New Content - Implemented Summer 2015 Path: One Crazy Random Summer

Veracity

Developer
Staff member
We have several monsters that we legitimately (?) have listed with id = 0:

clingy pirate - male and female versions have different ids but are otherwise identical - including factoids
El Vibrato monsters - untranslated/translated have different ids and different factoids but are otherwise identical
gremlins - tool/no tool versions have different ids and factoids but are otherwise identical
ancient protector spirits - 4 locations have different ids, different stats, different drops. We should disambiguate them...
Ninja Snowman (Hilt/Mask) - 2 monsters, different ids, different drops, otherwise identical stats. Can't disambiguate.
The Darkness (blind) - not really a distinct monster.
slime1 - slime5 - actually 5 sizes of a single monster - 791
Ed the Undying (1) - (7) - actually 7 variants of a single monster - 473
Dreadsylvania bosses - I don't know why we don't have the ids for those, since they are available. Perhaps the Hard Mode variants have the identical id - but those don't have distinct factoids. Or, perhaps they have different ids, but since they don't have factoids, we can't know them.

As you can see, there are several issues:

- 5 slimes are separate monsters for us, but are the same KoL monster (identical ID). We have both monster -> id map and id -> monster map - and the second one can't handle the one-to-many correspondence. Same issue with the 7 variants of Ed the Undying.
- the El Vibrato monsters have 2 variants with different monster ID - and different combat messages - but are otherwise indistinguishable. We COULD disambiguate them by seeing if you have the translator equipped, but what difference is there to the user?
- clingy pirates have two variants that are identical save for image & gender. We could disambiguate via image, but do we care?
- gremlins have 2 variants that are identical save for item drop & factoids - and we cannot disambiguate
- Ditto for 2 of of the ninja snowmen

Now, what you refer to as "dummy" monsters are the actual KoL name of monsters that we always disambiguate into other monsters. For now, I think I will add a DUMMY flag to such monsters, but rather than exposing it to the user, I'll simply not enter those monsters into the $monsters table, just into the leet translation table, since the user should never actually see such a dummy monster, since we will always disambiguate them.

Hmm. Not quite. If you meet an "invisible, 1337 xxxx", we may end up with a DUMMY monster after unleetifying the name, but since its invisible, we cannot disambiguate it via image.

OK, fine. I'll add a DUMMY flag, and will make it available via proxy field.
 

lostcalpolydude

Developer
Staff member
Dreadsylvania bosses - I don't know why we don't have the ids for those, since they are available. Perhaps the Hard Mode variants have the identical id - but those don't have distinct factoids. Or, perhaps they have different ids, but since they don't have factoids, we can't know them.

They're like Ed the Undying, where we have multiple monsters for a single KoL monster.
 

Veracity

Developer
Staff member
Now, what you refer to as "dummy" monsters are the actual KoL name of monsters that we always disambiguate into other monsters. For now, I think I will add a DUMMY flag to such monsters, but rather than exposing it to the user, I'll simply not enter those monsters into the $monsters table, just into the leet translation table, since the user should never actually see such a dummy monster, since we will always disambiguate them.

Hmm. Not quite. If you meet an "invisible, 1337 xxxx", we may end up with a DUMMY monster after unleetifying the name, but since its invisible, we cannot disambiguate it via image.
I'm not sure that's an issue, actually. last_monster() will give you a monster object, and all the details will be unknown. Why should we care that it isn't in the $monsters[] array?
 

Veracity

Developer
Staff member
Revision 15880 marks all "dummy" monsters with DUMMY in monsters.txt. Such monsters are not added to MONSTER_DATA (and hence do not appear in $monsters[]) but are added to LEET_MONSTER_DATA (and hence will be what you get if you meet an invisible 1337 monster, since we can't disambiguate it via image anymore.)

ASH scripts that deal with factoids and $monsters[] shouldn't ever see these anymore. In fact, when I removed the following list of exceptions from missingManuel.ash:

Code:
		Shadow Accordion Thief,Shadow Alfredo Archmage,Shadow Alligator Subjugator,Shadow Allspice Acolyte,Shadow Angel-Hair Archmage,Shadow Apprentice Accordion Thief,Shadow Asp Master,Shadow Avatar of Boris,Shadow Avatar of Jarlsberg,Shadow Avatar of Sneaky Pete,Shadow Basillusionist,Shadow Bay Leaf Brujo,Shadow Beat Snatcher,Shadow Boogie Brigand,
		Shadow Bullfrog Overseer,Shadow Button Box Burglar,Shadow Cannelloni Conjurer,Shadow Carbohydrate Cognoscenti,Shadow Caribou Smacker,Shadow Chill Crook,Shadow Chord Horker,Shadow Chromatic Crook,Shadow Cilantro Seer,Shadow Cobra Commander,Shadow Concertina Con Artist,Shadow Coriander Conjurer,Shadow Crocodile Lord,Shadow Disco Bandit,
		Shadow Dough Acolyte,Shadow Ermine Thumper,Shadow Flow Purloiner,Shadow Frog Boss,Shadow Frog Director,Shadow Funk Footpad,Shadow Gecko Supervisor,Shadow Groove Filcher,Shadow Hemi-Apprentice Accordion Thief,Shadow Hurdy-Gurdy Hooligan,Shadow Iguana Driver,Shadow Jam Horker,Shadow Jiggy Grifter,Shadow Jive Pillager,Shadow Lemming Trampler,Shadow Linguini Thaumaturge,Shadow Macaroni Magician,Shadow Malamute Basher,Shadow Manicotti Magus,
		Shadow Mariachi Larcenist,Shadow Marinara Mage,Shadow Moose Harasser,Shadow Move Buster,Shadow Narwhal Pummeler,Shadow Newt Herder,Shadow Noodle Neophyte,Shadow Oreganoccultist,Shadow Otter Crusher,Shadow Ox Wrestler,Shadow Parsley Enchanter,
		Shadow Pastamancer,Shadow Penguin Frightener,Shadow Polka Criminal,Shadow Pseudo-Apprentice Accordion Thief,Shadow Puffin Intimidator,Shadow Rattlesnake Chief,Shadow Ravioli Sorcerer,Shadow Reindeer Threatener,Shadow Rhymer and Stealer,Shadow Rhythm Rogue,Shadow Rosemary Diviner,Shadow Sage Sage,Shadow Salamander Subduer,Shadow Sample Swindler,Shadow Sauceror,Shadow Seal Clubber,Shadow Sesame Soothsayer,Shadow Skink Trainer,Shadow Spaghetti Sage,Shadow Spaghetti Spellbinder,Shadow Squeezebox Scoundrel,Shadow Starch Savant,Shadow Sub-Apprentice Accordion Thief,Shadow Sub-Sub-Apprentice Accordion Thief,Shadow Tarragon Thaumaturge,Shadow Tern Slapper,Shadow Thyme Wizard,Shadow Toad Coach,Shadow Turtle Tamer,Shadow Vermicelli Enchanter,Shadow Vibe Robber,Shadow Walrus Bludgeoner,Shadow Whale Boxer,Shadow Yeast Scholar,Shadow Zombie Master,Shadow Zydeco Rogue
i.e., the list of dummy monsters that turing added when thy suddenly appeared in $monsters[], that script now reports for me:

> call scripts/missingManuel.ash

Checking Monster Manuel...
...
Done checking Monster Manuel!
=================================

You have casually researched 0 creatures.
You have thoroughly researched 0 creatures.
You have exhaustively researched 1503 creatures.
You have not researched 0 creatures.
Total creatures: 1503.
Done.
just as it did before I recently added the dummy monsters to monsters.txt.
 

zarqon

Well-known member
OMG $monster[].id has sprung into existence. That's fantastic. *begins plotting*

Also, thanks for that Veracity, it makes it much simpler to not have to worry about the dummies while foreaching $monsters[].
 

Veracity

Developer
Staff member
We're approaching doneness on this, I think.

I want to reconsider something I did:

KoL says that various items and effects give "+1 Random Monster Modifier", but I, for some reason, decided to call them "Random Monster Attributes" - and make the proxy field be .random_attributes.

I'd like to change to agree with KoL's terminology. That will, of course, require changes to scripts that use the old names.
 

Crowther

Active member
I was wondering why it was called attributes. Could we get a maximizer shortcut for "Random Monster Modifier"?
 

Veracity

Developer
Staff member
Yeah. Revision 15892 renames "Random Monster Attributes" to "Random Monster Modifiers" and changes the proxy field from .random_attributes to .random_modifiers.

You can also "maximize ocrs" to get "maximize Random Monster Modifiers, -tie"
 

Veracity

Developer
Staff member
1337 monsters have been working perfectly for me - until today.

Code:
<span id='monname'>a left-handed, short, askew, pixellated, artisanal, 1337, obscene W4rdröb n1gh7574nd</span>
Yup, that is a real o-umlaut character, not the character entity for such.

I checked a non-random version and that, too, has the umlaut:

Code:
<span id='monname'>a Wardröb nightstand</span>
So does Manuel:

Code:
<font size=+2>Wardröb nightstand</font>

I could have sworn that KoL used to have monsters with accented characters use character entities, back when the Muertos Borrachos monsters were the only ones. But now that Manuel is here, perhaps they are using actual accented characters? In which character set? That last question is exactly why HTML has character entities, and not using them is sloppy.

Here are the headers for retrieving that fight page:

Code:
Retrieved: http://www.kingdomofloathing.com/fight.php
10 header fields
Field: Transfer-Encoding = [chunked]
Field: null = [HTTP/1.1 200 OK]
Field: Cache-Control = [no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Field: Server = [nginx/1.0.15]
Field: Connection = [keep-alive]
Field: Pragma = [no-cache]
Field: Expires = [Thu, 19 Nov 1981 08:52:00 GMT]
Field: Date = [Sun, 07 Jun 2015 17:36:55 GMT]
Field: X-Powered-By = [PHP/5.3.3]
Field: Content-Type = [text/html; charset=UTF-8]
So, I guess these are UTF-8.

Here are all the monsters in monsters.txt (aside from one-time special event monsters) which have character entities:

Code:
angry piñata
béarnaise zombie
Elpízo & Crosybdis
Wardröb nightstand
fabricator guài
Abcrusher 4000™
Escalatormaster™
Legstrong™ stationary bicycle
Novia Cadáver
Novio Cadáver
Padre Cadáver
Persona Inocente Cadáver
If those all are in Manuel with UTF-8 characters, should we switch to using them ourself? But, won't that cause a problem with ASH, where we insist that string literals be all ASCII?

I'm going to check all those monsters in Manuel. And if they are all there with UTF-8 characters, then for now, I will decode entities to characters before building the leet monster map.
 

Veracity

Developer
Staff member
Manuel says:

Code:
<font size=+2>angry piñata</font>
<font size=+2>béarnaise zombie</font>
<font size=+2>Elpízo & Crosybdis</font>
<font size=+2>fabricator guài</font>
<font size=+2>Abcrusher 4000™</font>
<font size=+2>Escalatormaster™</font>
<font size=+2>Legstrong™ stationary bicycle</font>
<font size=+2>Novia Cadáver</font>
<font size=+2>Novio Cadáver</font>
<font size=+2>Padre Cadáver</font>
<font size=+2>Persona Inocente Cadáver</font>
<font size=+2>Wardröb nightstand</font>
Lovely.
 

Veracity

Developer
Staff member
Revision 15918 decodes character entities before leetifying strings. Considering that character entities can contain leetable characters, not decoding them will give you corrupt character entities.
 

Theraze

Active member
If those all are in Manuel with UTF-8 characters, should we switch to using them ourself? But, won't that cause a problem with ASH, where we insist that string literals be all ASCII?

Should we convert data files from ASCII to UTF-8 for our data as well, and just plan on all of the scripts breaking once? Maybe after the next point release?
 

Veracity

Developer
Staff member
A question: I notice that when I do Saucestorm on a frozen monster, the cold half does 1 damage. So, I guess that aligns it cold. Or, perhaps, it gives it an Elemental Defense of Cold. We can't really distinguish in this case, since a frozen monster never attacks.

Other than that, is this done? Are there any other random monster modifiers that we don't support correctly? (As well as we support similar effects, at least; we don't know anything about elemental auras, for example.)
 

heeheehee

Developer
Staff member
I think Manuel hinting says that frozen monsters are cold, but I don't remember (I'm going off of the notes on the spading spreadsheet; I haven't ascended OCRS recently).

I didn't see the following in MonsterData.handleRandomModifiers:
Askew: monster.attack = new Integer( monster.getRawAttack() * 11 / 10 );

I'm also not entirely sure if monster.getRawAttack() etc. is the right thing to do, since these all multiply with each other (and are applied before ML).

I think I had a note for hopping-mad adding a bit of attack / defense, but I can't confirm that.
 
Last edited:

Veracity

Developer
Staff member
monster.getRawAttack() is exactly the right thing to do since that evaluates the value of monster.attack: if it was an expression, it evaluates it and returns an integer, whereas if it was an Integer, you get the intValue. Since we are munging the resulting value and storing it back into monster.attack as an Integer, the next random modifier that comes along will get the munged value and operate on it.

In other words, the way it is coded, all the random modifiers multiply with each other and are applied before ML, exactly as you say.

OK, looking at the spreadsheet, I see that askew "adds 10% attack?". So, I missed that - probably because the question mark led me to think it wasn't actually spaded yet.

I just ascended into a new OCRS run. I'll see what Manuel tells me next time I see a frozen monster.
 

heeheehee

Developer
Staff member
monster.getRawAttack() is exactly the right thing to do since that evaluates the value of monster.attack: if it was an expression, it evaluates it and returns an integer, whereas if it was an Integer, you get the intValue. Since we are munging the resulting value and storing it back into monster.attack as an Integer, the next random modifier that comes along will get the munged value and operate on it.

In other words, the way it is coded, all the random modifiers multiply with each other and are applied before ML, exactly as you say.

OK, looking at the spreadsheet, I see that askew "adds 10% attack?". So, I missed that - probably because the question mark led me to think it wasn't actually spaded yet.

I just ascended into a new OCRS run. I'll see what Manuel tells me next time I see a frozen monster.

Hm, okay. I see.

Revision 15918 decodes character entities before leetifying strings. Considering that character entities can contain leetable characters, not decoding them will give you corrupt character entities.

Interesting note, actually...
[12:10:08] [challenge] greycat: 1337, cloned 4ngry p1&n711d3;474
 

Veracity

Developer
Staff member
Interesting note, actually...
Ha ha ha. Yeah, that would be a KoL bug.

Well, that tells me that we should probably change all the other monsters in monster.txt with character entities in their name - EXCEPT that one - to have UTF-8 character.

I don't have time to think about it right now. Probably should make a new Bug report.
 
Top