Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2020-04-04 05:38:16

zalor
Member
Registered: 2020-01-31
Post 6/10

(Pokered) Trouble adding new items in a map

I've been trying to add an item to pick up in route 3 of Pokered. Originally there are no items to pick up there, but in Route 4 there is so I have replaced Route 4's code for Route 3 in the hide_show_data.asm and hide_show_constants.asm. However, when I go to pick the item up I get a blank text box and nothing happens. Here is all my relevant code:

\MapObjects\route3.asm :

db 10 ; objects
object SPRITE_BUG_CATCHER, 22, 66, STAY, NONE, 1 ;person
object SPRITE_BUG_CATCHER, 8, 62, STAY, DOWN, 2, OPP_BUG_CATCHER, 1
object SPRITE_BUG_CATCHER, 4, 66, STAY, RIGHT, 3, OPP_YOUNGSTER, 1 ;good
object SPRITE_LASS, 8, 54, STAY, NONE, 4, OPP_LASS, 2  ;good
object SPRITE_BUG_CATCHER, 10, 45, STAY, LEFT, 5, OPP_YOUNGSTER, 2 ;good
object SPRITE_LASS, 2, 49, STAY, RIGHT, 6, OPP_LASS, 3; good
object SPRITE_BUG_CATCHER, 14, 34, STAY, RIGHT, 7, OPP_BUG_CATCHER, 2
object SPRITE_LASS, 4, 30, STAY, LEFT, 8, OPP_LASS, 4 ; good
object SPRITE_BUG_CATCHER, 10, 14, STAY, RIGHT, 9, OPP_POKEMANIAC, 1
object SPRITE_BALL, 4, 50, STAY, NONE, 10, NUGGET

\data\hide_show_data.asm :

MapHS0F:
db ROUTE_3,$0A,Show

\constants\hide_show_constants.asm :

const HS_ROUTE_3_ITEM                  ; 1B X



Is there anything wrong with this code that I'm overlooking? Or is there another file I need to edit? In the script of route 3 I also replaced Route3text10 with "dw PickUpItemText". As far as I can tell I've done everything right. I even started a new save file incase if my save data got corrupted, but even then I still had the problem of the game not recognizing the item.

Last edited by zalor (2020-04-04 05:39:26)

Offline

#2 2020-04-04 09:38:32

zalor
Member
Registered: 2020-01-31
Post 7/10

Re: (Pokered) Trouble adding new items in a map

Okay, so I figured it out. In data\hide_show_data each of the map constants are aligned for every map in the game. Route 4's designated ID is MapHS0F and it only works for route 4. Route 3's is right before it in the pointer list, but because it is unused it is only labeled MapHSXX like all the other unused ones. Going in order however, its actual ID is MapHS0E, right between Route 2's ID which is MapHS0D. So if you plan on using any map show data for route 3 you will want to change it from MapHSXX to MapHS0E.

Offline

#3 2020-04-05 22:42:34

Mateo
Member
Registered: 2009-11-25
Post 3,635/3,642

Re: (Pokered) Trouble adding new items in a map

Glad you already got it worked out. Yeah, the way Red Version handled hiding and showing objects is... not great haha. Maybe one of these days I'll get around to adding some tutorials to pokered's Wiki tab to explain things like this.


I am no longer active on this forum. I only pop in from time to time.

Offline

#4 2020-04-07 10:36:07

zalor
Member
Registered: 2020-01-31
Post 9/10

Re: (Pokered) Trouble adding new items in a map

Mateo wrote:

Glad you already got it worked out. Yeah, the way Red Version handled hiding and showing objects is... not great haha. Maybe one of these days I'll get around to adding some tutorials to pokered's Wiki tab to explain things like this.


I could help write a tutorial for this and a couple other things that are relatively simple but might benefit from having an overt tutorial on them. The biggest resource for learning so far (other then just experimenting with the pokered files) has been reading old forum posts here of people who had similar problems to the ones I ran across.

Last edited by zalor (2020-04-07 10:39:42)

Offline

Board footer

Powered by FluxBB