Fallout Tactics Scripting Engine (0.21a)

Discussion in 'Fallout Tactics Modding' started by Melindil, Jul 3, 2018.

  1. Melindil

    Melindil First time out of the vault

    Apr 15, 2018
    Project page (GitHub): https://github.com/melindil/FTSE
    Download link (current): https://github.com/melindil/FTSE/blob/master/Release/FTSE_0.21a.zip

    This mod enhances the game Fallout Tactics, adding the following capabilities:

    Configurable EXE patching
    Most of the known hex-edits for the BOS executable file are included. Each can be selectively enabled or disabled from a configuration file. New edits can also be added without needing to hex edit, or rebuild the mod.

    Custom Scripting Engine
    The mod will patch the BOS executable to load an included DLL, containing a Lua language interpreter, and interfaces to the Fallout Tactics data. The Lua code can specify code to execute at certain pre-defined trigger points within the game, and modify game variables in real-time to produce customized behaviors.

    Installation Instructions
    Download the latest .ZIP release from the Release directory, and uncompress. Included is an installer EXE file - running this will prompt for the location of the Fallout Tactics EXE file. After selecting the EXE, the installer will patch it to load the included DLL at startup. A backup of the EXE will be produced. Note that the installer will check the EXE to ensure that a) the patch is not yet installed, and b) that the code being modified is as expected (BOS.EXE version 1.27). Should this check fail, the EXE will not be modified. After installation, double-check that the FTSE.DLL, FTSE-Config.json, and FTSE.lua files have been copied to the Fallout Tactics directory. Upon starting the game, if everything is working, the FTSE version should be included in the version string near the bottom of the main menu screen.

    More documentation will be forthcoming as new functionality is added.


    0.21a: July 5, 2018
    * Added -ftseconfig command-line option to specify config file
    * Fixed broken comment line in sample Lua file
    Last edited: Jul 7, 2018
    • [Like] [Like] x 1
  2. nadeauhugo

    nadeauhugo Author of FOT mod THE SUM Modder

    Mar 9, 2014
    Hi Melindil! I'm surprised no one replied to you already about this game changing addon! And sorry to not have replied earlier, I was busy in hollidays... Thanks again for all your work and all the promising features to come...

    I'll test this as soon as I can along with a new interface. I really want to implement custom perks for main character too based on global variable changes after special quests. Please tell me if I need more info from you to add this feature to my mod.

    Also, please tell me if a flag and UA code could be used to allow some items with a tag in the inventory to trigger some skill or stat changes to the character wearing them (example: if you have an item tagged Backpack in your inventory, you have +100 lbs of carry items. Other example: if you have boots in your inventory with Boots tag, you have +10 electric resistance). Thanks!!

    Keep on good work and stay connected, I'll send you screenshots soon.
  3. Melindil

    Melindil First time out of the vault

    Apr 15, 2018
    I don't have variable detection triggers working yet, but that's my next focus.

    Right now, it's possible for custom perks to add or remove temporary or permanent attribute values (anything under the "attributes" section in the FT Tools editor), with the following triggerable cases:

    * Date / Time values
    * Values of other attributes (permanent, temporary, or effective)
    * Taking radiation damage (found this one while making my example)

    And soon can be based on (i.e. things I know how to do already):

    * Teammate proximity
    * Stance
    * Attacks, hits, critical hits

    And ones I don't know yet, but want to figure out soon:

    * Campaign and mission variables
    * Equipped weapons/armor
    * In-inventory items
    * Light level
    * Detection level
    * Trade/barter window interactions

    And I'm definitely open to other suggestions for trigger conditions. It's mainly just a matter of finding a location in the game code where a certain thing happens, then adding an instruction there to jump to my script code.

    I like the idea of in-inventory bonuses. I'd need to make sure I can read the tag field (is this set for all entities of a type, or only single instances?). It could be something like, if an item is tagged "Bonus-XXX" (with XXX being any string), then I apply any modifier bonus attributes for that item on the character. An example would be, say, "Bonus-boots" to apply electric resistance or a bonus action point or whatever. Could even set it up so that if there are multiple items tagged "Bonus-boots" then only the highest bonus is applied. (*Really* fancy would be an actual, customizable inventory screen, but that's a very long way from being possible.)

    Edit to add (so I don't forget): Thought of an interesting idea .. with hooks on the barter/trade window, it'd be possible to 1) have scripting affect NPC shopkeeper / quartermaster, and (more interesting) 2) possibly create a "crafting" object, which when given certain combinations of items, will "trade" other items (possibly affected by character perks or skill ratings).
    Last edited: Jul 11, 2018
  4. Corpse

    Corpse Mildly Dipped

    Apr 7, 2003
    I'm finding myself coming back to FOT modding, and this sounds promising.

    Things I would like to change most are restrictions in the number of recruits you can take, as well as on the number of passengers on vehicles. Also some way to manipulate time so you can rest x number of minutes, hours, days.
  5. nadeauhugo

    nadeauhugo Author of FOT mod THE SUM Modder

    Mar 9, 2014
    Fabulous idea! Fallout 1 was strong on time related triggers, actions and quests, and I think this is still an advantage compared to many (maybe all) other games in the franchise. I have the idea in my mod to create a quest where you have to keep a recruit alive in the wild for at least a year. The only way for me to include that would be time related codes that affect global variables.

    That is exactly what I have in mind yess! I thought about that because Fallout 1,2, Tactics have a great weakness, you just can't equip many items to receive bonuses as in many other games. This is not an issue anymore if you can just "have" that item for it to be effective. Other examples : Special survival tools, a compass, a survival straw, gaz mask, gloves, mechanic-support legs or arms, binoculars, motion sensor, etc. etc.

    You are reading my mind here! I am looking forward for this kind of stuff to make the quartermaster in my mod to act like a container (all items free to buy from him). It is because in my mod the quartermaster is in fact the player's cooler with all items added to it as a 0$ item, so the player can take them when they appear (fresh meat from skinned animal, animal pelts, water gathered, etc.). At this point of my mod you can add any items from your inventory to the cooler but can't take them back... The items must be at 0$ to be taken by the player. I would like them to have a value, but still being optained without payment to the quartermaster...
  6. Melindil

    Melindil First time out of the vault

    Apr 15, 2018
    Resting time is very likely doable. I can control the game timer already, to advance date/time on an event. But I need to find how to have that time passing have the intended effects on healing and consumable effects. Plus a routine to detect if any enemy actors are alerted, so that you can't rest in combat.

    Changing limit on number of recruits between 1-6 would be easy. More than 6 is tricky - the engine appears to be able to handle it to at least a limited degree (the Newton mission lets you do it temporarily with the reaver leaders). But I don't know what side effects might pop up - things like whether the squad members greater than 6 can be persisted across missions, and a bug described on the wiki where, if the reaver leader is made permanent (by having him/her in a vehicle), they can sometimes replace the first character in the lead position. I'll try to find where the limit is enforced, and add a toggle to change or disable it, so we can test further.

    Vehicle capacity shouldn't be too difficult, subject to the same concerns about whether having > 6 passengers causes any issues.
  7. Corpse

    Corpse Mildly Dipped

    Apr 7, 2003
    I have tested having more than six recruits in a campaign, and have had no problem. There are two ways you can do this; one is through triggers. That was a problem before when tags got stripped entering a new map, but now that the tag name stripping has been removed through hex editing, it can work on a campaign. The other way is adding a map where only the main character is spawned, and putting a recruit master there. However, it would be much better if the limit was removed, so you don't have to implement tags, or enter and leave the recruit area mentioned, to add squad members.

    Vehicles have a limit of 7 passengers. Add a gunner and driver and you can take a maximum of 9 per vehicle.
  8. Melindil

    Melindil First time out of the vault

    Apr 15, 2018
    That's good to know. Means that the change is likely just modifying a test in the recruitmaster UI screen to allow adding if there are already 6+ members.

    Have you tested to see what happens when visiting a recruitmaster with more than six members? Does the UI show only the first six, or the last six? (Wondering about the feasibility of adding a couple buttons to scroll through a larger squad.)
  9. Corpse

    Corpse Mildly Dipped

    Apr 7, 2003
    Yes I have. Only the first six are shown; and adding a button to scroll in both the recruit master UI as well as the main interface, would be awesome.
    Last edited: Jul 12, 2018