Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27

Thread: Creating a World - Replacing Strat Models

  1. #21

    Default Re: Creating a World - Replacing Strat Models

    Didn't know where else to stick this but wanted to post somewhere related to strat models to save anyone else the aggro... The strat_flag.cas listed in descr_standards.txt as
    data/banners/strat_flag.cas
    won't be read from a mod_folder unless you name the path e.g.
    mods/my_mod/data/banners/strat_flag.cas
    or rename the flag and actually stick it in the M2TW/data folder like;
    data/banners/my_new_strat_flag.cas


    which has the side effect of meaning it's probably not worth trying to tweak the cas file, as pathing to the mod_folder name will make the game CTD on campaign load if anyone changes their mod_folder name (by which point you'll have probably forgotten that it's defined in there...)

  2. #22
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Creating a World - Replacing Strat Models

    We came across similar issues with the actual battle banners in 1648, the path in descr_banners_new needed to be set absolute (your path example) which was a pain to remember as we changed the folder name in one of the later releases and, as you describe, it took a while to remember that.
    Third age has an issue with a projectile CAS file as well (dwarf axes) - which leads to crashes when Steam users use the 'rename campaign folder' method to run the mod, something that will hopefully be a thing of the past with my repack.










  3. #23

    Default Re: Creating a World - Replacing Strat Models

    I've come across the projectile problem before - at the end of a very long mod re-build to try and work out why half the team had battle crashes and the other half didn't

    That was why I wasn't keen on starting another absolute path issue, I'm already running same mod in two different named folders for clean/dev version! BUT I think I might try it as a deliberate different folder:
    "mods/common_parts/data/banners/pkh_strat_flag.cas"
    If the file was named after the mod, then other mods could use same folder for problem files too.

    Would that work for a Steam install??


    EDIT: In case it's not clear, my logic for trying that is it should be easier to track and remember that the mod needs to look up 'common_parts' than it would be to know that PKHIV needs something in PKHII !

  4. #24
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Creating a World - Replacing Strat Models

    The Steam issue (folder rename is a real dinosaur method to make mods Steam compatible anyhow) will be totally avoided by using a steam compatible BAT file. See the code, red is optional but won't hurt for low end (low core speed) machines:
    Code:
    @echo off
    cd ..\..
    IF EXIST kingdoms.exe (start /affinity 1 /high kingdoms.exe @%0\..\[your CFG file's name here].cfg) ELSE (
    IF EXIST medieval2.exe (
    start /affinity 1 /high medieval2.exe @%0\..\[your CFG file's name here].cfg) ELSE (
        echo ERROR: Cannot find the M2TW or Kingdoms executable.
        echo You probably installed [your mod's name here] into the wrong folder.
        pause
      )
    )
    As to your actual question: farming out stuff to a dedicated mod folder that will not be affected by a rename should be the way to go, makes me wonder why I haven't thought of that I mean it's as good as using the default root folder because of the absolute path.

    It solves the possible rename problem AND keeps it out of that default folder.

    Will work with Steam as well - there are actually a very limited number of issues with Steam that require an adjustment in approach. Mostly for regenerating files - like NOT deleting STRING.BIN files for tooltips, battle, strat and shared because that quartet will not generate, it will however update existing string.bin files from edited TXT files provided the TXT files have a later timestamp then the string.bin ones. Same with ui\*.SD files I believe.
    Last edited by Gigantus; July 06, 2020 at 01:13 AM.










  5. #25

    Default Re: Creating a World - Replacing Strat Models

    Quote Originally Posted by Gigantus View Post
    You do it the same way as in my example. Then it is a matter of traits to trigger it. That part is in the other thread where you posted the same question.
    Also check the thread that has been linked by vasileos
    Which thread do you mean by "That part is in the other thread where you posted the same question."?

    I got the same problem as famiglia_ducale: I do know how to change strat_models of generals, captains, diplomats, etc.. I also know a lot about traits and triggers. What I don't know is how to assign a trait-dependant strat_model to a character. There seems to be no tutorial out there. I know that this is possible, since the mod "DHRR" uses this concept. However I am not able to read off the mod's files how it works. I also can't read it off the descr_strat file as you hinted below.

    So, dear Gigantus, can you please explain how to assign a strat_model to a character via traits?

  6. #26

    Default Re: Creating a World - Replacing Strat Models

    If you already have the cas files, textures and made appropriate changes in descr_model_strat (Works if the model is already used by the faction). You only need to change two files:

    export_descr_character_traits.txt :
    Example from vanila game traits for bishops/cardinals:
    Trait PriestLevel
    Characters priest

    Level Bishop
    Description Bishop_desc
    EffectsDescription Bishop_effects_desc
    Threshold 1

    Effect Piety 1
    Effect Level 1

    Level Cardinal
    Description Cardinal_desc
    EffectsDescription Cardinal_effects_desc
    Threshold 2

    Effect Piety 1
    Effect Level 2
    Effect HeresyImmunity 1

    Here the level decides which model is used from
    descr_character.txt :

    faction papal_states
    dictionary 15
    strat_model catholic_priest ; default model
    strat_model catholic_bishop ; medium level priest
    strat_model catholic_cardinal ; advanced priest

    The lines of strat_model corresponds to the Level specified in the edct file.
    There is a limit of Levels (think 9)

    Hope this was useful.
    Best regards

    Edit:
    This should also be the tutorial you were looking for :
    https://www.twcenter.net/forums/show...-battle-models
    Last edited by Mountainhouzhe; July 26, 2021 at 03:27 PM. Reason: typo

  7. #27
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Creating a World - Replacing Strat Models

    mountainhouzhe was faster then me, that's the way to do it ('level' traits) and the link to my tutorial explaining in more detail.










Page 2 of 2 FirstFirst 12

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
  •