The forum has been set to read-only mode. For community discussion and questions, head over to our Discord: https://discord.taleoftwowastelands.com

Suggestion: use UDFs instead of stage results (TTWFunctions)

Have something to say about Tale of Two Wastelands or have an idea for a new feature? Let us know here.
Post Reply
DoctaSax
Posts: 6
Joined: Wed Aug 14, 2013 7:29 pm

Suggestion: use UDFs instead of stage results (TTWFunctions)

Post by DoctaSax » Mon Dec 22, 2014 11:09 pm

The title says it all, really. Over at LL's fallout section, most scripters agree declaring local variables in result scripts should be avoided, as those variables are thought to occasionally overwrite the memory allocation of the variables to the attached quest script, or the dialog speaker (in dialog result scripts). One of those bugs that don't always happen, or for everybody, or under the same circumstances, but is hard to track down if it does.


Since TTW requires NVSE anyway, and NVSE's 'stable' release of 4.5.7 comes with UDFs, I suggest copying the stage result code from TTWFunctions to UDFs, which is what the stage results were probably meant to mimic anyway. For ease of use you could even make the UDF calls from the stage results, and avoid tracking down all references to them.


Apologies if this is already being considered. It just caught my eye. :)

JaxFirehart
Posts: 3003
Joined: Wed Sep 12, 2012 12:33 am

Yeah we only just decided to

Post by JaxFirehart » Mon Dec 22, 2014 11:27 pm

Yeah we only just decided to require NVSE and so a lot of stuff is still written with the asumption that the user does not have NVSE.



DoctaSax
Posts: 6
Joined: Wed Aug 14, 2013 7:29 pm

JaxFirehart wrote:

Post by DoctaSax » Mon Dec 22, 2014 11:32 pm

[quote=JaxFirehart]


 


Yeah we only just decided to require NVSE and so a lot of stuff is still written with the asumption that the user does not have NVSE.


[/quote]


Sure. I just figured I'd point out the local vars in results issue, in case that's not on your radar.



Post Reply