Bug Ginormous pumpkin ambiguity in get_campground()


As noted in this thread, ginormous pumpkins are unique in that they can exist both as a harvestable garden crop and as housing. In either case, get_campground() will return "ginormous pumpkin => 1", so any script checking for that can potentially have false positives and will need to instead use alternative methods (either checking the amount for "packet of pumpkin seeds => 11" or using get_dwelling()).

That alone isn't technically a bug, since it's just an ambiguity in KoL itself, and get_campground() is just accurately reporting that there's a ginormous pumpkin in the campground.

However, if there's both a harvestable ginormous pumpkin and a housing ginormous pumpkin, get_campground() will still report "ginormous pumpkin => 1" instead of "ginormous pumpkin => 2", which is inaccurate. Debug of such a campground attached.


  • DEBUG_20230517.txt
    13.9 KB · Views: 1


Staff member
Thanks for the DEBUG log. That, along with a log I made myself with a character with a pumpkin house and no garden, has allowed me to understand how this works.

Internally, the list of items in KoLConstants.campground does not include the dwelling.
For gardens, it includes both SEED_PACKET (X) (where X is the days of growth that produce the current crop) and the actual current crop.

pumpkin house + ginormous pumpkin in garden?
dwelling = ginormous pumpkin
campground = packet of pumpkin seeds (11) + ginormous pumpkin
getCrop() returns ginormous pumpkin

pumpkin house + no garden?
dwelling = ginormous pumpkin
campground = (no seeds) + (no crop)
getCrop() returns null

So, there is no ambiguity internally regarding dwelling/garden.

The ambiguity you point out is in the ASH get_campground() function.

That has all of the items in KoLConstants.campground - and also adds in the dwelling.
If the script sees ginormous pumpkin, does that mean the dwelling is a pumpkin house? (If so, get_dwelling will say so).
Or does it mean the garden contains a ginormous pumpkin? (If so, it will also contain "packet of pumpkin seeds" => 11)

Since get_campground returns a set of items - map from item => count - as coded, we do, in fact, simply enter ginormous pumpkin -> 1 twice. We could, in fact, make the count be 2, if it is both your crop and dwelling. That'd be easy enough, but a garden script would still have to check that ginormous pumpkin => 1 is not the dwelling. Probably simpler for a garden script to recognize what kind of garden you have via the seed packet, and progress via the "count" of that item.

I have not decided what do do about this, yet. Perhaps a change to how get_campground adds the dwelling to the returned campground.

In any case, I have several tests using your (and my) DEBUG logs, so, thanks again.