Results 1 to 16 of 16

Thread: Invisible units..

Hybrid View

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

    Default Invisible units..

    Hi everyone, sorry if this has been answered somewhere else but I have a slight problem. I created a new unit, Redcoat Musketeers, for England. I edited battle_models file, export_desc_unit etc. I have tried to use the unit in custom battle, and it works, but the unit itself is invisible. Can someone please help me rectify this? Here is the battle_models entry:

    18 redcoat_musketeers
    1 4
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod0.mesh 121
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod1.mesh 900
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod2.mesh 2500
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod3.mesh 6400
    1
    7 england
    73 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_england.texture
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture
    41 unit_sprites/venice_Musketeers_sprite.spr
    1
    7 england
    69 unit_models/AttachmentSets/Final European CB Gun_england_diff.texture
    69 unit_models/AttachmentSets/Final European CB Gun_england_norm.texture 0
    1
    4 None
    16 MTW2_Fast_Musket
    20 MTW2_Non_Shield_Fast 1
    19 MTW2_Musket_Primary 1
    18 MTW2_Sword_Primary
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    22 redcoat_musketeers_ug1
    1 4
    58 unit_models/_Units/RN_Light_Lmail/musketeers_ug1_lod0.mesh 121
    58 unit_models/_Units/RN_Light_Lmail/musketeers_ug1_lod1.mesh 900
    58 unit_models/_Units/RN_Light_Lmail/musketeers_ug1_lod2.mesh 2500
    58 unit_models/_Units/RN_Light_Lmail/musketeers_ug1_lod3.mesh 6400
    1
    6 england
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_england.texture
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture
    45 unit_sprites/venice_Musketeers_ug1_sprite.spr
    1
    7 england
    69 unit_models/AttachmentSets/Final European CB Gun_england_diff.texture
    69 unit_models/AttachmentSets/Final European CB Gun_england_norm.texture 0
    1
    4 None
    16 MTW2_Fast_Musket
    20 MTW2_Non_Shield_Fast 1
    19 MTW2_Musket_Primary 1
    18 MTW2_Sword_Primary
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002



    Also, when they fire I get the sound of a bow, but I want the sound of a musket. Please help!

  2. #2

    Default Re: Invisible units..

    Can we see the export descr unit entry as well?

  3. #3

    Default Re: Invisible units..

    Here it is:



    type Redcoat Musketeers
    dictionary Redcoat_Musketeers ; Musketeers
    category infantry
    class missile
    voice_type Light
    banner faction main_missile
    banner holy crusade
    soldier Cossack_Musketeers, 48, 0, 0.8
    attributes sea_faring, hide_forest, very_hardy, can_withdraw, gunpowder_unit, fire_by_rank,
    formation 1.2, 1.2, 2.4, 2.4, 3, square
    stat_health 1, 0
    stat_pri 17, 3, musket_bullet, 180, 20, missile, missile_gunpowder, piercing, none, musket_shot_set, 25, 1
    ;stat_pri_ex 0, 0, 20
    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 0, 9, 0, flesh
    ;stat_armour_ex 0, 4, 0, 0, 9, 0, 0, flesh
    stat_sec_armour 0, 0, flesh
    stat_heat 2
    stat_ground 1, -2, 3, 2
    stat_mental 11, disciplined, highly_trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 950, 150, 100, 75, 950, 4, 230
    armour_ug_levels 0, 1
    armour_ug_models Redcoat_Musketeers, Redcoat_Musketeers_ug1
    ownership england
    era 2 england
    ;unit_info 12, 17, 9

    I dont understand what I am doing wrong. By the way, this is my first forage into modding, so dont be too harsh if I have made an elementary mistake!

  4. #4

    Default Re: Invisible units..

    Quote Originally Posted by ashikamlani View Post
    Here it is:



    type Redcoat Musketeers
    dictionary Redcoat_Musketeers ; Musketeers
    category infantry
    class missile
    voice_type Light
    banner faction main_missile
    banner holy crusade
    soldier Cossack_Musketeers, 48, 0, 0.8
    attributes sea_faring, hide_forest, very_hardy, can_withdraw, gunpowder_unit, fire_by_rank,
    formation 1.2, 1.2, 2.4, 2.4, 3, square
    stat_health 1, 0
    stat_pri 17, 3, musket_bullet, 180, 20, missile, missile_gunpowder, piercing, none, musket_shot_set, 25, 1
    ;stat_pri_ex 0, 0, 20
    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 0, 9, 0, flesh
    ;stat_armour_ex 0, 4, 0, 0, 9, 0, 0, flesh
    stat_sec_armour 0, 0, flesh
    stat_heat 2
    stat_ground 1, -2, 3, 2
    stat_mental 11, disciplined, highly_trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 950, 150, 100, 75, 950, 4, 230
    armour_ug_levels 0, 1
    armour_ug_models Redcoat_Musketeers, Redcoat_Musketeers_ug1
    ownership england
    era 2 england
    ;unit_info 12, 17, 9

    I dont understand what I am doing wrong. By the way, this is my first forage into modding, so dont be too harsh if I have made an elementary mistake!
    Try changing the line that reads:

    soldier Cossack_Musketeers, 48, 0, 0.8

    to

    soldier redcoat_musketeers, 48, 0, 0.8

    There may be a conflict between that line and your armor_ug line.

  5. #5

    Default Re: Invisible units..

    unfortunately that does not work... Any other possible solutions?

  6. #6

    Default Re: Invisible units..

    I hate this error, it gets me sometimes and is a real annoyance. Along with what DG suggested...


    Have you tried adding a name, descr, and descr_short entry in export_units.txt (delete the .strings version after edit)? Sometimes this has solved my invisible unit issues, but not always.

  7. #7

    Default Re: Invisible units..

    Quote Originally Posted by Sher Khan View Post
    I hate this error, it gets me sometimes and is a real annoyance. Along with what DG suggested...


    Have you tried adding a name, descr, and descr_short entry in export_units.txt (delete the .strings version after edit)? Sometimes this has solved my invisible unit issues, but not always.
    I havent deleted the .strings version after I edited the exoprt_units.txt. Is this an issue? As soon as I get back to my computer, I will delete the strings version and also I will be able to change the serialisation number like Surgeon said.

    Thanks for the help guys, and I will reply with results ASAP!

  8. #8
    KnightErrant's Avatar Decanus
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    578

    Default Re: Invisible units..

    It depends where you add them. If you add at the end of the modeldb
    file then the number is crucial. If you add in the middle then you just lose
    some of the baltest units off the end if you don't change the number.

  9. #9

    Default Re: Invisible units..

    I put the new unit at the end. So what should I change the serialisation number to?

  10. #10
    Alletun's Avatar Artifex
    Join Date
    Jan 2007
    Location
    Denmark
    Posts
    584

    Default Re: Invisible units..

    The soldier line in the EDU only tells the game from which modelDB entry it should get the animations (the animations are specified in the end of the entry, such as fast musket etc.). Therefore the soldier line cannot cause invisible units (it can, at most, cause a CTD if the skeleton used in the animation doesn't match the bone assignments in the model).

    Usually when a unit is invisible there are two causes:
    1) There is no file at this location:
    unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_england.texture
    I think the programming term for this is a null pointer exception. It's probably the most common mistake.
    2) Check the alpha channels of your textures. They should be all black. The normal map's alpha channel is where transparency information is stored, so if it's all white the unit will be invisible.

    There is one more reason ... but i've been so long out of modding that i've forgotten it ... -_-

    Hope any of this helps.
    Unit makers Tome of Knowledge:
    http://www.twcenter.net/forums/showthread.php?t=127787
    Warhammer: Total war modeller. Orc & Goblins (GREENSKINS!) creator
    http://forums.totalwar.org/vb/showthread.php?t=90663&page=2
    Third Age: Total war. Modeling and Skinning. Working on Isengard.

  11. #11

    Default Re: Invisible units..

    I have a problem:



    This unit was added to new faction (EDU, EDB, battle_models.modeldb). In descr_character.txt for this faction:
    strat_model crusader_captain
    battle_model Northern_Captain
    If there is not my general in a battle (only captain) he is not visible.

    Sorry. Generals and captains in the end of the battle_models.modeldb file!
    Last edited by vonPeretz; February 03, 2008 at 01:54 PM.

  12. #12

    Default Re: Invisible units..

    Every time I get the dastardly invisible units it's almost always because I've forgotten to change the serialization line at the top of modelDB. Basically, the very first line of modelDB reads something like "22 serialization::archive 3 0 0 0 0 790 0 0 " (bolding mine). You need to change the bolded number by +1 per entry.

    e.i. In your case you have two entries for the redcoats and their upgrade models, so you would need to add 2 to the number, making it 792. Hope that helps.

  13. #13

    Default Re: Invisible units..

    Quote Originally Posted by Surgeon View Post
    Every time I get the dastardly invisible units it's almost always because I've forgotten to change the serialization line at the top of modelDB. Basically, the very first line of modelDB reads something like "22 serialization::archive 3 0 0 0 0 790 0 0 " (bolding mine). You need to change the bolded number by +1 per entry.

    e.i. In your case you have two entries for the redcoats and their upgrade models, so you would need to add 2 to the number, making it 792. Hope that helps.
    That number is meaningless. Mine has remained unchanged and no issue has ever arisen even though I have added numerous amounts of entries and deleted many as well.

  14. #14

    Default Re: Invisible units..

    The heck? For me it's always an issue :hmmm:

    Edit: Wait, you say you deleted entries too? Technically if you deleted as many as you've added then that would balance it out... However if not then I don't know what's up. For me, every time I don't add one to that number along with a new entry, the units are invisible. If I delete an entry and don't decrease the number, the game crashes. Strange...
    Last edited by Surgeon; February 03, 2008 at 11:53 PM.

  15. #15
    Socal_infidel's Avatar PDER Piper
    Join Date
    Jan 2007
    Location
    Brooklyn USA
    Posts
    2,563

    Default Re: Invisible units..

    If that redcoat musketeer is the only new unit you've added, increase the serialization number by two - one for each new model entry you've added (i.e. the initial and the ug1 models).

  16. #16

    Icon10 Re: Invisible units..

    Hey, it worked!!


    Thanks a lot guys!

Posting Permissions

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