Info Portions vs Persistant Storage

User avatar
DoctorX
Trespasser
Posts: 52
Joined: 10 Mar 2016, 00:36

Info Portions vs Persistant Storage

Postby DoctorX » 26 Sep 2017, 01:59

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?

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1368
Joined: 26 May 2012, 22:26

Re: Info Portions vs Persistant Storage

Postby Alundaio » 26 Sep 2017, 20:13

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.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

User avatar
DoctorX
Trespasser
Posts: 52
Joined: 10 Mar 2016, 00:36

Re: Info Portions vs Persistant Storage

Postby DoctorX » 01 Oct 2017, 13:38

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?

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1368
Joined: 26 May 2012, 22:26

Re: Info Portions vs Persistant Storage

Postby Alundaio » 02 Oct 2017, 15:39

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.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

User avatar
DoctorX
Trespasser
Posts: 52
Joined: 10 Mar 2016, 00:36

Re: Info Portions vs Persistant Storage

Postby DoctorX » 02 Oct 2017, 18:55

Got it. Thanks!


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests