Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

shared exp

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
BlastedEarth




Joined: 05 Oct 2009
Posts: 243

PostPosted: Fri Jan 15, 2010 10:32 am    Post subject: shared exp Reply with quote

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
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Jan 15, 2010 1:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Fri Jan 15, 2010 1:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
BlastedEarth




Joined: 05 Oct 2009
Posts: 243

PostPosted: Tue Jan 19, 2010 9:44 am    Post subject: Reply with quote

Great, thanks a lot for this!
_________________
So many ideas, so little focus. Monk spirit please lend me your power!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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