Random Questions

Lexx

Testament to the ghoul lifespan
Moderator
Modder
As the title says- I got a couple of scripts that execute code in the map_update_p_proc. Now the problem is, this code is only executed every ~30 seconds or something.

Now the question is: Do we have any way to *force* a global map update call? I don't mean a simple "call map_update_p_proc;", but basically triggering the roughly every 30 seconds call in this very moment?

I don't really want to send messages via map script to all my stuff which then triggers a timed event, etc... if I could as well just quickly force their map_update code. Another way to circumvent this would be to initialize a dialogue screen, but that only works in specific scenes...
 
I don't really want to send messages via map script to all my stuff which then triggers a timed event, etc... if I could as well just quickly force their map_update code. Another way to circumvent this would be to initialize a dialogue screen, but that only works in specific scenes...

Have you tried adding event listener via AddNamedEvent() and then triggering it when you need via SignalNamed() ?
 
Changed the thread title, because I got more issues other than the one posted above.


Here's the next one: Is it actually possible to either change the background or the image of the talking head while *being in a dialogue* ?
 
Can they be changed from elevation to elevation - such as basements? Or separate talking heads on the same map elevation - such as shitty house and adobe house.
 
If you start a new conversation, then in theory yes. It's just a bitch to script.
 
Nope, no idea what that is.
Use it like that:

In script that should listen to the event:
Code:
AddNamedEvent("event_name", callback_proc);
, where callback_proc is the name of local procedure (without quotes, just like in NOption, etc.)

In script that should fire the event:
Code:
SignalNamed("event_name");

I think event names are global for the game, so consider that when naming your events. Also it seems there is no way to pass event arguments, which is a shame. You could probably use sfall globals and/or arrays for that... Or import/export variables.

I never used this technique myself (yet) but I remember testing it once and it worked IIRC.

Created issue for this.
 
Last edited:
Here's another question:

Any chance of changing the gender of an NPC? I tried with
Code:
set_critter_stat(self_obj, STAT_gender, GENDER_FEMALE);
but when looking at the critter, the game still says "He looks.."
 
Is that in critter script?
I had this strange problem when set_stat_max/set_critter_stat wouldn't work in a map script, but when moved to a global script, the very same code worked. I didn't quite pinpoint it in the end, but you might want to try a global.
 
I am calling the line in the map_enter_p_proc of the critter. I'll see how it works in a global script, but it doesn't sound to me like it makes much sense. set_critter_stat isn't anything Sfall related either.

The retoration project is using "set_pc_base_stat" but I couldn't find any info about that one. Also it's obviously for the player character only.
/Edit: Ok, just found it in the other rp files. There is also "set_critter_base_stat" which might work. I'll try...

/Edit2: It seems to change the gender that way, but the description still remains with "He" .. meh.

/Edit3: I am on a run right now--- tried to compile ZIDCEGRL.ssl (untouched, original script) and Sfall Script Editor spits out a "Division by zero!"-error. The exact llocation is this piece of code used in a skill roll:
Code:
#define get_dice_penalty  (((bet_amt == level_1_bet)*level_1_penalty) +  \
  ((bet_amt == level_2_bet)*level_2_penalty) +  \
  ((bet_amt == level_3_bet)*level_3_penalty) +  \
  ((bet_amt == level_4_bet)*level_4_penalty) +  \
  ((bet_amt == level_5_bet)*level_5_penalty))

Anyone knows how to get around that? Like I wrote, it's the original untouched script.
 
Last edited:
Alright, forum is online again... time for a new post.

Anyone care to tell me how the automap feature in the pipboy works? I am going crazy over it right now, because none of my locations are shown. Also I am more or less sure right now that at some point years ago I disabled these automaps somehow... Can't figure out anything about it anymore, though. Also wasn't it possible to define them via Sfall or something?
 
New locations, but I know that it worked ages ago. Not sure why it doesnt anymore now.
 
Gonna fill this thread till I get answers. :>

Anyone knows if it's possible to change the text background color? This is how it looks for me:
psNjOI.png


Code:
       SetFont(5);
       SayBorder(30, 30);
       SetTextColor(0.0, 1.0, 0.0);
       SetHighlightColor(1.0, 1.0, 0.64);

I'd really like to get rid of the black background (either change it to a different color or make it transparent), but no idea how to do it.
 
Small note to the text problem: I am using the SayOptionWindow function. In any other form it seems the text works without ugly background color... but I need it as a clickable text.

Maybe it's possible to get a new Sfall function like SetBackgroundColor or so?

Also we have "SetTextFlags" but I have no idea what it's doing or what these flags would be.
 
/Edit3: I am on a run right now--- tried to compile ZIDCEGRL.ssl (untouched, original script) and Sfall Script Editor spits out a "Division by zero!"-error. The exact llocation is this piece of code used in a skill roll:
Code:
#define get_dice_penalty  (((bet_amt == level_1_bet)*level_1_penalty) +  \
  ((bet_amt == level_2_bet)*level_2_penalty) +  \
  ((bet_amt == level_3_bet)*level_3_penalty) +  \
  ((bet_amt == level_4_bet)*level_4_penalty) +  \
  ((bet_amt == level_5_bet)*level_5_penalty))

Anyone knows how to get around that? Like I wrote, it's the original untouched script.
Hmm, older sslc in modders pack 3.5 doesn't have this problem.
I did some more tests, and it seems the new sslc (compile.exe in modders pack 3.6 or newer) thinks all (X * 0) are "division by zero" but doesn't have any problem for (0 * X) calculation.
The current workaround is changing (bet_amt == level_1_bet)*level_1_penalty to level_1_penalty*(bet_amt == level_1_bet), because level_1_penalty is defined as zero.
 
If you really want some engine feature or information on how stuff works, the best way is to set up IDA Pro and start digging code for yourself. Some stuff may already be possible, but that research takes time... Yeah, I feel your pain about this game not being popular these days.
 
Thing is, I am not a programmer at all. The little bit of Fo2 / Sfall scripting is pretty much all I can do. Everything else code-wise usually is way above my skills and code understanding. Usually I come by with scrapping together bits of knowledge from here and there + copy&paste a lot from existing stuff. To underline my noob skill level: I am using Arrays since maybe barely a year now. :>

@Division by Zero: Thanks, this worked. I've been able to finish my stuff related to that now.
 
Thing is, I am not a programmer at all. The little bit of Fo2 / Sfall scripting is pretty much all I can do. Everything else code-wise usually is way above my skills and code understanding. Usually I come by with scrapping together bits of knowledge from here and there + copy&paste a lot from existing stuff...

You're not alone in that. I feel your pain. ;)
 
Back
Top