Feature - Implemented Include variable/scaling monsters in monster stat functions

zarqon

Well-known member
Monster stat functions -- monster_hp(), monster_attack(), and monster_defense() -- would be significantly more useful if they included variable monsters, or at least what is known of them. Even a reasonable estimate would be more usable than 0.

Wormwood monsters scale (somehow) to your buffed stats, to a maximum ML of 120. They are affected by +ML. If the formula is unknown, making their stats at least equal to your relevant stat would still be better than 0.

Molehill monsters are probably the same as Wormwood monsters...? Anyone? Bale? Bueller?

Holiday monsters (Feast, Borrachos) also scale -- not sure if the formula is still the one on the Wiki since the update last Crimbo, but the Wiki claims they scale by (relevant stat + 5), and are not affected by +ML. Again, even if it's slightly off, it's still better than 0.

Baron von Ratsworth is not even present in $monsters[], and his stats are based on Mus/Mox + min(12, 3+my_ascensions()).

These aren't variable, but tower monsters are all missing attack/defense. They should all be 100,000. Most people are probably using mafia's tower handling for this, but still.

GMoB is also missing defense stat. Anyone know what it is? Or even a ballpark?

I suspect these functions are at present merely ways to access information in data files, so including monsters with formulated stats would require a bit of special handling. But it's worth it. For one, it would improve the accuracy of flyeredML. For another, consult scripts would have a much more accurate view of the monster you are fighting. All of these monster have been around for quite some time now and don't seem like they will be going anywhere -- it's time mafia wises up to the fact that they aren't ML 0.

Haha, I think all my feature requests in the last 5 months have been about in-combat information. Hmmm.
 

Theraze

Active member
Well, since the big pack of updates went in, I suppose this could be the next target... means a bit more monster data tweaking. The question for Veracity or Jason is, would you prefer variable monsters kept in their own file, or the whole monsters.txt to be processed?

There's arguments for both...
For own file, it reduces additional processing in that the static monsters are just read in ignoring any additional chance for screwups, and it's very easy to figure out which monsters are which.
For same file, you KNOW where the monster data lives... it's all together and more consistent amongst itself.

Regardless of which we do, will probably have descriptors at the top similar to the current drop type descriptors in the monsters.txt and thinking it would be good for consistency to be using the same letters/processing-type that the modifiers.txt uses for its stat handling...
 

Darzil

Developer
Attack and defence values and HP as shown by Dwarven War Outfit (plus use of seal tooth for HP)

Red Queen's Garden Monsters

Attack = Character Moxie + additional ML, capped at 200.
Defence = Character Muscle + additional ML, capped at 200.
HP = Defence x 0.75, rounded down (so capped at 150).

Spaded here : http://kolspading.com/forums/viewtopic.php?f=2&t=118

Wormwood Monsters

Monster Attack = Character Moxie x 1.1, rounded down, capped at 125 + ML (Ignores ML from Detuned Radio)
Monster Defence = Character Muscle, capped at 125 + ML (ignores ML from Deturned Radio)
Monster HP = Monster Defence x 0.8, rounded down, capped at 100 + ML x 0.75, rounded down (ignores ML from Detuned Radio)

Spading : http://kolspading.com/forums/viewtopic.php?f=2&t=143

Stats for Mt Molehill Monsters are the same as Red Queen's Garden ones

Monster Attack = Character Moxie + additional ML, capped at 200.
Monster Defence = Character Muscle + additional ML, capped at 200.
Monster HP = Monster Defence x 0.75, rounded down (so capped at 150).

Spading : http://kolspading.com/forums/viewtopic.php?f=2&t=144

Stats for Hipster encounters are the same as Red Queen's Garden ones, only uncapped

Monster Attack = Character Moxie + additional ML, uncapped.
Monster Defence = Character Muscle + additional ML, uncapped.
Monster HP = Monster Defence x 0.75, rounded down (so uncapped).

Spading : http://kolspading.com/forums/viewtopic.php?f=2&t=149
 
Last edited:

Theraze

Active member
Yeah... that's not the part I have questions on. I've had their data repeatedly posted. The question is, where do I put it? :D If the developers don't want to weigh in, I'll take the suggestions of a preponderance of other people. If that means we get one person, then that'd be the majority of given opinions.

Regarding the original request, tower mobs should now have the 100k attack/defence, as I think I got most of those added during the major monster update.
While multiple people have apparently killed the GMoB, nobody has even provided a guessed defensive stat. As well, they list his attack at 100k and the quoted hits are generally in the multiple 10k range, whereas we currently have his strength listed at 10k total. The substat gain isn't especially helpful here, unless we want to suggest that he actually has 40 attack and the damage is just a fluke... Alternatively, if killing him without the mirror provides for different stat gain, that could be useful then.

If anyone can provide a list of which monsters scale, that would be appreciated. Not the specifics... yet... just which they are. The wiki, being a wiki, scatters the information to the winds. That being said, here's the list I currently have:
Holiday food/drink.
Rat Baron.
Boss Bat.
Worm Wood.
Red Queen.
Molehill.

Fairly certain there are more I'd either seen going through or noted otherwise earlier...

Possibles:
Talk like a pirate day.
Crimbo.
Crys-Rock.
Basement.
Halloween.
 
Last edited:

Darzil

Developer
Sorry, was answering some of Zarquon's questions, not yours!

Hmm, can you set up GMoB after the War? If so, I could try to meet him wearing the Dwarven War Outfit to see.
 

Theraze

Active member
Heh. Yeah, there were some decent unspaded bits in the past. Think you can set up the GMoB whenever, it's just that you can only kill him once per ascension.
 

zarqon

Well-known member
@Darzil: Pretty sure you can keep setting him up until you defeat him, per run.

@Theraze: How about the NS?

A third alternative would be hard-coding the scaling monsters. A switch statement would have the benefit of avoiding duplicate code for multiple monsters, as well as avoid unnecessary processing on normal (non-scaling) monsters.

Let's say mafia uses base_attack(monster) internally to read the attack from the data file.

Change it from

PHP:
int base_attack(monster) {
   return monsterdata[monster].attack;
}

to

PHP:
int base_attack(monster) {
   switch (monster) {
      case $monster[holiday monster 1]: 
      case $monster[holiday monster 2]: return my_buffedstat($stat[moxie]) + 5; break;
      case $monster[wormwood monster 1]: 
      case $monster[wormwood monster 2]: return min(125, floor(1.1*my_buffedstat($stat[moxie]))) + monster_level_adjustment(); break;
     // and so on!
   }
   return monsterdata[monster].attack;
}

Expressed in ASH because I actually know it better than Java, but you get the idea.
 

Theraze

Active member
We could do that, but it's not consistent with the current behaviour (modifiers and other data files handle scaling) and it's hackish, in that it takes a recompile to fix... It would definitely be the easiest way, though. If one of the devs wants to approve me going in that direction, we can probably have all the scaling monsters done in a day or two, as opposed to it taking several days/weeks to verify nothing is screwed up by changing handling in a major way.

Regarding the NS... does anything say she scales? Everything I've seen has had her static. Different forms, which mafia does take into account, but no scaling based on player stats or ascensions.
 

zarqon

Well-known member
I thought I remembered reading somewhere that she is affected by previous losses -- like if you lose to her, she gets easier next time. But I suppose mafia doesn't track that anywhere, and I strongly doubt many people (besides me!) want to fight the NS using BatMan, so not including her is no biggie, so long as values exist that are reasonably accurate.
 

Theraze

Active member
The only thing that appears to reference that in the wiki is:
•Sometimes, she can appear to do absolutely nothing on a combat round. This may appear to happen more if she's defeated you several times: in fact, it's most likely because you are using delevelling-type skills or combat items (and succeeding in using them more often), which have a chance of preventing their target acting. (This observation was made most often by people funkslinging plot holes, under NS11, when this was a common strategy used by softcore out-of-ronin players, and is still noticed nowadays by people with large stacks of delevel and stun items.)

IF that's correct, it's more due to stunning her than anything else, irrelevant to anything but the round prior. That being said, it's an old entry that references NS11. I think we're fairly safe leaving her with static stats for now. If you decide to kill the third form and spade it out for us, we can figure out any additional spading needed there. :)
 

Darzil

Developer
Only thing I've noticed changing, or been told about, are that her chances to block skill usage and item usage are reduced. My experience does tend to back that up.

Not heard anything about stats changing.
 

zarqon

Well-known member
Forget I mentioned it then. Must have been old information.

I'm excited for this to happen! Right now BatMan likes to throw a Gnomitronic Hyperspatial Demodulizer at Wormwood monsters, since according to mafia they only have 0 HP (BatMan caps it on the low end at 1). Haha.
 

xKiv

Active member
The wiki page on Special Monsters says:

The Naughty Sorceress used to scale with your stats, but no longer does as of NS13.
 

Theraze

Active member
Ahhh... missed that. Would make sense. Anyways, for now, think I'll just put a hook bit into MonsterDatabase. Currently it just passes it straight to parseint. If we just use StringUtilities.isNumeric first, we should be able to decide if we use the current parsing straight to int, or more complicated management. The big question becomes whether we want to do strict overrides or allow for it to be smarter, more similar to modifiers. If we add in ceil/floor/min/max (and maybe sqrt... don't think anything uses it currently, but if the handling's already there, shouldn't hurt) then we should be able to do anything we need... The one thing that modifiers doesn't have that we NEED is ascension count. Basically, it's all muscle/moxie/ascension currently, right?

Random note RE above: Boss bat doesn't scale. Can't remember why I thought it did. I think I have all of the other scaling mobs listed above though.

Edit: In addition to muscle/moxie/ascension there's also basement floor level, but that should be parsable from the monster name.
 
Last edited:

Darzil

Developer
How would you currently treat +ML and +ML but ignoring Detuned Radio ? Does Modifiers handle that ?

ML doesn't just work on top of the scaling monsters like it does on a normal one, for some of the zones, anyway.
 

Theraze

Active member
Well, some zones just say ML gets completely ignored. Some zones say ML works... but only up to a point. Bottom line, we'll get there when we get there. We still haven't come up with HOW we're doing this, whether we're doing this as manual overrides or in the main data file... If we do it as manual overrides, I suggest we use something specific in the monsters.txt as 'code' for scales. We could stick with S... HP: S Def: S Atk: S. We could write the whole word, though that gets somewhat long... Hp: Scales Def: Scales Atk: Scales. We could do a question mark... HP: ? Def: ? Atk: ?. We can do whatever we want... within reason.

But HOW we're doing it needs to happen before I can actually decide how to mutilate my own file. Speaking of mutilating files, I should really spin that patch for checking attack/defence/hp based on a given ML +-.
 

Rinn

Developer
I don't see why we don't just make the monster data file parsing handle expressions, the string already has to be parsed to separate out the hp/def/atk/meat/element values anyway, just make any request for that value resolve the expression at runtime. Didn't jason add more support for the modifier_eval function for your combat item map zarqon? Perhaps it just needs a few more keywords or to have the single upper-case letter values expanded to words, or support to have more then one of each text function so you could add stat(moxie) or monster_stat(def) or something like that?

Code:
Monster    HP: [min(def*0.75,150)] Def: [min(mus+ml,200)] Atk: [min(mox+ml,200)]
I would think this would be the obvious solution to the issue, I don't understand why you would even consider hardcoding scaling monsters in the code. modifiers.txt already does this, the standard is already there it just needs to use it.
 
Last edited:

Theraze

Active member
Hmm... so looked at modifer_eval and nothing we especially want is actually currently included, as neither base stats nor ascensions are officially parsed. However, it is possible to kludge past it with code like the following:
PHP:
> ash modifier_eval(min(my_basestat($stat[moxie]) + monster_level_adjustment(), 200))
 
Returned: 67.0
That's the modifier_eval for the Atk posted above. Think you actually swapped Atk/Def, as you have muscle for def and moxie for atk, but, minor sidenote. :) Anyways, if we can just run isNumeric against the value, and if it fails that, pass the monsters.txt through the Modifiers.expression and have it work properly... great. We just need to plan on either adding in shortcuts for the stats, or having VERY long lines for monsters. I believe the full version of your one above (with def/atk swapped so def is mox) would change from...
Code:
Monster    HP: min(def * 0.75,150) Def: min(mox + ml, 200) Atk: min(mus + ml, 200)
to
Code:
Monster    HP: min((my_basestat($stat[moxie]) + monster_level_adjustment()) * .75, 150) Def: min(my_basestat($stat[moxie]) + monster_level_adjustment(), 200) Atk: min(my_basestat($stat[muscle]) + monster_level_adjustment(), 200)
This is as compared to the current bits, where it does:
Code:
Monster    HP: 150 Def: 200 Atk: 200

On a positive note, if we're fine with monster data lines running 2-3 lines long per scaled monster, we can have this working in about 30-60 minutes for all of them...
 
Last edited:

Darzil

Developer
Think you actually swapped Atk/Def, as you have muscle for def and moxie for atk, but, minor sidenote. :)

That's correct. It's defence scales to your muscle, and it's attack to your moxie. So that you can hit them, and they can hit you.
 
Top