Page 1 of 1

Info Portions vs Persistant Storage

Posted: 26 Sep 2017, 01:59
by DoctorX
Any real benefit to using info portions as opposed to a pstor bool? For instance, is it in any way worse to use <precondition> that checks a pstor var for a dialog initiation instead of using <dont_has_info>? Better performance either way or just two different ways of doing the same thing?

Re: Info Portions vs Persistant Storage

Posted: 26 Sep 2017, 20:13
by Alundaio
infoportions would be faster. But infoportions list gets pretty huge. In engine infoportions is just a vector of strings (http://en.cppreference.com/w/cpp/container/vector), it either finds the the matching string or it doesn't when using has_info.

Re: Info Portions vs Persistant Storage

Posted: 01 Oct 2017, 13:38
by DoctorX
I've noticed sometimes they need to be pre-declared in info_portions.xml, whereas other times (for instance when using within tm_*.ltx), they don't. What is the criterea for needing to pre-declare them? Is it always a good idea to do so or is that no longer needed?

Re: Info Portions vs Persistant Storage

Posted: 02 Oct 2017, 15:39
by Alundaio
DoctorX wrote:I've noticed sometimes they need to be pre-declared in info_portions.xml, whereas other times (for instance when using within tm_*.ltx), they don't. What is the criterea for needing to pre-declare them? Is it always a good idea to do so or is that no longer needed?


They don't need to be predeclared, that is something that was necessary in soc, you couldn't use info at all unless you did. The purpose was also to do things when certain info was given


<info_portion id="ui_pda">
<disable>ui_pda_hide</disable>
</info_portion>
<info_portion id="ui_pda_hide">
<disable>ui_pda</disable>
</info_portion>

Like this was supposed to remove ui_pda_hide info from the player when he was given ui_pda, and visa versa. But it doesn't work anymore. That is why in info_portions.script there are "info switches" to fix these broken infos.

Re: Info Portions vs Persistant Storage

Posted: 02 Oct 2017, 18:55
by DoctorX
Got it. Thanks!