XP from monsters for whole party?
XP from monsters for whole party?
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?
Easily doable with custom onDie hook
Re: XP from monsters for whole party?
Good to know, thanks Petri.
Re: XP from monsters for whole party?
Hey, I managed to get a working script for this.
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?
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
}
Is there a better way to write my script, or a way to get a hook on the "+ XP" in-game display?
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Re: XP from monsters for whole party?
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,
}
A trip of a thousand leagues starts with a step.
Re: XP from monsters for whole party?
Edit:
While that does clean up my code a bit, it still doesn't solve that display issue.
While that does clean up my code a bit, it still doesn't solve that display issue.