• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Nostalrius 7.7

After further investigation - this time with debuger linked.
Found out special circumstance when monster might perform lower delay.
It's when monster is 2 tile away and performs an distant spell attack, if it manages to gap close enough for melee attack it will perform melee + spell instantly.

I am not really sure if CipSoft intended it to work that way? Seems like that makes "good kitting" a skill. But that's what triggered "evul demon" in that video. It casted spell right before it gap closed back to EK and casted again when it could melee.

Here's a video of reproduction on Cip files:

So if you keep fighting above melee range, without blocking it's path it will never go 1000ms.

So annihilator demons, should spam @ 1000ms while the "tanked" one will be 2000ms.

General interval on the IdleStimulus
Attack = 2,000ms
Idle = 1,000ms ( can't reach any of the target & looks for new target/ random walk/etc )
 
After further investigation - this time with debuger linked.
Found out special circumstance when monster might perform lower delay.
It's when monster is 2 tile away and performs an distant spell attack, if it manages to gap close enough for melee attack it will perform melee + spell instantly.

I am not really sure if CipSoft intended it to work that way? Seems like that makes "good kitting" a skill. But that's what triggered "evul demon" in that video. It casted spell right before it gap closed back to EK and casted again when it could melee.

Here's a video of reproduction on Cip files:

So if you keep fighting above melee range, without blocking it's path it will never go 1000ms.

So annihilator demons, should spam @ 1000ms while the "tanked" one will be 2000ms.

General interval on the IdleStimulus
Attack = 2,000ms
Idle = 1,000ms ( can't reach any of the target & looks for new target/ random walk/etc )

Awesome work. I got similar behavior by setting earliestAttackTime = 0 when the goes monster from distance to melee range. The idea being that: if between attacks the creature is able to reach melee range within the 1 second interval, then it gets an extra attack.

If it's not too much, I wonder if a switch between melee to range would trigger it as well. Perhaps, in a fleeing dragon. You could get it to flee and go in and out of melee range to see if it's triggered on exiting melee range as well. Disabling healing might make it easy to test as well.

edit: Maybe not. I watched the video again after I typed that out and I see that that case is probably covered there.

One reason enabling this behavior might be useful (other than realism) is that it makes running down a wounded creature more dangerous as if you stray in and out of melee range, like when running diagonally with dragons, they get more chances to hit you with firebombs. Or more concisely, I think it does have a meaningful effect on overall game balance.
 
Last edited:
If it's not too much, I wonder if a switch between melee to range would trigger it as well. Perhaps, in a fleeing dragon. You could get it to flee and go in and out of melee range to see if it's triggered on exiting melee range as well. Disabling healing might make it easy to test as well.

edit: Maybe not. I watched the video again after I typed that out and I see that that case is probably covered there.

One reason enabling this behavior might be useful (other than realism) is that it makes running down a wounded creature more dangerous as if you stray in and out of melee range, like when running diagonally with dragons, they get more chances to hit you with firebombs. Or more concisely, I think it does have a meaningful effect on overall game balance.

I have tested the fleeing behaviour a bit. So we already know the monster while fleeing has only 33% of it's normal attack chance. However interval for fleeing is 1000ms. Making it possible for the fleeing creature to do some nasty combo but its less likely due to 33% chance nerf.

Retargeting->moving towards new target is regular 2000ms interval.
 
After further investigation - this time with debuger linked.
Found out special circumstance when monster might perform lower delay.
It's when monster is 2 tile away and performs an distant spell attack, if it manages to gap close enough for melee attack it will perform melee + spell instantly.

I am not really sure if CipSoft intended it to work that way? Seems like that makes "good kitting" a skill. But that's what triggered "evul demon" in that video. It casted spell right before it gap closed back to EK and casted again when it could melee.

Here's a video of reproduction on Cip files:

So if you keep fighting above melee range, without blocking it's path it will never go 1000ms.

So annihilator demons, should spam @ 1000ms while the "tanked" one will be 2000ms.

General interval on the IdleStimulus
Attack = 2,000ms
Idle = 1,000ms ( can't reach any of the target & looks for new target/ random walk/etc )
Which debugger do you use?
 
Which debugger do you use?

I've used GDBServer - attached post boot.
I've tried to use the IDA's linux one I couldn't use the 32bit one with low libgc version due to my VM for Cip files being some older distro.
 
I've used GDBServer - attached post boot.
I've tried to use the IDA's linux one I couldn't use the 32bit one with low libgc version due to my VM for Cip files being some older distro.
Thanks :)
 
I have tested the fleeing behaviour a bit. So we already know the monster while fleeing has only 33% of it's normal attack chance. However interval for fleeing is 1000ms. Making it possible for the fleeing creature to do some nasty combo but its less likely due to 33% chance nerf.

Retargeting->moving towards new target is regular 2000ms interval.

Thanks for clearing those cases up. One last question. Is it possible for the melee attacks and spells to happen on separate intervals in the 2000ms case? As in, melee -> spell -> melee -> spell. Instead of: melee + spell -> idle -> melee + spell.

Here's my method for calculating the nextAttackTime now:
int64_t nextAttackTime = OTSYS_TIME() + 1000 + ((isUpdatingPath | hasFollowPath) & (isSummon() | !isFleeing())) * 1000;

I'm using bitwise operators and no conditionals to prevent branching for performance reasons. If that's unnecessary, it's probably more readable/maintainable with conditionals and logical operators.

I guess it could also be:
int64_t nextAttackTime = OTSYS_TIME() + 1000 + ( ((isUpdatingPath | hasFollowPath) & !isFleeing()) | isSummon() ) * 1000;
Depending on if summons cast more spells if they can't reach the target.
 
Last edited:
After further investigation - this time with debuger linked.
Found out special circumstance when monster might perform lower delay.
It's when monster is 2 tile away and performs an distant spell attack, if it manages to gap close enough for melee attack it will perform melee + spell instantly.

I am not really sure if CipSoft intended it to work that way? Seems like that makes "good kitting" a skill. But that's what triggered "evul demon" in that video. It casted spell right before it gap closed back to EK and casted again when it could melee.

Here's a video of reproduction on Cip files:

So if you keep fighting above melee range, without blocking it's path it will never go 1000ms.

So annihilator demons, should spam @ 1000ms while the "tanked" one will be 2000ms.

General interval on the IdleStimulus
Attack = 2,000ms
Idle = 1,000ms ( can't reach any of the target & looks for new target/ random walk/etc )

OTHire have all correct
 
OTHire have all correct

I don't think any distro have it all correct ;)

Another finding is quite intresting. For distance fighting creatures like warlocks, it seems like there can be additional time attack can be cast - which is inbetween each(?) movement that is further away than >1 tiles away from target.

So if target stands 2 tiles away the warlock tries to gain some distance, and uses spells inbetween each movement.

so tl;dr
If target is standing next to warlock = 2000ms.
If warlock stands still more than 1 tile away = 1000ms
If warlock is gaining distance away from target it casts in between each movement - although here am not sure 100% there seem to be tiles where it doesn't cast anything. But there are tiles where it just spams in between each tile ( managed to get warlock to attack like 4 times in 1 second with boosted movement speed )

Here are two videos showcasing the spam

 
I don't think any distro have it all correct ;)

Another finding is quite intresting. For distance fighting creatures like warlocks, it seems like there can be additional time attack can be cast - which is inbetween each(?) movement that is further away than >1 tiles away from target.

Again, awesome. I was able to get that behavior by overriding onWalkComplete inside the monster class to call doAttacking while gaining distance and not fleeing.
 
How is it determined what goes inside the bag of a monster when it dies?

For example necromancer:
Does not include a bag in loot with ID: 2853

Code:
<loot>
        <item id="3079" countmax="1" chance="2" /> <!-- boots of haste -->
        <item id="3311" countmax="1" chance="10" /> <!-- a clerical mace -->
        <item id="3031" countmax="90" chance="300" /> <!-- a gold coin -->
        <item id="3732" countmax="1" chance="15" /> <!-- a green mushroom -->
        <item id="3574" countmax="1" chance="5" /> <!-- a mystic turban -->
        <item id="3377" countmax="1" chance="100" /> <!-- a scale armor -->
        <item id="3294" countmax="1" chance="150" /> <!-- a short sword -->
        <item id="3324" countmax="1" chance="1" /> <!-- a skull staff -->
    </loot>

If someone knows, anyone can explain?
 
How is it determined what goes inside the bag of a monster when it dies?

For example necromancer:
Does not include a bag in loot with ID: 2853

Code:
<loot>
        <item id="3079" countmax="1" chance="2" /> <!-- boots of haste -->
        <item id="3311" countmax="1" chance="10" /> <!-- a clerical mace -->
        <item id="3031" countmax="90" chance="300" /> <!-- a gold coin -->
        <item id="3732" countmax="1" chance="15" /> <!-- a green mushroom -->
        <item id="3574" countmax="1" chance="5" /> <!-- a mystic turban -->
        <item id="3377" countmax="1" chance="100" /> <!-- a scale armor -->
        <item id="3294" countmax="1" chance="150" /> <!-- a short sword -->
        <item id="3324" countmax="1" chance="1" /> <!-- a skull staff -->
    </loot>

If someone knows, anyone can explain?

It's in the source code in the MonsterType::createLoot method in monsters.cpp:
Code:
if (itemType.weaponType != WEAPON_NONE ||
    itemType.stopTime ||
    itemType.decayTime) {
    includeBagLoot = true;
    if (g_game.internalAddItem(bagContainer, item) != RETURNVALUE_NOERROR) {
        corpse->internalAddThing(item);
    }
} else {
    if (g_game.internalAddItem(corpse, item) != RETURNVALUE_NOERROR) {
        corpse->internalAddThing(item);
    }
}
 
Last edited:
Yeah, I found that now aswell... But what defines !bagloot?
 
Yeah, I found that now aswell... But what defines !bagloot?

I think this line:

if (itemType.weaponType != WEAPON_NONE || itemType.stopTime || itemType.decayTime)

So weapons, shields, ammo, and stuff like rings that expire go into bags I believe.
 
Anyone can reproduce that?
vEUCiFz.png


So it's a 500 items limit when you trade with any npc?
1kpEVTd.png
 
Last edited:
Back
Top