Attack Pause does not seem defined right for cold steel?

Discussion in 'Modding' started by Ftoomsh, Jan 11, 2017.

  1. Ftoomsh

    Ftoomsh Well-Known Member

    Attack Pause does not seem to be defined correctly for cold steel? Or else I don't understand it.

    It's defined by this procedure and its code which I have left out;

    procedure SetObjBaseWeapon(var objprop : TObjProp; var objbase : TObjBase; index, damage, pause, radiusmin, radiusmax, detectradiusmin, detectradiusmax, kind : Integer; bSearchMinAttackRadius : Boolean);

    Yet, when attack pause for pikes and all other cold steel is defined it is left at zero. How can attack pause be zero, even for for cold steel?

    'pikeman', 'pikemanpol', 'pikemantur', 'pikemanrus' : begin
    objbase.maxhp := 95;
    SetObjBaseWeapon(objprop, objbase, 0, 8, 0, 35, 100, 0, 100000, gc_obj_weapon_kind_pike, True);

    According to this index is 0, attack is 8 and pause is 0. Am I reading this wrong?

    I tested an attack pause of 750 on pikes for fun (at 50 frames a second that is 15 seconds) and it worked, so why does 0 attack pause work for cold steel? Is any pause at zero just the pause it takes them to acquire another target?
     
    Last edited: Jan 11, 2017
  2. Fulcrum

    Fulcrum Active Member

    Pause is 35. On Russian spearmen it is 45, which is funny as they`re quoted to be the most effective pikemen...But its made by GSC so no wonder.
     
  3. icosferu

    icosferu Active Member

    If you pass "default", which is apparently -1, no changes to the field are made. So, previous value stay on. But if no new value were introduced, then it will be set to 0, just because it's pascal. This logic implies that the engine should replace 0 with some default value.
     
  4. Ftoomsh

    Ftoomsh Well-Known Member

    In the spirit of Cuba Gooding; "Show me the code."

    I see only zeroes in all the cold steel definitions. Remember, we are talking about C3 not C1.
    Or maybe I am going blind, I have been looking at the screen too long. ;)
     
  5. Fulcrum

    Fulcrum Active Member

    Sure, here you go:

    SetObjBaseWeapon(objprop, objbase, 0, 8, 0, 35, 100, 0, 100000, gc_obj_weapon_kind_pike, True);

    Applies to all units. Units with bayonets have this line twice so observe which one you change. One`s for firing, one for cold steel.
     
  6. Ebel

    Ebel Moderator Staff Member

    Something doesn't add up.
    Units.script at line 520 says:
    Code:
    procedure SetObjBaseWeapon(var objprop : TObjProp; var objbase : TObjBase; index, damage, pause, radiusmin, radiusmax, detectradiusmin, detectradiusmax, kind : Integer; bSearchMinAttackRadius : Boolean);
    
    Pikeman:
    Code:
    SetObjBaseWeapon(objprop, objbase, 0, 8, 0, 35, 100, 0, 100000, gc_obj_weapon_kind_pike, True);
    
    I could be going blind here or read this wrong, but:
    0 : index
    8: damage
    0: pause
    35: radiusmin
    100: radiusmax
    0: detectradiusmin
    100000:detectradiusmax
    gc_obj_weapon_kind_pike: kind
    True: bSearchMinAttackRadius

    Am i reading this wrong?
     
  7. Setakat

    Setakat Member

    Nope, I've noticed that for melee units as well. There doesn't seem to be a delay between attacks for melee units.
     
  8. Fulcrum

    Fulcrum Active Member

    No you are actually not. I tested it and its the number right behind the damage, so zero in this case. On shooters it is the same one, silly me (as I have tweaked it indeed). The zero should be a base value, which means melee units have the same attack speed, which should be set as a parameter in terms of frames per second somewhere. Question is where?
     
  9. Fulcrum

    Fulcrum Active Member

    Ok, the 0 is some basic parameter but I cannot seem to find where this base value is set. If you change the value, it will affect teh attack speed of the pikeman, I already tried it 10 min ago. 400 makes them super slow :) So, the question is - what is this base value, I can get close to it by trial and error but a hint would save me the trouble.
     
  10. Ftoomsh

    Ftoomsh Well-Known Member

    I see what Ebel sees on this matter. My guess is this. An attack pause of 0 (zero) works in the manner.

    Real Effective Pause = Time to acquire next target + Attack Pause.

    When you think about it there will be a processing overhead (and consequent delay) in each unit acquiring its next target.

    In practice, I am using an attack pause of 25 for cold steel. It is working well and cold steel makes a thrust or stroke about every 1 second at this setting and on fast speed (not very fast). If we assume fast speed on my PC at game beginning vs. AI (how I do basic tests) is 50 frames then we get a value of 25 frames for "Time to acquire next target". This is how it looks to me.

    Now this pause might be buffered somewhere to a minimum of 25 frames (for example). As in
    "if targetacquisitiondelay < 25 frames then targetacquisitiondelay := 25 frames". Then;
    "fullattackpause := targetacquisitiondelay + pause"

    But I am just guessing. I haven't seen code evidence of this.
     
    Last edited: Jan 13, 2017
  11. Setakat

    Setakat Member

    Attack pause seems to be the delay between the attack animation. Some units have a noticeably faster attack animation than others (Spearman, Winged Hussar), so they inflict damage faster.

    Musketeer attack animation seems to take the same time for all, so the attack pause is basically being used to simulate the reload time. If you set it to 0, they'll attack about as fast as someone skilled with a bolt action. Their attack animation is much longer than that of melee units, so there are no machine gun musketeers sadly.
     
  12. Ftoomsh

    Ftoomsh Well-Known Member

    From my experiments in my first prototype mod, attack pause affects more than the animation for cold steel units. It affects the actual rate of attack cuts and thrusts. Since I lifted attack pause for cold steel from 0 to 25, cold steel battles take longer. It makes pike groups, sword groups etc. take a more appreciable time to cut through each other. Since I have lifted attack pause on standard muskets to 750 (15 seconds at 50 frames per second), the longer time of pike battles gives the longer-reload-time muskets time to have more of a bearing on the battle. Their reload rate is now realistic. Pity there are no reload animations (that I have seen).

    I have lifted standard 17th C muskets base shot power to 25. This makes up for slower, realistic fire rate. These muskets also now produce at the same speed as standard pikes (that is 150 in the code and 4.68 IIRC in the in-game info.) Of course, other units that need a lift in shot power to match this, get it. For example, Grenadiers (standard or default type) get a base shot-power of 45 and standard 18th C muskets get 50 base shot power. Power nation muskets are brought back a bit but are still higher in shot power than standard 18th C muskets. Their costs come down somewhat (for loss of power) but they are still more expensive than standard 18th C muskets.
     
    Last edited: Jan 13, 2017
  13. Fulcrum

    Fulcrum Active Member

    750 and 25 base shot would render them as useless as they are in the original "days of (mis)coding brilliance". Problem is, if you make them with higher shot to compensate for the 750 reload time, as it was in some of the C1 mods, difference between them and the newer 18c units becomes too narrow. I think something like 330-350 might be best indeed, in combination with drills completed shot of around 40 for the 17c musket but its all down to what you like :)
     
  14. Francesco_Cavalli

    Francesco_Cavalli Active Member

    Thought I'd point out that changing the number for ranged units' melee attack results in them using their firing animation rather than the bayonet one, and that changing it to 10 in melee units results in a bug whereby they stop fighting after a few seconds. Strangely, numbers over 20 don't have this effect but do rather disjoint combat
     
  15. Loner

    Loner Active Member

    In HEW there were two separate buttons, one for Melee the other for Melee and Skirmish, this meant that you could get right up close to the enemy with a Melee attack then switching to both to offload a devastating volley.:cool:
     
  16. Ftoomsh

    Ftoomsh Well-Known Member

    Along with 750 reload and 25 base shot I have now added in 25% chance of a head-shot (kill-shot). Their minimum range is lowered so they can fire at quite close range. All this works well.

    I am really happy at this stage with the 17th C pike vs musket confrontation and how it turns out in this prototype mod.

    1. Ran a trial vs. the AI where I made a 72 man 17th musket formation.
    2. Upgraded the 4 attack bonuses in the barracks for these muskets.
    3. Did not run any shot speed upgrade (simulating early play from 1,000s resources).
    4. Lured 2 x 36-pike AI formations to assault the 72 17th musket formation front-on simultaneously. Had the balloon on from the start to help me do this test.
    6. Results of survivors after salvos as follows. Muskets retreated after each salvo and reloaded on the march (not a bad feat - more about this facet of the model at a later time).
    The pikes had 4 attack and 4 defence upgrades by then.

    PIKE SURVIVORS AFTER SALVOS

    > 1st x 36 pikes 2nd x 36 pikes

    First salvo 29 survivors 24 survivors
    Second 15 survivors 20 survivors
    Third 9 survivors 16 survivors


    Muskets were disrupted and had lost some men by the time of the 3rd salvo. I had retreated into a tight corner with pikes right in my midst by 3rd salvo. All muskets were lost in the final trap I put myself in. This illustrates the muskets at these settings will need plenty of retreat space or support by pikes or horse. Yet, if they can fire off even 2 full salvos at pikes and retreat to safety behind pikes or a wooden fence then they can inflict significant casualties on infantry cold steel with minimal losses or none to themselves if no enemy muskets are present. The occasional musket man seems to walk the wrong way, get caught by pikes and die in a close pursuit. This is more so if the terrain is difficult.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice