[XP] Character Races

Started by G_G, January 28, 2010, 08:34:35 pm

Previous topic - Next topic

ShinyToyGuns

Is there a way to make this so it doesn't just trigger one actor, but a set of actors with the same race? i.e. Player chooses Elf race, then before they get to the class selection, it automatically makes them an Elf? To make this more clear, my situation is this: Player chooses race, and then they can choose the class, and then they are assigned an actor based on the class and race they choose.

Let me know if you need more detail.
Days
I've missed so many days
In a world that has become an unfamiliar place
Now to you, I'm just an unfamiliar face

~Shiny Toy Guns, Blown Away (2008)

G_G

You could do this.
$game_actors.each{|i| i.race = race_id}
That turns all actors into the same race. I think that'd do what you need.

ShinyToyGuns

So would I use that in an event script call when they choose their race?
Days
I've missed so many days
In a world that has become an unfamiliar place
Now to you, I'm just an unfamiliar face

~Shiny Toy Guns, Blown Away (2008)

G_G

Yes. After they choose the race. Just call that script and change race_id.

ShinyToyGuns

What if there are no actors in the Initial Party until they choose a class? I'd prolly have to put it in for each class, aye?
Days
I've missed so many days
In a world that has become an unfamiliar place
Now to you, I'm just an unfamiliar face

~Shiny Toy Guns, Blown Away (2008)

The Niche

Game_Guy, I'd first like to declare that I adore you.

Second, I looked at the script and I'm guessing that it;d be possible to limit weapons to races by messing with a copy of the skills yoke.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

G_G

You can just limit weapons through classes.

The Niche

I could, but I could also do the same with skills.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Griver03

can you maybe help me with a equipment by race plugin?
like

if shield => [[1, 0], [2,1], [3,2]]
if helmet... and so on...
id1 can be equped by all races, id2 can be equiped by raceid1 only, id3 can be equiped by raceid2 only...

thx in advance
My most wanted games...



Griver03

My most wanted games...



PhoenixFire

To start with, I do apologize for a... well, like 2 year necro-post. I do have legitimate questions though, and I know the creator is still active lolz..

1) Am I correct in thinking that by just changing the way it calculates bonuses, I could make it use a "percentage" instead of numbers?such as:

   @temp_stat=@new_stat
   @new_stat=(@temp_stat*1.5)


2) Is this called every time that Game_Actor is called? As in, if the character levels up, is there a way to make it recalculate the bonuses?
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

G_G

You'd have to modify the script a bit. The script subtracts and adds bonuses. The bonuses are calculated only once when you setup the player's race. Bonuses aren't added at every level up.

Marauder93

Is there an easy way to have the race be displayed in the menu right after the class? There's definitely space for it, as much space as there is for the actor name and class. I'm just getting into scripting so I personally haven't a clue how to do this yet.

KK20

Stick this to the end of the script:

class Window_Base < Window
  def draw_actor_race(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 236, 32, actor.race_name)
  end
end

class Window_Status < Window_Base
  alias draw_actor_race_after_refresh refresh
  def refresh
    draw_actor_race_after_refresh
    draw_actor_race(@actor, 4 + 144 * 2, 0)
  end
end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Marauder93

Right at the end of the races script? Didn't work for me, but like I said, still getting the hang of this so might be a tad confused...

KK20

Yes, just append the snippet to the end of G_G's script. Tested and works.

Did you put the script below Scene_Debug and above Main?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Marauder93

Yep. There's a few other scripts installed however, guess it might be a conflict...

pics



where I want the race name (right after class above hp)



KK20

August 29, 2014, 03:22:32 pm #37 Last Edit: August 29, 2014, 03:25:26 pm by KK20
Ohhhhhhh, that status window. Let me whip that up quick-like.

Append this to the bottom of what I put before.

class Window_MenuStatus < Window_Selectable
  alias draw_races_after_refresh refresh
  def refresh
    draw_races_after_refresh
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_race(actor, x + 144 * 2, y)
    end
  end
end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Marauder93

Worked! Much thanks ^_^ and made it look so easy. I really need to wrap my head around this stuff. Just got back into using rpg maker after quite a few years (making a 5th ed D&D inspired thing), so I'll be definitely be frequenting these parts.