Results 1 to 14 of 14

Thread: A question to the fans

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    EBII Mapper and Animator Member -Praetor-'s Avatar
    Join Date
    Apr 2006
    Location
    Marburg, Germany
    Posts
    3,760

    Default A question to the fans

    Hi!

    Currently, we have some units that are going to undergo a reform process. That reform process is going to be implemented via the blacksmith armour and weapon upgrades.

    The question is, does anyone know how to implement such reforms, which files does one have to alter and such? I have been looking for a guide on TWC but haven't found anything useful.

    Could anyone post a small guide how to do it?

  2. #2
    Member Megas Methuselah's Avatar
    Join Date
    Aug 2007
    Location
    Prairie Grasslands
    Posts
    5,040

    Default Re: A question to the fans

    Really? Huh. I thought all the blacksmith upgrades do is give the units a new skin.

  3. #3
    EBII Mapper and Animator Member -Praetor-'s Avatar
    Join Date
    Apr 2006
    Location
    Marburg, Germany
    Posts
    3,760

    Default Re: A question to the fans

    That's a kind of reform. The access to better equipment or the evolution of it.

    How do you implement that?

  4. #4
    urk! Member bobbin's Avatar
    Join Date
    Aug 2008
    Location
    Tin Isles
    Posts
    3,668

    Default Re: A question to the fans

    I'm not too knowlegable about scripting but if you don't have it already you should get GrnEyedDvl's Ultimate Docudeamons, it contains loads of information on scripting (triggers, commands etc).

    Edit: On a bit of further reading what you could do is have barracks use the faction_capability command and tie this to a event counter. The faction capability command applies a bonus factionwide and so would be useful if you are wanting to make a reform.

    for example

    You would have an event (lets call it Reform_A) that is triggered by certain conditions. The barracks can then be set to provide the upgrade when that event happens.

    Code:
    barracks  requires factions { romans, } 
            {
                capability
                {
                    recruit_pool "Principes"  1   0.7   6  0  requires factions { romans, }  
                }
                faction_capability
                {
                    armour 1 requires factions { romans,} and event_counter Reform_A 1
                    armour 2 requires factions { romans,} and event_counter Reform_B 1
                }
                material stone
                construction  1 
                cost  3000 
                settlement_min huge_city
                upgrades
    I haven't tested this but it seems logical given the available commands and triggers etc. Also I'm not sure if you would even need a seperate reform counter for each upgrade as it could just go
    Code:
    armour 2 requires factions { romans,} and event_counter Reform_A 2
    not entirely confident on that though.

    The these are threads I got my info from if it helps.
    http://www.twcenter.net/forums/showt...ion_capability
    http://www.twcenter.net/forums/showt...ion_capability
    Last edited by bobbin; 02-13-2010 at 19:18.


  5. #5
    Member Member Bucefalo's Avatar
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    170

    Default Re: A question to the fans

    I don´t know if i understand you very well. I guess you already know about the ug models, which are models that are used to represent a graphical change when you upgrade armour, you can easily see it in vanilla. Anyway just in case i will make a short summary.

    The entry to modify is in the EDU at the end of the unit, a good example is the pike militia unit.

    type Pike Militia
    dictionary Pike_Militia ; Pike Militia
    category infantry
    class spearmen
    voice_type Light
    banner faction main_spear
    banner holy crusade
    soldier Pike_Militia, 48, 0, 4
    attributes sea_faring, hide_forest, can_withdraw, free_upkeep_unit, pike
    formation 1.2, 1.2, 2.4, 2.4, 4, square, phalanx
    stat_health 1, 0
    stat_pri 6, 4, no, 0, 0, melee, melee_blade, piercing, spear, 25, 1
    ;stat_pri_ex 0, 0, 0
    stat_pri_attr spear, long_pike, spear_bonus_8
    stat_sec 3, 1, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    ;stat_sec_ex 0, 0, 0
    stat_sec_attr no
    stat_pri_armour 0, 4, 0, flesh
    ;stat_armour_ex 0, 2, 3, 5, 4, 0, 0, flesh
    stat_sec_armour 0, 0, flesh
    stat_heat 4
    stat_ground 1, -2, 0, 4
    stat_mental 3, normal, highly_trained
    stat_charge_dist 40
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 200, 100, 45, 105, 200, 4, 60
    armour_ug_levels 0, 1, 2, 3
    armour_ug_models Pike_Militia, Pike_Militia_ug1, Pike_Militia_ug2, Pike_Militia_ug3
    ownership france, hre, spain, portugal, milan, venice, papal_states, sicily
    era 1 spain
    era 2 spain
    ;unit_info 6, 0, 4
    recruit_priority_offset 5
    This unit uses several models, depending whenever their armour is upgraded, and how much:
    -No upgrade (no icon): use Pike_Militia model to represent the soldier
    -First upgrade (copper shield icon): use Pike_Militia_ug1 model to represent the soldier
    -Second upgrade (silver shield icon): use Pike_Militia_ug2 model to represent the soldier
    -Third upgrade (golden shield icon): use Pike_Militia_ug3 model to represent the soldier

    About scripting unfortunately i don´t know enough to help you. You could ask the Dominion of the sword mod as i think they plan to use something similar, iirc it was that in a certain year it becomes active. I don´t know if it means that all units automatically gets the improved armour (that would be a script command) or that the building that does the upgrade (in vanilla the smithy) becomes available, and the player can build it and upgrade his troops. Those are two different things and would probably require different solutions. I hope i may have been of some help. Cheers
    Last edited by Bucefalo; 02-13-2010 at 18:50.

  6. #6
    Member Member seienchin's Avatar
    Join Date
    Feb 2009
    Posts
    588
    Blog Entries
    2

    Default Re: A question to the fans

    I guess the easiest way would be to make the higher blacksmith levels only available after a reform. Like the canonbuilder structure only gets available in Vanilla afte the invention of gun powder. That would be really easy to do.
    If you want the units to be altered in a way that they can only upgrade (Even if the structure is already there) after a reform I guess its imposible.

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