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.
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
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 ?