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 )
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.
Which debugger do you use?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?
ThanksI'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 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.
int64_t nextAttackTime = OTSYS_TIME() + 1000 + ((isUpdatingPath | hasFollowPath) & (isSummon() | !isFleeing())) * 1000;
int64_t nextAttackTime = OTSYS_TIME() + 1000 + ( ((isUpdatingPath | hasFollowPath) & !isFleeing()) | isSummon() ) * 1000;
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
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.
<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>
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?
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);
}
}
Yeah, I found that now aswell... But what defines !bagloot?
if (itemType.weaponType != WEAPON_NONE || itemType.stopTime || itemType.decayTime)