Toggled collision changes states between saves

Any bugs found while playing or testing the engines for both PC and Android

Toggled collision changes states between saves

Postby zach_holbrook » Tue Sep 12, 2017 2:17 am

Not sure if this is a known issue or not, but I am able to reproduce it consistently: if I use the script gaToggleAreaSquareWalkable to change the default collision settings (either false or true) of squares in an area, loading a saved game reverts to the default collision settings (potentially trapping adventurers!).
zach_holbrook
 
Posts: 141
Joined: Mon Dec 26, 2016 5:52 am

Re: Toggled collision changes states between saves

Postby youngneil1 » Tue Sep 12, 2017 1:03 pm

Good catch, Zach. I wasnt aware of the issue, I put it on the list of things to fix. Without you guys input we would never be able to do the IB project, many thanks again.
User avatar
youngneil1
Backer
Backer
 
Posts: 4617
Joined: Sat Dec 08, 2012 7:51 am

Re: Toggled collision changes states between saves

Postby zach_holbrook » Tue Sep 12, 2017 11:48 pm

Of course -- thanks for fixing things!
zach_holbrook
 
Posts: 141
Joined: Mon Dec 26, 2016 5:52 am

Re: Toggled collision changes states between saves

Postby youngneil1 » Wed Sep 13, 2017 2:26 pm

I think what I will do is to add a new IBScriptHook that is called for when loading a savegame. This hook in combination with global variables (if gobal var = x, set walkable to true) can be used to set states of properties that are by default read from module and not from savegame (like walkability of a tile).

Walkability of a tile is not bound to savegame data because expanding campaigns might need to open up former non-walkable areas - for existing savegames as well. The most recent version of the module file itself is therefore always used to determine walkability, regardless of the save.

Still, as Zach correctly pointed to, there are also situations where walkability has to be stored in the savegame (eg new passage unlocked by quest progress). And here the mentioned new scipt hook comes into play. Savegames store the values of global variables. So, an author can use these in combination with the new script hook to override the walkability state form the recent module version.

This is hopefully a flexible solution for manually handling the save data vs module data conflict in a fitting way.

Ah, harder to put in words than I thought, I hope it still makes some sense...
User avatar
youngneil1
Backer
Backer
 
Posts: 4617
Joined: Sat Dec 08, 2012 7:51 am

Re: Toggled collision changes states between saves

Postby slowdive » Wed Sep 13, 2017 3:15 pm

Or the builder could use an invisible prop with collision and delete the prop to make it passable. Or have a trigger that does a check and either let's you stay on the square or does the transition to last square (Pongo used this in the elderin stone for all the torches on walls and pictures on walls).
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 2966
Joined: Wed Nov 21, 2012 11:58 pm

Re: Toggled collision changes states between saves

Postby zach_holbrook » Thu Sep 14, 2017 12:57 am

Ah, that makes a lot of sense. That will be easy to do. Trying it out!
zach_holbrook
 
Posts: 141
Joined: Mon Dec 26, 2016 5:52 am


Return to Engine Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron