Page 5 of 6 FirstFirst 123456 LastLast
Results 81 to 100 of 112

Thread: How to add mercenaries.

  1. #81
    KEA's Avatar Senator
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    1,104

    Default Re: How to add mercenaries.

    The captain model needs a merc entry as well (in models.db)

  2. #82
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: How to add mercenaries.

    Thanks! What a stupid mistake of my.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  3. #83
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

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

    Default Re: How to add mercenaries.

    Edit: ninja'ed by not reading to the end of the thread before responding

    Allocate a merc entry for the captain model (check descr_characters for the model's name) in the modelDB file, although I would have expected a regular faction captain. The mercenary_unit attribute of the captain's unit might be messing with that captain allocation.
    Last edited by Gigantus; May 24, 2015 at 09:49 AM.










  4. #84

    Default Re: How to add mercenaries.

    Sorry for necroing this thread again, but I have a question to the replenishment for the mercenaries.

    So when i put this line into the descr_mercenaries:

    unit Swordsmen Recruits exp 0 cost 300 replenish 0.36 - 0.5 max 100 initial 5

    I can buy 5 swordsmen recruits - but regardless how long I wait there do not come new mercs into that region. So when I buy this 5 mercs with General A, send him into an adventure and want to buy mercs with General B - i can wait until oblivion. Only when I disband one swordsmen unit it comes back the next round.

    Is that intended? And if yes, how can I make sure that multiple general general can by a few mercs (without setting the initial value higher)?

    EDIT: Problem solved - it seems to get buggy when you have the same region in different pools.
    Last edited by Nihilem; June 24, 2016 at 03:14 PM.

  5. #85
    Civis
    Join Date
    Aug 2009
    Location
    Always temporary.
    Posts
    186

    Default Re: How to add mercenaries.

    What about if the mod is a total conversion? Are there any extra steps? For my mod, I followed the steps as best as I can. Now, when I added the unit to the roster, it loaded fine and looks ok in custom battles. I started with the descr_mercenaries file cleaned and empty to start from scratch. I added the entry like this:

    pool Crab
    regions Kyoukan_Province
    unit Yari Ronin exp 2 cost 670 replenish 0.36 - 1.0 max 6 initial 3
    This is the only entry in the mercenaries file. The game runs fine, but when I try to run the campaign it returns to the single player menu. I checked the log and found this line:
    19:24:32.389 [script.err] [error] Script Error in mods/Bare_Geomod/data/world/maps/campaign/imperial_campaign/descr_mercenaries.txt, at line 9, column 11
    Unrecognised unit name found: 'Yari Ronin exp 2 cost 470 replenish 0.36 - 1.0 max 6 initial 3'
    What exactly could cause this?

    For details, here is what the entries for the desired unit look like:

    type Yari Ronin
    dictionary Yari_Ronin
    category infantry
    class spearmen
    voice_type Light
    banner faction main_infantry
    banner holy crusade
    soldier yari_ronin, 43, 0, 1.3125
    attributes sea_faring, hide_forest, can_withdraw, hardy, mercenary_unit
    formation 1.2, 1.2, 2.4, 2.4, 5, square
    stat_health 1, 0
    stat_pri 7, 3, no, 0, 0, melee, melee_blade, piercing, spear, 25, 1
    ;stat_pri_ex 0, 0, 0
    stat_pri_attr light_spear, spear_bonus_6
    stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
    ;stat_sec_ex 0, 0, 0
    stat_sec_attr no
    stat_pri_armour 5, 5, 0, metal
    ;stat_armour_ex 0, 4, 0, 0, 1, 3, 3, flesh
    stat_sec_armour 0, 0, flesh
    stat_heat 2
    stat_ground 1, -2, 3, 2
    stat_mental 11, impetuous, trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 670, 300, 100, 75, 670, 4, 160
    armour_ug_levels 0
    armour_ug_models yari_ronin
    ownership slave
    ;unit_info 5, 0, 4
    10 yari_ronin
    1 1
    47 unit_models/_Units/samurai/ronin_yari_lod0.mesh 10000
    2
    5 slave
    65 unit_models/_Units/samurai/textures/samurai_infantry_body.texture
    70 unit_models/_Units/samurai/textures/samurai_infantry_body_norm.texture
    36 unit_sprites/merc_Samurai_sprite.spr
    4 merc
    65 unit_models/_Units/samurai/textures/samurai_infantry_body.texture
    70 unit_models/_Units/samurai/textures/samurai_infantry_body_norm.texture
    36 unit_sprites/merc_Samurai_sprite.spr
    2
    5 slave
    76 unit_models/_Units/samurai/attachments/samurai_infantry_weapons_diff.texture
    76 unit_models/_Units/samurai/attachments/samurai_infantry_weapons_norm.texture 0
    4 merc
    76 unit_models/_Units/samurai/attachments/samurai_infantry_weapons_diff.texture
    76 unit_models/_Units/samurai/attachments/samurai_infantry_weapons_norm.texture 0
    1
    4 None
    10 MTW2_Spear 0
    2
    18 MTW2_Spear_primary
    14 fs_test_shield 0
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    Any ideas? I'm out of 'em.

  6. #86

    Default Re: How to add mercenaries.

    It seems to be reading the whole
    'Yari Ronin exp 2 cost 670 replenish 0.36 - 1.0 max 6 initial 3'
    thing as the unit name - so I'm guessing you need a tab and not just a space between Ronin & exp (or vice versa)

    anyway some sort of text formatting issue...

  7. #87
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: How to add mercenaries.

    A tab is needed after the unit type, that's right. Just like for "unit" lines in descr_strat and campaign_script. It's how the game knows that it has reached the end of the unit type, because the type can contain spaces.

  8. #88
    Civis
    Join Date
    Aug 2009
    Location
    Always temporary.
    Posts
    186

    Default Re: How to add mercenaries.

    Yup, that's exactly what it was. Thanks you two.

    Now I must once again bang my head against the wall.

  9. #89

    Default Re: How to add mercenaries.

    Hello it seems I'm the only fool here who hasn't understood the process of changing the texture file, for one thing even tho you outlined in red what should be changed you still added lines to the texture file that are not in red (confusing me at the beginning) and that is not the problem but my problem is the number 4 you changed it to 5 but I didn't quite understand did you mean we increase the number that would be in that place by 1? or change it to 5 always? for example the unit Feudal Knights has the number 13 instead of 4, should i change it to 14 or 5? another thing is how to know what lines to add? where do I get those textures from? and do I always add them where you added them? and for example units like Feudal knights are available to all european nations and are coloured accordingly, so how to change their texture to fit a mercenary tone? can I use the French color for example as a texture?
    It would probably be much easier to answer all these questions by showing me what to change in the feudal knights part of the battle_model file and then I can apply that to all files (I tried to copy exactly what you did in this example but big surprise, that didn't work and the unit remained a silver surfer)

  10. #90

    Default Re: How to add mercenaries.

    New info: I discovered that when adding a unit to mercenary list, if that unit is a recruitable unit by a certain nation and that nation recruits it as a mercenary it will have all the necessary sprites, in other words if one's aim is to add recruitable units to the merc pool of a certain nation and wants to play that nation then he has not to change the texture file or the EDU file for that unit...for example one can simply add all France's recruitable units to the merc pool without changing anything outside of desc_mercenaries and those units would show normal textures if France recruits them

  11. #91
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

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

    Default Re: How to add mercenaries.

    number stuff in modeldb - the number in front of the line must be equal to the number of characters following it. Examples:

    6 england
    8 big_dude

    The way textures work:
    the 'merc' texture will be used if the unit has the mercenary_unit attribute entry in EDU
    the 'faction name' texture will be used otherwise
    the 'silver surfer' appears if there is no texture for that faction and the unit does not have the mercenary attribute above

    Seeing that mercenaries can be recruited by every faction unless restricted in descr_mercenaries any faction that has no texture allocated will recruit silver surfers. The mercenary attribute is there to reduce the requirements to one texture for all.
    Following that: if you want to use a regular unit as mercenary as well (normal recruiting PLUS mercenary recruiting) will mean that you have to create texture entries for all factions in the modeldb - unless you add the mercenary attribute to the EDU entry and make sure a merc texture entry exists in the modeldb file.










  12. #92

    Default Re: How to add mercenaries.

    Quote Originally Posted by Gigantus View Post
    The way textures work:
    the 'merc' texture will be used if the unit has the mercenary_unit attribute entry in EDU
    the 'faction name' texture will be used otherwise
    the 'silver surfer' appears if there is no texture for that faction and the unit does not have the mercenary attribute above

    Seeing that mercenaries can be recruited by every faction unless restricted in descr_mercenaries any faction that has no texture allocated will recruit silver surfers. The mercenary attribute is there to reduce the requirements to one texture for all.
    Following that: if you want to use a regular unit as mercenary as well (normal recruiting PLUS mercenary recruiting) will mean that you have to create texture entries for all factions in the modeldb - unless you add the mercenary attribute to the EDU entry and make sure a merc texture entry exists in the modeldb file.
    Let me check that I got this right. Instead of having for example:
    Code:
    7 denmark 
    38 unit_models/Armenian/Armenian1.texture 
    45 unit_models/Armenian/Armenian1_normal.texture 
    47 unit_sprites/Armenian/Armenian_Horse_Archer.spr 
    5 egypt 
    38 unit_models/Armenian/Armenian1.texture 
    45 unit_models/Armenian/Armenian1_normal.texture 
    47 unit_sprites/Armenian/Armenian_Horse_Archer.spr
    And ect for all factions, I could just have one merc entry for every single units textures, then the mercenary attribube for all units in EDU regardless if they are true mercenary or not, and that would be that? But this is incredibly relieving, why bother having textures entries for factions then? If I ever need to reopen this cursed battlemodel file, I will be much less weary... Thanks both for the tip.

    Ps, I got it right? This is the big secret tip that might save my sanity some day?

  13. #93

    Default Re: How to add mercenaries.

    Yes, the merc attribute values as "merc" entry in the .db, and for all factions...

    But having entries for all factions for each unit is never wasted, you do not risk unwilling "silver surfers" (especially for unit officers, bannermen, other aside men in a unit, etc.)..


  14. #94

    Default Re: How to add mercenaries.

    I'm encountering a problem I know I've had trouble with before; but I'm not seeing the solution here (and have no clue where to look for it).

    Anyway, I've successfully added a Merc Longboat (I think); but I'm having trouble with my Mercenary Norse Swordsmen and Mercenary Norse Archers. The situation is this: I only use the (Turn Based) Campaign Map; but I did follow all the procedures listed above; however the pictures that appear in the mercenary recruitment window are of generic units (except for the longboat).

    I've even searched directories to compare where I placed the various Merc Longboat TGA's etc. and have ensured that the tga's for the other two units are there as well. They are showing up in the Army window and the Info Pop Ups work too; but the recruitment window is just not right.

    So, I'm stumped.

    SK.
    Last edited by Knightforger; March 04, 2018 at 03:24 AM.

  15. #95
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: How to add mercenaries.

    If they have the mercenary_unit attribute in EDU then...

    data\ui\unit_info\merc
    data\ui\units\mercs

  16. #96

    Default Re: How to add mercenaries.

    Quote Originally Posted by Withwnar View Post
    If they have the mercenary_unit attribute in EDU...
    That was the issue: somehow I forgot to add ", mercenary_unit" to the end of the attributes after copying and renaming the entries.

    Now (that it all works) I have to decide whether I actually want separate "Mercenary" units or to go back and just add the "mercenary_unit" attribute to the original units.

    Decisions, decisions.

    SK

    PS. Thanks! I think the file may have been opened twice and while I made the change in the one I did not save it and then ended up making other changes in the other...

  17. #97

    Default Re: How to add mercenaries.

    Sorry for the late necro.

    I Gigantus, or anyone else, I am having some issues with your instructions or the game itself. I am playing Stainless Steel and had a mercenary unit causing a CTD because its textures did not exist. following your instructions I added a replacements for any missing files.

    7 macemen
    1 4
    56 unit_models/_Units/EN_Lmail_Hmail/baltest_mace_lod0.mesh 121
    56 unit_models/_Units/EN_Lmail_Hmail/baltest_mace_lod1.mesh 900
    56 unit_models/_Units/EN_Lmail_Hmail/baltest_mace_lod2.mesh 2500
    56 unit_models/_Units/EN_Lmail_Hmail/baltest_mace_lod3.mesh 6400
    1
    4 merc
    80 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_teutonic_order.texture
    87 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_teutonic_order_normal.texture
    57 unit_sprites/merc_Dismounted_Mercenary_Knights_sprite.spr
    1
    4 merc
    57 unit_models/AttachmentSets/Final Heater_merc_diff.texture
    57 unit_models/AttachmentSets/Final Heater_merc_norm.texture 0
    1
    4 None
    9 MTW2_Mace 0

    As far as I can tell it should work, but the problem is in battle the units are loaded with a silver surfer sheen over top of the textures. I can see the body textures, but the silver surfer is coating it. I am unsure why that is and want to fix it ASAP. Thank you!

  18. #98
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

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

    Default Re: How to add mercenaries.

    If it's a total silver surfer then it means that the unit's faction is not represented in the texture section. That should however not be the case if the unit has the 'mercenary_unit' ability in it's EDU entry.

    If it's like an ice coating with some texture still visible then it's a bad 'normal' texture.










  19. #99
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

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

    Default Re: How to add mercenaries.

    Check in the 3D section (workshop as well as tutorials) on how to get a proper normal map texture.










  20. #100

    Icon3 Re: How to add mercenaries.

    Greetings!

    After reading this thread i started to wonder if it's possible to make some mercenaries available only to a specific general (with a specific custom trait/ancillary for example).
    This could be used to create lots of subfactions in mods if necessary.

    Best regards.

    Milovan

    P.S. It is amazing that many threads related to MTW2 modding are still alive.

Page 5 of 6 FirstFirst 123456 LastLast

Posting Permissions

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