Results 1 to 30 of 77

Thread: Using -mod:my_mod

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Modder Member Encaitar's Avatar
    Join Date
    Oct 2003
    Location
    Melbourne, Australia
    Posts
    234

    Default Using -mod:my_mod

    How to use the -mod:my_mod command line switch

    Here is a quote (I believe from CA although I cannot find the source anymore) that explains a bit more about this switch:
    The command line option for modding is there in previous builds as well, but is not fully implemented. In the patch build, most significant files go through a directory switching mechanism (though not quite all, unforunately). It is controlled via the -mod command... For example, -mod:my_mod will cause the game to look for the descr_ files in the my_mod directory rather than in the data directory.

    The difference between the 1.2 exe's use of the shortcut and that in earlier builds is that in 1.2 it will actually look for a requested file under data if it cannot find it under my_mod. This allows you to do partial mods, changing only one or two files. The earlier build insists that you duplicate all of the descr_ files plus the contents of the world directory. The 1.2 build also applies the directory switching to a larger variety of files.

    Since this system refers to the descr_ files first and foremost it allows you to mix and match your own content with that from vanilla RTW quite easily, since most of the files the engine loads up are specified in the descr files. For example, if you don't like the Germanic double-handed axeman's model, you can just duplicate descr_model_battle.txt in your mod directory, supply a new cas model there as well and redirect the model type entry in descr_model_battle to the new file.
    Now onto the guide:
    Firstly, you must have RTW v1.2 for this to work.

    1. In the root directory of Rome - Total War (i.e. the one that has the .exe in it), create a folder for your mod - in this example we will call it "my_mod"

    2. Place any modified descr_ and export_descr txt files (that would normally go in the Data folder) that your mod uses in this my_mod folder.

    3. Run the game with the command line switch "-mod:my_mod", where "my_mod" is the name of the folder created in Step 1. An example of how your run command might look is:
    run "C:\Program Files\Rome - Total War\RomeTW.exe" -mod:my_mod
    Note that the switch should be outside the quotation marks that surround the path of the exe file. Also, the '-' in front of the switch is not necessary (you can just use "mod:my_mod" if you wish).

    Additional: how to use provincial campaigns with the -mod:my_mod switch

    i) Place all world files in the Data\world\maps\campaign\my_campaign\ folder as per usual.

    ii) Create the folder my_mod\world\maps\campaign\my_campaign and copy the following files into it from the Data\world\maps\campaign\my_campaign\ folder:
    descr_strat.txt
    leader_pic_{faction}.tga
    map_{faction}.tga

    (So in actual fact these files don't need to be in the data\etc folder, but can just be in the my_mod\etc folder)

    iii) As per Step 3 above.


    Note: When running RTW with the -my:my_mod switch, custom battles do not seem to work (at least, I have been unable to get them to). Battles in campaigns do though.
    Last edited by Encaitar; 03-02-2005 at 14:50. Reason: Added quote
    Encaitar Arandur

    Middle-earth: Total War Dev

  2. #2
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Using -mod:my_mod

    Please, correct me if I am wrong, but from this tutorial it seems to me that in the new campaign we cannot show new symbols, buttons and banners (models and textures?).
    Is that true?

    I was thinking in the possibility of describing the new path for models, textures, symbols and banners in this way:
    In the new descr_model_battle.txt file
    Code:
    texture				gauls, my_mod/models_unit/textures/unit_barb_infantry_gaul.tga
    In the new descr_model_strat.txt file
    Code:
    texture				egypt, my_mod/models_strat/textures/diplomat_egypt.tga
    and so on.

    Has anybody tried this before?
    In any case, I didn't find the same possibility for info_cards and unit_cards.

  3. #3
    Modder Member Encaitar's Avatar
    Join Date
    Oct 2003
    Location
    Melbourne, Australia
    Posts
    234

    Default Re: Using -mod:my_mod

    An easier solution in cases where the file is referenced from one of the descr_ txt files would be to give your modded version of the texture a different filename, but put it in the normal folder. So your code might look something like this:
    Code:
    texture				gauls, data/models_unit/textures/my_mod_unit_barb_infantry_gaul.tga
    You'd then put this modified descr_ txt file in the my_mod folder.
    Encaitar Arandur

    Middle-earth: Total War Dev

  4. #4

    Default Re: Using -mod:my_mod

    1. To get custom battles working you need to include a bunch of files from data/world in your mod folder. For XGM the installer just copies the entire contents of data/world to xgm/data/world before installing the rest of the mod. I have never bothered to figure out exactly which files are needed.

    2. For most files the exe will look in mymod/data first to see if there is a modified version, but it will not do this for .CAS files, so you need to go through the text files and specify the location of modified .CAS files.

    In most cases the text files expect a location relative to the install folder, like data/models_unit/foo.CAS, which you can change to mymod/data/models_unit/foo.CAS. But in some cases the location is specified relative to the data folder itself, like say models_building/foo.CAS. Here you need to give the location as ../mymod/data/models_engine/foo.CAS. The ../ tells the exe to look one level up.

    3. One bonus that comes with using -mod:mymod is that replacing unit and unit info cards is much easier. The exe will check in the mymod folder before looking in the packs.

  5. #5
    Member Member kleemann's Avatar
    Join Date
    Feb 2006
    Location
    Estonia (little state in EU) and town is Tartu
    Posts
    17

    Default Re: Using -mod:my_mod

    Hi to everybody,

    Where i can find information about RTW-s using -mod:my_mod.
    I want to make mod swich for BI. I don't want to overwrite original files and the mod managing is a lot easier then.
    If i use "RomeTW:BI.exe" -mod:my_mod then i get CTD when puting BI files into that folder, what's the problem?

  6. #6
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Using -mod:my_mod

    Quote Originally Posted by DimeBagHo
    1. To get custom battles working you need to include a bunch of files from data/world in your mod folder. For XGM the installer just copies the entire contents of data/world to xgm/data/world before installing the rest of the mod. I have never bothered to figure out exactly which files are needed.

    2. For most files the exe will look in mymod/data first to see if there is a modified version, but it will not do this for .CAS files, so you need to go through the text files and specify the location of modified .CAS files.

    In most cases the text files expect a location relative to the install folder, like data/models_unit/foo.CAS, which you can change to mymod/data/models_unit/foo.CAS. But in some cases the location is specified relative to the data folder itself, like say models_building/foo.CAS. Here you need to give the location as ../mymod/data/models_engine/foo.CAS. The ../ tells the exe to look one level up.

    3. One bonus that comes with using -mod:mymod is that replacing unit and unit info cards is much easier. The exe will check in the mymod folder before looking in the packs.

    The biggest drawback of -mod:my_mod is that while it works nice for pure RTW mods, it's horrible for BI mods.

    Since BI itself is sort of "RTW -mod:bi", in order to make -mod:my_mod work for BI you need to copy entire BI folder to your mod folder in order to make it work.
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  7. #7

    Default Re: Using -mod:my_mod

    Quote Originally Posted by player1
    The biggest drawback of -mod:my_mod is that while it works nice for pure RTW mods, it's horrible for BI mods.

    Since BI itself is sort of "RTW -mod:bi", in order to make -mod:my_mod work for BI you need to copy entire BI folder to your mod folder in order to make it work.
    There are ways around this in fact. Some files can simply be skipped (finding out which ones is a pain, but I think the animation folder is one - because the BI animations are all included in the RTW animations files now). With a lot of others you can edit the text files to tell the engine to look for them in the BI folder. You could do this with all of the unit models, textures, and sprites for example (and it would be pretty easy - just a search and replace in DMB for "data/"/"bi/data/" would probably do the trick. In theory you could do this for a lot of other files, although tracking down where the locations are specified in the text files can be a pain in some cases.

    Obviously this takes a lot more start-up effort than an equivalent mod for RTW though. *Edit* Actually this seems like a pretty useful community service that someone could do - constructing a base BI mod that contains as little of the original BI folder as possible, with all the basic text file edits taken care of. *Edit 2* Just looking over the BI files I think you could use this method to avoid copying most of the files - but there is really no way to avoid copying almost all of the ui folder - which is about 232 MB.
    Last edited by DimeBagHo; 03-01-2006 at 18:41.

  8. #8
    Member Member Stuie's Avatar
    Join Date
    Aug 2001
    Location
    Upper Gwynedd, PA
    Posts
    406

    Default Re: Using -mod:my_mod

    Quote Originally Posted by player1
    The biggest drawback of -mod:my_mod is that while it works nice for pure RTW mods, it's horrible for BI mods.

    Since BI itself is sort of "RTW -mod:bi", in order to make -mod:my_mod work for BI you need to copy entire BI folder to your mod folder in order to make it work.
    I think I finally figured this out. You need to put your mod folder in the BI folder, and then use this on the command line:

    Code:
    "C:\Program Files\Activision\Rome - Total War\RomeTW-BI.exe" -mod:bi/modname
    I tried it real quick with TFT, and v1.6 shows on the Options screen, and I can start a campaign. Didn't go much further than that due to time constraints, but it looks promising.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO