THOM wrote:Duncan1246 wrote:
An unknown bug: I try to cast a "one icon"-water spell (my mistake, never tested in main game) and get this:
Code: Select all
[string "Champion.lua"]:0: attempt to index a nil value
stack traceback:
[string "Champion.lua"]: in function 'addTrait'
[string "Champion.lua"]: in function 'castSpell'
[string "RunePanel.lua"]: in function 'updatePanel'
[string "AttackPanel.lua"]: in function 'update'
[string "AttackPanel.lua"]: in function 'update'
[string "Gui.lua"]: in function 'draw'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
It seems, that it is not possible for the engine to add the trait to your champion, that he successfully learned a new spell.
I have no idea where this comes from and it exceeds my coding-skills.
Maybe the post of
AndakRainor can help?
Unless I am confusing it with something else, it appears to be a bug of the game engine I know well enough!
To explain it a little, it is a crash that occurs when an imported character casts a new spell for the first time. The game then tries to add the trait of that spell to the character, and for some reason at that point the game "checks" all the traits the champion has, and if it finds any trait that was defined in the previous game but not in the current mod, then it will crash.
Modders can't do anything about it with the official scripting reference methods (we cannot get a list of the traits a champion has).
My little editor lets you edit your saved game files and for example clean the unwanted traits that remain from your previous game.