Results 1 to 9 of 9

Thread: Making mercenary units trainable

  1. #1
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Making mercenary units trainable

    Today I was looking back at things I tried previously that didn't work out and how to modify them to make them work.

    What I came across that was bugging me was making mercanry units trainable.
    Initially, I only wanted them retrainable as in this topic:
    https://forums.totalwar.org/vb/showthread.php?t=95283

    However, as that didn't work out for some reason, I thought of scrapping the limit of only allowing retraining, in making the unit fully hirable.

    As you can imagine, that didn't quite work either...

    What I did:
    Change descr_regions.txt to have several regions have a resource called levant
    Change export_descr_buildings.txt to add levant as one of the hidden resources to the top
    Change export_descr_buildings.txt to add following lines to large_stone_wall, huge_stone_wall, fortress and citadel:
    Code:
                    recruit_pool "Crusader Sergeants"  1   0.2   2  0  requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, hungary, poland, sicily, }  and hidden_resource levant
                    recruit_pool "Crusader Knights"  1   0.15   2  0  requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, hungary, poland, sicily, }  and hidden_resource levant
                    recruit_pool "Religious Fanatics"  1   0.2   3  0  requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, hungary, poland, sicily, }  and hidden_resource levant
                    recruit_pool "Great Cross"  1   0.1   1  0  requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, hungary, poland, sicily, }  and hidden_resource levant
                    recruit_pool "Ghazis"  1   0.2   3  0  requires factions { egypt, turks, }  and hidden_resource levant
                    recruit_pool "Mutatawwi'a"  1   0.2   4  0  requires factions { egypt, turks, }  and hidden_resource levant
    Change export_descr_unit.txt to add the factions to the ownership line of the above units
    Started a new game as HRE, teleported a character to Damascus, took it after a turn using auto_win, add_population up to 24000, process_cq to build all walls and enough PO buildings to prevent a revolt.
    Ended turn about 10 times.

    Still cannot hire any of the units.
    I tried above then also with removing the mercenary_unit attribute off the selected units, but that didn't help either.

    Of course I could create a completely new unit resembling the above units, but it has to be the same unit in my case because I want this to allow retraining.

    Any pointers on where I went wrong?
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  2. #2
    Member Member Charge's Avatar
    Join Date
    Jul 2007
    Location
    Russia
    Posts
    1,324

    Default Re: Making mercenary units trainable

    That might sound very stupid, but have you regenerated .rwm? (you haven't mentioned it)
    It is so simple procedure that I constantly keep forgetting it
    Or deleting it after changes to descr_regions isn't actual in M2TW ?
    Last edited by Charge; 01-03-2008 at 18:03.

  3. #3
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Making mercenary units trainable

    Good point, I haven't deleted it because I didn't add any regions.
    But maybe doing so will fix it... Will try it out in just a bit!

    Thanks for the reply
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  4. #4
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Making mercenary units trainable

    Yes, it works absolutely perfect now (tried as Egypt this time around as they start with Gaza).

    Thanks a lot for your help Charge
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  5. #5
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Making mercenary units trainable

    You might want to be careful with mercenary retraining. Mirage41 from BC mentioned a CTD to me in regions that are both able to recruit the unit and where you can get it as a merc unit (although the exact conditions aren't clear to me right now).
    He said removing the ability to recruit it apparently fixed the problem so if you get weird ctds some dozens of turns into the game, have a look for this.

  6. #6
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Making mercenary units trainable

    Thanks for the heads up alpaca!

    I haven't started a new campaign with those settings yet (trying to finish my old one first), but I think I know what could be causing the CTD you mention.

    Retraining a mercenary unit usually draws from the mercenary pool to do so. When the pool is empty, you normally cannot retrain. However, if you can also recruit it in the settlement, it might try to draw from both pools and if the merc pool is empty but the settlement pool is not, it might cause a CTD or so...
    That is coupled with the bug that if you try to retrain a merc from merc pool and add/remove it from the retraining queue a few times, it actually deplenishes the merc pool each time rather than replenishing it when you cancel retraining that same turn...

    With your new information though, I'll make those units that are trainable in the resource regions non hirable from the merc pool of the same region. Hopefully that will work.

    Thanks
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  7. #7
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Making mercenary units trainable

    Yeah that was my theory, too. The game probably gets "confused" by which pool to apply here.

  8. #8
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: Making mercenary units trainable

    Ran a few tests just now.

    It seems that the game differentiates completely between units hired with the crusade tag and those without regardless of settlement availability of hire:

    Any unit I hired as a crusading mercenary, I cannot retrain even if I can build that unit in a given settlement or even if I have the same unit without the crusading tag in the mercenary file for the same region.

    Any same unit without the crusading tag cannot be retrained in a settlement that can build that unit.

    Hirable mercenaries in settlements can only be retrained in a settlement's training pool, not the mercenary pool.

    I guess that makes it completely impossible to enable a faction to hire a mercenary in a city and retrain it using a local merc pool and vice versa...
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  9. #9
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Making mercenary units trainable

    Hmm that probably disproves our theory

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