Results 1 to 30 of 268

Thread: Tutorial - Adding a unit to the game

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member Musashi's Avatar
    Join Date
    Nov 2002
    Location
    The Mists of Legend
    Posts
    811

    Default Re: Tutorial - Adding a unit to the game

    No, there's lots of problems. They just only crop up when someone wants to install two mods that both use custom models.
    Fear nothing except in the certainty that you are your enemy's begetter and its only hope of healing. For everything that does evil is in pain.
    -The Maestro Sartori, Imajica by Clive Barker

  2. #2
    Member Member the_mango55's Avatar
    Join Date
    Apr 2004
    Location
    Raleigh, North Carolina
    Posts
    94

    Default Re: Tutorial - Adding a unit to the game

    Quote Originally Posted by Musashi
    No, there's lots of problems. They just only crop up when someone wants to install two mods that both use custom models.
    Possibly, however what I was getting at is that it could be manually worked around by pasting all the model info from one mod into the battle_models file, then pasting all the model info from another mod directly after it.

    Since they all reference the same file, and as far as I know it doesn't hurt to have models in there that aren't in use, what would problems be?

    It's a tad burdensome, but compared to MTW and RTW (separate installs for every mod) I will take it any day.
    "You're drunk again!"
    "Na Im just exhausted from staying up all night drinking!" - Family guy

  3. #3
    Member Member Musashi's Avatar
    Join Date
    Nov 2002
    Location
    The Mists of Legend
    Posts
    811

    Default Re: Tutorial - Adding a unit to the game

    Sure, it'd work, but how many users would you trust to do that and not be emailing you asking why their game won't load anymore?

    I was thinking of having the batch file that runs the mod (Which would be included in the zipped distro) back up the original model db file (If it exists) and copy the mod's file from a special directory in the mod folder, and then restore the original before exiting. Simple enough solution if every modder sticks to it...

    But it would entail fairly long batch files if we have to copy every texture over...
    Fear nothing except in the certainty that you are your enemy's begetter and its only hope of healing. For everything that does evil is in pain.
    -The Maestro Sartori, Imajica by Clive Barker

  4. #4
    Guardian of the Fleet Senior Member Shahed's Avatar
    Join Date
    Oct 2002
    Location
    Leading the formation!
    Posts
    7,918

    Default Re: Tutorial - Adding a unit to the game

    Good job Musashi ! THANKS a lot for typing this up for up !
    If you remember me from M:TW days add me on Steam, do mention your org name.

    http://www.steamcommunity.com/id/__shak

  5. #5
    Member Member scsscsfanfan's Avatar
    Join Date
    Sep 2002
    Location
    Adelaide, Australia
    Posts
    145

    Default Re: Tutorial - Adding a unit to the game

    hi, I still has problem to get the un packed files to work, here is what I've done:

    I unpacked the data folder, deleted the 2 geographic files, then following various suggestions, I tried a few different ways:

    1. add in .cfg file,

    [features]
    --io.file_first

    or 2. add in .cfg file

    [io]
    file_first = True

    or 3. Creating bat file and open it:

    medieval2.exe --io.file_first

    however, non of them work at all.
    the game dosen't even load - gives a blank screen.
    Could someone help please?

    thanks

  6. #6
    Hiding in a bush near you Member Sir Robin the Brave's Avatar
    Join Date
    Dec 2006
    Location
    Ol' Blighty (England)
    Posts
    72

    Default Re: Tutorial - Adding a unit to the game

    I'm getting a blank screen on loadup now, would this mean I've done something wrong in the model.db file?
    Brave Sir Robin ran away.
    Bravely ran away, away!
    When danger reared its ugly head,
    He bravely turned his tail and fled.
    Yes, brave Sir Robin turned about
    And gallantly he chickened out.
    Bravely taking to his feet
    He beat a very brave retreat,
    Bravest of the brave, Sir Robin!

  7. #7
    Member Member Musashi's Avatar
    Join Date
    Nov 2002
    Location
    The Mists of Legend
    Posts
    811

    Default Re: Tutorial - Adding a unit to the game

    Yes it would. The blank screen + error noise generally means your modeldb file is borked. Although, if it gets to the medieval splash screen and then craps out, it means it's one of your data files like export_descr_unit.txt. Check the last two lines of your system.log.txt in your main medieval directory. If it says "unspecified error" then it's most likely in the modeldb file... If it's in one of the data files it will give you helpful information about which file and what line in the file.
    Fear nothing except in the certainty that you are your enemy's begetter and its only hope of healing. For everything that does evil is in pain.
    -The Maestro Sartori, Imajica by Clive Barker

  8. #8
    Member Member scsscsfanfan's Avatar
    Join Date
    Sep 2002
    Location
    Adelaide, Australia
    Posts
    145

    Default Re: Tutorial - Adding a unit to the game

    Quote Originally Posted by Sir Robin the Brave
    I'm getting a blank screen on loadup now, would this mean I've done something wrong in the model.db file?
    I had the exactly the same problem earlier. I started unit mod after found this thread, but I have already messed around with the data. I tried all things, and at the end, I decided to re install the game and patch again, my model.db or EDU files had nothing wrong, just needed a fresh install, it worked fine.
    may be similar problem in your case, if you find all your files are correct and still getting a blank screen and nothing else, might want give clean install a try.

    In term of multi mod running at the same time,the mod switch works by adding:

    [features]
    mod = franch

    [io]
    file_first = True

    at the end of your mod .cfg file, , put all modified files, unit cards, etc in the coresponding sub folder in your mod\data folder, then the run the mod with .bat file, all the modded files will be read from the mod folder.
    the only problem is that model.db still has to be run in the base data folder.

    My solution to run multiple mods in the same mother M2TW folder would be copy the model.db file a few times and rename them to Origional_model.db, Franch_model.db, Byz_model.db etc, then when you want to play franch mod, just change that file to the active modle.db file.
    Last edited by scsscsfanfan; 12-26-2006 at 01:15.

  9. #9
    Member Member the_mango55's Avatar
    Join Date
    Apr 2004
    Location
    Raleigh, North Carolina
    Posts
    94

    Default Re: Tutorial - Adding a unit to the game

    I have tried at least 20 times to create my own unit with my own skin, or existing skins, but have been unsuccessful to various degrees (sometimes the game plays but the units are invisible, sometimes the game crashes on starting, sometimes the game goes to black screen and I have to restart it)

    Finally, I copeied your sample unit EXACTLY, both the EDU and modelDB parts, and created a new byzantine skin. I don't even want this unit in my game, but I figured I would just try to get one unit working.

    Still nothing, crashes to desktop and the log says "Could not find soldier battle model for unit type 'GR_Dragoons'."
    "You're drunk again!"
    "Na Im just exhausted from staying up all night drinking!" - Family guy

  10. #10

    Default Re: Tutorial - Adding a unit to the game

    This is a very tough and long process, I kinda gave up on it till a more simple alternative comes along. I simply choose the easy way out of adding units by mix-matching armour upgrades and mount available within the same faction.

    type NE Royal Guards
    dictionary NE_Late_Bodyguard ; NE Royal Guards
    category cavalry
    class heavy
    voice_type Heavy
    banner faction main_cavalry
    banner holy crusade_cavalry
    soldier NE_Bodyguard, 32, 0, 1
    mount armoured horse
    mount_effect elephant -4, camel -4
    attributes sea_faring, hide_forest, very_hardy, can_withdraw, can_formed_charge, knight
    formation 2, 4.4, 3, 6, 2, square, wedge
    stat_health 1, 0
    stat_pri 13, 8, no, 0, 0, melee, melee_blade, piercing, spear, 25, 1
    ;stat_pri_ex 0, 0, 0
    stat_pri_attr no
    stat_sec 14, 4, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    ;stat_sec_ex 0, 0, 0
    stat_sec_attr no
    stat_pri_armour 9, 5, 3, metal
    ;stat_armour_ex 9, 10, 0, 0, 5, 3, 3, metal
    stat_sec_armour 0, 0, flesh
    stat_heat 6
    stat_ground 0, -2, -4, 0
    stat_mental 15, disciplined, highly_trained
    stat_charge_dist 45
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 1070, 250, 120, 95, 1070, 1, 210
    armour_ug_levels 5, 6
    armour_ug_models NE_Late_Bodyguard, NE_Late_Bodyguard_ug1
    ownership england, scotland, france, hre, denmark, poland, hungary
    era 2 england, scotland, france, hre, denmark, poland, hungary
    ;unit_info 13, 0, 34


    type Dismounted NE Royal Guards
    dictionary Dismounted_NE_Bodyguard ; Dismounted NE Royal Guards
    category infantry
    class heavy
    voice_type Heavy
    banner faction main_infantry
    banner holy crusade
    soldier Dismounted_NE_Late_Bodyguard, 48, 0, 1.2
    attributes sea_faring, hide_forest, very_hardy, can_withdraw
    formation 1.2, 1.2, 2.4, 2.4, 3, square
    stat_health 1, 0
    stat_pri 16, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    ;stat_pri_ex 0, 0, 0
    stat_pri_attr no
    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 9, 9, 3, metal
    ;stat_armour_ex 9, 0, 0, 0, 9, 3, 3, metal
    stat_sec_armour 0, 0, flesh
    stat_heat 6
    stat_ground 1, -2, 3, 2
    stat_mental 15, disciplined, highly_trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 570, 55, 80, 60, 570, 4, 140
    armour_ug_levels 5, 6
    armour_ug_models Dismounted_NE_Late_Bodyguard, Dismounted_NE_Late_Bodyguard
    ownership england, scotland, france, hre, denmark, poland, hungary
    ;unit_info 16, 0, 42
    You can always replace the upgrade models with those from feudal knights but the lances will be those wooden ones used by them. And for some other faction like English, you can even give the armoured horse to your English Knights and increase the defensive stats a bit to make them look more special.

  11. #11
    Senior Member Senior Member Jambo's Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    712

    Default Re: Tutorial - Adding a unit to the game

    So, the --io.file_first is incompatible with a mymod folder? There's no way to interlink the two?
    =MizuDoc Otomo=

  12. #12

    Default Re: Tutorial - Adding a unit to the game

    Step Three: Texture Alteration

    First you go to unit_models/_Units/RN_Half_3Q_Plate/textures. In here you'll see textures for this model type for a bunch of different factions. What you need to do is open one, say rn_half_3q_plate_england.texture, with a hex editor, and cut (Cut to the clipboard, you're going to need to paste it back in later) the first 48 bytes. Now rename the file from .texture to .dds, and load it up in your favorite image processing software. I'm going to be talking about how to work with it in Photoshop CS2, because that's what I own.
    I've made everything right ( at least i suppose...), but i encountered difficulties here. First time in text modding and i already find stuck in

    Never seen an HEX editor and i don't know what to look for. I downloaded it, but selecting those "48 bites" it's too much as now. I need some explanation on what to look for and modify...

    Someone can help ?


    P.S. I'm starting this because of my intention to mod existing units for the mod i'm working on with others. I would take advantage of this discussion to ask here if someone is interested. The Mod is in Italian but there are no problems for us. HERE'S a link to the discussion on TWC. We also have our own forum but it's in italian language and so for now it's useless. If someone wants to help us.

    Stat rosa pristina nomine nomina nuda tenemus

  13. #13
    Member Member -Amon-'s Avatar
    Join Date
    Sep 2003
    Location
    Amon..The Last Jedi..
    Posts
    139

    Default Re: Tutorial - Adding a unit to the game

    I tried 30 times and still blank screen with error noise..

    I edited EDU file for making my neew unit "ghazi infantry"..


    1.here is EDU entry

    Code:
     
    type             Ghazi_Infantry
    dictionary       Ghazi_Infantry      ; Ghazi Infantry
    category         infantry
    class            light
    voice_type       Light
    accent         Arabic
    banner faction   main_infantry
    banner holy      crusade
    soldier          Ghazi_Infantry, 48, 0, 1
    attributes       sea_faring, hide_forest, very_hardy, can_withdraw
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 0
    stat_pri         11, 6, no, 0, 0, melee, melee_blade, slashing, axe, 25, 1.2
    ;stat_pri_ex      0, 0, 0
    stat_pri_attr    ap
    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  0, 1, 6, flesh
    ;stat_armour_ex   0, 0, 0, 0, 1, 6, 6, flesh
    stat_sec_armour  0, 0, flesh
    stat_heat        0
    stat_ground      1, 1, 0, -1
    stat_mental      9, impetuous, untrained
    stat_charge_dist 40
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 490, 70, 90, 70, 490, 4, 120
    armour_ug_levels 0
    armour_ug_models Ghazi_Infantry
    ownership        turks
    era 0            turks
    era 1            turks
    era 2            turks
    ;unit_info        10, 0, 7


    2.and model.db entry

    Code:
     14 Ghazi_Infantry 1 4 51 unit_models/_Units/ME_Light_Padded/ghazis_lod0.mesh 121 51 unit_models/_Units/ME_Light_Padded/ghazis_lod1.mesh 900 51 unit_models/_Units/ME_Light_Padded/ghazis_lod2.mesh 2500 51 unit_models/_Units/ME_Light_Padded/ghazis_lod3.mesh 6400 1 5 turks 76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_turks.texture 77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 35 unit_sprites/turks_Ghazi_Infantry_sprite.spr 1 5 turks 65 unit_models/AttachmentSets/Final Middle eastern_turks_diff.texture 65 unit_models/AttachmentSets/Final Middle eastern_turks_norm.texture 0  1 4 None 14 MTW2_Fast_Mace 0  2 17 MTW2_Mace_Primary 14 fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002


    3.i added the line,

    [io]
    file_first = 1
    to mediecal.pre.cfg...

    4. I created turks_Ghazi_Infantry_sprite.spr file..




    BUT..

    I still get blank screen



    I REALLY appriciated for your help..
    The Truth is from thy Lord; so be not at all in doubt. The Heifer (Al-Baqarah)-147

  14. #14

    Default Re: Tutorial - Adding a unit to the game

    excellent

  15. #15

    Default Re: Tutorial - Adding a unit to the game

    i hate to seem like a noob but i follow the directions to the letter and i cant get anything
    im trying to make an unit thats basically a insanely good armored swordsmen for england
    its supposed to have the same look but have a bow for a secondary weapon and be unstoppable so i can fight off endless hordes of turmirds and mongols and the like on another mod im working on

    here is what i have in the

    type Marines
    dictionary Marines ; Marines
    category infantry
    class heavy
    voice_type Heavy
    banner faction main_infantry
    banner holy crusade
    soldier Armored_Swordsmen, 48, 0, 2.4
    attributes sea_faring, can_swim, hide_anywhere, can_sap, command, hardy, can_withdraw, free_upkeep_unit
    formation 1.2, 1.2, 2.4, 2.4, 4, square
    stat_health 8, 0
    stat_pri 60, 16, no, 0, 0, melee, melee_blade, piercing, sword, 10, 1
    ;stat_pri_ex 10, 10, 10
    stat_pri_attr ap
    stat_sec 48, 10, bodkin_arrow, 800, 3000, missile, missile_mechanical, piercing, none, 18, 1
    ;stat_sec_ex 10, 10, 10
    stat_sec_attr bp
    stat_pri_armour 36, 32, 36, metal
    ;stat_armour_ex 8, 9, 0, 0, 8, 6, 6, metal
    stat_sec_armour 0, 0, flesh
    stat_heat 0
    stat_ground 8, 8, 8, 8
    stat_mental 60, disciplined, lock_moral
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 610, 150, 90, 70, 610, 4, 150
    armour_ug_levels 4, 5
    armour_ug_models Marines, Marines_ug1
    ownership england
    era 1 england
    era 2 england
    ;unit_info 60, 48, 104

    i did everything but the DB and make a new texture thing cause im not making any new skins or textures just a really good unit for the same faction
    And Fry, you've got that brain thing.

    I already did.

  16. #16

    Default Re: Tutorial - Adding a unit to the game

    I read the second thing listed that is needed to be done but I can't find anything for naval units? Could someone tell me how to do so?

  17. #17
    The Philosopher Duke Member Suraknar's Avatar
    Join Date
    Dec 2002
    Location
    Navigating the realm of Ideas
    Posts
    707

    Default Re: Tutorial - Adding a unit to the game

    Thank you Musashi for this Tutorial.

    The Model DB way was a turn off for modding in this TW game, however, after a couple of hours of just looking at the file I build up enough courage to start modding it, and thus far I was successful without crashes.

    A few Things I would like to share which may solve many people's issues with this file.

    1st - I use Notepad, with Word Wrap on to do my modding. Without Word Wrap it is very difficult to navigate in the Data (but its your call).

    2nd - It is very important to remember that there are places between some blocks that use 2 spaces. These have to be reproduced, specially if you want to make a unit from Faction A also available to Faction B (read bellow for more).

    3rd - Never ever use "Enter/Return" key when you do operations in this file. Use the left and right arrows to navigate around, use Spacebar, and only use Copy and Paste operations, and always verify for 1 or 2 spaces at the end or the beginning of where you are copy pasting the new data. And of course use the Find function to find units fast, by always placing your cursor to the beginning of the file, since you want to find the first entry of a given unit, like CTRL-F, "dismounted_e_chivalric_knights".

    4th - use the "-0.090000004 0 0 -0.34999999 0.80000001 0.60000002" strings to your visual advantage, they repeat only between different models so they do make good boxing indicators when you are looking at the file full of text.

    5th - Start slowly. I started by simply making changes to some factions, taking a unit from one faction and making it available to the another. For instance I gave a couple key advanced units to Byzantium. This helps to become familiar with the file before moving to adding full new units. learn how it works first before making to many changes at once.

    1 space or 2 Spaces?

    Each unit block follows the same format.

    Unit name/Model Info, Texture/sprite Info, Attachments texture Info, Weapons/Skeleton Info

    This is repeated for the same unit, upgrade models if there are any.

    What is important to know is that there is TWO spaces in some areas.

    Unit name/Model InfoOne SpaceTexture/sprite InfoOne SpaceAttachments InfoTwo SpacesWeapons/Animation Info
    Thus far, this is pretty straight forward when the unit is used by 1 faction.

    But when the model is used by more than one Faction there are a couple more things to watch for. Lets say the following unit is shared by 4 factions.

    Unit name/Model InfoOne Space4Texture/sprite InfoOne SpaceTexture/sprite InfoOne SpaceTexture/sprite InfoOne SpaceTexture/sprite InfoOne Space4Attachments InfoTwo SpacesAttachments InfoTwo SpacesAttachments InfoTwo SpacesAttachments InfoTwo SpacesWeapons/Animation Info
    Notice the 4, this is the number of Factions that use that Unit at the same time as the Number of textures or attachments to follow. In short its the Faction count.

    So, if you wanted to give reiters to a second faction, the count would be 2.

    And that is about it, I haven't yet used KnightErrant's formated DB, because I just discovered it. Still, this maybe helpful to some, and I thought to share it.

    Happy Modding.
    Last edited by Suraknar; 12-03-2007 at 10:13.
    Duke Surak'nar
    "Η ΤΑΝ Η ΕΠΙ ΤΑΣ"
    From: Residing:
    Traveled to: Over 70 Countries, most recent: and

    ~ Ask not what modding can do for you, rather ask what you can do for modding ~
    ~ Everyone dies, not everyone really fights ~

  18. #18
    One easily trifled with Member Target Champion Motep's Avatar
    Join Date
    Oct 2006
    Location
    In flux
    Posts
    4,268

    Default Re: Tutorial - Adding a unit to the game

    ah! I dont have the textures thanks to faulty unpacking programs. Or maybe faulty packs....


    And to the dude above me, that actually looks rather cool
    Last edited by Motep; 03-24-2008 at 04:24.
    TosaInu shall never be forgotten.

  19. #19

    Question Re: Tutorial - Adding a unit to the game

    Hello i am new to the modding world and I really appreciate these tutorials, but I have a little problem, I did a new unit for scotland, I used the look of a noble swordsmen and I changed his sword and shield for a 2h sword (the same one the highland nobles use) I did everything you say in the tutorial but when I start the game and do a custom battle I cant find my unit
    Ye pose your eyes on king Arthurs magical sword, Caledfwlch

  20. #20

    Default Re: Tutorial - Adding a unit to the game

    Please help, I've been messing around with the battle_models thing for this group I'm making, I think I've got everything right on my other stuff. But, it still isn't working and I think something on this is the problem. Can anyone give me their advice?














    11 Aindrea_ug1 1 3 82

    unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug1_lod0.mesh 121 82

    unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug1_lod1.mesh 1225 82

    unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug1_lod2.mesh 6400 1 7

    Denmark 78 unit_models/_Units/ES_Greek_Greek_Heavy/textures/Aindrea.texture 65

    unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture 82

    unit_sprites/byzantium_Byzantine_Infantry_ug1_sprite.spr 1 7 Denmark 58

    unit_models/AttachmentSets/Final Kite_byzantium_diff.texture 60 unit_models/AttachmentSets/Final

    Kite_byzantium_norm.texture 0 1 4 None 14 MTW2_Swordsman 0 2 18 MTW2_Sword_Primary 14

    fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    11 Aindrea_ug2 1 3 82

    unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug2_lod0.mesh 121 82

    unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug2_lod1.mesh 1225 82

    unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug2_lod2.mesh 6400 1 7

    Denmark 78 unit_models/_Units/ES_Greek_Greek_Heavy/textures/Aindrea.texture 65

    unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture 82

    unit_sprites/byzantium_Dismounted_Byzantine_Lancers_ug2_sprite.spr 1 7 Denmark 58

    unit_models/AttachmentSets/Final Kite_byzantium_diff.texture 60 unit_models/AttachmentSets/Final

    Kite_byzantium_norm.texture 0 1 4 None 14 MTW2_Swordsman 0 2 18 MTW2_Sword_Primary 14

    fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 11 Aindrea_ug3 1 3 82

    unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug3_lod0.mesh 121 82

    unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug3_lod1.mesh 1225 82

    unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug3_lod2.mesh 6400 1 7

    Denmark 78 unit_models/_Units/ES_Greek_Greek_Heavy/textures/Aindrea.texture 65

    unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture 82

    unit_sprites/byzantium_Dismounted_Byzantine_Lancers_ug3_sprite.spr 1 7 Denmark 58

    unit_models/AttachmentSets/Final Kite_byzantium_diff.texture 60 unit_models/AttachmentSets/Final

    Kite_byzantium_norm.texture 0 1 4 None 14 MTW2_Swordsman 0 2 18 MTW2_Sword_Primary 14

    fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002

  21. #21

    Default Re: Tutorial - Adding a unit to the game

    this is awesome
    just on thing though how can I get a missle unit (such as genoa crossbowmen) to have a super beastly arrow attack. like what should I change in Export_descr_unit?

  22. #22

    Default Re: Tutorial - Adding a unit to the game

    Hi everyone I have a problem with this ad the problem is that units are invisible! my files are as follows:

    Code:
    23 bosnian_peasant_archers 
    1 4 
    64 unit_models/_Units/ES_Peasant_Padded/s_peasant_archers_lod0.mesh 121 
    64 unit_models/_Units/ES_Peasant_Padded/s_peasant_archers_lod1.mesh 900 
    64 unit_models/_Units/ES_Peasant_Padded/s_peasant_archers_lod2.mesh 2500 
    64 unit_models/_Units/ES_Peasant_Padded/s_peasant_archers_lod3.mesh 6400 
    1 
    6 bosnia 
    71 unit_models/_Units/ES_Peasant_Padded/textures/ES_Peasant_bosnia.texture 
    71 unit_models/_Units/ES_Peasant_Padded/textures/ES_Peasant_normal.texture 
    47 unit_sprites/Bosnian_Peasant_Archers_sprite.spr
    1 
    6 bosnia 
    68 unit_models/AttachmentSets/Final European Archer_bosnia_diff.texture 
    68 unit_models/AttachmentSets/Final European Archer_bosnia_norm.texture 0  
    1 
    4 None 
    16 MTW2_Fast_Bowman 
    18 MTW2_Fast_Knifeman 1 
    19 MTW2_Bowman_Primary 1 
    18 MTW2_Knife_Primary 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    Code:
    type             Bosnian Peasant Archers
    dictionary       Bosnian_Peasant_Archers      ; Bosnian Archers
    category         infantry
    class            missile
    voice_type       Light
    banner faction   main_missile
    banner holy      crusade
    soldier          S_Peasant_Archers, 48, 0, 0.8
    attributes       sea_faring, hide_forest, can_withdraw
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 0
    stat_pri         5, 1, arrow, 120, 30, missile, missile_mechanical, piercing, none, 25, 1
    ;stat_pri_ex      0, 0, 0
    stat_pri_attr    no
    stat_sec         2, 1, no, 0, 0, melee, melee_simple, piercing, knife, 25, 1.8
    ;stat_sec_ex      0, 0, 0
    stat_sec_attr    no
    stat_pri_armour  0, 1, 0, flesh
    ;stat_armour_ex   0, 4, 0, 0, 1, 0, 0, flesh
    stat_sec_armour  0, 0, flesh
    stat_heat        0
    stat_ground      1, 0, 2, 0
    stat_mental      3, normal, untrained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 220, 100, 65, 50, 220, 4, 50
    armour_ug_levels 0, 1
    armour_ug_models Bosnian_Peasant_Archers
    ownership        bosnia
    era 0            bosnia
    era 1            bosnia
    era 2            bosnia
    ;unit_info        2, 5, 1

    Also where ever S Peasant Archers appeared in the 2export_descr_buildings.txt" I had dupicated it like this:
    From this:
    Code:
    recruit_pool "S Peasant Archers"  0   0.000001   0.999  0  requires factions { sicily, hungary, byzantium, }
    to this:
    Code:
    recruit_pool "Bosnian Peasant Archers"  0   0.000001   0.999  0  requires factions { bosnia, }
    Game doesn't crash but as I have already stated units are invisible for some reason, I have based this unit on a "S Peasant Archers" and cloned everything including scins etc... Any help would be greatly appreciated.

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