Page 1 of 1
How to clone potions.
Posted: Mon Oct 08, 2012 6:26 pm
by Obyvvatel
I already have many informations here
http://www.grimrock.net/modding/asset-d ... reference/ ,but I don't know how to apply all those parameters. For example I want to make potion that adds stronger rage effect to all party members for about 2 minutes and i just typed that:
cloneObject{
name = "Ultra_violence_potion"
baseObject = "rage_potion" (this probably have diffrent name)
And what I can do next?

Re: How to clone potions.
Posted: Mon Oct 08, 2012 6:28 pm
by Neikun
I think rage is a hard coded game effect D: Just like speed.
Re: How to clone potions.
Posted: Mon Oct 08, 2012 6:29 pm
by Obyvvatel
Ok, but maybe i can increase attackpower for those 2 minutes?
Re: How to clone potions.
Posted: Mon Oct 08, 2012 6:42 pm
by crisman
I think is (haven't tested):
onUseItem = function (self, champion)
champion:setCondition("rage", 120)
end,
Or something very similar.
I don't know if 120 is in seconds.
Re: How to clone potions.
Posted: Mon Oct 08, 2012 8:45 pm
by Obyvvatel
I read some texts and i figured out how to do this, but i don't know how to make the effect running on every party member. LoL, you probably wouldn't understand me

Re: How to clone potions.
Posted: Mon Oct 08, 2012 9:14 pm
by crisman
Oh, sorry, did not understand that part :S
I'm not sure this will work inside a hook. But you can give it a try:
onUseItem = function (self, champion)
for i = 1, 4 do
party:getChampion(i):setCondition("rage", 120)
end
return true
end,
if it won't works, you can always add a function inside the hook:
onUseItem = function (self, champion)
potions.violence()
return true.
end
an ingame add a script with an ID 'potions'
function violence()
for i = 1, 4 do
party:getChampion(i):setCondition("rage", 120)
end
end
Right now I cannot test anything - I always do something wrong, like a " missing or something similar - , so sorry if this crashes your editor, but later I'll give it a try too.