Page 1 of 1

party level

Posted: Tue Jun 09, 2015 9:19 pm
by ian363
Hi, could someone help. I need to test some puzzles with higher level party (cast spells, survive punishment, etc). Is there a way to start editor with a higher level group. I tried to search the forum but it failed because of common words in search. Thanks Ian

PS I have no idea about writing scripts.

Re: party level

Posted: Tue Jun 09, 2015 9:24 pm
by Drakkan
insert object called script_entity inside your dungeon anywhere and name it anyhow. than copy + paste inside for example this

Code: Select all

function getexperience()
party.party:getChampion(1):gainExp(1000)
party.party:getChampion(2):gainExp(1000)
party.party:getChampion(3):gainExp(1000)
party.party:getChampion(4):gainExp(1000)
end
you can modify exprience number of course how you wish.
than just place any trigger (plate etc...) and connect it to the script. If you want start it automatic, then you can use timer for example. hope it helped a little

Re: party level

Posted: Tue Jun 09, 2015 9:26 pm
by ian363
Drakkan wrote:insert object called script_entity inside your dungeon anywhere and name it anyhow. than copy + paste inside for example this

Code: Select all

function getexperience()
party.party:getChampion(1):gainExp(1000)
party.party:getChampion(2):gainExp(1000)
party.party:getChampion(3):gainExp(1000)
party.party:getChampion(4):gainExp(1000)
end
you can modify exprience number of course how you wish.
than just place any trigger (plate etc...) and connect it to the script. If you want start it automatic, then you can use timer for example. hope it helped a little
Thanks, I'll give it a go. Ian

Re: party level

Posted: Tue Jun 09, 2015 9:29 pm
by Azel
ian363 wrote:Hi, could someone help. I need to test some puzzles with higher level party (cast spells, survive punishment, etc). Is there a way to start editor with a higher level group. I tried to search the forum but it failed because of common words in search. Thanks Ian

PS I have no idea about writing scripts.
Without writing any script? Export your dungeon and make sure the DAT file is in the Dungeons folder for Grimrock 2 (it should default there when you click Export). Load up the game, go to Custom Dungeon and select your map, then simply "import" the high-level party from a previous game (eg, the group you used to beat the main campaign of Grimrock). Easy enough. And this way you can test out any Save/Load bugs as well.

Otherwise you need script. You can connect a floor trigger to this:

Code: Select all

function AddPartyExp()
	for i = 1,4 do
		party.party:getChampion(i):gainExp(5000); -- gains 5,000 experience
	end
	hudPrint("5,000 experience gained!");
end

That code assumes you will have all 4 party members, if not adjust the number or do a "if not nil" check.