Results 1 to 14 of 14

Thread: Creating an effective javelin -> sword unit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Creating an effective javelin -> sword unit

    I'm working on the Romans for my mod, and that means using Javelin and sword skeletons a lot. I've also modified the Javelin skeleton to have the unit shoot in one motion from drawing to releasing the projectile.

    Now there are several issues to be dealt with:

    First, one might assume that the command 'prec' should be used, like in RTW, except the only problem is that it is bugged. If the unit is attacked before it releases the projectiles, units will stand passively, not even in battle mode, as they will proceed to get killed one by one.

    To solve this a simple 'thrown' might be used, which all javelin units use. However this causes the following problem: an ammo amount of "1" is no longer allowed, so you have to give them at least 2. If you give the unit 2 javelins, they will try to fire one after the other, while the enemy charges at them and catches them offguard.

    So here are the questions:

    1) is there any way to remove the 'minimum missiles' requirement for the 'thrown' keyword?

    2) is there any way, in the AI files for example, to modify the AI behavior of the soldiers, where they will not try to shoot at an enemy if he's within a certain range, but switch to swords instead?


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  2. #2

    Default Re: Creating an effective javelin -> sword unit

    Well, I have encountered the same problem.
    So I am on your side.

    "thrown" actually does nothing to MTW2, at least I havent found any difference.

    For me, I think that it is a "class problem", ai won't use the secondary weapon of a "prec" unit because of not thinking a heavy/light/spearmen unit has a seconday weapon.

  3. #3
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Creating an effective javelin -> sword unit

    Well, by 'thrown' I meant converting the legionary unit into a regular javelin unit, which works very well. They throw javelins from a far, and when done, charge at the enemy. There are still some kinks to work out with it, as I outline in the OP.

    But more specifically, the 'thrown' attribute in stat_pri_attr, you're right, does not add functionality by itself. What it does do however is change the cursor from the bow-and-arrow, default for all ranged units, into a javelin cursor whenever you bring the mouse over the enemy. So it is still useful aesthetically.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  4. #4

    Default Re: Creating an effective javelin -> sword unit

    Are you meaning the "single ammo"? Well, sometimes it may work, but the problem still occurs when not all the unit has finished their single ammo, especially ai units.

    Do you think that it is a animation problem?

  5. #5
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Creating an effective javelin -> sword unit

    It's not an animation problem, it's a core engine problem I think. The units don't even start battle carrying secondary weapons, like they did in RTW where although javelin was the primary weapon, with 'prec' they started battle with swords instead.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  6. #6

    Default Re: Creating an effective javelin -> sword unit

    Well, in some RTW mod you can find the javelin coming back again, I don't think that it is the real problem, because "sword and javelin" is just mesh.

    If it is a exactly hardcore, I should say that ca has created such a useless and stupid engine from BI.(Can you image that they even kept shield_wall but forgot javelin??)

  7. #7

    Default Re: Creating an effective javelin -> sword unit

    god, I hate vpn, my work on the reply is completely vanished.

    For my suggest, delete the damned "prec" and put the unit as "heavy" with a "cannot_skirmish"attribute, then put engage_at_will in formation_ai to stop ai by reactiving skirmish.

    I wished to talk about some detail but the stupid internet ruined all my works here.
    Last edited by flagcarrier; October 05, 2010 at 04:23 PM.

  8. #8
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Creating an effective javelin -> sword unit

    I don't see a script solution to this. The main problem I notice is that there is no command to force an attack with the secondary. So if it is possible to track the occurrance of the problem, and I haven't really found a way to do that, it then doesn't seem possible to force the unit to behave correctly. Scripting an attack for the unit produces more of the same problem.

    Such a shame, I really like the function until it breaks.

    flagcarrier, tiny tip to avoid that irritation; write your reply in notepad and copy it over. In the past I've had similar probs resulting from browser crashes.
    Last edited by Taiji; October 06, 2010 at 09:05 AM.

  9. #9
    Auto-Nabishtam's Avatar Civis
    Join Date
    Jul 2010
    Location
    Hotest Erea In The World
    Posts
    167

    Default Re: Creating an effective javelin -> sword unit

    Quote Originally Posted by SigniferOne View Post
    I'm working on the Romans for my mod, and that means using Javelin and sword skeletons a lot. I've also modified the Javelin skeleton to have the unit shoot in one motion from drawing to releasing the projectile.

    Now there are several issues to be dealt with:

    First, one might assume that the command 'prec' should be used, like in RTW, except the only problem is that it is bugged. If the unit is attacked before it releases the projectiles, units will stand passively, not even in battle mode, as they will proceed to get killed one by one.

    To solve this a simple 'thrown' might be used, which all javelin units use. However this causes the following problem: an ammo amount of "1" is no longer allowed, so you have to give them at least 2. If you give the unit 2 javelins, they will try to fire one after the other, while the enemy charges at them and catches them offguard.

    So here are the questions:

    1) is there any way to remove the 'minimum missiles' requirement for the 'thrown' keyword?

    2) is there any way, in the AI files for example, to modify the AI behavior of the soldiers, where they will not try to shoot at an enemy if he's within a certain range, but switch to swords instead?
    What exactly you do to get one motioned shoot for javelins?

  10. #10
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Creating an effective javelin -> sword unit

    Basically I created a single aim+release animation, and assigned it to the release animation keyword. I then gave the 'idle' anim to the previous two preparatory animation keywords.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  11. #11
    Auto-Nabishtam's Avatar Civis
    Join Date
    Jul 2010
    Location
    Hotest Erea In The World
    Posts
    167

    Default Re: Creating an effective javelin -> sword unit

    Basically I created a single aim+release animation,
    anim attack_missile_ready data/animations/MTW2_Javelin/MTW2_Javelin_ready.cas
    anim attack_missile_hold data/animations/MTW2_Javelin/MTW2_Javelin_ready.cas
    anim attack_missile_release data/animations/MTW2_Javelin/MTW2_Javelin_attack_missile_release.cas


    then gave the 'idle' anim to the previous two preparatory animation keywords.
    anim attack_missile_ready data/animations/MTW2_Javelin/MTW2_Javelin_ready.cas
    anim attack_missile_hold data/animations/MTW2_Javelin/MTW2_Javelin_ready.cas
    anim attack_missile_release data/animations/MTW2_Javelin/MTW2_Javelin_attack_missile_release.cas
    right?

  12. #12
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Creating an effective javelin -> sword unit

    Code:
    ;;;Firing procedure: stand_to_ready, ready, release, ready, ready_to_stand
    ;Ready
    anim		stand_a_to_ready			data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas			-fr
    anim		stand_b_to_ready			data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas			-fr
    anim		stand_c_to_ready			data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas			-fr
    anim		ready					data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas			-fr
    
    ;uncertain when these are triggered, usually when firing while with the back towards the enemy
    anim		attack_missile_ready			data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas			-fr
    anim		attack_missile_hold			data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas			-fr
    
    anim		attack_missile_release			data/animations/MTW2_S1_Javelin/MTW2_Javelin_ready_release.cas			-fr		-id:0.0, 1.5, 1.0, -if:52	-evt:data/animations/MTW2_Javelin/MTW2_Javelin_attack_missile_release.evt
    anim		ready_to_stand_a			data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas			-fr
    Last edited by SigniferOne; November 19, 2010 at 01:56 AM.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  13. #13
    Auto-Nabishtam's Avatar Civis
    Join Date
    Jul 2010
    Location
    Hotest Erea In The World
    Posts
    167

    Default Re: Creating an effective javelin -> sword unit

    Quote Originally Posted by SigniferOne View Post
    Code:
    ;;;Firing procedure: stand_to_ready, ready, release, ready, ready_to_stand
    ;Ready
    anim        stand_a_to_ready            data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas            -fr
    anim        stand_b_to_ready            data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas            -fr
    anim        stand_c_to_ready            data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas            -fr
    anim        ready                    data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas            -fr
     
    ;uncertain when these are triggered, usually when firing while with the back towards the enemy
    anim        attack_missile_ready            data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas            -fr
    anim        attack_missile_hold            data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas            -fr
     
    anim        attack_missile_release            data/animations/MTW2_S1_Javelin/MTW2_Javelin_ready_release.cas            -fr        -id:0.0, 1.5, 1.0, -if:52    -evt:data/animations/MTW2_Javelin/MTW2_Javelin_attack_missile_release.evt
    anim        ready_to_stand_a            data/animations/MTW2_S1_Javelin/MTW2_Mace_stand_A_idle.cas            -fr
    Now I got the idea short timed animations of stand and idle so the unit will take shorter time to release their missle good idea, thank you SigniferOne, I will try it.

  14. #14
    Auto-Nabishtam's Avatar Civis
    Join Date
    Jul 2010
    Location
    Hotest Erea In The World
    Posts
    167

    Default Re: Creating an effective javelin -> sword unit

    SigniferOne could you please upload the .cas file as I failed to make the effective fast javelin animations???

Posting Permissions

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