Results 1 to 7 of 7

Thread: How to change secondary weapon into primary? Need help.

  1. #1

    Default How to change secondary weapon into primary? Need help.

    Anyone know how to take pilum or javelin from any unit?
    So their secondary melee weapon become primary?
    For example take pilum from hastati so they become a normal plain swordsmen.
    Any simple solution?
    I look for some answers but or I am unlucky or what I find didn't work.
    Thanks for any help.
    "Its a GUNDAM!"
    "Nope. This is Polish Winged Cavalry."

  2. #2
    pacifism's Avatar see the day
    Citizen

    Join Date
    Mar 2013
    Location
    purple mountains majesty
    Posts
    1,958
    Tournaments Joined
    1
    Tournaments Won
    0

    Default Re: How to change secondary weapon into primary? Need help.

    Hold down the Alt button before sending the Hastati to attack. The javelin attack mouse icon thingy turns to a sword attack mouse icon thingy if you do it correctly.

    I find holding down the Alt button to choose whether you have melee combat significantly easier than modifying the unit info files.
    Read the latest TWC Content and check out the Wiki!
    ---
    Graham's Hierarchy of Disagreement

  3. #3

    Default Re: How to change secondary weapon into primary? Need help.

    Thank for good will. I was unclear.
    I mean mod it from the game. Switching primary/secondary in EDU didn't help. They fight with javelins using them like a melee weapon.
    Switching models didn't help either. They now use javelins like sword in melee.
    Trying to reduce ammo to zero but they still have some to throw(so I assume minimal value is 1).
    So what I have:
    Inf ->throw pilum on charge-> then melee.
    #What I want:
    Inf->charge to melee, no pilum. Secondary weapon become primary.
    But hastati are just example.
    Hoplites->spears and swords.
    Hoplites with only sword and no spear visible.
    Any simple method that not involve modifying models/textures?
    "Its a GUNDAM!"
    "Nope. This is Polish Winged Cavalry."

  4. #4

    Default Re: How to change secondary weapon into primary? Need help.

    Yes. I'm assuming your running Vanilla RTW version 1.5

    Open your export_descr_units.txt, search for Hastati. You should get an entry similar to the one below as a result, copy and paste this entry over what you have (the bold and italicized parts are the changes):

    Code:
    type             roman hastati
    dictionary       roman_hastati      ; Hastati
    category         infantry
    class            light
    voice_type       Light_1
    soldier          roman_hastati, 40, 0, 1
    attributes       sea_faring, hide_forest, can_sap
    formation        1, 2, 2, 3, 4, square
    stat_health      1, 0
    stat_pri         7, 2, no, 0, 0, melee, simple, piercing, sword, 25 ,1
    stat_pri_attr    no
    stat_sec         0, 0, no, 0, 0, no, no, no, none, 25 ,1
    stat_sec_attr    no
    stat_pri_armour  5, 4, 5, metal
    stat_sec_armour  0, 1, flesh
    stat_heat        3
    stat_ground      2, 0, 0, 0
    stat_mental      6, normal, trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 440, 170, 50, 70, 440
    ownership        roman
    As you can see, I copied the secondary weapon to the primary weapon, and removed the secondary weapon from the game.

    Then, open your descr_model_battle.txt, again search for Hastati. You should get an entry similar to the one below as a result, copy and paste this entry over what you have (the bold and italicized parts are the changes):

    Code:
    type				roman_hastati
    skeleton			fs_swordsman
    indiv_range			40
    texture				romans_julii, data/models_unit/textures/unit_roman_hastati_julii.tga
    texture				romans_brutii, data/models_unit/textures/unit_roman_hastati_brutii.tga
    texture				romans_scipii, data/models_unit/textures/unit_roman_hastati_scipii.tga
    texture				romans_senate, data/models_unit/textures/unit_roman_hastati_senate.tga
    texture				slave, data/models_unit/textures/unit_roman_hastati_slave.tga
    model_flexi_m			data/models_unit/unit_roman_hastati_high.cas, 15
    model_flexi_m			data/models_unit/unit_roman_hastati_med.cas, 30
    model_flexi_m			data/models_unit/unit_roman_hastati_low.cas, 40
    model_flexi			data/models_unit/unit_roman_hastati_lowest.cas, max
    model_sprite		slave, 60.0, data/sprites/slave_roman_hastati_sprite.spr
    model_sprite		romans_senate, 60.0, data/sprites/romans_senate_roman_hastati_sprite.spr
    model_sprite		romans_scipii, 60.0, data/sprites/romans_scipii_roman_hastati_sprite.spr
    model_sprite		romans_brutii, 60.0, data/sprites/romans_brutii_roman_hastati_sprite.spr
    model_sprite		romans_julii, 60.0, data/sprites/romans_julii_roman_hastati_sprite.spr
    model_tri			400, 0.5f, 0.5f, 0.5f
    As you can see, I removed the fs_javelinman skeleton, because it is no longer needed. Hastati should now fight without Pilums, using the correcting animations.

    Good luck.
    Last edited by Fallen851; November 24, 2013 at 10:45 AM.

  5. #5

    Default Re: How to change secondary weapon into primary? Need help.

    Thank you for help.
    I try this method before. What I get was a hastati beating enemy with javelins using a blunt side with great effect(they keep they like swords but a sharp side to earth and swing them like swords - so they have extremely murderous slashing sticks).
    So I try it again using your advice and get the same result. Which is hilarious and fun to watch but still leave me where I stand.
    Thanks for good will anyway.
    "Its a GUNDAM!"
    "Nope. This is Polish Winged Cavalry."

  6. #6
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: How to change secondary weapon into primary? Need help.

    You'd need to change the model used by the unit (i.e. the cas file(s) so that the primary weapon of the mod was not a javelin/pilum) either by editing the CAS file or by using a model that already uses a sword as a primary weapon.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  7. #7

    Default Re: How to change secondary weapon into primary? Need help.

    I have come quite far modding units. as to your question.
    You need to change a couple things for what you want to change in the base file :
    lets take this :
    type roman hastati
    dictionary roman_hastati ; Hastati
    category infantry
    class light
    voice_type Light_1
    soldier roman_hastati, 40, 0, 1
    attributes sea_faring, hide_forest, can_sap
    formation 1, 2, 2, 3, 4, square
    stat_health 1, 0
    stat_pri 7, 2, no, 0, 0, melee, simple, piercing, sword, 25 ,1
    stat_pri_attr no
    stat_sec 0, 0, no, 0, 0, no, no, no, none, 25 ,1
    stat_sec_attr no
    stat_pri_armour 5, 4, 5, metal
    stat_sec_armour 0, 1, flesh
    stat_heat 3
    stat_ground 2, 0, 0, 0
    stat_mental 6, normal, trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 440, 170, 50, 70, 440
    1 we change the type of unit it is (after all we change it PRIMARY weapon from melee to missile)
    2 we see the soldier type roman_hastati, we will need to change this too, we go to Descr_Model_Battle.txt and look this up :
    type roman hastati
    dictionary roman_hastati ; Hastati
    category infantry
    class light
    voice_type Light_1
    soldier roman_hastati, 40, 0, 1
    attributes sea_faring, hide_forest, can_sap
    formation 1, 2, 2, 3, 4, square
    stat_health 1, 0
    stat_pri 11, 2, pilum, 35, 2, thrown, blade, piercing, spear, 25 ,1
    stat_pri_attr prec, thrown ap
    stat_sec 7, 2, no, 0, 0, melee, simple, piercing, sword, 25 ,1
    stat_sec_attr no
    stat_pri_armour 5, 4, 5, metal
    stat_sec_armour 0, 1, flesh
    stat_heat 3
    stat_ground 2, 0, 0, 0
    stat_mental 6, normal, trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 440, 170, 50, 70, 440
    ownership roman
    The skeleton determines how a unit moves -> linked to this is also whether a unit is slow, normal or fast (keep in mind though not all skeletons work for all units)
    sure you can make your own skeleton, but thats a whole new level of modding. As we can see in this case we use two skeletons (one for trowing pilaii, one for swordfight) If we want to remove the second combat abilty we should remove that swordsman skeleton, if we want to keep it, it might be needed to reverse them (not sure though) It is also possible to copy-paste some other skeleton type to here (for example if you want to make a certain unit be faster or have fire missle ability, you might save time by just copy paste some other skeleton) -> editing skeletons themselves while possible I have not tried yet.
    So lets presume we just remove the sword skill alltogether.
    so we just get :
    skeleton fs_javelinman
    now step 3 : removing secondary skill (see change below)
    the line under stat_pri and stat_sec read the same :
    base attack value - extra attack when charging - type of missile* (no if not missile) - range of missile - number of missiles carried - Weapon type (melee, thrown, missile, siege_missile) - Tech type (simple, other, blade, archery, siege) - Damage type** (piercing, blunt, slashing, fire) - Sound by hitting (none, knife, mace, axe, sword, spear) - delay between attacks
    *you can see&change what every type of missile does here : Descr_Projectile_New.txt
    **changing damage type seems to do nothing, these settings are instead now included in the skeleton builds
    so to make the stat_sec inactive we should change it to :
    0, 0, no, 0, 0, no, no, no, none, 25 ,1
    and now :
    stat_pri 11, 2, pilum, 35, 2, thrown, blade, piercing, spear, 25 ,1
    Seems fine, we do want to give it more than 2 missiles, or it will run out to fast, lets give it 30.
    so now it should read :
    stat_pri 11, 2, pilum, 35, 30, thrown, blade, piercing, spear, 25 ,1
    and now what causes the bug (in both cases, also if you want to make it a swordman)
    stat_pri_attr prec, thrown ap
    this line can add specific options, all those options are :
    •ap = armour piercing. Only counts half of target's armour
    •bp = body piercing. Missile can pass through men and hit those behind
    •spear = Used for long spears. +8 vs. cavalry and -4 defense vs infantry
    •light_spear = Same as spear, but unit has less pushing power than Spear.
    •spear_bonus_x = used with spear or light_spear. This adds an extra bonus (x) to the effect.
    •long_pike = Use very long pikes. Phalanx capable units only.
    •short_pike = Use shorter than normal spears. Phalanx capable units only.
    •prec = Missile weapon is thrown just before charging into combat. It can still be used in "Fire At Will" mode.
    •thrown = The missile type if thrown rather than fired.
    •launching = attack may throw target men into the air.
    •area = attack affects an area, not just one soldier
    we see that the one causing trouble for us is the prec command, remove it.
    Finally we will want to remove the charge distance alltogether
    the line :
    stat_charge_dist 30
    should be changed to 0
    now our unit would be ready, a nice new javalin trower that would look like this :

    type roman hastati
    dictionary roman_hastati ; Hastati
    category infantry
    class missile
    voice_type Light_1
    soldier roman_hastati, 40, 0, 1
    attributes sea_faring, hide_forest, can_sap
    formation 1, 2, 2, 3, 4, square
    stat_health 1, 0
    stat_pri 11, 2, pilum, 35, 30, thrown, blade, piercing, spear, 25 ,1
    stat_pri_attr thrown ap
    stat_sec 0, 0, no, 0, 0, no, no, no, none, 25 ,1
    stat_sec_attr no

    stat_pri_armour 5, 4, 5, metal
    stat_sec_armour 0, 1, flesh
    stat_heat 3
    stat_ground 2, 0, 0, 0
    stat_mental 6, normal, trained
    stat_charge_dist 0
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 440, 170, 50, 70, 440

Posting Permissions

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