The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: darkelementwars on February 22, 2007, 05:04:11 AM

Title: Not in Party gaining experience? [Resolved]
Post by: darkelementwars on February 22, 2007, 05:04:11 AM
I did I quick search and didn't find anything so I thought I'd ask

is there a way you can make it so that characters who aren't in your active party are still gaining experience, at say, 50% of the level of the characters in the active party?
Title: Re: Not in Party gaining experience?
Post by: Blizzard on February 22, 2007, 04:40:13 PM
Find "def start_phase5" in Scene_Battle. Scroll down until you find lines that should look similar like this:

for actor in $game_party.actors
  if not actor.dead?
    actor.exp += exp
  end
end


Add below these lines here:

for i in 1...$data_actors.size
  unless $game_party.actors.include?($game_actors[i])
    $game_actors[i].exp += exp/2 unless $game_actors[i].dead?
  end
end


This should work fine. Everybody who's not in the party and not dead will gain 50% of the battle EXP. :)
Title: Re: Not in Party gaining experience?
Post by: Elistios on February 22, 2007, 05:08:41 PM
http://www.geocities.com/mavric_silver/XP_OUTSIDE_PARTY.JPG

Here is my solution in RM2003 but it must be similar in XP

Sorry i dont have a demo cuz my Geoshities dont alow me to import zip or rar files.

Anyway to give you a quick explaination of my way of doing it, first creat a quick set of 1 variable and 1 switch.

Variable name: EXP STORED
SWITCH NAME: XP DISTRIBUTION

Then, i have defined a monster to fight(make sure to know how much xp this monster give) then got on my M.Groupe to have a new fight with that monster that give 100xp and there is only 1 monster so that make it easy to count.

On the M.groupe battle i have make the trigger so that when the monster HP is = 0 then add 100 to my current variable EXP STORED as i know this fight will give 100 xp.

- Then activated on the switch : XP DISTRIBUTION (that is related to the even on the main map)

once the battle if finish, the paralelle process of that switch simply take EXP STORED Value and divide it by 2.

Once it's divided by 2 i have use the change experience and have put the stored value of the variable EXP STORED and simply add it to whoever character you like.

The only problem with my methode is that you have to set up this little trigger on each parties of monster that you create while counting the total amount of xp the whole Battle will generate and use the same patern as i just used.

For the need of this demo i have put 2 characters on the party and before the battle start, remove the second party member then after the fight put into the first line of our XP DISTRIBUTION switch to add this character back so we can see the diffrence.

Another major problem will be if you are using this for character that are leaving the party for a story purpose and will be back later, this is juste perfect for you but in the other hand if you plan on having a FF3 like switch character base game that make the randomness of the team a problem on whitch hero you gave the remaining xp (as this is hard to know what party the player will generate so make it difficult to know who's fighting and who's not).

to avoid this you will have to make some more variable (using a way that i have not search for so i dont know personaly how to use it) and make it possible to find what \n[n] Character should have the xp or not.

For this second part i will call for help with the rest of you guys to complete your part of this.

Hope this help!

Elistos
Title: Re: Not in Party gaining experience?
Post by: darkelementwars on February 22, 2007, 07:29:21 PM
thanks for all the help guys!

(obtw blizz u accidentally put in aize instead of size.  just a note in case any one else wants to use those scripts)
Title: Re: Not in Party gaining experience? [Resolved]
Post by: Blizzard on February 22, 2007, 08:24:21 PM
(https://rmrk.net/proxy.php?request=http%3A%2F%2F209.85.12.227%2F6999%2F66%2Femo%2Fshithappens.gif&hash=3a327b0c14ba471ba5495917a914bc034c539476)

I'll include it into Tons of Add-ons, lol!

@Elistios: That's a cool system. But in RMXP this can be done fastly by script. You should post this demo in the tutes section separately. :) BTW, use sendspace.com for your demo. ;)
Title: Re: Not in Party gaining experience? [Resolved]
Post by: Elistios on February 23, 2007, 12:07:29 AM
http://www.sendspace.com/file/pg1s9d

Thanks for the Info Blizzard ^-^ v

BTW: This is the whole Project file in a rar. format for RPG Maker 2003 so please make sure to
have the RTP for that version of RPGM2k3