Feature - Implemented Tracking Combat Monster Level

Theraze

Active member
Before that, I think I need to verify the increasing message/html, and do a *= -1 on that first. Then I'll resubmit. The version with log posted above is in the first post, as I've been doing throughout. But yeah, not quite ready yet. Unless those/bangs are unlisted, in which case it's not really an issue. :D

Edit: Checked today, and confusion is the only of the bang potions that actually detects... Sleepiness and others that have traditionally been thought of as delevellers don't detect, nor do the ones that raise monster attack/defence, though they definitely still had an effect, as it caused me to not be able to hit despite having 20 more muscle than the posted monster defence.

We COULD do the increasing bangs/sleepiness as manual overrides, like the healing bang potion. I'd suggest instead of the former range, we use the upper part of the increase, and the lower part of sleepiness' decrease... most conservative possible, since everything else will be accurate, and we're only dealing with a max of 5-10 difference in the range.
 
Last edited:
We COULD do the increasing bangs/sleepiness as manual overrides, like the healing bang potion. I'd suggest instead of the former range, we use the upper part of the increase, and the lower part of sleepiness' decrease... most conservative possible, since everything else will be accurate, and we're only dealing with a max of 5-10 difference in the range.

Since no one's replied to this, I agree that it makes sense to always use the most pessimistic values where exact numbers are unknown.

Thanks for working on this; I'm really looking forward to having this in Mafia.

On another note, I always assumed that monster_attack(), monster_defense() and monster_hp() would return Mafia's best guess of the current state of the monster, and monster_attack(last_monster()) etc. would return the state of the monster at the start of combat. Hence you could subtract one from the other to find delevelling done so far in combat.

What was the conclusion with monster_level_adjustment()? Is this going to return just the static ML adjustment from MCD and equipment, like numeric_modifier("monster level"); or numeric_modifier("monster level") + in-combat effects that aren't included in monster_attack()/defense()?
 

Theraze

Active member
Correct. Because with the displayed stuff, we discovered that there isn't just a 'monster level' combat modifier, there are separate "monster attack power/defence" modifiers.

Sounds good... unless someone objects, I'll plan on verifying that bangs (besides confusion) still aren't displayed, and then will make it have manual overrides...
 

Rinn

Developer
I would just spin the patch without any manual overrides, wait a week or so to see if jick adds the messages, then work on the overrides if he doesn't at that point. I don't think anyone is going to run into any issues with not having bang potions or a few outliers not reporting attack/defense changes, and having the messages in mafia would probably make it easier for people to notice that certain things that aren't showing messages.

Jick has been asking in the forum thread related to this if he missed any messages, someone mentioned the bang potions and some other things and he already fixed some weapons/familiars that were brought up so I expect he'll get to them.
 
Last edited:

Theraze

Active member
Yes... but most of the bangs don't actually fall under the realm of the changes, since they're not DE-levelling, but increasing the strength of the mob.
Just saying... :)

Also, it's been almost week since Jick last responded... not sure if you mean to wait a week from then, as in implement it in 3 hours from now when we do hit the week (or so), or to wait another week. I'm fine either way... I mean, my copy of mafia tracks the delevelling and monster healing and all of that stuff beautifully. :D Regardless, the bang overrides are going into mine soon (to be removed if/when displayed), so if we want a version with only healing as an override, I can spin that first. Or we can get one that includes sleepiness as a delevel and the other 4 or 5 de-de-levellers... if it's not getting rolled in just yet, I may as well make the patches that nobody else uses be as accurate as possible. Heh.
 

Veracity

Developer
Staff member
Regardless, the bang overrides are going into mine soon (to be removed if/when displayed), so if we want a version with only healing as an override, I can spin that first. Or we can get one that includes sleepiness as a delevel and the other 4 or 5 de-de-levellers... if it's not getting rolled in just yet, I may as well make the patches that nobody else uses be as accurate as possible. Heh.
I could have sworn that I asked you to release a patch for me to look over & submit containing the round by round tracking of the deleveling messages.

I guess what's next is that you post your latest patch and I look it over and submit it, if it meets my standards. And then you keep your eyes open for bug reports. ;)
Ah, yes. I did.

The main reason "it's not getting rolled in just yet" is that you haven't given me a patch to look at. Let's see your patch sans special overrides, if possible, so that if/when Jick fixes them, nothing needs to be removed. We can always add things when Jick is "done".
 

Theraze

Active member
The updated patch has been there in the first post for 4.5 days now... as untouched as it was when I uploaded it. :)

Edit: The 20101105 patch should now properly track the new modifiers. It should do the following:
Tracks monster attack and defence in processNode using image matching.
Tracks monster healing for the NS, +125 per healing, no cap. Also added a pattern for the NS2 to match properly.
Tracks monster healing for the ghuols, +10 per healing, no cap.
Tracks monster healing for the NSN, +90 per healing, caps at HP max.
Tracks monster healing through mana drain for NS and Lord Spookyraven, same amount healed as drained.
Tracks monster healing for Dr. Awkward, +50 per healing, no cap.
Tracks monster healing using the healing bang potion, +16 per healing, no cap.
Removes the old delevelling hacks.
 

Veracity

Developer
Staff member
Before that, I think I need to verify the increasing message/html, and do a *= -1 on that first. Then I'll resubmit. The version with log posted above is in the first post, as I've been doing throughout. But yeah, not quite ready yet.
You specifically told me it was "not quite ready yet."

Considering that, I was supposed to know that I should take and submit it ... how? You told me it wasn't ready, so it never occurred to me to look...
 
Last edited:

Theraze

Active member
Before that, I think I need to verify the increasing message/html, and do a *= -1 on that first. Then I'll resubmit. The version with log posted above is in the first post, as I've been doing throughout. But yeah, not quite ready yet. Unless those/bangs are unlisted, in which case it's not really an issue. :D

Edit: Checked today, and confusion is the only of the bang potions that actually detects... Sleepiness and others that have traditionally been thought of as delevellers don't detect, nor do the ones that raise monster attack/defence, though they definitely still had an effect, as it caused me to not be able to hit despite having 20 more muscle than the posted monster defence.

We COULD do the increasing bangs/sleepiness as manual overrides, like the healing bang potion. I'd suggest instead of the former range, we use the upper part of the increase, and the lower part of sleepiness' decrease... most conservative possible, since everything else will be accurate, and we're only dealing with a max of 5-10 difference in the range.

First paragraph of my first post after your request says that the patch is in the first post. And posed the question of whether we wanted to do manual overrides on the ones that aren't listed yet. If the answer is no, then it's ready to get some staring.

Edit: To make things clear (though I think I explain it in that post), the Legacy patch is there for if Jick listens to the griping on how knowing stuff makes the game less fun. If we need to go back to manual overrides, it's ready. The other patch (at under half the size, and only modifying one file instead of 7) is the new version that I'll keep updating if it needs it. When it meets with approval, if we keep this thread open instead of making a new one, I'll post updates beyond approved-post as UpdateFightMonsterLevel, so that if someone needs to use an old version of the code and compile just that in (for some bizarre reason) they aren't confused by a patch modifying nonexistant lines.
 
Last edited:

Veracity

Developer
Staff member
Your patch, modifying only FightRequest.java, does not compile, since it deletes FightRequest.getMonsterLevelModifier, which is referenced in RuntimeLibrary.java.

Edit: I fixed that, and a few other bugs, and cleaned up some code, and also pulled in your "abort automation against adding machine and hulking construct if your familiar can interfere with item usage" patch, and submitted it in revision 8755.

Test away!
 
Last edited:

Theraze

Active member
Oops... forgot about that. Did a search through the base files and found that those were the only two files that referenced getMonsterLevelModifier. Spawned it into two new public checks... getMonsterAttackModifier and getMonsterDefenseModifier. Used getMonsterAttackModifier in RuntimeLibrary where getMonsterLevelModifier was called before, so that expectedDamage still properly considers battle checks for its output.

Updated patch put into first post. Hopefully this one should compile properly.
 

slyz

Developer
I've been thinking about it ever since this thread started, but now that the changes are well implemented, maybe it would be the right time to add this Feature Request by RoyalTonberry regarding how monster defense is affected by KoLCharacter.getMonsterLevelAdjustment().
 
Top