Was having fun thinking about how to do this. If your game is gonna be made of levels rather than a big open vania type thing, I'd do it like this:
-have (eg) ten bytes of ram, allowing ten screens in the level to have pickups
-have 8 possible pickups, ordered in NES Maker's game objects at slots 8 to 15
-have a screenbyte (doesn't need to be in ram) that tells each pickup screen which byte of ram to check
-when an item is picked up, subtract 8 from its object ID and flip the corresponding bit in that screen's assigned item pickup ram
-then when scrolling onto that screen again, check that same bit to decide whether to spawn it or not
This will work! And it'd be easier than trying to do the same thing with tile-based pickups. Then when the player goes to the next level, zero all those variables out again. One caveat would be that you could only have one type of each pickup on that screen, unless you duplicated game objects.
When you're running low on spare ram check out the default zero page and overflow ram lists, there's quite a lot of stuff in there that's assigned but literally never used.
A handy table NES Maker includes for stuff like this is in ToggleTables.asm:
Code:
ValToBitTable_inverse:
.db #%00000001, #%00000010, #%000000100, #%00001000, #%00010000, #%00100000, #%01000000, #%10000000
It took me way too long to realise what this was for. So if you wanted to flip the bit for the pickup that's object ID #15:
Code:
LDA Object_type,x ;;#15
SEC
SBC #$08
TAX ;;#07 now
LDA ValToBitTable_inverse,x ;; #%10000000
ORA pickupRam,y
STA pickupRam,y
;;y would have to have been set up already with the current screen's pickupRam index, from the screen byte
And then when the scrolling engine hits the point where it's loading that pickup on that screen, you'd check whether it was flagged already or not with AND, and branch around the object creation.
Hope this helps get the gears turning.