 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
BlastedEarth

Joined: 05 Oct 2009 Posts: 243
|
Posted: Fri Jan 15, 2010 10:32 am Post subject: shared exp |
|
|
is it possible to give the swapped out characters some experience everytime the main party gets some? so they wouldn't be left out... _________________ So many ideas, so little focus. Monk spirit please lend me your power!
 |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Fri Jan 15, 2010 1:18 pm Post subject: |
|
|
You can indirectly find out how much experience a hero gained by checking how much experience they have before and after a battle, using the 'plot:total experience' command. This is a bit tricky, because if you check any single hero, they might be dead and not have gained any XP. So here's a really ugly instead-of-battle script that checks the XP gained by all the heroes in the battle party and then gives all the heroes in the reserve party the same amount:
Code: | plotscript, insteadofbattle, formation, begin
variable (b0, b1, b2, b3, a0, a1, a2, a3, gained)
if (hero by slot (0) <> -1) then (b0 := total experience (0))
if (hero by slot (1) <> -1) then (b1 := total experience (1))
if (hero by slot (2) <> -1) then (b2 := total experience (2))
if (hero by slot (3) <> -1) then (b3 := total experience (3))
fight formation (formation)
if (hero by slot (0) <> -1) then (a0 := total experience (0))
if (hero by slot (1) <> -1) then (a1 := total experience (1))
if (hero by slot (2) <> -1) then (a2 := total experience (2))
if (hero by slot (3) <> -1) then (a3 := total experience (3))
if (a0 >> b0) then (gained := a0 -- b0)
if (a1 >> b1) then (gained := a1 -- b1)
if (a2 >> b2) then (gained := a2 -- b2)
if (a3 >> b3) then (gained := a3 -- b3)
variable (i)
for (i, 4, 40) do (
if (hero by slot (i) <> -1) then (give experience (i, gained))
)
end |
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Fri Jan 15, 2010 1:45 pm Post subject: |
|
|
There's a "dead heroes get XP" bitset now, isn't there? Presumably, if the people who didn't participate get XP, the dead ones who did should, too. _________________
|
|
Back to top |
|
 |
BlastedEarth

Joined: 05 Oct 2009 Posts: 243
|
Posted: Tue Jan 19, 2010 9:44 am Post subject: |
|
|
Great, thanks a lot for this! _________________ So many ideas, so little focus. Monk spirit please lend me your power!
 |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|