Results 1 to 13 of 13

Thread: Editing the units avaliable to fractions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Editing the units avaliable to fractions

    Just a quick question: Is it easy to change the units allowed to a fraction to train? Like, say I wanted to be utterly crazy and allow the english to train mongolian units (not the case but you get what I mean), would it be a simple case of editing a .txt file? Or something more complex.
    Thanks in advance

  2. #2
    midnite's Avatar Citizen
    Join Date
    Sep 2007
    Location
    new england area
    Posts
    7,141

    Default Re: Editing the units avaliable to fractions

    Quote Originally Posted by Tetsu View Post
    Just a quick question: Is it easy to change the units allowed to a fraction to train? Like, say I wanted to be utterly crazy and allow the english to train mongolian units (not the case but you get what I mean), would it be a simple case of editing a .txt file? Or something more complex.
    Thanks in advance

    It is very easy.

    Look for this file under your data directory export_descr_unit. Open it using a text editor. For example let us change the mongolian horse archers.
    Currently thiey are only available to 1 faction, the mongols. Look for this line


    type Mongol Horse Archers
    dictionary Mongol_Horse_Archers ; Mongol Horse Archers
    category cavalry
    class missile
    voice_type Light
    banner faction main_cavalry
    banner holy crusade_cavalry
    soldier Mongol_Horse_Archers, 36, 0, 1
    mount fast pony
    mount_effect elephant -4, camel -4
    attributes sea_faring, hide_forest, very_hardy, can_withdraw, cantabrian_circle
    formation 2, 4.4, 3, 6, 3, square
    stat_health 1, 0
    stat_pri 4, 3, quality_cav_composite_arrow, 190, 30, missile, missile_mechanical, piercing, none, 0, 1
    stat_pri_attr no
    stat_sec 5, 6, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    stat_sec_attr no
    stat_pri_armour 0, 2, 0, flesh
    stat_sec_armour 0, 0, flesh
    stat_heat 0
    stat_ground 0, 0, -3, 0
    stat_mental 11, disciplined, trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 690, 100, 120, 95, 670, 4, 140
    armour_ug_levels 0, 1
    armour_ug_models Mongol_Horse_Archers, Mongol_Horse_Archers_ug1
    ownership mongols
    era 0 mongols
    era 1 mongols
    era 2 mongols

    and change it to this

    armour_ug_models Mongol_Horse_Archers, Mongol_Horse_Archers_ug1
    ownership mongols, england
    era 0 mongols, england
    era 1 mongols, england
    era 2 mongols, england

    England can now recruit mongol horse archers, at least in custom battles. I think it should work in the campaign also.
    memory of Midnite, Pumpkin, Bear, Pip and Pepper -- 4/2/10, 5/24/10, 11/27/17, 11/11/18 and 1/15/19

    Under the esteemed patronage of Elrond

  3. #3

    Default Re: Editing the units avaliable to fractions

    Ahhh thank-you very much I would +rep but can't, either due to lack of knowladge (yes I'm newb ) or due to lack of post count. But thank you, I shall post again once I know the results on campaign recruitment.

    *edit*
    Upon further exploration, I'll need to edit the building .txt to allow england (or whatever fraction) to build new units. With the following as an example:
    "recruit_pool "Levy Spearmen" 1 0.7 5 0 requires factions { england, } "
    I can understand how to add factions to the allowed recruitment pool, but what do the varying numbers mean?
    Last edited by Tetsu; April 24, 2008 at 11:33 PM.

  4. #4

    Default Re: Editing the units avaliable to fractions

    I can't answer your question, but yes you do need more posts. I think the requirement is 50.


  5. #5
    Naked Emperor's Avatar Centenarius
    Join Date
    Mar 2005
    Location
    Norway
    Posts
    828

    Default Re: Editing the units avaliable to fractions

    It is rather more complicated than that.

    If you follow midnites advice, most likely you will end up with invisible units. You have to change the ModelDB file as well and that is a little more complicated. Also if you are going to use them in the campaign you will have to change the EDB as well.

    Most likely there should be a guide on the modding forums how to change the ModelDB file, so use the search function.
    No battleplan ever survives contact with the enemy
    - Field Marshall Helmuth Carl Bernard von Moltke -

    ____________________________________________________________

  6. #6
    midnite's Avatar Citizen
    Join Date
    Sep 2007
    Location
    new england area
    Posts
    7,141

    Default Re: Editing the units avaliable to fractions

    Quote Originally Posted by Naked Emperor View Post
    It is rather more complicated than that.

    If you follow midnites advice, most likely you will end up with invisible units. You have to change the ModelDB file as well and that is a little more complicated. Also if you are going to use them in the campaign you will have to change the EDB as well.

    Most likely there should be a guide on the modding forums how to change the ModelDB file, so use the search function.
    Actually I stand partially corrected. If I add a regular faction unit to another faction unit then naked emperor is correct, I get an invisible unit and the modeldb file would have to be modified. But if I add a mercenary unit to a faction that did not already have that particular merc unit available then what I described above works. EXample I added a numidian cav unit to england. The merc numidian cav unit was available only to the moors. The unit appeared normal in my custom battle. See the enclosed picture. Eng knight with numidian cav, my modified numidain cav that is
    memory of Midnite, Pumpkin, Bear, Pip and Pepper -- 4/2/10, 5/24/10, 11/27/17, 11/11/18 and 1/15/19

    Under the esteemed patronage of Elrond

  7. #7

    Default Re: Editing the units avaliable to fractions

    Sorry for asking this here but I dont think there is need to make another topic for this. But I have been trying to transfer Berdiche Axemen trainable from castles. I have done all right removed them from militia buildings and but them into castles but my game crashesh every time I start it. When I just delete my berdiche axemen entry under castle barracks parts. Game starts working again. Is there something else that needs to be done to transfer city unit to castle?

    I hope you people can understand what I am trying to say here.

  8. #8

    Default Re: Editing the units avaliable to fractions

    Quote Originally Posted by Aleksei Raukov View Post
    Sorry for asking this here but I dont think there is need to make another topic for this. But I have been trying to transfer Berdiche Axemen trainable from castles. I have done all right removed them from militia buildings and but them into castles but my game crashesh every time I start it. When I just delete my berdiche axemen entry under castle barracks parts. Game starts working again. Is there something else that needs to be done to transfer city unit to castle?

    I hope you people can understand what I am trying to say here.
    Did you check the system.log MTW2 creates? It's the best hint when the game doesn't load properly/crashes due to wrong values in EDU, EDB, desr_strat.txt etc. It tells which line it can't parse.

  9. #9

    Default Re: Editing the units avaliable to fractions

    These are last 5 lines in system log.

    Spoiler Alert, click show to read: 
    06:05:16.883 [system.io] [warning] open: data/models_strat/residences/textures/NE_ship_dock.TGA.dds is missing
    06:05:16.945 [system.io] [warning] open: data/terrain/aerial_map/water.tga.dds is missing
    06:05:16.977 [system.io] [warning] open: data/terrain/aerial_map/tile_models/alpha_pages/mountain_mask.tga.dds is missing
    06:05:17.008 [system.io] [warning] open: data/terrain/aerial_map/tree_models/textures/conifer_01.TGA.dds is missing
    06:05:17.008 [system.io] [warning] open: data/terrain/aerial_map/tree_models/textures/conifer_winter.TGA.dds is missing

  10. #10

    Default Re: Editing the units avaliable to fractions

    Delete the log, start SS again and look for comments regarding EDU, EDB and the actual arror in the particular line.

    Post the whole log in here.

    Remember that there's also a log-folder containing a sytem.log! Choose the right one (easy to spot by checking the time)
    Last edited by Anarion; April 25, 2008 at 05:01 AM.

  11. #11

    Default Re: Editing the units avaliable to fractions

    I found the problem:

    Spoiler Alert, click show to read: 
    13:23:45.609 [script.err] [error] Script Error in mods/Stainless_Steel_6/data/export_descr_buildings.txt, at line 1263, column 138
    Unexpected in condition parsing: 'recruit_pool'


    Question is how I can find that with my notepad T_T

  12. #12

    Default Re: Editing the units avaliable to fractions

    Notepad --> View --> Status Bar

    then check the bottom for the line number

  13. #13

    Default Re: Editing the units avaliable to fractions

    haha I managed fix it thanks!

Posting Permissions

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