Bug - Fixed Matters arising from Monster Name Case Sensitivity

Darzil

Developer
From GD:

I get spammed with msgs to change the name of knob goblin embezzler to Knob Goblin Embezzler and other mobs and I cant fix it because mafia custom combat editor forces text to lowercase. (and by spammed i mean the msg pops up like 15 times in a single combat) It doesnt break anything but I can't make it go away.
 

Veracity

Developer
Staff member
Why does the CCS editor give a message? Shouldn't messages only be given for ASH scripts?
I'll look at this.
 

Veracity

Developer
Staff member
It "fixed" lower case monsters in ASH scripts, but broke substring matching for monster names.
I'll see what I can do.
 

zarqon

Well-known member
In case this information is helpful: I also am getting exactly 11 messages at the start of combat for every monster with a capital letter in its name, telling me to change the all-lowercase name to the correct name. Neither my CCS nor my consult script contains the monster name. It's ridiculous. It's not even funny.
 

Veracity

Developer
Staff member
Revision 18843 should take care of this issue. It still has temporary code in it.

- findMonster( name ) - a single argument - looks only for exact case-sensitive matches.
Use this when looking up monsters KoL gives us.
- findMonster( name, boolean substrings, boolean case-sensitive ) - will do fuzzy matching and/or exact match case-insensitive matching.
Use this when parsing user input - including ASH, for now.
Also specifically used in CCS, since encounterKey is lower-cased...
I notice that substring matches does lower case matching, since fuzzy matching uses "canonical" strings.
- I removed the "friendly warning". It'll have to go into ASH, with additional support to recognize ambiguity and case-sensitivity; fuzzy matching doesn't quite make it.
- When parsing combats.txt, print error message to gCli if a monster name is not an exact case-sensitive match to a monster in monsters.txt
- I added brushfire, 25 skeletons, and 100 skeletons to monsters.txt with pseudo ids. We have no data for them, but it's fun to see the images in the Encyclopedia.
And it makes combat.txt parsing not print aforementioned error messages. :)

I think the code in findMonster to handle substrings & case-insensitivity is not what we really want long-term, but it hides the ASH script issue, for now.
 

Darzil

Developer
Not matching monsters like The Muff and The Bush in Hole in the Sky (not decorating, as it isn't recognising them, presumably due to "The Muff" not matching "Muff").

Code:
[139] The Hole in the Sky
Preference lastEncounter changed from The Bush to The Muff
Encounter: The Muff
Preference _lastCombatStarted changed from 20180903180406 to 20180903180419
Round 0: darzil loses initiative!
Round 1: You lose 44 hit points
Round 1: You lose 46 hit points
 

Veracity

Developer
Staff member
I did test before I committed, by the way, so I was pretty sure it was fixed three weeks ago,
Thanks for your confirmation, though. :)
 

Darzil

Developer
Yeah, just that having said I would test, when I found that I was embarrassed that I'd not replied and closed it, and wanted to. I never had significant doubts!
 
Top