party level

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
ian363
Posts: 55
Joined: Tue Dec 18, 2012 3:44 pm

party level

Post 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.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: party level

Post 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
Breath from the unpromising waters.
Eye of the Atlantis
ian363
Posts: 55
Joined: Tue Dec 18, 2012 3:44 pm

Re: party level

Post 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
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: party level

Post 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.
Post Reply