Bug - Fixed Spelunky logging

Veracity

Developer
Staff member
Code:
{34} The Temple Ruins
Encounter: Idolatry
Took choice 1036/4: gain 250 gold and lose all hp
choice.php?pwd&whichchoice=1036&option=4
You lose 50 hit points
I did gain 250 gold. Why was it not logged?

Code:
place.php?whichplace=spelunky&action=spelunky_camp
You gain 35 hit points
The special adventure took no turn, but resting at base camp did. I would like it to log like this:

{34} Rest at Base Camp

Code:
place.php?whichplace=spelunky&action=spelunky_side6
Encounter: Spelunkrifice
Took choice 1041/1: sacrifice buddy
choice.php?pwd&whichchoice=1041&option=1
You have sacrificed your Buddy, A Helpful Guy
You acquire an item: cursed coffee cup
Again, this took no turn, but didn't log nicely. How about:

{12} The Altar

Code:
place.php?whichplace=spelunky&action=spelunky_camp&ghostyghostghost=clown
Encounter: the ghost
Round 0: Veracity wins initiative!
Round 1: ghost (spelunky) takes 8 damage.
Round 1: Veracity casts USE ROPE!
Round 2: Veracity casts THROW BOMB!
Round 3: ghost (spelunky) takes 25 damage.
Round 3: Veracity attacks!
Round 4: ghost (spelunky) takes 6 damage.
You lose 21 hit points
Well, I screwed up this attempt; I didn't have the resources to deal with that many HP. But, how about logging it better?

{10} The Ghost

(or something). Now, having lost, logging was screwed up for several turns:

Code:
place.php?whichplace=spelunky&action=spelunky_camp
You gain 51 hit points

{0} The Mines
Encounter: spider
Round 0: Veracity wins initiative!
Round 1: spider takes 14 damage.
Round 1: Veracity attacks!
Round 2: spider takes 41 damage.
Round 2: Veracity wins the fight!
You have found a new Buddy, A Skeleton

{0} The Ice Caves
Encounter: A Shop
Buying 5 ropes for 25 gold
Took choice 1028/1: unknown
choice.php?pwd&whichchoice=1028&option=1
Encounter: A Shop
Buying a shotgun for 50 gold
Took choice 1028/2: unknown
choice.php?pwd&whichchoice=1028&option=2
Encounter: A Shop
You acquire an item: shotgun
Took choice 1028/6: leave
choice.php?pwd&whichchoice=1028&option=6

equip off-hand torch

{7} The Spider Hole
Encounter: spider
Round 0: Veracity wins initiative!
Round 1: spider takes 10 damage.
Round 1: spider takes 14 damage.
Round 1: Veracity wins the fight!
You gain 4 gold
You find a rope
So, what turn was it, really?

- lost to ghost on turn 10
- rested at base camp - turn 9?
- mines - turn 8?
- shop - on turn 7? What?

And then the session log starts putting in the counter again and says it is turn 7.

Code:
{4} The Mines
Encounter: A Shop
Buying 5 bombs for 25 gold
Took choice 1028/1: unknown
choice.php?pwd&whichchoice=1028&option=1
Encounter: A Shop
Buying 5 bombs for 25 gold
Took choice 1028/2: unknown
choice.php?pwd&whichchoice=1028&option=2
Encounter: A Shop
Took choice 1028/6: leave
choice.php?pwd&whichchoice=1028&option=6

equip off-hand The Joke Book of the Dead

equip acc1 spring boots

place.php?whichplace=spelunky&action=spelunky_camp&ghostyghostghost=clown
Encounter: the ghost
Round 0: Veracity wins initiative!
Round 1: Veracity casts THROW BOMB!
Round 2: ghost (spelunky) takes 25 damage.
Round 2: ghost (spelunky) takes 5 damage.
Round 2: Veracity casts THROW BOMB!
Round 3: ghost (spelunky) takes 25 damage.
Round 3: ghost (spelunky) takes 4 damage.
Round 3: Veracity casts THROW BOMB!
Round 4: ghost (spelunky) takes 25 damage.
Round 4: ghost (spelunky) takes 5 damage.
Round 4: Veracity casts THROW BOMB!
Round 5: ghost (spelunky) takes 25 damage.
Round 5: ghost (spelunky) takes 4 damage.
Round 5: Veracity casts THROW BOMB!
Round 6: ghost (spelunky) takes 25 damage.
Round 6: ghost (spelunky) takes 5 damage.
Round 6: Veracity casts THROW BOMB!
Round 7: ghost (spelunky) takes 25 damage.
Round 7: ghost (spelunky) takes 5 damage.
Round 7: Veracity casts THROW BOMB!
Round 8: ghost (spelunky) takes 25 damage.
Round 8: ghost (spelunky) takes 5 damage.
Round 8: Veracity casts THROW BOMB!
Round 9: ghost (spelunky) takes 25 damage.
Round 9: ghost (spelunky) takes 5 damage.
Round 9: Veracity casts THROW BOMB!
Round 10: ghost (spelunky) takes 25 damage.
Round 10: ghost (spelunky) takes 4 damage.
Round 10: Veracity casts THROW BOMB!
Round 11: ghost (spelunky) takes 25 damage.
Round 11: ghost (spelunky) takes 5 damage.
Round 11: Veracity casts THROW BOMB!
Round 12: ghost (spelunky) takes 25 damage.
Round 12: Veracity wins the fight!

{14} The City of Goooold
I find a shop - on turn 4? - which has enough bombs, fortunately.
I fight the ghost again and win.
And now we have 14 turns left?

Code:
{0} The City of Goooold
Encounter: 

place.php?whichplace=spelunky&action=spelunky_quit
Encounter: The End of the Tale of Spelunking
Took choice 1027/1: unknown
choice.php?pwd&whichchoice=1027&option=1
You gain 2,064 Meat
Well, that wasn't really an encounter, was it?
 
Regarding your seeming confusion:
{12} The Altar
Note that noncombats don't take a turn.
Then you had combats (presumably won) {12} and {11}, lost to ghost on {10}, rested on {9}, and won the third combat on {8}, which brought up the shop unlock.
 
That is what I said. My "confusion" was about the shop noncombat being on turn 7. I thought noncombats came every 3 turns. Here is where they came on that run:

Code:
{37} The Jungle
Encounter: A Shop
{34} The Temple Ruins
Encounter: Idolatry
{34} Rest in base Camp - takes a turn but does not advance noncombat counter, it seems)
{30} The Mines
Encounter: It's a Trap!  A Dart Trap.
{27} The Ice Caves
Encounter: A Shop
{24} The Mines
Encounter: A Shop
{21} The Temple Ruins
Encounter: It's a Trap!  A Smashy Trap.
{18} The Spider Hole
Encounter: A Wicked Web
{15} The Mines
Encounter: A Shop
{12} The Ice Caves
Encounter: A Landmine
Which would lead me to expect the next noncombat at turn 9. However, it happened at turn 7.

There was a loss to the ghost and a base camp rest there. Perhaps they both take turns but do not advance the noncombat counter.

My subsequent noncombats:

Code:
{0} The Ice Caves
Encounter: A Shop
{4} The Mines
Encounter: A Shop
(Beat ghost immediately afterwards)
{14} The City of Goooold (so it did not take a turn?)
Encounter: mummy
{11} The Jungle
Encounter: It's a Trap!  A Tiki Trap.
{8} The Jungle
Encounter: A Shop
{5} The Jungle
Encounter: A Tombstone
{2} The City of Goooold
Encounter: A Golden Chest
So, it looks like losing to the ghost takes a turn but does not advance the noncombat counter, but beating the ghost adds 10 turns but does NOT advance the noncombat counter.
 
Last edited:
The noncombat counter is advanced by winning combats in the zones (I guess Spelunky ghost does not advance it, but everything else should).
 
Another thing I noticed is that ropes and bombs and keys are special:

- They do not appear in your initial inventory

- When you find a rope or a bomb (because you have a mining helmet or torch), they log like this:

You find a rope
You find a bomb

but are not added to inventory

- When you buy ropes or bombs or keys, they log like this:

Buying 5 bombs for 25 gold
Took choice 1028/1: unknown
choice.php?pwd&whichchoice=1028&option=1
Encounter: A Shop
Buying 5 ropes for 25 gold
Took choice 1028/2: unknown
choice.php?pwd&whichchoice=1028&option=2
Buying a key for 30 gold
Took choice 1028/2: unknown
choice.php?pwd&whichchoice=1028&option=2

Even though such things are in the charpane - and are in the spelunkyStatus setting - I think I'd like them to be in inventory, too.
 
They are not in inventory. I was commenting that I thought it might be nice if they were. It might make it easier to do a Spelunky script, if all Spelunky items were in inventory, for example.

I haven't committed to making that be the case. I'm just opening it for discussion.
 
Revision 15919 fixes all the logging issues:

- Parsing turns from the charpane was screwed up whenever you had the joke book of the dead equipped, since the charpane then contained a clickable link.
- Resting at base camp, exiting the game, and visiting the altar are all place.php?place=spelunky&action=xxx things and are logged.
- Fighting the ghost is actually a special case of visiting your base camp
- Trying to adventure in a location and being told the ghost has arrived is a standard adventure failure
- I fixed the expected gold amount for several choice options.

That takes care of everything I mentioned except for putting bombs/ropes/keys into inventory. I'm still undecided on this. I'll try another game after I'm done with breakfast and will go look in my KoL inventory. I will also do an api.php request for inventory to see what it says. If KoL says those items are in inventory, then I think that's where they belong in KoLmafia, too.
 
Yeah, OK. bombs, ropes, and keys are not actual items and do not appear in inventory. So, I think we're fine.

There may be a bit more we could do to make scripting easier, but I won't be thinking about that for a good long time, if ever. When the time comes, I'll make a new Feature Request to discuss it.

Revision 15920 fixes a couple more spoilers. Given that, I think this is done.
 
Back
Top