FoT Trigger File Combining Tool

Discussion in 'Fallout Tactics Modding' started by ryuga, Dec 19, 2008.

  1. ryuga

    ryuga First time out of the vault

    62
    Nov 29, 2008
    Here is the program for combining, compress, and decompress FoT trigger files.
    http://rapidshare.com/files/174810145/BOSTrigger.rar

    I wrote this to increase re-usability of speech tree design baseline trigger files. Since FoT doesn't support the speech trees that we have known to love in F1 and F2, and the closest that we have approximated requires a good number of triggers to set up.

    Speech tree baseline triggers can be found @
    http://www.nma-fallout.com/forum/viewtopic.php?t=48371

    They are exported from speech tree baseline maps @ http://www.nma-fallout.com/forum/viewtopic.php?t=48037

    Special thanks to Jarekfall for identifying the file format and additional file information.


    ===============================================
    Install Notes
    ===============================================
    Extract to any folder, preferably where Fallout Tactics TRG files are stored.



    ===============================================
    Changelog (Dec.19,2008) Version 1.0.0
    ===============================================
    - Ability to combine two Fot deflate-compressed TRG files. Source file 2 is appended to source file 1. Output is a FoT deflate compressed TRG file loadable by FoT editor.
    - Ability to decompress FoT deflate-compressed TRG files. Source file 1 file path is used. Output is readable by human.
    - Ability to compress decompressed FoT formated TRG files. The source file needs to follow the standards. Review some decompressed FoT TRG files for formats. More information will follow



    ===============================================
    Usage Notes
    ===============================================
    This program copies triggers verbatim.

    Whether the triggers will be loaded into a mission map when tag entities aren't already existing in the map is a function of FoT Editor Trigger loading, and the triggers dealing with non-existing tag entities are loaded with the tags texts in the triggers preserved, but the tag entities still need to be added to the map

    ---------------------------
    Function - Combine
    ---------------------------
    -------------------
    Inputs
    Source File 1
    - Type in the file path (example is C:\Games\FalloutTacticsModding\triggers\Actors_Triggers.trg)
    - or
    - Click button to the right of the text box to use Windows open file dialog

    Source File 2
    - Type in the file path
    - or
    - Click button to the right of the text box to use Windows open file dialog

    The order does matter. File 2 is appended to the end of file 1.
    -------------------

    -------------------
    Outputs
    Combined TRG file
    - This file contains source file 1 triggers verbatim, then followed by source file 2 triggers verbatim.
    - This file can be loaded into FoT map using FoT editor trigger loading/saving function.
    - File name = <Source> + "Combined"
    - File Location = Same folder as the BOSTrigger program

    Decompressed Source File 1
    - This file can not loaded into FoT maps.
    - Decompressed files are for viewing and/or manual modifying, then compression for importing into FoT maps.
    - File Name = <Source> + "Decompressed"
    - File Location = Same folder as the BOSTrigger program

    Decompressed Source File 2
    - This file can not loaded into FoT maps.
    - Decompressed files are for viewing and/or manual modifying, then compression for importing into FoT maps.
    - File Name = <Source> + "Decompressed"
    - File Location = Same folder as the BOSTrigger program

    Example is Map21.TRG combining with ItemBaseline.TRG will produce Map21Combined.TRG with original map 21 triggers listed first, then followed by ItemBaseline triggers. The file should either be where the BOSTrigger program is or the original TRG files.
    -------------------


    ---------------------------
    Function - Decompress
    ---------------------------
    -------------------
    Input
    Source File 1 - The file needs to be FoT TRG format
    -------------------

    -------------------
    Output
    Decompressed Source File 1
    - This file can not loaded into FoT maps.
    - Decompressed files are for viewing and/or manual modifying, then compression for importing into FoT maps.
    - File Name = <Source> + "Decompressed"
    - File Location = Same folder as the BOSTrigger program
    -------------------


    ---------------------------
    Function - Compress
    ---------------------------
    -------------------
    Input
    Source File 1 - The file needs to be FoT decompressed TRG format
    For details on format, decompress a FoT TRG file for example
    -------------------

    -------------------
    Output
    Compressed Source File 1
    - This file can be imported to FoT maps using FoT Editor via Trigger Load/Save function
    - File Name = <Source> + "Ccompressed"
    - File Location = Same folder as the BOSTrigger program
    -------------------
     
  2. xkcon

    xkcon Transcending the Multiverse Modder

    206
    Apr 2, 2003
    Cool, I am very impressed with the work you've done here, and will most definitely be using this on my Mod, but I was wondering how to use it properly. I am confused, could you provide an example on how to append 2 files properly, including which slot to put the files and when to compress/decompress. I apologize in advance for being an idiot, heh.

    Also I have a few questions:

    Does it copy the triggers verbatim including all variables and tag names?

    Will it copy the triggers even if tag entities aren't already existing in the current map?

    Thanks and Good Job!! :clap:
     
  3. ryuga

    ryuga First time out of the vault

    62
    Nov 29, 2008
    Thanks, I had help in figuring out the format of the file (Thanks, Jarekfall), the rest was relative easy. There is no dumb question. I finished the program before Christmas and uploaded at 2AM, and it wasn't complete with instructions. I wanted to follow up, since there weren't too much responses and it was holiday, I kind of skimped it. I updated the usage section above in orange. Let me know any suggestions, bugs, or questions. Thanks.

    Everything is copied verbatim.

    This is a function of FoT editor trigger loading/saving. I tested, the tag texts are preserved when the trigger file is loaded into the map even if the tag entities are not created on the map; the tag entities still need to be created on the map for the triggers to work.
     
  4. VFSniper

    VFSniper It Wandered In From the Wastes

    109
    Jan 27, 2008
    Excellent great work guys, should make triggers a little easier to work with. Ryuga did you upload it to moddb?
     
  5. VFSniper

    VFSniper It Wandered In From the Wastes

    109
    Jan 27, 2008
    Excellent, great work guys should make triggers a little easier to work with. Ryuga did you upload it to moddb?
     
  6. xkcon

    xkcon Transcending the Multiverse Modder

    206
    Apr 2, 2003
    Another question if you don't mind... after editing a decompressed file with word pad it saves it as a text file, what file format do I save as, and how do I do it? (sorry, I am dumb, heh)
     
  7. ryuga

    ryuga First time out of the vault

    62
    Nov 29, 2008
    I would use notepad or notepad++ to edit. If you want to compress the decompressed file, save the file as *.trg where * is the filename. The program looks for the .trg file type for either compressed and decompressed.
     
  8. xkcon

    xkcon Transcending the Multiverse Modder

    206
    Apr 2, 2003
    Ok thanks I'll try that out. And thanks for this program, it makes scripting a lot easier because some of my trigger files are so long that when I have to scroll down everytime I add a new trigger it becomes a real nuisance. so now I can script a new sequence on a virgin 'mock up' map and then just combine the new sequence with the old file. COOL! saves me lots of time, Thanks again.
     
  9. paladin_lord

    paladin_lord It Wandered In From the Wastes

    106
    Dec 12, 2011
    was the file removed? i didn't find it at rapidshare ...
     
  10. Zod

    Zod First time out of the vault

    9
    Oct 29, 2011
    RapidShare link is dead for years. Use this.

    p.s. also i have a problem with this util - script runs fine only when I did not change the number of variable's characters. For example, replace the tagname with 'BDC' to 'RDC'. But it was enough to write an extra character('RRDC') and FTTools will crash while loading .trg