Help converting global script to work with Fo1 engine

Discussion in 'Fallout General Modding' started by gustarballs1983, May 16, 2018 at 9:58 PM.

  1. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    So I've been recently fooling around with Fo2 Modders Pack, and stumbled upon some really cool mods in there, wich i would also like to use in Fo1. However simply grabbing the source and trying to compile it with sslc_f1.exe from dobrovik's archive renders some functions incompatible. Does anybody have an idea how to change the code to work with Fo1 and Crafty's Sfall1?

    Code:
    procedure start;
    // adjust include paths if needed
    #include "..\..\scripting_docs\headers\sfall.h"
    
    #define RESULT_SUCCESS  (1)
    #define RESULT_FAIL     (0)
    
    procedure start begin
       if game_loaded then begin
          register_hook(HOOK_STEAL);
       end else begin
          variable
             thief := get_sfall_arg,
             target := get_sfall_arg,
             item := get_sfall_arg,
             action := get_sfall_arg,
             result := RESULT_SUCCESS;
    
          if (thief == dude_obj) then begin
             display_msg(sprintf(mstr_skill(570 + result + action*2), obj_name(item)));
             set_sfall_return(result);
          end
       end
    end
    
    Forgot to mention sslc_f1.exe fails at game_loaded..
     
    • [Like] [Like] x 1
  2. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    you're trying to mix apples and oranges AFAIK the 2 games sfall is completely different,and global scripts do not work for fo1 at all (again AFAIK)

    Nirran
     
  3. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Yes, Sfall for Fo1 is very bare bones and not the same as Sfall for Fo2.

    Crafty does lots of hardcodet stuff as well, so you can't really change that.
     
  4. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    ekhm.. I *might* have improperly both titled the thread and improperly described my issue..

    the thing is I have problem compiling this script with sslc_f1.exe when i simply try to compile it sslc_f1.exe throws an error that "game_loaded" is an unregistered command.

    I was hopeing that somebody could help me tackle or go around the issue to compile this script for fo1 engine. Possibly by giving some ideas on how to modify the script so that it does compile with sslc_f1.exe I would try it out wether it works or not.

    Besides sfall1 v1.8 fixes a lot of stuff in Fo1 (even including ammo modifiers) so as @Nirran said sfall1 is so specific thing it is unknown wether global scripts work or not. However Sduibek made couple of things in Fixt 0.81a that i assume are controlled by global script(s) like the hidden function to create rat/dog/deathclaw/etc. meat on corpses of slain enemies of the apropriate type based on outdorsmann skill roll. This is disabled by default. In order for this to work one has to set proper settings in VAULT13.GAM textfile, as Sduibek made several modificatins to this file.

    Anybody willing to help me?
     
  5. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Any example script from Sduibek around? Can't find any right now.

    What he did with the deathclaws, etc. is easily done with editing the critter scripts, just as it was done in Fallout 2. And the "settings" in the Vault13.gam are just global variables.
     
  6. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    Me either. There's just too many scripts to plow through to search for this, it's like a needle in a hay stack. Besides I wouldn't know where to look first.

    So anyway, can i get any help on adjustments to the script above so that it would be possible compile it with sslc_f1.exe?
     
  7. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    Global scripts always start with gl... so if there aren't any, then there are no global scripts.
     
  8. gustarballs1983

    gustarballs1983 -Level 99 in Fallout Fixt-

    Oct 28, 2009
    There are a few scripts starting with GL.., however I'm afraid they are tied to "the Glow" location.
    but that does not guarantee global scripts would not work for Fo1 provided one has latest sfall1.

    Fixt 0.81a was released with one of the earliest editions of Crafty's sfall1 since then Crafty made a lot of additions. It's hard to say without checking wether it works or not.
    So eigther we ask @Crafty or We could finally start brainstorming on this script and do what it takes to be able to compile it under sslc_f1.exe. Because as of present it is not possible because sslc_f1.exe throws an error "unregistered command" for "game_loaded". So i think in order to check wether it would work or not it'd have to be compiled first, before trying to run it with the game.

    Obviously the script needs to be modified before compileing as some commands from F2 are not backwards compatible with Fo1.