Results 1 to 13 of 13

Thread: Question regarding Unit Upgrading

Hybrid View

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

    Default Question regarding Unit Upgrading




    Does anyone know how I can modify the small shield in the image above?

    Background of my question:
    You can upgrade units with e.g. padded leather, a slight armor and so on. If you do so you'll see a small shield in bronze, silver or in gold.
    The problem is you can not upgrade all units to the 3rd step, to the gold shield.
    Example: Polish Spear Milita is only possible to upgrade to the 2nd step, Town Milita to the 1st and Halberd Militia to the 3rd step.
    Hence the player needs a good memory which units are already upgraded to its maximum and which not, because some specific buildings for upgrading are missing.

    What I need is: It would be very nice, if the game shows me every time a gold shield if there are no more steps for upgrading possible - even though a unit was upgraded to the 1st step. The big advantage is in the optic. I like to see a gold shield more than bronze or silver shields, only.
    Any ideas?

    Thanks in advance!!


    (I hope my English is okay)

    ****EDIT****
    I don't want to expand all units to a 2nd or a 3rd upgrading level. When a unit has the possiblilty to upgrade only once (e.g. EE_Peasant_Archer) I want to see a gold shield instead of a bronze one.
    Last edited by Granatenwerfer; July 07, 2013 at 04:51 AM.

  2. #2
    Hermod's Avatar Miles
    Join Date
    Jun 2012
    Location
    United States
    Posts
    344

    Default Re: Question regarding Unit Upgrading

    If you right click on the unit it tells you what the next upgrade level is. For example if you right click an archer with no shield emblem it will say something like Next Armor Level: Padded, once you upgrade to padded (by retraining in a settlement with the appropriate level smith building) a bronze shield will appear on the unit. From there if you right click it will say Next Armor Level: Chainmail, or whatever it may be. If you right click and no Next Armor Level information appears on the unit card then you know that the specific unit is fully upgraded. As far as changing the shield emblems themselves, I am not sure how or if it is possible to do that.

  3. #3

    Default Re: Question regarding Unit Upgrading

    I know, thank you.
    If I have an army of 20 units I don't want to right-click each unit to see if there is an upgrade possible.
    I want to see it at a glance.

  4. #4
    Vipman's Avatar Protector Domesticus
    Join Date
    Jul 2010
    Location
    Romania
    Posts
    4,405

    Default Re: Question regarding Unit Upgrading

    A way is to create models/textures/skins (I don't know which, I know nearly nothing of modding units) for all units to have 3 armor upgrades. An easier way but I'm not sure if it will work entirely is to create new armor upgrades only in text files so you can upgrade 2 or 3 armor levels at once per each smith level, they will never be used in battle so no models are needed.

    I'm not sure but first requires most probably a HUGE amount of modding, second still a lot of modding. I guess you'll just have to get used to it.
    Last edited by Vipman; July 04, 2013 at 04:09 PM.

  5. #5

    Default Re: Question regarding Unit Upgrading

    Which files do I need? Or in which files do I find the needed parameter for modifying?

  6. #6
    Vipman's Avatar Protector Domesticus
    Join Date
    Jul 2010
    Location
    Romania
    Posts
    4,405

    Default Re: Question regarding Unit Upgrading

    In export_descr_buildings you'll have to add 2 more armor levels per smith level, from this
    Spoiler Alert, click show to read: 
    Code:
    building smith{
        convert_to castle_smith
        levels leather_tanner blacksmith armourer heavy_armourer plate_armourer gothic_armourer 
        {
            leather_tanner city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 0
                capability
                {
                    armour 1
                }
                material wooden
                construction  2 
                cost  600 
                settlement_min town
                upgrades
                {
                    blacksmith
                }
            }
            blacksmith city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 1
                capability
                {
                    armour 2
                }
                material wooden
                construction  3 
                cost  1200 
                settlement_min large_town
                upgrades
                {
                    armourer
                }
            }
            armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 2
                capability
                {
                    armour 3
                }
                material wooden
                construction  4 
                cost  2400 
                settlement_min city
                upgrades
                {
                    heavy_armourer
                }
            }
            heavy_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 3
                capability
                {
                    armour 4
                }
                material wooden
                construction  5 
                cost  6400 
                settlement_min large_city
                upgrades
                {
                    plate_armourer
                }
            }
            plate_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 4
                capability
                {
                    armour 5
                }
                material wooden
                construction  6 
                cost  10000 
                settlement_min huge_city
                upgrades
                {
                    gothic_armourer
                }
            }
            gothic_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 5
                capability
                {
                    armour 6
                }
                material wooden
                construction  7 
                cost  15000 
                settlement_min huge_city
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    to this
    Spoiler Alert, click show to read: 
    Code:
    building smith{
        convert_to castle_smith
        levels leather_tanner blacksmith armourer heavy_armourer plate_armourer gothic_armourer 
        {
            leather_tanner city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 0
                capability
                {
                    armour 1
                    armour 2
                    armour 3
                }
                material wooden
                construction  2 
                cost  600 
                settlement_min town
                upgrades
                {
                    blacksmith
                }
            }
            blacksmith city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 1
                capability
                {
                    armour 4
                    armour 5
                    armour 6
                }
                material wooden
                construction  3 
                cost  1200 
                settlement_min large_town
                upgrades
                {
                    armourer
                }
            }
            armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 2
                capability
                {
                    armour 7
                    armour 8
                    armour 9
                }
                material wooden
                construction  4 
                cost  2400 
                settlement_min city
                upgrades
                {
                    heavy_armourer
                }
            }
            heavy_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 3
                capability
                {
                    armour 10
                    armour 11
                    armour 12
                }
                material wooden
                construction  5 
                cost  6400 
                settlement_min large_city
                upgrades
                {
                    plate_armourer
                }
            }
            plate_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 4
                capability
                {
                    armour 13
                    armour 14
                    armour 15
                }
                material wooden
                construction  6 
                cost  10000 
                settlement_min huge_city
                upgrades
                {
                    gothic_armourer
                }
            }
            gothic_armourer city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 5
                capability
                {
                    armour 16
                    armour 17
                    armour 18
                }
                material wooden
                construction  7 
                cost  15000 
                settlement_min huge_city
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    And the same thing for castle_smith building.

    In expors_descr_unit you have to edit these lines of each unit

    Spoiler Alert, click show to read: 
    Code:
    type             Heavy Billmen
    dictionary       Heavy_Billmen      ; Heavy Billmen
    category         infantry
    class            heavy
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          Heavy_Billmen, 48, 0, 1.2
    attributes       sea_faring, hide_forest, hardy, can_withdraw
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 0
    stat_pri         15, 5, no, 0, 0, melee, melee_blade, slashing, axe, 25, 1.33
    ;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  7, 3, 0, metal
    ;stat_armour_ex   7, 8, 0, 0, 3, 0, 0, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        5
    stat_ground      1, -2, 3, 2
    stat_mental      5, normal, trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 300, 150, 75, 55, 300, 4, 70
    armour_ug_levels 3, 4
    armour_ug_models Heavy_Billmen, Heavy_Billmen_ug1
    ownership        england
    era 2            england
    ;unit_info        15, 0, 10

    First you have to change the armor upgrade numbers of ALL units that have armor upgrades. In vanilla armour 2 represented light mail upgrade, now light mail is armour 4, this is determined by the first armour level put at each smith level, in this case blacksmith. So you have to change 2 to 4, all 3 to 7, all 4 to 10, all 5 to 13 and all 6 to 16.

    Then you will add the fake armour upgrades, the next armor levels at the SAME smith level, so that each unit has 4 armor levels (1 is original value, 3 are upgrades) and copy last armor model as many times you added armor upgrades. Heavy Billmen had 1 armor upgrade, now I added 2 more:
    Spoiler Alert, click show to read: 
    Code:
    type             Heavy Billmen
    dictionary       Heavy_Billmen      ; Heavy Billmen
    category         infantry
    class            heavy
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          Heavy_Billmen, 48, 0, 1.2
    attributes       sea_faring, hide_forest, hardy, can_withdraw
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 0
    stat_pri         15, 5, no, 0, 0, melee, melee_blade, slashing, axe, 25, 1.33
    ;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  7, 3, 0, metal
    ;stat_armour_ex   7, 8, 0, 0, 3, 0, 0, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        5
    stat_ground      1, -2, 3, 2
    stat_mental      5, normal, trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 300, 150, 75, 55, 300, 4, 70
    armour_ug_levels 7, 10, 11, 12
    armour_ug_models Heavy_Billmen, Heavy_Billmen_ug1, Heavy_Billmen_ug1, Heavy_Billmen_ug1
    ownership        england
    era 2            england
    ;unit_info        15, 0, 10


    This way units that would normally reach their limit will actually upgrade 2 or 3 levels at once at the same smith level and you'll get the golden shield. The side effect is that the armor defense value of units will still increase by 1 per each armor upgrade.

    Oh and you'll have to change expanded.txt to add and change info about armor levels.

    If you want this in vanilla you'll have to unpack the txt files of the game. If you have Kingdoms you can install retrofit mod which is the same as vanilla and it has these files in it.
    Last edited by Vipman; July 06, 2013 at 05:45 AM.

  7. #7

    Default Re: Question regarding Unit Upgrading

    Thank you very much, Vipman, for your detailed description.

    I'm not quiete sure if this works.
    The problem may be that Polish Spear Militia can be upgraded to the 2nd level only, Spear Militia from HRE and France can go to the 3rd level.

    When I look into the export_desc_unit.txt file I found all stats for the units. In this file please go to EE_Spear_Militia.
    Looks like this:
    Code:
    type             EE Spear Militia
    dictionary       EE_Spear_Militia      ; Spear Militia
    category         infantry
    class            light
    voice_type       Light
    banner faction   main_spear
    banner holy      crusade
    soldier          EE_Spear_Militia, 60, 0, 1
    attributes       sea_faring, hide_forest, can_withdraw, free_upkeep_unit
    formation        1.2, 1.2, 2.4, 2.4, 5, square
    stat_health      1, 0
    stat_pri         5, 2, no, 0, 0, melee, melee_blade, piercing, spear, 25, 0.6
    ;stat_pri_ex      0, 0, 0
    stat_pri_attr    light_spear, spear_bonus_4
    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, 4, 5, 0, 1, 6, 6, flesh
    stat_sec_armour  0, 0, flesh
    stat_heat        2
    stat_ground      1, -2, 3, 2
    stat_mental      3, normal, trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 290, 125, 75, 60, 290, 4, 70
    armour_ug_levels 0, 1, 2
    armour_ug_models EE_Spear_Militia, EE_Spear_Militia_ug1, EE_Spear_Militia_ug2
    ownership        poland, russia, hungary, slave
    ;unit_info        5, 0, 7
    Interesting are the both bold lines. What is EE_Spear_Militia_ug2? Is this a sprite file? Unfortunately I can not open sprite and texture files.
    When EE_Spear_Militia_ug2 is the silver shield it would be easy to modify just to put the sprite with the small golden shield behind it. What do you think?

    Which files contain the bronze, silver and the gold shield?

  8. #8

    Default Re: Question regarding Unit Upgrading

    @Admin:
    Please move this topic to Mod Workshop/Skins, Models, and Animations.
    Thank you very much!

  9. #9
    Vipman's Avatar Protector Domesticus
    Join Date
    Jul 2010
    Location
    Romania
    Posts
    4,405

    Default Re: Question regarding Unit Upgrading

    I'm a complete idiot, why didn't I think of that, for some reason I assumed the shields are hardcoded.

    Download the attachment and extract it into data\ui\southern_european\interface folder and that's it. Create the folders if they aren't there.

    I have made all armor shields golden. You no longer need to modify EDB or EDU.

    Edit: oh wait, this won't work quite as you wanted, it'll show golden even if units can still upgrade their armor 1 or 2 more levels.

    Back on the previous method I described, EE_Spear_Militia_ug2 is a model of a unit described in battle_models.db used at the respective armor level. Number of unit armor levels must be equal to nr of models. Because I told you to add more armor levels you also have to copy the last model name as many levels you added. I called them fake armor models because they are there just to get the gold shield but the already existent models will be used, unless you create new ones and add them.

    The shields are shown in the attached image only, the models are only for battle, they don't affect unit cards.
    Attached Files Attached Files
    Last edited by Vipman; July 06, 2013 at 12:58 PM.

  10. #10

    Default Re: Question regarding Unit Upgrading

    Quote Originally Posted by Vipman View Post

    Edit: oh wait, this won't work quite as you wanted, it'll show golden even if units can still upgrade their armor 1 or 2 more levels.
    Yes, regrettably it's not what I want, but the tga is interesting. I have IrfanView and hence I could watch the image.

    Can you show me an image - like the .tga file you uploaded - from EE_Spear_Militia_ug2? Why is it no possible to interchange the contents of e.g. EE_Spear_Militia_ug1 with EE_Spear_Militia_ug2?

  11. #11
    Vipman's Avatar Protector Domesticus
    Join Date
    Jul 2010
    Location
    Romania
    Posts
    4,405

    Default Re: Question regarding Unit Upgrading

    To view and edit unit stuff some special programs are needed. I don't understand what do you want to do? If you want units to have more armor levels in battle you'll have to read some unit tutorials and create them, if you want just the golden shield and don't want each unit to have 3 armor levels in battle then just edit the text files like I said.

  12. #12

    Default Re: Question regarding Unit Upgrading

    Quote Originally Posted by Vipman View Post
    To view and edit unit stuff some special programs are needed. I don't understand what do you want to do? If you want units to have more armor levels in battle you'll have to read some unit tutorials and create them, if you want just the golden shield and don't want each unit to have 3 armor levels in battle then just edit the text files like I said.
    I'm not sure if you understand me correctly. What I want was described by me in my 1st post. I don't want to expand group No. 1 (please see below) to 3 levels of upgrading. My English is not so good, but I hope the sense is clear. I don't want to expand all units to a 2nd or a 3rd upgrading level. When a unit has the possiblilty to upgrade only once I want to see a gold shield instead of a bronze one.

    At the moment I understand the system in which M2 works regarding an unit upgrade not fully. But I want to!

    What I understand is that the file export_descr_unit.txt plays an important role. Spear_Militia is not equal to Spear_Militia. There are two groups of Spear_Militia:
    1) EE_Spear_Militia (available for poland, russia, hungary, slave) and
    2) Spear_Militia (available for england, scotland, france, hre, denmark, spain, portugal, slave, normans). Both groups have their own upgrade-levels. 2nd has three levels:

    armour_ug_levels 0, 1, 2, 3
    armour_ug_models Spear_Militia, Spear_Militia_ug1, Spear_Militia_ug2, Spear_Militia_ug3


    And the 1st has two levels, only:

    armour_ug_levels 0, 1, 2
    armour_ug_models EE_Spear_Militia, EE_Spear_Militia_ug1, EE_Spear_Militia_ug2

    A
    s I said before I don't understand why it is not possible to start with the silver shield for group No. 1? My impression is the solution is simple, provided that we have an expert here who can open the specific files. Therefore, let me repeat my question again: What is 'behind' e.g. EE_Spear_Militia_ug1 ?

    You find in /data/unit_sprites files like

    poland_ee_spear_militia_ug2_sprite.spr,
    poland_ee_spear_militia_ug2_sprite_000.texture,
    poland_ee_spear_militia_ug2_sprite_001.texture.
    Last edited by Granatenwerfer; July 07, 2013 at 04:56 AM.

  13. #13
    Vipman's Avatar Protector Domesticus
    Join Date
    Jul 2010
    Location
    Romania
    Posts
    4,405

    Default Re: Question regarding Unit Upgrading

    You do not understand, this is hardcoded. There is a maximum of 3 armor upgrade levels for units, basically level 1, level 2 and level 3, and each one applies the images put in the .tga, bronze, silver respectively gold shield, to the unit card. For each armor upgrade the shield advances to next level/image, to a maximum of 3.

    You need 3 armor upgrades to get to golden shield, unless you change the shield images in the .tga . I have told you they are fake armor upgrades, the way I told you will upgrade 2 or 3 armor levels at once... For the units with just 1 armor upgrade, what I told you to do above will work. For the units that have 2 levels like EE_spear_militia, you'll have to add just 1 fake armor upgrade after the first upgrade to get the silver shield for first level, then at second you'll get gold. With the system I described above it should look like this:

    armour_ug_levels 0, 1, 2, 4
    armour_ug_models EE_Spear_Militia, EE_Spear_Militia_ug1,
    EE_Spear_Militia_ug1, EE_Spear_Militia_ug2

    From what I understood, the sprites are the 2D images of units when you look from high up view and units are tiny. The models, in unit_models folder, are the files which determine how units look in closer view. They determine only how units look in battle and have nothing to do with the actual system, just that in EDU the model names are mentioned to know which is used at what armor level upgrade.

    This is the only way to get what you want. I told you they are fake armor upgrades as the game will consider the units will upgrade 2 or 3 levels at once on the smith level you do the first upgrade, this way in the campaign and battle they will still actually have only 1 or 2 upgrades man...

    Or you can hack the medieval and kingdoms.exe and the game engine to change the system to what you want. You'll have to figure it out yourself, I have no idea about it, and talking about this on this forum is banned.

    PS: there are actually at least 2 more spear militias, SE and ME
    Last edited by Vipman; July 07, 2013 at 08:01 AM.

Posting Permissions

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