Results 1 to 3 of 3

Thread: Faction Launcher

  1. #1

    Default Faction Launcher

    FACTION LAUNCHER

    Spoiler Alert, click show to read: 







    This app aims to help the modder create special sets of files to enrich each faction individually. At this moment
    my M2TW modding skills are somehow limited to make this app even more helpfull, but maybe feedback and comments
    from experienced modders could help me improve it.


    Features:

    1. Easy configuration from xml files.
    Spoiler Alert, click show to read: 


    - Modder will be able configure the way the app looks, sounds and behave, to his own needs.

    a) config.xml:
    Spoiler Alert, click show to read: 
    This file contains two parameters:

    <launcher>: Which makes reference to the mods ".bat" launcher name (ex. <launcher>Third Age.bat</launcher>).
    When Faction Launcher app is open, and FactionX is selected from it, and "launch" button is clicked; the app will try to find the launcher ".bat" specified file and execute it.

    <cleaner>: In case the modder requires to clean some mods files before running the game (like ".bin" and "map.rwm"). The modder can point at a ".bat" file that does the cleaning work <cleaner>cleaner.bat</cleaner>.
    When Faction Launcher app is open, and FactionX is selected from it, and "launch" button is clicked; the app will try to find the cleaner ".bat" specified file and execute it.

    **Note**
    ".bat" files must be in the mods root folder.
    ex. C:\GAMES\SEGA\Medieval II Total War\mods\Mods_NAME\


    b) factions.xml:

    Spoiler Alert, click show to read: 
    This file contains the individual parameters (order doesn't matter) of each faction needed on the mod an will have different effects:

    <faction id="1">
    <name>Faction Name</name>
    <description>FactionX_Description.txt</description>
    <image>scroll.png</image>
    <sound>dong.wav</sound>
    <enabled>1</enabled>
    <files_folder>FactionX</files_folder>
    <script>FactionX.txt</script>
    </faction>

    1. <faction id="#">:

    - The app requires unique "id" numbers for each needed faction, NEVER repeat ids.

    2. <name>:

    - Set ups the name displayed in the app's menu.

    3. <description>:

    - Set ups the name of the ".txt" file that contains the text of the description of the specified faction.
    - The description files must be placed in "FactionLauncher/FL_descriptions" directory and may have any desired names (ex. gondor.txt, khazad_dum.txt, dol_amroth.txt).
    - The app will show descriptions when a specified faction is selected from the menu.

    4. <image>:

    - Set ups the name of the image file (tested with .jpg and .png other formats migth work) to be shown for each selected faction.
    - The images must be placed in "FactionLauncher/FL_images" directory and may have any desired names (ex. scroll.png, gondor.jpg, dol_amroth.jpg, etc).
    - The app will show the specified image (as the complete app background, app res 800x600) when the faction is selected from the menu.
    - A single image could be used by the app, just specify the image name in all factions description tags (not specifiying an makes the background transparent).

    5. <sound>:

    - Set ups the name of the sound file (ONLY ".wav" files allowed) to be played for each selected faction.
    - The sounds must be placed in "FactionLauncher/FL_sounds" directory and may have any desired names (ex. dong.wav, gondor.wav, music.wav, etc).
    - The app will play the specified sound when the faction is selected from the menu (the previous sound will interrupt when playing a new one).
    - A single main music theme could be used for the entire app, just specify the name of the song file(<sound>music.wav</sound>) in the top faction in the xml file and leave the other factions blanc (<sound></sound>).

    6. <enabled>:


    - Specifies if faction must be shown in the app's menu. 1 = visible, 0 = hidden.

    7. <files_folder>:

    - Explained below.

    8. <script>:

    - Explained below.



    2. Automatic directory merging
    Spoiler Alert, click show to read: 



    - Modder will be able to create different sets of files taking as root a "data" folder, the files changed should be organized exactly as the modder expect them to be placed in the mods directory. The app will copy-paste-replace the files from selected "FactionLauncher/FL_Files/FactionX/data" directory to "/SEGA/Medieval II Total War/mods/Mods_NAME/data" directory.

    Instructions:
    Spoiler Alert, click show to read: 

    a) In "FactionLauncher/FL_files" directory create a folder for each set of files that are needed for the mod, take in consideration the creation of a default folder which contains the default files.

    b) For each folder created, insert the corresponding modified faction files, respect the mods directory order ALWAYS parting from a "data" folder. DON'T place any CAMPAING_SCRIPT.TXT in these set of files, the app handel this in a different process.
    Ex. The modder created a special script for FactionX that only triggers when player chose FactionX. This implies that, the modder can adapt several files (descr_strat, UI, EDU, EDB, map locations, etc...) and can to optimize the campaign_script.txt for this specific faction.
    In this example the player created a special script for FactionX, he needs to make the rest to the factions unplayable, modifiting the "descr_strat.txt" file. Modder needs to do the folowing:
    -Create directories: "FactionLauncher/FL_Files/FactionX/data/world/maps/campaing/imperial_campaign/"
    -Insert modified "descr_strat" file in its corresponding created folder. Ending like this "FactionLauncher/FL_Files/FactionX/data/world/maps/campaing/imperial_campaign/descr_strat.txt"

    c) Edit "FactionLauncher/factions.xml" file, updating the factions <files_folder> element with the name the the created FactionX folder.
    Ex. Modder created folder "FactionX" (created like this "FactionLauncher/FL_Files/FactionX"), he needs to update xml element like this "<files_folder>FactionX</files_folder>" of the specific faction tag (<faction id="#">).

    d) When Faction Launcher app is open, and FactionX is selected from it, and "launch" button is clicked; the app will copy-paste-replace the set of files from "FactionLauncher/FL_Files/FactionX/data" directory to "/SEGA/Medieval II Total War/mods/Mods_NAME/data" directory



    3. Automatic script merger
    Spoiler Alert, click show to read: 



    - Since this is the area where I have more experience, I created a special merging process to optimize the "campaign_script.txt" file for a specific played faction. The modder will be able to create a "campaign_script_base.txt" file which will contain all the global scripts and a "FactionX.txt" specific script which contains playable faction specific scripts. Faction Launcher app will then merge the files to create the final merged version.

    Instructions:

    Spoiler Alert, click show to read: 
    a) In "FactionLauncher/FL_scripts/base" directory create a file named exactly as "campaign_script_base.txt". In this file insert the main script. I recommend inserting only the global scripts here, which trigger independently of player chosen faction (ex. "FactionLauncher/FL_scripts/base/campaign_script_base.txt").

    b) In "FactionLauncher/FL_scripts" directory create a file named as desired (ex. "FactionX.txt"). In this file insert the faction specific script. I recommend inserting only the scripts that trigger when player choose the specific faction (ex. "FactionLauncher/FL_scripts/FactionX.txt").

    c) At the bottom of "campaign_script_base" file, just before "wait_monitors" command place the following exact line ";================= ADDITIONAL SCRIPTS ==================;". The app will use this line as a reference to start merging "campaign_script_base.txt" script with "FactionX" script.

    d) Edit "FactionLauncher/factions.xml" file, updating the factions <script> element with the name the the created "FactionX.txt" file.
    Ex. <script>FactionX.txt</script>

    e) If a faction doesnt have any special scripts just leave <script></script> blanc. The app will create "campaign_script.txt" exactly as the "campaign_script_base.txt" file avoiding unnecesary monitors running while playing this faction.

    f) When Faction Launcher app is open, and FactionX is selected from it, and "launch" button is clicked; the app will merge both files and create a final one as "campaign_script.txt" in mods main directory ("Mods_NAME/data/world/maps/campaing/imperial_campaign/campaign_script.txt").







    Recomendations:


    Spoiler Alert, click show to read: 
    Have a default <faction id="0"> placed as the top faction in the xml file, which contains the default files changed during the use of the launcher.

    - In the <files_folder> specify a directory that has the default files that might be changed when launching an specific faction.
    (ex. If modder changed descr_strat to only show Gondor in the selection menu in-game. The modder must also add the descr_strat file where the other factions are show.)

    - Create a factionsAll.txt (name doesn't matter just specify it on the xml file) which contains ONLY the content of each created script in "FactionLauncher/FL_scripts". This way the app will have an all factions option.




    Installation:


    Spoiler Alert, click show to read: 
    Download the file and install it on the mods root folder.


    Ex. C:\GAMES\SEGA\Medieval II Total War\mods\Third_Age\FactionLauncher.exe
    C:\GAMES\SEGA\Medieval II Total War\mods\Third_Age\FactionLauncher\



    Download from:

    here

  2. #2

    Default Re: Faction Launcher

    May bad, could someone help me move this thread to Miscellaneous forum, please.

  3. #3
    Kahvipannu's Avatar Bring me Solo & wookie
    Join Date
    May 2009
    Location
    Finland
    Posts
    3,671

    Default Re: Faction Launcher

    Did I understand right, this would basically eliminate culture limits and such in terms of 2d stuff like UIs and event pics?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •