Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Just so you know, I'm getting an error when generating with this apworld. I think it's because of two problems in rules.py:

1. In the entrance rules, the brackets surrounding both arguments of HasAll() are unnecessary - HasAll() just takes strings separated by commas. Also, Has() cannot be nested inside HasAll() like that. If you want to join multiple rules together, you can use & (for "and") and | (for "or"). For example, for can_access_mountain, if you want to check whether the player has the Mountain Pass and at least one Progressive Stats Upgrade, the rule could be formatted like this:

can_access_mountain = Has("Mountain Pass") & Has("Progressive Stats Upgrade", 1)

That's not necessarily even the most concise way to write that rule (and I'd like some clarity from the docs myself about how HasAll() treats items with multiple copies), but I think it's the easiest to understand. 1 is the default number for Has(), so I think it could technically be removed (though I like the idea of keeping it explicit, in case you decide you'd like to change the number of upgrades the player needs).

2. In set_all_location_rules, there are three calls to world.set_rule() that include a number at the end. set_rule() cannot take a number as an argument like that, but I'm guessing those numbers are supposed to be passed to Has(), not set_rule(). If so, the parentheses would just need to be moved. For example, for gold_loc:

world.set_rule(gold_loc, Has("Progressive Stats Upgrade", 2))

Edit: I just noticed that the "Progressive Stats" string in each world.set_rule line is missing the word "Upgrade", which it'll need in order for the item to be identified, so I've updated the above example.

(+1)

Thanks for this! The apworld should be fixed now. 30 minutes before the jam ended this morning I realized i never uncommented set_all_location_rules and apparently forgot to make sure it actually generated…