Toorum mode - scripts and poll

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Toorum mode - scripts and poll

Post by Xanathar »

In the last days I played a lot of mods using Toorum, specially all of those who reduce the party to a single character, because as I said elsewhere I'm a dirty cheater :lol:

Some magically works (Big friendly warden), some have odd issues (Wine basement - so far at least, This Rotten Place), some work ok with a varying range of difficulty from being much easier to being much harder (One Room Round Robin up to my room), others can't be completed (none so far, but it's not difficult to figure this scenario).

I think we have these choices:
  • Do not meddle with enabled/disabled champions, do not meddle with champion inventories, be careful with party iterations and Toorum magically works (sometimes, the Toorum bugs can be subtle however; for example you cannot ask the party to sacrifice the life of a champion!).
  • Detect Toorum mode, and kill the party instantly at startup, saying "hey, use a normal party ok ?" (see below)
  • Convert Toorum party to a standard one (see below)
  • Pray the devs to disable Toorum for mods in the next release
  • Do some heavy development to support Toorum (totally not trivial and quite time consuming) and playtest it at least twice.
I have made this two functions to help supporting Toorum:

Detect if standard Toorum party:
SpoilerShow

Code: Select all

function isToorumMode()
	local rangerDetected = 0
	local zombieDetected = 0

	for i=1,4 do
		local c = party:getChampion(i)
		if (c:getClass() == "Ranger") then 
			rangerDetected = rangerDetected + 1
		end
		if (not c:getEnabled()) and (c:getStatMax("health") == 0) then 
			zombieDetected = zombieDetected + 1
		end
	end
	
	return (rangerDetected >= 1) and (zombieDetected == 3)
end
De-zombify Toorum party
If you try to setEnabled/heal a toorum party, you end up with a party of zombies.
After running this function once, real but very weak characters would come out of that resurrection process. Note that this is very basic - for example all characters will be fighters. Change that to suite your tastes :) but consider that Toorum is very strong by himself so surrounding him with strong champions would probably unbalance the game.
SpoilerShow

Code: Select all

function DezombifyParty()
	local portraits = { "human_female_01", "human_female_02", "human_male_01", "human_male_02" }
	local genders = { "female", "female", "male", "male" }
	local names = { "Sylyna", "Yennica", "Contar", "Sancsaron" }

	for i=1,4 do
		local c = party:getChampion(i)
		if (c:getStatMax("health") == 0) then 
			c:setStatMax("health", 25)
			c:setStatMax("energy", 10)
			c:setPortrait("assets/textures/portraits/" .. portraits[i] .. ".tga")
			c:setName(names[i])
			c:setSex(genders[i])
		end
	end
end

I think at the very least we should specify in the mod description if Toorum is supported or not..

What do you think ?
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Toorum mode - scripts and poll

Post by Komag »

Wow, thank you for this. I think most authors forget about Toorum, and I would love to see him more supported and accommodated for sure! :)
Finished Dungeons - complete mods to play
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Toorum mode - scripts and poll

Post by Montis »

Well, I actually did a "special mode" with Toorum for my Hypercube (first community contest winner) but apparently no one figured that out by themselves. :D

I didn't mention it at first and only hinting at it later since Toorum is a secret and thus should be handled as one. :)


btw, my script to detect him was something like this:

Code: Select all

function isToorumMode()
   if party:getChampion(1):getClass() == "Ranger" then
      return true
   else
      return false
   end
This works at the very start of the dungeon since when you enter the name Toorum, you will always have Toorum at the first position. I also did only a check at the start of the dungeon, so I didn't need to account for checks later. Else I might just have saved a variable that stores true or false.
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
User avatar
Brodie301
Posts: 286
Joined: Sun Apr 08, 2012 6:00 pm
Location: Mississippi, USA

Re: Toorum mode - scripts and poll

Post by Brodie301 »

My mod uses the "Ranger" but not Toorum. If you use default character it's Contar with 0 stats but that's in the editor. I haven't played the dat to see if I adjust stats how it plays out. I know I'm limiting the player who might download my mod but if I tell them upfront I don't see where that is a problem.
The FORCE is with me!!!
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: Toorum mode - scripts and poll

Post by Xanathar »

The script in the original post detects Toorum mode without getting mistaken on other rangers (it checks for zombie champions too, which are actually the problem, not Toorum himself).
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Toorum mode - scripts and poll

Post by Montis »

Xanathar wrote:The script in the original post detects Toorum mode without getting mistaken on other rangers (it checks for zombie champions too, which are actually the problem, not Toorum himself).
Well, if you implement "other rangers", this can only be done (yet) by the author of a map if I'm not mistaken. So he would know best how / if he added Rangers :P
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: Toorum mode - scripts and poll

Post by Xanathar »

Well, if you implement "other rangers", this can only be done (yet) by the author of a map if I'm not mistaken. So he would know best how / if he added Rangers
Sure, but then you would have to worry about the order of execution of script entities if you put it into two different entities.. nitpicking I know :)
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Toorum mode - scripts and poll

Post by Montis »

Yeah I actually had some problems with that but if you put all the functions into one entity and just call the check at the end, it's no problem :)
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
Post Reply