Page 1 of 1
XP from monsters for whole party?
Posted: Tue Sep 18, 2012 5:17 pm
by Aexrael
In the base game monsters give XP only to party members which successfully deal damage, is this hardcoded in the engine or is it something like monsters are coded that way and it could be overwritten via scripts?
Re: XP from monsters for whole party?
Posted: Tue Sep 18, 2012 5:24 pm
by petri
Easily doable with custom onDie hook
Re: XP from monsters for whole party?
Posted: Tue Sep 18, 2012 7:32 pm
by Aexrael
Good to know, thanks Petri.
Re: XP from monsters for whole party?
Posted: Thu Sep 20, 2012 12:35 am
by Huff
Hey, I managed to get a working script for this.
Code: Select all
-- Fixed EXP monsters
cloneObject
{
name = "snail",
baseObject = "snail",
exp = 0,
onDie = function(self, dir)
party:getChampion(1):gainExp(60)
party:getChampion(2):gainExp(60)
party:getChampion(3):gainExp(60)
party:getChampion(4):gainExp(60)
end
}
I ran into one minor issue though. When a monster is killed, the "+ XP" display in-game will show up as 0 because it's still attached to the exp = function.
Is there a better way to write my script, or a way to get a hook on the "+ XP" in-game display?
Re: XP from monsters for whole party?
Posted: Thu Sep 20, 2012 12:43 am
by cromcrom
Try this
Code: Select all
cloneObject
{
name = "snail",
baseObject = "snail",
exp = 0,
onDie = function(self, dir)
for i=1,4 do
party:getChampion(i):gainExp(60)
end
end,
}
Re: XP from monsters for whole party?
Posted: Thu Sep 20, 2012 1:09 am
by Huff
Edit:
While that does clean up my code a bit, it still doesn't solve that display issue.