Random Questions

Discussion in 'Fallout General Modding' started by Lexx, Oct 29, 2016.

  1. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    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...
     
  2. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    Have you tried adding event listener via AddNamedEvent() and then triggering it when you need via SignalNamed() ?
     
  3. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Nope, no idea what that is.
     
  4. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    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* ?
     
  5. .Pixote.

    .Pixote. Venerable Relic of the Wastes
    Modder

    Sep 14, 2009
    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.
     
  6. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    If you start a new conversation, then in theory yes. It's just a bitch to script.
     
  7. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    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: Oct 31, 2016
  8. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    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.."
     
  9. burn

    burn Look, Ma! Two Heads!
    Modder

    Apr 22, 2012
    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.
     
  10. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    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: Nov 21, 2016
  11. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    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?
     
  12. .Pixote.

    .Pixote. Venerable Relic of the Wastes
    Modder

    Sep 14, 2009
    Did you make new map names - or are you using the original map names?
     
  13. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    New locations, but I know that it worked ages ago. Not sure why it doesnt anymore now.
     
  14. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    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:


    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.
     
  15. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    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.
     
  16. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Looks like I am alone with my questions again. Why the hell do I always make mods for games that rarely anyone else works on anymore?
     
    • [Like] [Like] x 3
  17. NovaRain

    NovaRain Casual Modder

    Mar 10, 2007
    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.
     
  18. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    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.
     
  19. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    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.
     
  20. MIB88

    MIB88 Sonny, I Watched the Vault Bein' Built!
    Modder

    Feb 22, 2005
    You're not alone in that. I feel your pain. ;)