Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

How does initiative work in BG, IWD and PT?

2»

Comments

  • AlonsoAlonso Member Posts: 745
    edited February 2019
    Grond0 wrote: »
    Ordering an attack while in range of an opponent starts a round, but note that this is a different calculation from the activities one, i.e. you can have 2 separate round calculations going at the same time and at different stages.
    I'm frying my brains trying to understand this, but it seems trickier than quantum mechanics. Can you give us some examples to clarify the concept? You know, something like "my bard attacks with his sword, then casts spell x, then sings a bard song... and rounds start at points x, y, z".

  • Grond0Grond0 Member Posts: 5,852
    Does this help to clarify that rounds for combat and spell etc activities are different things?
    pqah4tbu8bx9.jpg

    Alonso
  • The user and all related content has been deleted.

  • Grond0Grond0 Member Posts: 5,852
    edited February 2019
    @subtledoctor I know you don't value my personal experience and observation highly :p. However, for what it's worth my experience is that in the situation you describe you will indeed fail to attack for a long period (at least it seems a long period to me as the icon flails around with the sword without actually making a genuine attack).

    Consider this example for an attacker with 1 APR:
    - an attacker clicks to attack with a long sword (speed 5), but rolls -1 on initiative meaning the attack is expected in segment 4.
    - the attacker switches to cast a magic missile spell just before they actually attack.
    - that means they're now in segment 5, but have missed their attack for that round.
    - the next attack could be made in, say, segment 7 of the following round if they get a poor initiative, i.e. they fail to attack for more than 6 seconds (if you play at the standard 30 fps).

    I've seen the type of behavior outlined in that example numerous times - where there's a delay of something like a full round between clicking to attack and actually attacking. That's never the case when you attack in a fresh combat round and confirms that the combat round does not stop at the point you stop attacking. If you're using a fast weapon you get more attacks in by attacking then casting rather than the reverse.

    If I inadvertently get into the situation where I think I've missed my intended attack for the round - for instance in moving around between attacks for slightly longer than I intended - then I will normally briefly retreat from combat (after a full round of not attempting to attack the round counter does reset) rather than attempt to attack when I know I won't actually do so, but my opponent will.

  • The user and all related content has been deleted.

  • Grond0Grond0 Member Posts: 5,852
    edited February 2019
    Post deleted to avoid confusion in the light of further clarifications below.

    Post edited by Grond0 on
  • CamDawgCamDawg Member, Developer Posts: 3,413
    edited February 2019
    Just dropping in two cents here--ranged weapons with ammunition have speed factors of zero. The weapon's speed factor gets overridden by the ammunition's speed factor; at present all ammo in the game uses zero. We had a similar issue where bows/slings/etc. were usable without a non-proficiency penalty due to the ammo overriding the weapon. We had a similar discussion on speed factor, but for the life of me I can't find it.

    edit: found the thread

    Grond0GusindaJuliusBorisovsemiticgod
  • [Deleted User][Deleted User] Posts: 0
    edited February 2019
    The user and all related content has been deleted.

    Post edited by [Deleted User] on
  • AlonsoAlonso Member Posts: 745
    Grond0 wrote: »
    Does this help to clarify that rounds for combat and spell etc activities are different things?
    How can you measure all the segments with so much precision? For instance, how do you know that the second attack happens at t=7, and not at t=6 or t=8?

  • The user and all related content has been deleted.

  • AlonsoAlonso Member Posts: 745
    Impressive testing work, @Grond0 !
    Grond0 wrote: »
    Next I tried to look at the effect of retreating briefly from combat before re-engaging - still at 1 APR.
    Can you elaborate on what you did here? I'm not sure of what you're testing in this case.

    semiticgod
  • Grond0Grond0 Member Posts: 5,852
    edited March 2019
    Alonso wrote: »
    Impressive testing work, @Grond0 !
    Grond0 wrote: »
    Next I tried to look at the effect of retreating briefly from combat before re-engaging - still at 1 APR.
    Can you elaborate on what you did here? I'm not sure of what you're testing in this case.

    I was confirming that the combat round does not reset when you break off combat. All the 10 attacks listed fell into the expected range (of between speed 1 and 6) for the initial attacks and I then retreated briefly before coming back in for a second attack.
    - in 4 cases the delay was long enough that the second attack was made after the end of the first round and in all of those the speed of attack fell into the expected range for a new attack.
    - in the remaining cases the second attack was ordered while still in the first round. In all of those cases the speed of attack was consistent with a fresh initiative roll having been made for an attack only at the start of the second round, but in 3 of them the speed of attack would not have been consistent with an initiative roll having been made immediately (as the speed of attack was slower than 6 segments after the order to attack).
    Though the sample is small, for the purpose of confirming already 'known' behavior, the results are convincing (at least to me ;)).

    Alonsojessejmc
  • The user and all related content has been deleted.

    Grond0jessejmcmonico
  • semiticgodsemiticgod Member, Moderator Posts: 14,094
    edited March 2019
    @subtledoctor @Grond0: Can you guys summarize your findings in a way I could better understand? This is pretty dense for me.

  • Grond0Grond0 Member Posts: 5,852
    edited March 2019
    semiticgod wrote: »
    @subtledoctor @Grond0: Can you guys summarize your findings in a way I could better understand? This is pretty dense for me.

    I don't have findings, only hypotheses.

    My understanding is:
    - There is a 6-second timer that runs for weapon attacks, and a separate one for spells/potions/wands/etc. The former represents you think of as APR; the latter represents your "aura being cleared."

    - When attacks take place in the weapon attack timer is subject to a random variation of plus or minus ~1.2 seconds, for no good reason at all. :tongue:

    - When spells are cast is not subject to that variation.

    - Those timers can interfere with each other. If you have an attack "scheduled" to take place 3 seconds into the round, you can cast Magic Missile before one second passes and still go back and execute the attack; but if you cast a spell like Wish that takes 5+ seconds to cast, you will miss your chance to attack.

    - Likewise, if you break off your attack and then re-engage - in this example, if you tell your character to move somewhere 2 seconds into a round, and then click to attack someone 4 seconds into the round, you will have missed your attack that was scheduled at 3 seconds into the round.

    - (This one is my hypothesis) If you tell your character to move around 2 seconds into a round, and keep moving around for 8 seconds, and then click to attack 4 seconds into the next round, you will not miss your round-2 attack. In this case because the attack round timer expired with no attacks scheduled, the next 4 seconds are not measured at all; when you click to attack again, a brand new attack timer begins from that moment.

    I agree with the above. A few points of clarification about how I think it works are:
    - the round timer (which I agree is about 6 seconds if you're playing at 30 fps) for weapons commences at the point you order an attack while in range with the weapon being used. That timer continues until you stop attempting to attack for at least a round, i.e. you don't actually have to make an attack to start the timer and the timer is not renewed by any actual attacks you do make.
    - attacks can only take place at defined times (one each segment).
    - haste works not just by affecting APR, but by doubling the speed your attacks are processed at. At 30 fps that means that a hasted round would only last 3 seconds (and you would thus only have to break off combat for 3 seconds to end the combat round timer). Slow halves the speed your attacks are processed at. Although fast and slow don't affect initiative directly the change in the duration of the rounds does affect that indirectly. Hence if the combination of weapon speed and initiative means an attack would take place in segment 4, a slowed attack would only happen in segment 8 as far as the rest of the combatants are concerned.
    - the random variation is to reduce weapon speed by up to 2 segments or increase it by up to 3 (and I think reducing the advantage of fast weapons is a good reason for that :p).

    Post edited by Grond0 on
    JuliusBorisovjessejmcmonico
  • semiticgodsemiticgod Member, Moderator Posts: 14,094
    That seems to match my experience with kiting, since I've found that running away at the wrong time can mysteriously remove an attack per round, and it's nearly impossible to prevent that from happening because the timing is partly random.

    I've also noticed evidence that the round timer starts when you give the order to attack; not when an attack roll is made or even when the target is within range. I once ordered a character to attack an enemy while dual-wielding, and since it took several seconds to actually make an attack roll, the character struck with the off-hand weapon first, because the main hand attacks were lost.

    JuliusBorisovjessejmcmonico
  • gorgonzolagorgonzola Member Posts: 3,361
    i was running some tests puzzled by this thread and i noticed something weird.
    aerie dw under regular haste:
    expected behavior 2 attacks with main hand and 1 with off hand every 6 sec.
    results of test is 1 3 sec round with oh attack followed by mh attack, followed by 1 3 sec round with oh attack. over and over.
    this happens both if the mh weapon is faster than the oh one and if the opposite is true, the speed factor of weapon seems to not affect which hand attacks first.
    if i throw in also some spellcasting the thing becomes even more complicated. the weapons used have sf of 2 and 3, after the first 2 attacks she is able to cast a magic missile before the end of the round, ordering her to attack again the next 3 sec round she performs the oh attack, just as the test without casting, but then if ordered to cast again she cast and then the round never ends.
    autopause on round end used to see the end of each round.

    if i am not wrong the splitting of the round into 2 of 1/2 duration was introduced by EE, probably to avoid that all the attacks are performed by the mh but the last one that is with the oh.
    judging by the results of my test the thing seems to not work properly as now in some cases like the one tested by me the oh gets more attack than the mh and as to have 2 3 sec lasting rounds instead of a 6 sec one gives problems possibly cause the apr and the 1 spell/round refer to a 6 sec one but that one is replaced by 2 short ones.

    JuliusBorisovjessejmc
  • Grond0Grond0 Member Posts: 5,852
    I think the halving of the round length goes back to vanilla - as does the preference for the extra attack by the off-hand. I vaguely recall seeing an engine explanation for the latter behavior a long time ago - possibly from @kjeron?

    Autopause on round end is a bit of a strange one because as is discussed above rounds don't really exist in BG. The autopause often kicks in at the point a timer is about to start, rather than when it stops (I think on the grounds it assumes that's the end of a previous round even where there was no timer running at that point). If you didn't order another attack after the second magic missile then there would be no further action to trigger the autopause (to show when the new timer is about to begin).

    gorgonzolajessejmc
  • kjeronkjeron Member Posts: 2,151
    gorgonzola wrote: »
    i was running some tests puzzled by this thread and i noticed something weird.
    aerie dw under regular haste:
    expected behavior 2 attacks with main hand and 1 with off hand every 6 sec.
    results of test is 1 3 sec round with oh attack followed by mh attack, followed by 1 3 sec round with oh attack. over and over.
    That's normal.
    Haste reduces the attack round timer from 6s to 3s - this is not EE specific.
    As long as you attack uninterrupted (and don't have 0 APR):
    - At least one mainhand attack occurs every 2-round period.
    - Offhand attacks always occur in equal amounts over a 2-round period.
    - With an offhand weapon, if you have 3/2 APR unhasted or 3 APR hasted, you will attack once with mainhand every other round, and once with the offhand every round, and always with the offhand first.
    - With an offhand weapon, if you have 1 APR unhasted, you will attack ONLY with the mainhand, once every round.
    - All other values allow giving the offhand one attack every round with the rest (equal or more) going to the mainhand.

    gorgonzolaGrond0jessejmc
  • GoidaGoida Member Posts: 118
    Here is a small mod that introduces random speed adjustments for spells, weapons and character speed every fighting round: https://forums.beamdog.com/discussion/62465/initiative-mod

Sign In or Register to comment.