Results 1 to 7 of 7

Thread: Creating a World - Starting RTW Mods the Batch Way

  1. #1
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,429
    Blog Entries
    23

    Default Creating a World - Starting RTW Mods the Batch Way

    IntroductionOne bright and sunny afternoon I proceeded to install an interesting RTW mod when I was mildly frustrated once more by the archaic way of creating a desktop shortcut. Since I have been blessed with some M2TW and installer (more about it later) experience I dabbled with the M2TW BAT set up based on the following bright thought: creating a desktop shortcut is done by the installer by linking\using the BAT file in M2TW whereas in RTW the shortcut is linked to the RTW executable - something that an installer has difficulties with. Hence why not a BAT file for RTW?

    In the end it was surprisingly easy and it beats the old way hands down. The mod creators have to do some minor additional work and the player doesn't have to create a short cut himself (provided an installer is used and not a simple extracting method).


    Hands on Stuff
    The BAT file
    Here is how the cookie crumbles - it assumes your mod is in it's own folder (mod foldered), eg RTW\MyMod

    1. Open the default Notepad application (other editors are a bit convoluted here in my experience)
    2. Copy the BAT code from further down into it
    3. Edit the code as per requirement
    4. Use the Save as function of Notepad and browse to your mod's folder
    5. Give a short, descriptive name to your file and add the .bat extension to it. It's recommended to use the mod's short form\name as this will be used when creating the desktop shortcut
    6. Change the Save as type setting to All files, click Save



    The desktop shortcut - manually
    This assumes the BAT file already exists

    1. Right click the BAT file and choose Send To\Desktop from the drop down menu
    2. Optional - Edit the name of the short cut if you wish by selecting the short cut and pressing F2
    3. Optional - Change the default icon by right clicking the short cut and choose Properties, in the new window click Change Icon and browse to the mod folder (if it has an icon) or select one of the RTW executables in the base folder.


    The desktop shortcut - installer
    For details on how to use the BAT file in an installer please refer to my tutorial: Creating a World - Using the Install Creator


    The BAT code
    It's pretty much straight forward:
    Code:
    @echo off
    cd ..\.
    start [RTW executable] -show_err -mod:[Mod folder's name]
    Replace the brackets as follows:
    • RTW executable - this is one of three possible executables, enter the one your mod uses. Example: RomeTW-ALX.exe
    • Mod folder's name - enter the name of you mod's folder. Example MyMod as in the picture above.

    To add more commands, example -nm, simply add it to the end of the last line. Requires a space between commands.
    To modify an existing BAT file simply right click it and choose Edit from the drop down menu.


    Note to Steam users
    For some weird reason (same ID) this method does not work with the Steam RTW-BI executable - it will call the default game and\or crash with this error message: "minumum horde size" which is related to the horde settings in BI's descr_sm_factions file.
    The Wise coffin made a detailed video concerning this issue. Underneath the code for the BAT file, entries in blue need to be obtained with the process explorer as explained in the video. The template BAT file can be downloaded here.

    Spoiler for template code for the BAT file
    Code:
    set SteamAppId=4760
    set SteamAppUser=myusername                    #find with_process_explorer
    set SteamAppVersionId=0
    set STEAMID=mysteamidnumber                    #find with_process_explorer
    set SteamPath=path\to\Steam\folder            #find with_process_explorer
    set SteamUser=myusername                    #find with_process_explorer
    set suppress_restart=1
    set valvePlatformMutex=path\to\steam.exe    #find with_process_explorer
    set __STEAM_BOOTSTRAPPER_ICON_ID__=128
    set PATH=%SteamPath%:%PATH%
    
    RomeTW-BI.exe -rm -show_err -mod:bi                    # starting BI original
    rem RomeTW-BI.exe -rm -show_err -mod:bi\mod_name    # starting BI mod
    rem RomeTW.exe -rm -show_err                        # starting RTW original
    rem RomeTW.exe -rm -show_err -mod:mod_name            # starting RTW mod
    
    rem link to instruction video: https://www.youtube.com/watch?v=tzbBBPzq0wU
    Once completed place the BAT file together in the directory with the game's executable file and create a short cut as explained further up.
    Credit for the BAT file code goes to Afterman.

    Last edited by Gigantus; May 22, 2020 at 08:00 AM. Reason: RTW-BI issue addressed




  2. #2

    Default Re: Creating a World - Starting RTW mods the batch way

    thanks for tutorial.. blessed

  3. #3

    Default Re: Creating a World - Desktop Shortcuts for the Kingdoms Campaigns

    I'm sorry but it did not work. I dit what you say in that post but it appears an error message saying that in bi\data\descr_sm_faction the feature "minumum horde size" is not supported

    That is the bat file test i put in rome total war gold \ bi :
    @echo off
    cd ..\.
    start RomeTW-BI.exe -show_err -mod:bi

    I also tried with the other executable (RomeTW) and it happened the same

    And if i create a cfg

    ([features]
    mod = bi

    [io]
    file_first = true)

    and edit the bat adding: ..... -mod:bi\bi.cgf

    it starts the normal romeTW game and not its official barbarian invasion submod
    (and morevoer it starts a new romeTW game as if i never playied it before)

    What is going on? thank you


  4. #4
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,429
    Blog Entries
    23

    Default Re: Creating a World - Desktop Shortcuts for the Kingdoms Campaigns

    I suppose you are on Steam? That's a bummer to get BI working in a batch file - see this video by wisecoffin.

    The batch file certainly works on the disk version.
    Last edited by Gigantus; May 19, 2020 at 05:55 AM.




  5. #5

    Default Re: Creating a World - Desktop Shortcuts for the Kingdoms Campaigns

    yes steam, sorry for not having told you
    Thank you

  6. #6

    Default Re: Creating a World - Desktop Shortcuts for the Kingdoms Campaigns

    Quote Originally Posted by Gigantus View Post
    I suppose you are on Steam? That's a bummer to get BI working in a batch file - see this video by wisecoffin.

    The batch file certainly works on the disk version.
    It works very well: the video was very clear and it was not difficult; it only requires you to download processexplorer

    I suggest you to open a thread about it cause it is a problem common to many users; i could do it by myself but you are Gigantus, so… more visibility

    If you want i can send you the default necessary bat; if you link it in the thread's post and you add few more information it will be very usefull

    If you use once processexplorer in order to pick up that couple of necessary information and you create the first batch then for every mod you install next it is just matter of a little change in the mod name in the bat file and you can contemporary have how many mod you want doing like that, as for m2tw. And if you do not want a mod but BI itself it is enough to put where necessary:
    bi instead of bi"mod name"

    It can also be used to launch rtw mods only by raplacing the executable name, infact rtw and rtw-BI shares the same ID, and that was originally the problem: but now it is a resource for me

    I think that it can also be used in order to launch m2tw mods but this time you also have to find and change m2tw ID, not only the executable. When I TRY WITH M2TW i'll let you know if it works.

    PM me if you want me to sent you the default BATCH: it was in the video description but link is gone so i had to do it by myself

    Thank you again it was really good and im happy now

  7. #7
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,429
    Blog Entries
    23

    Default Re: Creating a World - Desktop Shortcuts for the Kingdoms Campaigns

    I will add the link in the RTW tutorial - the batch file will be very helpful, simply paste the text here as attaching a bat file only works if it is in a zip format. And replace your personal steam reference with suitable wording like steam account reference.

    There is no issue with M2TW using my short cuts in Steam - Steam's BI executable is very unique in that aspect, the disk version works fine in a simple batch file.
    Last edited by Gigantus; May 20, 2020 at 07:27 PM.




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
  •