Info Portion

Discussions on Modding of S.T.A.L.K.E.R. SoC & Clear Sky

Info Portion

Postby jamie1992 on 19 Feb 2009 14:45

Hey all, ok so basicaly, i built a script to give me all main infoportions, i asked natvac and he provided me with alot of usefull help, however, when i use his technique, it crashes the game and breaks the engine, (i had a 800KB log with just fatal errors from top to bottom), and if i do it via dialog it dosent work 100% it leaves parts out, so i was wondering, does anyone have a good way for which i can induce the game into giving the player all Infoportions on game start?

Cheers

Jamie
Wu Tang! Wu Tang! Wu Tang!
User avatar
jamie1992
Senior Resident
 
Posts: 802
Joined: 12 Sep 2008 23:04
Location: Oxford, Oxfordshire, United Kingdom

Re: Info Portion

Postby Nightwatch on 19 Feb 2009 19:55

First of all, I think NatVac can answer much better why such a problem occured, after all you say that he sent you the script. I suspect it may not an ideal thing fo you to try to get "all" infoportions at the start of the game (selected many, maybe. But the whole?) I can't remember from top of my head right now, but I suspect there are many contradicting info potions in the game. I haven't tried getting all the info portions in the game at once, but what would you do about the different and sometimes opposing info portions for the same single event that say that a specific mission -or an event- done or not done, failed, etc. Wouldn't it be contradicting in the game engine to handle the proceeding events?
NEWSA.SIMBION_TWEAK 3.0
Mod Website= Features, Video, Tips & Download Link: NEWSA.SIMBION_Tweak

Watch the Trailer: http://www.youtube.com/watch?v=1Ajw_f8K ... re=channel
Please Do Not download and install any files from links other than those on the Mod's Website
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Re: Info Portion

Postby EggChen on 19 Feb 2009 23:33

It could be the contradiction, or a memory issue. Remember all the talk about available memory with russao and his teleports in Inferno 1.2.

Maybe the game cannot simply store all those packets of data, after all many were never really used and as Nightwatch points out, some designed to be 1 or the other. I found infoportions that relate to cut out content, zombie_rise, dead_city, etc, etc. I'm guessing Natvac only sent you the ones in use, but even then there are many that have multiple possibilities, like yan_scientist_dead and yan_scientist_rescued, etc, etc.

I'm pulling those infoportions from memory, they could well be inaccurate but hopefully the point is there ;)

So, what you up to Jay??
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Re: Info Portion

Postby jamie1992 on 19 Feb 2009 23:49

Just trying to open the zone, so that all infoportions are open, to enhance my mod, and also make it so that the zone is freeplay and open, i already got rid of things like flashdrives and documents and stuff, just infoportion parts i need to fix up.
Wu Tang! Wu Tang! Wu Tang!
User avatar
jamie1992
Senior Resident
 
Posts: 802
Joined: 12 Sep 2008 23:04
Location: Oxford, Oxfordshire, United Kingdom

Re: Info Portion

Postby Nightwatch on 20 Feb 2009 00:39

jamie1992 wrote:Just trying to open the zone, so that all infoportions are open, to enhance my mod, and also make it so that the zone is freeplay and open, i already got rid of things like flashdrives and documents and stuff, just infoportion parts i need to fix up.


ZRP offers an open zone from the start and you can jump from escape (cordon) into various other parts. Why don't you use ZRP last version (it's not compatible with NEWSA, but should be compatible with vanilla based mods) to get those "necessary" (not all) info portions. I think NatVac explains in ZRP how to merge this function.
NEWSA.SIMBION_TWEAK 3.0
Mod Website= Features, Video, Tips & Download Link: NEWSA.SIMBION_Tweak

Watch the Trailer: http://www.youtube.com/watch?v=1Ajw_f8K ... re=channel
Please Do Not download and install any files from links other than those on the Mod's Website
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Re: Info Portion

Postby jamie1992 on 20 Feb 2009 00:46

Yeah, natvac explained alot to me, and i followed his thing, but i still cant get it to work flawlessly, and its starting to tick me off, as its delaying Faction Wars V1.01.
Wu Tang! Wu Tang! Wu Tang!
User avatar
jamie1992
Senior Resident
 
Posts: 802
Joined: 12 Sep 2008 23:04
Location: Oxford, Oxfordshire, United Kingdom

Re: Info Portion

Postby Nightwatch on 20 Feb 2009 02:11

Why don't you enable all your wanted Level Changers from the all.spawn? (NEWSA is using a different all.spawn and a different way (mostly) of handling Level Changers, so as I don't have a vanilla all.spawn right in front of me, I can't immediately point the relevant matters to you, but I guess you have an open one as you're working on a mod, so you can see the way how all proceed there.)


EDIT:

OK, after another -a more careful- reading of your post, I noticed that my above post is too simple and that you (I think) want to make all NPCs and factions behave as if they are at the end of the game. Correct? So you need the necessary info portions that would have been received by that time (end of game time) Correct me if I'm wrong.

For this,you need to be specific in your "info portions" selection, as you cannot get "all" info portions. As it's obvious, a mission cannot have "successful ending and a failure ending at the very same time," because on either occasions different things are allowed to happen; while some missions (which may check if a certain NPC dead or alive, too) end over there, some others give way and lead to some other events which are set differently depending on the result of that mission, and on the info portion received in that respect, of course.
In some mods which also offer freeplay, when you've finished the game and before starting their freeplay continuation, you would've finished the "one way section" (up to that point) of the game in a certain way, not in all possible ways.

Either go through the files and specify the info portions that you want, or tell us how you want your game to shape up (or, in what way it should end up before freeplay, as if it was the continuation of a normal game) then we can put those info portions into your game at the start of the game, once you know what you'll include that's the easiest part.
NEWSA.SIMBION_TWEAK 3.0
Mod Website= Features, Video, Tips & Download Link: NEWSA.SIMBION_Tweak

Watch the Trailer: http://www.youtube.com/watch?v=1Ajw_f8K ... re=channel
Please Do Not download and install any files from links other than those on the Mod's Website
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Re: Info Portion

Postby NatVac on 20 Feb 2009 22:08

Ah, grasshoppah, one does not need info_portions. One needs understanding. To acquire understanding, one needs study and contemplation of same. To study, one needs patience.

Unfortunately, patience is not granted to all who matriculate at the school of hard knocks.


Larry Wall has a saying about programmers: "Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." While this works most of the time, impatience is not profitable in the long run when dealing with learning and research. (Dealing with incompetence is another matter.)

I don't think I'm capable of telling you how to do it.* I'll hazard guesses (because you didn't post any examples of what the errors were) as to what the possible problems might be.

First: I gave you no "technique". I answered your questions: one about how to give yourself info_portions and one on where to find the info_portions used by the game. I threw in a couple of caveats, and mentioned I'd done this in the ZRP.

You also posted to the GSC forum in the ZRP thread asking the same questions. I suggested reading the ZRP thread starting with my October 23, 2007 post. Later posts mentioned the problems and solutions to the info_portion dilemma; cf. my post on November 3, 2007.

To requote myself (and echo others): "You really should get the ZRP and study it." The original quote was in reply to you, Jamie1992 -- and the point of the associated (asterisked) joke about the daughter in college repeatedly requesting parental money may have gone over your head. The Zone Reclamation Project, version 1.05 Test R6 or later, has the most complete set of info_portions, with the engine to provide them in a game-compatible fashion.

But you want a "hack". I don't think a hack will suffice here. Maybe an alternate approach is better; see "Let's elevate the question" below. Meanwhile, here are some considerations:

    Problem #1: You can't give yourself the info_portions all at once in db.script's add_actor() or via dialog, as the game needs to digest and process the news of one info_portion before it can deal with subsequent one that is related. Case in point: The two info_portions given at the door to X18 in Dark Valley. Study _dev.script in the ZRP to see how this is done with a queued table that is processed as needed via the nv_need_update flag in bind_stalker.script's actor_binder:update() function.

    Problem #2: As I mentioned in my first comment to you, some info_portions are "ungiven" after being given. But you can't "unget" in the same breath you used to "get". In the early version of the TZIO function of the ZRP, a crash resulted from a lack of Barkeep's dialog paths because the game engine didn't properly handle the needed removal of an info_portion -- it did nothing and the info_portion stuck. Again, see _dev.script.

    Problem #3: The task_nn.script files are a starting point. Many info_portions are not actually used by the game, and some used ones are not in the files -- you find them out when some tasks don't complete the way you expect. You have to track down the associated info_portions in the dialog and gameplay XML files. Oh, wait -- the ZRP already has these. :P And it helps you avoid Problem #3a: Some info_portions are for alternate paths or failures, like bar_rescue_research_corruped, bar_rescue_research_fail -- and yes, Nightwatch, you can get bar_rescue_research_done (good; it means you succeeded) and bar_rescue_research_fail (it can mean failure, or simply that you returned to the Bar after rescuing Kruglov before going to Yantar) in the same vanilla game.

    Problem #4: There are some all.spawn and LTX file items that are dependent on these info_portions in ways you might not expect. A minor example: As you move along the road to the Scorcher in Red Forest, you pass Duty and Freedom's OK Corral gunfight at the south end of the road to Pripyat. Then you trigger the testosterone-laden dialog between their leaders as you move farther up the road toward the Scorcher. Why? Because you have the info_portion that says the Scorcher is off, in free play.

    Feature-not-bug #5: The Law of Unintended Consequences: The free-play you can get with this will result in scripted behavior differences. For example, the robber loners that plague Yurik in vanilla will usually side with him guarding the Garbage hangar if you get the associated info_portions. The Freedom traitor Pavlik will be neutral initially, but he will suddenly turn on you.

¯¯¯¯¯¯¯¯¯¯
Let's elevate the question: Why do you need to have all the info_portions? If you are going to start a new game with free play enabled, why not just skip the storyline to start with and see what happens? The ZRP is meant to provide a means to insert yourself into the game at any point in the story -- and that just happens to include the end (e.g., free play) -- but you sounded like you just wanted to remove the story from the playing field.

In that case, this is what I'd look at: First, don't "start the action"; try not giving yourself storyline_actor_start in bind_stalker.script. Then remove all the conditionals from tasks, and the checks in space_restrictors and other places in the all.spawn and LTX files.

I wonder if that's what XiaNi did... Anyway, whichever way you go, you will need a lot of patience. I recall that you wanted to "roll your own" instead of using XiaNi's approach. In that case you need to stop hacking and start learning.

¯¯¯¯¯¯¯¯¯¯
EggChen, Nightwatch: I didn't send any script; I just referenced the task_nn.script files that accomplish the same task -- and I recommended studying the ZRP, the same way you guys did. As you can see, it's not the same problem as the variable storage issue Russao encountered.

__________
*I've read that book; it's called "Nancy Drew and the Case of the Nagging Nymlit". Unfortunately I read it after I became "a quivering, burbling mass of weepy protoplasm". :P
NatVac
Resident
 
Posts: 152
Joined: 16 Sep 2008 00:13
Location: Texas

Re: Info Portion

Postby EggChen on 21 Feb 2009 00:53

You crease me up Natvac, thanks for the lesson, as always :-k
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Re: Info Portion

Postby Nightwatch on 21 Feb 2009 01:20

Ah NatVac, another brilliant writing again; (beside the deep knowledge pool that we all enjoy) professional authors who aim for literary awards should wish they could write half as good as you do. :thumbright:
NEWSA.SIMBION_TWEAK 3.0
Mod Website= Features, Video, Tips & Download Link: NEWSA.SIMBION_Tweak

Watch the Trailer: http://www.youtube.com/watch?v=1Ajw_f8K ... re=channel
Please Do Not download and install any files from links other than those on the Mod's Website
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Re: Info Portion

Postby jamie1992 on 21 Feb 2009 02:19

Oh damn thats a large post, ill have to read it modnay, wont be half asleep/drunk/hung over.

So monday will eb the day i red it.
Wu Tang! Wu Tang! Wu Tang!
User avatar
jamie1992
Senior Resident
 
Posts: 802
Joined: 12 Sep 2008 23:04
Location: Oxford, Oxfordshire, United Kingdom

Re: Info Portion

Postby jamie1992 on 27 Feb 2009 23:02

Maybe i put my point across incorrectly and with wrong wording, i didnt mean it in such a way as to offend you Natvac, if i have please accept my apologise, say, would it be possible for me to build Faction Wars V1.01 ontop of ZRP? This way, people can play with the choice of being able to skip story or just follow it etc.

Anyway, its up to you, i shall take what you said into mind, and research some more files, cheers Natvac, i owe you a beer or something.

And sorry for late reply, only just had the chance to get on here properly for the first time so to speak.
Wu Tang! Wu Tang! Wu Tang!
User avatar
jamie1992
Senior Resident
 
Posts: 802
Joined: 12 Sep 2008 23:04
Location: Oxford, Oxfordshire, United Kingdom

Re: Info Portion

Postby NatVac on 01 Mar 2009 05:56

Trust me on this, jamie1992: I'm considered blunt by many. I prefer the term direct. If I am angry with someone, I tell them, and not always with even a dash of tact, although you'll see lots of Tabasco(TM).

Perhaps you are reacting to the perceived tone on the clarification about "technique", but don't sweat it. If I were upset with you, I would not have answered you with the detail I provided.

As you've seen in the readme (good for you!) there's no prob using the ZRP as a base for your mod, although I don't recommend R11 as it is still being worked on, other than the all.spawn changes. The best version to use at the moment is 1.05 Test R10, the one you were intending to use. (You might want features from R11, but they will have to be copied by hand for now.) The MM/AS/ZRP 1.05 R11 demo has a few mini-mods on top of the otherwise-unreleased R11, as that was the best way to integrate the updated imagery, especially the ui_icon_equipment.dds file.

That said, I refer you to my earlier post, where I mentioned that skipping the storyline altogether has some advantages for what you are trying to do. The only things you get by using the ZRP as a base is an easier time of debugging your stuff and fewer problems from vanilla woes.
NatVac
Resident
 
Posts: 152
Joined: 16 Sep 2008 00:13
Location: Texas

Re: Info Portion

Postby audioave10 on 02 Mar 2009 01:11

If NatVac wrote a book I would surely have to read it. However, I
think a mandatory Websters dictionary nearby would be prudent.
Jamie...I'm going to try your Faction Mod as it seems popular. If
you improve it more by using ZRP as a base...I'll try it too. Much
respect for you if you can incorporate both.
"Let the Zone take me if I am"
User avatar
audioave10
Senior Resident
 
Posts: 1154
Joined: 14 Sep 2008 01:30
Location: USA

Re: Info Portion

Postby jamie1992 on 02 Jun 2009 15:02

Ok so, its been awhile, now i have all the infoportions i need, i just need the best way to execute them to be given to the actor wheater its via dialog or via script.

All cs infoportions i have written down, story ones anyway, i just need to give them the actor, anyone have any good ways, because doing the whole give_infoportion is just impractical with the huge amount there.
Wu Tang! Wu Tang! Wu Tang!
User avatar
jamie1992
Senior Resident
 
Posts: 802
Joined: 12 Sep 2008 23:04
Location: Oxford, Oxfordshire, United Kingdom

Re: Info Portion

Postby Nightwatch on 03 Jun 2009 15:39

I have the opinion that giving all info portions all at once, whether they are bundled together and given by a script order or introduced to the game one by one, can possibly cause problems, as my understanding is that the game (engine) needs to absorb/ digest the info_portions and process them. It may cause serious blockages. I would suggest them to be given through XML dialogs, while having dialogs with characters along a certain period of time. In this way, those can be given at the start of the game, during the initial dialogs, as they are needed, within a reasonably short time, while allowing enough time to process them.
NEWSA.SIMBION_TWEAK 3.0
Mod Website= Features, Video, Tips & Download Link: NEWSA.SIMBION_Tweak

Watch the Trailer: http://www.youtube.com/watch?v=1Ajw_f8K ... re=channel
Please Do Not download and install any files from links other than those on the Mod's Website
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Re: Info Portion

Postby nandersen on 10 Jun 2009 11:41

Let me propose another solution:
- introduce a queue in bind_stalker.script that stores functions and their arguments
- let the actor_binder:update() function process one element in that queue in every call
- use this mechanism to perform all kinds of occasional updates like loss workaround or ammo boxing as well as info portions

Example interface: bind_stalker.enqueue_call(function, arg1, arg2, ...)

The idea is that for every kind of update you won't have to add more lines to bind_stalker.script (or _z.script) but only to the module that needs the update. E.g. in treasure_manager.script to implement the loss_workaround() to work with this you'd implement it as a function rather than a "method":
Code: Select all
function loss_workaround()
   local tm = get_treasure_manager()
   for k,v in pairs(tm.loss_workaround_queue) do
      box = level_object_by_sid(k)
      if box == nil then
         abort("inv box nil")
      end
      -- dbglog("loss_workaround:box=%d", k)
      for kk,vv in ipairs(v) do
         -- dbglog("  item:name=%s", level.object_by_id(vv):name())
         db.actor:transfer_item(level.object_by_id(vv), box)
      end
   end
   tm.loss_workaround_queue = {}
end

and then instead of setting
Code: Select all
bind_stalker.nv_need_update = true
you'd do something like:
Code: Select all
bind_stalker.enqueue_call(loss_workaround)
"They shoot and I run and I spill my drink - all over my uniform..."
My files for S.T.A.L.K.E.R.: http://zhat.dk/stalker/
User avatar
nandersen
Senior Resident
 
Posts: 212
Joined: 17 Sep 2008 17:24

Re: Info Portion

Postby Nightwatch on 12 Jun 2009 14:33

That's a very good, in fact, very ingenious approach nandersen :thumbright: That's exactly what's expected from your well-known scripting skills.


(Thread is marked to be moved to "Modding Techniques" section.)
NEWSA.SIMBION_TWEAK 3.0
Mod Website= Features, Video, Tips & Download Link: NEWSA.SIMBION_Tweak

Watch the Trailer: http://www.youtube.com/watch?v=1Ajw_f8K ... re=channel
Please Do Not download and install any files from links other than those on the Mod's Website
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Re: Info Portion

Postby ket on 21 Jul 2009 13:29

I may be wrong here, I have been many times when it comes to scripting in stalker, its a real PITA. But for stability reasons alone wouldn't you be better off writing a script that gives you all info_portions for that level, then when you progress to the following level, the script gives you all info_portions for that level. You achieve the same effect as what you want, but the mod should be much more stable :thumbright:
Mobo: MSI X570 Tomahawk
CPU: R7 3700X @ 4.4GHz 1.3v
RAM: 2x16GB Klevv BoltX 3600MHz 16-20-20-35
GPU: Powercolor 6800XT Red Devil
Sound: Asus Xonar DX 7.1 PCI-E, Realtek ALC1200
HDD: 250GB & 500GB nVME 3.0 M.2 drives, 2TB Seagate Barracuda, Sata3 64MB Cache, 250GB Hynix SL301
Opticals: DVD-RW, Blu-Ray
PSU: eVGA 1000w G2 Supernova
Case: NZXT Phantom 530

STALKER: Singularity (SIN) homepage
User avatar
ket
Senior Resident
 
Posts: 1262
Joined: 14 Sep 2008 11:57
Location: The solar system


Return to Modding Techniques

Who is online

Users browsing this forum: No registered users and 21 guests

cron