Page 2 of 9 FirstFirst 123456 ... LastLast
Results 31 to 60 of 268

Thread: Tutorial - Adding a unit to the game

  1. #31
    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

  2. #32
    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.

  3. #33
    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

  4. #34
    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

    If it gives you that error message then it's not reading your battle_models.modeldb file at all. What location is your model db file in, and what flags are you using to run the game?
    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

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

    Default Re: Tutorial - Adding a unit to the game

    it sounds like the model.db is not correct.
    Try to add the new model text part in the middle of the model.db file (usually after the one you copied), once I tried to add to the end of the text, it didn't work. there should be a single space before and after the added text. if this doesn't work then I suggest try another clean uninstall and re install with patch, unpack, then mod the files.
    it took me a while to get use to it, but now I have around 5-6 modded units and works fine.
    good luck.

  6. #36
    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

    It's not a problem in the modeldb file. If it was, the game would crash and the only message would be "unspecified error". If it gets far enough to start parsing the files in the data directory, the modeldb file checked out. If it then crashes out saying it can't find the model for a given unit type, and there is an entry for that unit type in your modeldb file, then the game isn't trying to load your modeldb file, which means it's either in the wrong location (Like your mod folder) or you're not using --io.file_first
    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

  7. #37
    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

    It's in the main data folder and it has:

    [io]
    file_first = true

    In the preferences file. Plus I know it's working because it's loading my custom skins just fine.

    See if you can tell me what I have got wrong here, trying to create basically a dismounted Gothic knight for scotland.

    HTML Code:
     14 armored_nobles 1 4 73 unit_models/_Units/LN_Gothic_RN_Plate/dismounted_gothic_knights_lod0.mesh 121 73 unit_models/_Units/LN_Gothic_RN_Plate/dismounted_gothic_knights_lod1.mesh 900 73 unit_models/_Units/LN_Gothic_RN_Plate/dismounted_gothic_knights_lod2.mesh 2500 73 unit_models/_Units/LN_Gothic_RN_Plate/dismounted_gothic_knights_lod3.mesh 6400 1 8 scotland 82 unit_models/_Units/LN_Gothic_RN_Plate/textures/LN_gothic_RN_plate_scotland.texture 80 unit_models/_Units/LN_Gothic_RN_Plate/textures/LN_gothic_RN_plate_normal.texture 53 unit_sprites/hre_Dismounted_Gothic_Knights_sprite.spr 1 8 scotland 61 unit_models/AttachmentSets/Final Heater_scotland_diff.texture 61 unit_models/AttachmentSets/Final Heater_scotland_norm.texture 0  1 4 None 21 MTW2_Slow_2HSwordsman 0  1 24 MTW2_2HSwordsman_Primary 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    HTML Code:
    type             Armored Nobles
    dictionary       Armored_Nobles      ; Zwei Hander
    category         infantry
    class            heavy
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          Armored_Nobles, 48, 0, 1.2
    attributes       sea_faring, hide_forest, hardy, can_withdraw
    formation        1.2, 1.2, 2.4, 2.4, 3, square
    stat_health      1, 0
    stat_pri         14, 6, no, 0, 0, melee, melee_blade, slashing, sword, 25, 1.3
    ;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  10, 4, 0, metal
    ;stat_armour_ex   7, 8, 0, 0, 4, 0, 0, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        5
    stat_ground      1, -2, 3, 2
    stat_mental      9, normal, trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 760, 150, 90, 70, 760, 4, 170
    armour_ug_levels 4
    armour_ug_models Armored_Nobles
    ownership        scotland
    era 2            scotland
    ;unit_info        14, 0, 11
    "You're drunk again!"
    "Na Im just exhausted from staying up all night drinking!" - Family guy

  8. #38
    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

    And you've created unit_models/AttachmentSets/Final Heater_scotland_diff.texture and unit_models/AttachmentSets/Final Heater_scotland_norm.texture?

    They have to be in the data folder, not the mod/data folder.
    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

  9. #39
    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

    they already existed, and yes they were in the data folder.

    All the skins for this unit already existed.
    "You're drunk again!"
    "Na Im just exhausted from staying up all night drinking!" - Family guy

  10. #40
    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

    What problem exactly do you get with this unit?

    If it's a crash, what does the system log say?
    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

  11. #41

    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.

  12. #42

    Default Re: Tutorial - Adding a unit to the game

    Quote Originally Posted by Musashi
    Well, since Naffatun don't have an entry in the model DB file for the moors, you'll have to either change the lines for the Turks to be for the Moors by changing the faction name (You're in luck, in that they're the same number of letters, so you can literally just change where you see "Turks" to "Moors"), or add texture lines for the Moors. The problem with changing the Turks lines, is that the Naffatun will become invisible when the Turks field them.
    I'am doing a similar thing, i want to make it so that scots guards are acuireable for both france and scotland. i dont get what ur saying up there could u simplify it a little more for me? also i cant open battle_models.modeldb... help please. thanks :D

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

    Default Re: Tutorial - Adding a unit to the game

    By the by, a short notice on the modeldb file (just had my first look on it tbh):
    I guess the pathnames in there are relative to the data directory, so if you use ../mymod/data/models_unit instead of models_unit in each path they probably work in a mod folder.

    Edit: Just tested that, you can put the textures into mod folders. However the modeldb file will still be read from the base dir if you use file_first and is not recognised at all if you don't.
    Last edited by alpaca; 12-30-2006 at 00:22.

  14. #44

    Default Re: Tutorial - Adding a unit to the game

    i have figured out how to edit it... derr, anyways i want to edit the scots_gaurd
    Brigandine_milan.texture 77 unit_models/_Units/LN_Brigandine_heavy/textures/LN_ Brigandine_normal.texture 53 unit_sprites/milan_Genoese_Crossbowmen_ug1_sprite.spr 1 5 milan 67 unit_models/AttachmentSets/Final European CB Gun_milan_diff.texture 67 unit_models/AttachmentSets/Final European CB Gun_milan_norm.texture 0 1 4 None 20 MTW2_Pavise_Crossbow 14 MTW2_Swordsman 2 21 MTW2_Crossbow_Primary 14 fs_test_shield 2 18 MTW2_Sword_Primary 14 fs_test_shield 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 6 france 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 1 6 france 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0 1 4 None 11 MTW2_Bowman 15 MTW2_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 14 archer_militia 1 4 61 unit_models/_Units/EN_Peasant_Padded/archer_militia_lod0.mesh 121 61 unit_models/_Units/EN_Peasant_Padded/archer_militia_lod1.mesh 900 61
    what of that do i want too copy? i thought i could just copy and past the scot gaurd info and just replace all the france with scotland.

  15. #45
    Member Member tsubame's Avatar
    Join Date
    Nov 2006
    Location
    Magenta, Milan, Northern Italy
    Posts
    28

    Default Re: Tutorial - Adding a unit to the game

    Still only gosts...

    Damn, damn, damn. Seems that my only problem is too create (or modify) a proper .bat file with the string --io.file_first.
    Please can say me which .bat file I've to add this line to OR how have
    I to create a new one ?

    Have I to create, say, a file named "Age_of_War" with inside "medieval2.exe --io.file_first" ? Or one named "Medieval2" with "medieval2.exe --io.file_first"
    BTW I'm using Medmanager. Should the right .bat file and Medmanager work together correctly ? I suspect this manager can play a role in my defets...

  16. #46

    Default Re: Tutorial - Adding a unit to the game

    Quote Originally Posted by billiam_maillib
    i have figured out how to edit it... derr, anyways i want to edit the scots_gaurd what of that do i want too copy? i thought i could just copy and past the scot gaurd info and just replace all the france with scotland.
    NM, lol, figured it out, i might have more questions l8er tho :P

  17. #47

    Default Re: Tutorial - Adding a unit to the game

    ok this is what i have edited,
    Code:
    type             Scots Guard
    dictionary       Scots_Guard      ; Scots Guard
    category         infantry
    class            missile
    voice_type       Heavy
    banner faction   main_missile
    banner holy      crusade
    soldier          Scots_Guard, 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      2, 0
    stat_pri         9, 3, arrow, 160, 30, missile, missile_mechanical, piercing, none, 25, 1
    ;stat_pri_ex      0, 0, 0
    stat_pri_attr    ap
    stat_sec         12, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    ;stat_sec_ex      0, 0, 0
    stat_sec_attr    no
    stat_pri_armour  8, 9, 0, metal
    ;stat_armour_ex   8, 0, 0, 0, 9, 0, 0, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      1, -2, 3, 2
    stat_mental      11, normal, highly_trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 800, 175, 100, 75, 800, 4, 200
    armour_ug_levels 4
    armour_ug_models Scots_Guard
    ownership        france
    era 2            france
    ;unit_info        12, 9, 17
    to
    Code:
    type             Scots Guard
    dictionary       Scots_Guard      ; Scots Guard
    category         infantry
    class            missile
    voice_type       Heavy
    banner faction   main_missile
    banner holy      crusade
    soldier          Scots_Guard, 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      2, 0
    stat_pri         9, 3, arrow, 160, 30, missile, missile_mechanical, piercing, none, 25, 1
    ;stat_pri_ex      0, 0, 0
    stat_pri_attr    ap
    stat_sec         12, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    ;stat_sec_ex      0, 0, 0
    stat_sec_attr    no
    stat_pri_armour  8, 9, 0, metal
    ;stat_armour_ex   8, 0, 0, 0, 9, 0, 0, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      1, -2, 3, 2
    stat_mental      11, normal, highly_trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 800, 175, 100, 75, 800, 4, 200
    armour_ug_levels 4
    armour_ug_models Scots_Guard
    ownership        france, scotland
    era 2            france, scotland
    ;unit_info        12, 9, 17
    then i copyed the ui\units\france\#scots_guard.tga to the scotland section and i copyed the unit info\france files to the scotland folder, and i edited the
    battle_models
    Code:
    11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 6 france 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 1 6 france 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0  1 4 None 11 MTW2_Bowman 15 MTW2_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    to
    Code:
    11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 6 france, scotland 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 1 6 france, scotland 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0  1 4 None 11 MTW2_Bowman 15 MTW2_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    when i load the game and go to custom battles( i select era of units all) it dosnt show up what em i missing?

  18. #48
    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

    OK, I think I have the modeldb file worked out, at least somewhat. I succeeded in making a new unit with it anyway. 2 tips for working with it that I think were holding me back:

    1. Don't use word wrap. It puts extra spaces and crap in there. When I didn't do this the game would crash upon loading.

    2. Don't put the new entry at the end, but in the middle somewhere. When it was at the end the units didn't seem to show up, they were invisible.

    Thanks to Musashi for his help!

    Here are some results!

    Last edited by the_mango55; 12-30-2006 at 09:30.
    "You're drunk again!"
    "Na Im just exhausted from staying up all night drinking!" - Family guy

  19. #49

    Default Re: Tutorial - Adding a unit to the game

    Quote Originally Posted by billiam_maillib
    ok this is what i have edited,
    Code:
    type             Scots Guard
    dictionary       Scots_Guard      ; Scots Guard
    category         infantry
    class            missile
    voice_type       Heavy
    banner faction   main_missile
    banner holy      crusade
    soldier          Scots_Guard, 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      2, 0
    stat_pri         9, 3, arrow, 160, 30, missile, missile_mechanical, piercing, none, 25, 1
    ;stat_pri_ex      0, 0, 0
    stat_pri_attr    ap
    stat_sec         12, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    ;stat_sec_ex      0, 0, 0
    stat_sec_attr    no
    stat_pri_armour  8, 9, 0, metal
    ;stat_armour_ex   8, 0, 0, 0, 9, 0, 0, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      1, -2, 3, 2
    stat_mental      11, normal, highly_trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 800, 175, 100, 75, 800, 4, 200
    armour_ug_levels 4
    armour_ug_models Scots_Guard
    ownership        france
    era 2            france
    ;unit_info        12, 9, 17
    to
    Code:
    type             Scots Guard
    dictionary       Scots_Guard      ; Scots Guard
    category         infantry
    class            missile
    voice_type       Heavy
    banner faction   main_missile
    banner holy      crusade
    soldier          Scots_Guard, 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      2, 0
    stat_pri         9, 3, arrow, 160, 30, missile, missile_mechanical, piercing, none, 25, 1
    ;stat_pri_ex      0, 0, 0
    stat_pri_attr    ap
    stat_sec         12, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    ;stat_sec_ex      0, 0, 0
    stat_sec_attr    no
    stat_pri_armour  8, 9, 0, metal
    ;stat_armour_ex   8, 0, 0, 0, 9, 0, 0, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      1, -2, 3, 2
    stat_mental      11, normal, highly_trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 800, 175, 100, 75, 800, 4, 200
    armour_ug_levels 4
    armour_ug_models Scots_Guard
    ownership        france, scotland
    era 2            france, scotland
    ;unit_info        12, 9, 17
    then i copyed the ui\units\france\#scots_guard.tga to the scotland section and i copyed the unit info\france files to the scotland folder, and i edited the
    battle_models
    Code:
    11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 6 france 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 1 6 france 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0  1 4 None 11 MTW2_Bowman 15 MTW2_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    to
    Code:
    11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 6 france, scotland 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 1 6 france, scotland 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0  1 4 None 11 MTW2_Bowman 15 MTW2_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    when i load the game and go to custom battles( i select era of units all) it dosnt show up what em i missing?
    Ok i have changed it around now its now looks like this
    11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 6 scotland 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 1 6 scotland 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0 1 4 None 11 MTW2_Bowman 15 MTW2_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 6 france 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 1 6 france 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0 1 4 None 11 MTW2_Bowman 15 MTW2_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    i have also tried it with out adding
    11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 6 scotland 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 1 6 scotland 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0 1 4 None 11 MTW2_Bowman 15 MTW2_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    with the top way i cant even load the game with the second way i can choose the units but when i go to fight it CTD and comes up with Error: unspecific error medieval 2 will now exit. what am i missing?

  20. #50
    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

    Quote Originally Posted by the_mango55
    OK, I think I have the modeldb file worked out, at least somewhat. I succeeded in making a new unit with it anyway. 2 tips for working with it that I think were holding me back:

    1. Don't use word wrap. It puts extra spaces and crap in there. When I didn't do this the game would crash upon loading.

    2. Don't put the new entry at the end, but in the middle somewhere. When it was at the end the units didn't seem to show up, they were invisible.

    Thanks to Musashi for his help!
    No worries. Glad it worked out for you :)
    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

  21. #51

    Default Re: Tutorial - Adding a unit to the game

    Ok i got my model to show up but u cant see the textures, why?
    https://img401.imageshack.us/img401/7756/0001vc1.jpg
    https://img125.imageshack.us/img125/9348/0002sy5.jpg
    https://img182.imageshack.us/img182/4664/0003ro8.jpg
    https://img405.imageshack.us/img405/3453/0004hm2.jpg
    could some one actually respond to me this time cuz i dont know whats wrong.

  22. #52
    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

    Do you have the right textures in the texture folder?
    "You're drunk again!"
    "Na Im just exhausted from staying up all night drinking!" - Family guy

  23. #53

    Default Re: Tutorial - Adding a unit to the game

    ya, i just copyed the scots texture from frances folder scolands folder

  24. #54

    Default Re: Tutorial - Adding a unit to the game

    wait scratch that, what textures i want to use the same textures for france and scotland, when i start a battle france has textures but scotland dosnt >.<

  25. #55

    Default Re: Tutorial - Adding a unit to the game

    here is all i have done http://www.box.net/public/ybrb2v4p9i if some one wouldnt mind taking a look anf figuring out whats wrong and telling me how to fix it i would be in there det.

  26. #56
    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

    Your problem seems to be here

    1 6 scotland
    the 1 represents how many factions use this model, so it should be 2 since france also uses it.

    the 6 represents the number of letters in the name of the faction, scotland has 8 letters.

    Try this:

    HTML Code:
     11 scots_guard 1 3 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod0.mesh 121 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod1.mesh 1225 61 unit_models/_Units/LN_3QPlate_HalfPlate/scots_guard_lod2.mesh 6400 1 6 france 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 8 scotland 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_france.texture 92 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_scotsguard_normal.texture 42 unit_sprites/france_Scots_Guard_sprite.spr 2 6 france 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0  8 scotland 68 unit_models/AttachmentSets/Final European Archer_france_diff.texture 68 unit_models/AttachmentSets/Final European Archer_france_norm.texture 0  1 4 None 11 MTW2_Bowman 15 MTW2_Non_Shield 1 19 MTW2_Bowman_Primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    Also, you can't have 2 models named the same thing, which is why it wouldn't load with your top one.
    Last edited by the_mango55; 12-31-2006 at 21:28.
    "You're drunk again!"
    "Na Im just exhausted from staying up all night drinking!" - Family guy

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

    Default Re: Tutorial - Adding a unit to the game

    Musashi, is there any way to change weapon type of the unit, eg, give dismounted gothic knight an Axe or something?

    thanks

  28. #58
    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

    Unfortunately not that anyone has discovered yet. The weapons appear to be encoded into the unit mesh (model) and we have no way of opening, editing, or saving those models yet.

    Some of us have tried to break into them with a hex editor, but no luck whatsoever so far.
    Fear nothing except in the certainty that you are your enemy&#39;s begetter and its only hope of healing. For everything that does evil is in pain.
    -The Maestro Sartori, Imajica by Clive Barker

  29. #59

    Default Re: Tutorial - Adding a unit to the game

    thanks mango, it didnt crash anymore but the texture still dosnt show for the scotish.

  30. #60
    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

    perhaps someone here can help me:

    HTML Code:
    8 clansmen 1 4 65 unit_models/_Units/RN_Light_Lmail/sword_and_buckler_men_lod0.mesh 121 65 unit_models/_Units/RN_Light_Lmail/sword_and_buckler_men_lod1.mesh 900 65 unit_models/_Units/RN_Light_Lmail/sword_and_buckler_men_lod2.mesh 2500 65 unit_models/_Units/RN_Light_Lmail/sword_and_buckler_men_lod3.mesh 6400 2 8 scotland 70 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_scot.texture 72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 52 unit_sprites/sicily_Sword_and_Buckler_Men_sprite.spr 1 8 scotland 59 unit_models/AttachmentSets/Final Iberian_spain_diff.texture 59 unit_models/AttachmentSets/Final Iberian_spain_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
    This doesn't seem to work, if you could find out what and explain to me what is wrong, I would be most grateful
    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!

Page 2 of 9 FirstFirst 123456 ... LastLast

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