Fallout 1 mod Modding Fallout 1?

Discussion in 'Fallout General Modding' started by Sn1p3r187, Mar 28, 2015.

  1. Sn1p3r187

    Sn1p3r187 Carolinian Shaolin Monk

    867
    Apr 7, 2014
    From what I've heard it's really hard, next to impossible to mod Fallout 1 without breaking it since they say a lot of stuff in there is hard coded. Is it true? I really wanted to add a few weapon and location mods in there. But...........
     
  2. Mikael Elofsson

    Mikael Elofsson Stealthy courier

    55
    Jun 28, 2014
    it's not next to impossible, only a bit difficult... sorry for text color change... i have no idea how to fix it, since it changed with my "we" copy paste and i need it to spell words with w or e in them

    Fix to that, is
    editing!
     
    Last edited: Mar 28, 2015
  3. Continuum

    Continuum Vault Fossil

    Nov 8, 2006
    Modding Fallout is easy if you stay within its engine limitations. For instance, whole stuff with world map/locations/whatever is hardcoded while in its total conversion has been externalized to txt.

    Scripting is exactly the same like in Fallout 2 (except few extra script functions). The same goes for how engine handles items/critters/art/whatever other shit. You can edit existing maps without problems, or even add new elevations (workaround for hardcoded txt with maps). You can add new random encounters, or tweak existing ones, you can add new stuff to do for player, and shit.

    Anyway, I wouldn't say "a lot", but rather "few important things" are hardcoded that makes it inferior modding platform to Fallout 2 (especially if you're doing total conversion). And of course.... sfall that is available for Fallout 2 only.

    Also, you'll certainly break something if you don't know what you're doing - but this is valid for any other game.
     
    • [Like] [Like] x 1
  4. Sn1p3r187

    Sn1p3r187 Carolinian Shaolin Monk

    867
    Apr 7, 2014
    Could you explain that a bit more with locations? Like say if I wanted to add Dayglow to the Fallout world, or the cut content of the Vipers camp. Or maybe even a few new quests as part of the locations.
     
  5. Continuum

    Continuum Vault Fossil

    Nov 8, 2006
    It's not possible to add new locations that will be visible on World Map (i.e.: Junktown, Hub, etc.), nor maps that will be visible on Town Maps (i.e.: Shady Sands West, Shady Sands East, etc.) - all this stuff is hardcoded.

    For instance, I wanted to split Boneyard into the pieces - small dots all over LA on World Map - no way to do that. As a workaround I've made each map over there "separated" from the rest by placing exit grids leading to the World Map instead to another map.

    Once any Boneyard's map is visited, all other maps from this location are marked on Town Map:

    Code:
    procedure map_enter_p_proc begin
        if (map_first_run) then begin
            set_global_var(GVAR_MARK_LA_ADYTUM, 1);
            set_global_var(GVAR_MARK_LA_BLADES, 1);
            set_global_var(GVAR_MARK_LA_RIPPERS, 1);
            set_global_var(GVAR_MARK_LA_GUN_RUNNERS, 1);
            set_global_var(GVAR_MARK_LA_FOLLOWERS, 1);
            display_msg(g_mstr(1800));
        end
        if (not(is_loading_game)) then begin
            override_map_start(98, 25, 0, 2);
            call Rippers;
            call Uthern;
        end
    end
    

    Screenies time...

    Adytum:

    scr00000.gif

    Map start is no longer placed in the middle of fucking entrance thus dialogue with guards is no longer forced unless you'll move closer to the gate!

    :jiggy:

    This was annoying as hell, and visually awful.


    Fortress:

    scr00001.gif




    As for adding new quests - sure, but you'll not be able to add them to the PipBoy, unless you'll recycle available stuff:

    Code:
    // Quests Status
    #define GVAR_KILL_DEATHCLAW                    (100)
    #define GVAR_FIND_WATER_CHIP                (101)
    #define GVAR_KILL_RADSCORPIONS                (102)
    #define GVAR_RESCUE_TANDI                    (103)
    #define GVAR_CAPTURE_GIZMO                    (104)
    #define GVAR_KILL_KILLIAN                    (105)    // unused
    #define GVAR_MISSING_CARAVANS                (106)
    #define GVAR_STEAL_NECKLACE                    (107)
    #define GVAR_BECOME_AN_INITIATE                (108)
    #define GVAR_FIND_LOST_INITIATE                (109)
    //#define GVAR_WARNED_BROTHERHOOD            (110)
    #define GVAR_KILL_MERCHANT                    (111)
    #define GVAR_KILL_JAIN                        (112)
    //#define GVAR_KILL_SUPER_MUTANTS            (113)
    ///#define GVAR_STOP_GANGS_WAR                (128)
    ///#define GVAR_DESTROY_FOLLOWERS            (129)    // Deliver package from the Gun Runners
    ///#define GVAR_RESCUE_JASON                (130)
    ///#define GVAR_FIND_SPY_INSIDE_FOLLOWERS    (133)
    #define GVAR_START_POWER                    (139)
    #define GVAR_DISARM_WEAPONS                    (140)
    #define GVAR_SAVE_SINTHIA                    (143)
    ///#define GVAR_SAUL_QUEST                    (144)
    ///#define GVAR_TRISH_QUEST                    (145)
    #define GVAR_FIND_WATER_THIEF                (188)
    #define GVAR_CALM_REBELS                    (238)
    #define GVAR_DESTROY_SOURCE_OF_MUTANTS        (308)
    #define GVAR_DESTROY_MUTANT_LEADER            (309)
    #define GVAR_BUST_SKULZ                        (555)
    Don't remember if these are all/all of them are displayed/whatever - haven't touched Fallout for a longer time... but IIRC "///" means entry, and "//" no entry. Of course, this goes for unused/cut stuff. You'll have to figure out what GVAR state is for strikethrough (aka done). But probably it will be like this:

    0 - none,
    1 - accepted (normal entry),
    2 - done/failed (strikethrough entry).
     
    Last edited: Mar 28, 2015
  6. Sn1p3r187

    Sn1p3r187 Carolinian Shaolin Monk

    867
    Apr 7, 2014
    And I guess adding new weapons to Fallout 1 wouldn't be much to do? Like adding a M16, a uzi, a M1911, a RPG-7?
     
    • [Like] [Like] x 1
  7. Mikael Elofsson

    Mikael Elofsson Stealthy courier

    55
    Jun 28, 2014
    there is supposed to be unfinished scripts for upgraded guns in both Fallout 1 and 2, Megamod has it in Fallout 2 "restored and expanded upon" so it might be true, and therefore there is room for new guns
     
  8. Continuum

    Continuum Vault Fossil

    Nov 8, 2006
    Adding items is exactly the same in both games.





    Speaking of items: I stole Fallout 2 restock macro :wiggle: and added it traders in Fallout:

    Code:
    procedure start;
    procedure map_enter_p_proc;
    
    variable restock_amt;
    variable restock_obj;
    variable removed_qty;
    
    import variable Beth_Box_ptr;
    
    #include ".\HEADERS\COMMAND.H"
    #include ".\HEADERS\DEFINE.H"
    #include ".\HEADERS\HUBDWNTN.H"
    
    #define NAME SCRIPT_BETHBOX
    
    #define LVAR_RESTOCK_TIME                (0)
    
    procedure start begin
    
    end
    
    procedure map_enter_p_proc begin
        if (map_var(MVAR_BETH_STATUS) != 3) and (local_var(LVAR_RESTOCK_TIME) < game_time) then begin
            check_restock_item(PID_BOTTLE_CAPS, 756, 1451, 100)
            check_restock_item(PID_BRASS_KNUCKLES, 1, 4, 100)
            check_restock_item(PID_THROWING_KNIFE, 1, 4, 100)
            check_restock_item(PID_KNIFE, 1, 5, 100)
            check_restock_item(PID_COMBAT_KNIFE, 0, 2, 65)
            check_restock_item(PID_CLUB, 1, 5, 100)
            check_restock_item(PID_CROWBAR, 1, 3, 100)
            check_restock_item(PID_SLEDGEHAMMER, 1, 2, 85)
            check_restock_item(PID_SPEAR, 1, 3, 100)
            check_restock_item(PID_10MM_PISTOL, 0, 2, 75)
            check_restock_item(PID_10MM_SMG, 0, 2, 75)
            check_restock_item(PID_SHOTGUN, 0, 2, 75)
            check_restock_item(PID_FRAG_GRENADE, 1, 7, 75)
            check_restock_item(PID_SHOTGUN_SHELLS, 1, 4, 85)
            check_restock_item(PID_8MM_FMJ, 1, 4, 65)
            check_restock_item(PID_LEATHER_ARMOR, 1, 3, 100)
            check_restock_item(PID_METAL_ARMOR, 0, 2, 50)
            set_local_Var(LVAR_RESTOCK_TIME, game_time + (ONE_GAME_DAY * Random(3, 5)));
        end
        Beth_Box_ptr := self_obj;
    end
    




    Anyway, back then I've been working on few things (or rather too many :twitch:), and one of them was reworked caravans - now, is this possible to set encounter on exact grid, and exact day (get_day) on World Map in Fallout 2? And use such code to generate/place critters during it? It's a map script, so you should get idea what I'm talking about, besides Fallout uses scripts for random encounters while Fallout 2 some txt:

    Code:
    procedure map_enter_p_proc begin
        if (map_first_run) then begin
            set_global_var(GVAR_MARK_HUB_ENTRANCE, 1);
            display_msg(g_mstr(1700));
        end
        if (not(is_loading_game)) then begin
            // check if both Keri and Demeter are dead
            // if true their caravans no longer run
            if (global_var(GVAR_CRIMSON_CARAVANS_STATUS) == 4) then begin
                if (map_var(MVAR_CC_CARAVAN_STATUS) != 1) then begin
                    set_map_var(MVAR_CC_CARAVAN_STATUS, 1);
                    call CCCarts;
                end
            end
            else begin
                call CCInit;
            end
        end
        override_map_start(107, 39, 0, 2);
    end
    
    procedure CCInit begin
        if (map_var(MVAR_CC_CARAVAN_STATUS) == 2) then begin
            if (get_day == 3) or (get_day == 17) then begin
                if (map_var(MVAR_CC_CARTS_STATUS) == 0) then begin
                    call CCCarts;
                    set_map_var(MVAR_CC_CARTS_STATUS, 1);
                end
            end
            else begin
                if (get_day > 3) and (get_day < 9) or (get_day > 17) and (get_day < 23) then begin
                    set_map_var(MVAR_CC_CARAVAN_STATUS, 1);
                end
                else begin
                    set_map_var(MVAR_CC_CARAVAN_STATUS, 0);
                    set_map_var(MVAR_CC_CARTS_STATUS, 0);
                    set_map_var(MVAR_CC_CARAVANERS_STATUS, 0);
                end
            end
        end
        if (map_var(MVAR_CC_CARAVAN_STATUS) != 2) then begin
            call CCCaravan;
        end
    end
    
    procedure CCCaravan begin
        // READY TO LEAVE
        if (get_day == 3) or (get_day == 17) then begin
            if (map_var(MVAR_CC_CARAVAN_STATUS) == 1) then begin
                set_map_var(MVAR_CC_CARAVAN_STATUS, 0);
                call CCCarts;
            end
            if (map_var(MVAR_CC_CARAVANERS_STATUS) == 0) then begin
                Critter := create_object_sid(PID_GUARD_HMMETL, 0, 0, SCRIPT_CCLEADER);
                critter_attempt_placement(Critter, 9307, 0);
                anim(Critter, 1000, 5);
                Critter := create_object_sid(PID_LARGE_BRAHMIN, 0, 0, SCRIPT_CBRAHMIN);
                critter_attempt_placement(Critter, 10711, 0);
                CritterTile := 10711;
                call CCDrivers;
                Critter := create_object_sid(PID_LARGE_BRAHMIN, 0, 0, SCRIPT_CBRAHMIN);
                critter_attempt_placement(Critter, 12114, 0);
                CritterTile := 12114;
                call CCDrivers;
                set_map_var(MVAR_CC_CARAVANERS_STATUS, 1);
            end
        end
        else begin
            // ON ROUTE
            if (get_day > 3) and (get_day < 9) or (get_day > 17) and (get_day < 23) then begin
                if (map_var(MVAR_CC_CARAVAN_STATUS) == 0) then begin
                    set_map_var(MVAR_CC_CARAVAN_STATUS, 1);
                    set_map_var(MVAR_CC_CARAVANERS_STATUS, 0);
                    call CCCarts;
                end
            end
            else begin
                // JUST ARRIVED
                if (get_day == 9) or (get_day == 24) then begin
                    if (map_var(MVAR_CC_CARAVAN_STATUS) == 1) then begin
                        set_map_var(MVAR_CC_CARAVAN_STATUS, 0);
                        call CCCarts;
                    end
                    if (map_var(MVAR_CC_CARAVANERS_STATUS) == 0) then begin
                        set_map_var(MVAR_CC_CARAVANERS_STATUS, 2);
                    end
                end
                else begin
                    // IN DOWNTOWN
                    if (map_var(MVAR_CC_CARAVAN_STATUS) == 1) then begin
                        set_map_var(MVAR_CC_CARAVAN_STATUS, 0);
                        call CCCarts;
                    end
                end
            end
        end
    end
    
    procedure CCCarts begin
        if (map_var(MVAR_CC_CARAVAN_STATUS) == 0) then begin
            create_scenery(PID_WAGON_2, 10514, 0);
            create_scenery(PID_WAGON_1, 12317, 0);
        end
        else begin
            remove_scenery(PID_WAGON_2, 10514, 0);
            remove_scenery(PID_WAGON_1, 12317, 0);
        end
    end
    
    procedure CCDrivers begin
        variable CurrentTile;
        CurrentTile := CritterTile;
        CritterDirection := 0;
        CritterNum := 3;
        CritterScript := SCRIPT_CCDRIVER;
        while (CritterNum) do begin
            CritterType := 0;
            WeaponType := 0;
            RndX := random(1, 6);
            if (RndX == 1) and (not(Critter1)) then begin
                CritterType := PID_GUARD_NFMAXX;
                Critter1 := 1;
                RndY := random(0, 1);
                if (RndY == 0) then begin
                    WeaponType := PID_SPEAR;
                end
                if (RndY == 1) then begin
                    WeaponType := PID_10MM_SMG;
                end
            end
            if (RndX == 2) and (not(Critter2)) then begin
                CritterType := PID_MERCENARY_NMLTHR;
                Critter2 := 1;
                RndY := random(0, 1);
                if (RndY == 0) then begin
                    WeaponType := PID_SPEAR;
                end
                if (RndY == 1) then begin
                    WeaponType := PID_SHOTGUN;
                end
            end
            if (RndX == 3) and (not(Critter3)) then begin
                CritterType := PID_GUARD_NMMAXX;
                Critter3 := 1;
                RndY := random(0, 1);
                if (RndY == 0) then begin
                    WeaponType := PID_10MM_PISTOL;
                end
                if (RndY == 1) then begin
                    WeaponType := PID_10MM_SMG;
                end
            end
            if (RndX == 4) and (not(Critter4)) then begin
                CritterType := PID_GUARD_HMBMET;
                Critter4 := 1;
                RndY := random(0, 1);
                if (RndY == 0) then begin
                    WeaponType := PID_10MM_PISTOL;
                end
                if (RndY == 1) then begin
                    WeaponType := PID_SLEDGEHAMMER;
                end
            end
            if (RndX == 5) and (not(Critter5)) then begin
                CritterType := PID_GUARD_NFMETL;
                Critter5 := 1;
                RndY := random(0, 1);
                if (RndY == 0) then begin
                    WeaponType := PID_SPEAR;
                end
                if (RndY == 1) then begin
                    WeaponType := PID_COMBAT_KNIFE;
                end
            end
            if (RndX == 6) and (not(Critter6)) then begin
                CritterType := PID_GUARD_HFLTHR;
                Critter6 := 1;
                RndY := random(0, 1);
                if (RndY == 0) then begin
                    WeaponType := PID_SPEAR;
                end
                if (RndY == 1) then begin
                    WeaponType := PID_10MM_PISTOL;
                end
            end
            if (CritterType) then begin
                Critter := create_object_sid(CritterType, 0, 0, CritterScript);
                Item := create_object(WeaponType, 0, 0);
                add_obj_to_inven(Critter, Item);
                wield_obj_critter(Critter, Item);
                Item := create_object(PID_STIMPAK, 0, 0);
                add_mult_objs_to_inven(Critter, Item, random(1, 3));
                Item := item_caps_adjust(Critter, random(25, 50));
                CritterTile := tile_num_in_direction(CurrentTile, CritterDirection, random(2, 3));
                critter_attempt_placement(Critter, CritterTile, 0);
                CritterDirection := CritterDirection + 2;
                CritterNum := CritterNum -1;
            end
        end
    end
    
    Result (ready to leave state):

    scr00000.gif

    (wedge formation around Brahmin, facing the same direction as poor animal)

    During random encounter code would be much simpler, only "going to", or "returning from" states, so only screenie above would be valid. Case you wonder why (not(CritterX)) check - I needed unique PIDs to attach them to player (party_add) - engine can't move the same PIDs between maps when in party.


    On a side note: "player hired as caravaner" is hardocded: time when on route + exit grids on these maps + it's broken - how dumb this is? :yuck: I guess, set_exit_grid (or whatever the name was) in Fallout 2 is unhardcoded function for hardcoded grids in Fallout. But this is only guess, since I never messed with Fallout 2 scripts.
     
    Last edited: Mar 29, 2015
  9. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
    This is possible and not difficult, BUT, Fallout(1) is limited to 255 items. So you can only add a handful. This is one of the hard-coded limitations of the first game's engine; only 255 items possible.

    btw thank you for the code, Continuum :)

    Fallout is definitely not next-to-impossible to mod, otherwise Fixt wouldn't exist with its hundreds of changes ;) But Continuum is correct, the majority of modding has to be done via scripting, and if you take some time to get it working, can use the map editor as well.

    Remind me what precisely you were looking to change or add?
     
  10. bestfrog

    bestfrog First time out of the vault

    3
    Dec 29, 2015
    I always dreamed of more powerfull Super Mutants in Fallout 1.

    Like 30% more HP, better armed patrollers, more encounters (also aroud other locations).

    Would something like that take a lot of effort? Is there a guide that woul allow somebody with no exp in modding achieve that?
     
  11. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
    That's not too hard to do, especially in Fallout 2 engine once we finish porting it over.

    Please add to Bugs Wiki in bottom section Ideas / Suggestions :) Thank you! http://falloutmods.wikia.com/wiki/F...estions_.2F_Ideas_.2F_Requests_.28NOT_BUGS.29
     
    Last edited: Jan 3, 2016
  12. RapidWaterOver

    RapidWaterOver First time out of the vault

    3
    Jan 1, 2016
    Is that why when I try adding more then that, and open a Fallout 1 map in mapper2, some of the items inventory graphics either don't show up or are given to the wrong item?
     
  13. Lexx

    Lexx Background Radiant
    Moderator

    Apr 24, 2005
    No. This probably happens because you are still using the Fallout 2 proto files. You'll have to replace all that stuff first before the mapper is ready for Fallout 1. Someone (I think Sduibek?) somewhere wrote how to set this up correctly. No idea where that stuff is exactly, though.
     
  14. RapidWaterOver

    RapidWaterOver First time out of the vault

    3
    Jan 1, 2016
    I'll go looking for that then. By the way what's the difference between FO1 and FO2 proto files? I've only seen two documentation pieces on the file format, one from Vault-Tec Labs Wiki and the other from the now gone downloads section, and the latter I can't find anywhere else. I don't remember either of them saying anything about the differences between the two.
     
  15. Sn1p3r187

    Sn1p3r187 Carolinian Shaolin Monk

    867
    Apr 7, 2014
    Well then I need to learn the art of scripting fast then. Maybe I could get some help in figuring out scripting and possibly make a small team to work on weapons, quests, and maybe armor
     
  16. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
    The main difference is just that the Fallout 2 .PRO files for critters have 4 bytes added to the end, so they're 416 bytes instead of 412. I forget the differences for the items and such.

    And my guide for the mapper is at http://www.nma-fallout.com/threads/...exe-the-bis-official-fallout-2-mapper.196020/