Results 1 to 8 of 8

Thread: Broken general models

  1. #1

    Default Broken general models

    Hello there.

    I've entered the bug-hunt phase of mod development. The bug in question is the famous silver surfer battle model. I was never good working with the battle_models.MODELDB file, but I thought I knew better. This thing is making me confused.

    While my soldier models are all right, some of my generals are silver surfers. This is true even in cases when the model used for the general is the same as the model used for a soldier type. I don't know why this is so.

    After further testing, I realised that the general model only appears as a silver surfer if he has certain unit types as his bodyguard. I even got two generals for the same faction taking part in the same battle, with one being a silver surfer and the other being normal, even though their models are the same. The difference was the bodyguard unit of each general.

    Am I missing something obvious? I heard the silver surfer problem can have more than one cause.
    Last edited by es157; November 08, 2021 at 11:45 AM.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

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

    Default Re: Broken general models

    Silver surfer - missing ownership faction texture entries in the model's modeldb entry, see the models in the armour_ug_models line as well as any entry in the officer lines, the latter are optional entries so may not be present.
    Last edited by Gigantus; November 08, 2021 at 09:25 PM.










  3. #3

    Default Re: Broken general models

    Quote Originally Posted by Gigantus View Post
    Silver surfer - missing ownership faction texture entries in the model's modeldb entry, see the models in the armour_ug_models line as well as any entry in the officer lines, the latter are optional entries so may not be present.
    So there is nothing about bodyguard types affecting the model? I suspected, but lol what's happening then? Gotta investigate a bit further.

    Also, the only mention to armour_ug_models is in EDU. Isn't it exclusive to soldiers (not generals)?
    Last edited by es157; November 09, 2021 at 04:18 AM.

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

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

    Default Re: Broken general models

    The general (and captain) model is in the descr_characters file, you will need to check if every faction in that file has an entry in the modeldb file, eg in that model's section:
    Code:
    type            named character
    
    actions            moving_normal, moving_quickmarch, garrison, assault, attack, besiege, entrench, ambush, diplomacy, bribe, exchange, building_fort, building_watchtower
    wage_base        200
    starting_action_points    80
    
    faction            venice
    dictionary        15
    strat_model        southern_general
    battle_model    Northern_General
    battle_equip    gladius, chainmail shirt helmet and rectangular shield
    Code:
    type            general
    
    actions            moving_normal, moving_quickmarch, garrison, assault, attack, besiege, entrench, ambush, exchange
    wage_base        0
    starting_action_points    80
    
    faction            venice
    dictionary        15
    strat_model        southern_captain
    battle_model    Northern_Captain
    battle_equip    gladius, chainmail shirt helmet and rectangular shield
    The body guard of the general is defined in the EDU file.










  5. #5

    Default Re: Broken general models

    Boy, why am I so full of these weird issues that only happen to me? Idk

    I have managed to solve it by adding an entry for merc (mercenary) models in modeldb. However, this has not helped me understand what was wrong in the first place. The unit in question isn't even mercenary.

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

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

    Default Re: Broken general models

    The mercenary_unit attribute entry in EDU (required for the entry in modeldb to work) does nothing other then enable you to use one texture for all factions in the modeldb file via the 'merc' faction entry there - that way it doesn't matter which faction recruits a mercenary, the unit will always have a texture. In other words - you had a missing faction entry and have it now covered - it does however stop you from using individual faction textures, like red for england and blue for france.

    Summary: there is nothing weird about this - you only need to understand how the texture allocation works.

    EDU:
    models in armour_ug_models line are the modeldb reference
    models in officer line(s) are the modeldb reference
    ownership line are the factions that need to be in the modeldb references

    mercenary_unit attribute allows use of unified merc faction entries n the modeldb reference

    descr_characters:
    models in battle_model line are the modeldb reference
    faction line is the factions that need to be in the modeldb reference
    Note: there can be different battle models, hence you need to check the textures against modeldb one by one.
    Last edited by Gigantus; November 09, 2021 at 08:01 AM.










  7. #7

    Default Re: Broken general models

    The matter is, I actually had entries for the respective faction in place. They didn't work for whatever reason.

    Since this file is extremely sensitive even to the smallest typos, I didn't assume the entries could contain any mistake, since they tend to result in crashes. Visually, they seemed all right as well.

    But I take your word for it. And the merc entry has solved it.
    Last edited by es157; November 09, 2021 at 09:19 AM.

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

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

    Default Re: Broken general models

    Well, it might be a simple issue of the texture not being present in your mod or the entry having a minor typo, eg a wrong letter.










Posting Permissions

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