scenery mapping question

killap

Bear Dude
Moderator
Modder
I am trying to figure out where the values for the scenery defined in scenery.h come from.

Example:

#define PID_BLOCKING_HEX (33554499)
#define PID_BLOWN_ARROYO_CAVE_DOOR (33555365)
#define PID_ARROYO_CAVE_DOOR (33555366)
#define PID_TEMPLE_SKULL_POLE (33555374)

Where do the values for each of the pid_"object" come from? I thought it corresponds to the proto files somehow, but I am not making sense from it. There seems to be some pattern where each one begins with 3355, or is this just a coincidence? Any thoughts?

Thanks!
 
It's a constant plus the proto number. You can work it out by matching some of these (like the skull pole) to the corresponding proto numbers. It's the same for creating monsters in a script, although a different constant is used.
 
Per said:
It's a constant plus the proto number. You can work it out by matching some of these (like the skull pole) to the corresponding proto numbers. It's the same for creating monsters in a script, although a different constant is used.

Got what I wanted working, thanks Per.

Oh, and on a semi-related note (is a scenery question to some degree) I do have another question.

Is there any reason why a map would behave differently in the official mapper than in the actual game? I am working on a map and when you go on the exit grid it should take you to a spot close to the other exit grid on the adjacent map. It does this correctly in the mapper, but for some reason when playing the game it sends you to a spot on the adjacent map as if you just came from the world map (ie not close to the exit grid to the next map but the spot where you would appear if you just arrived at the city). Any ideas?
 
How do you do to make the char appear next to the exit grid (or other location) when he enters the map? I'm making 1 map and i am getting lotsa problems -.-'
 
demonslayer said:
How do you do to make the char appear next to the exit grid (or other location) when he enters the map?

There are basically two ways: if the character came from an exit grid, the grid specifies the destination hex. If the character was moved by a script, this sets a global parameter (specified in the script) which is used in the map_enter procedure of the map script to place the character. For "basic" questions such as this one you should consult the tutorials; see the sticky thread in this forum.
 
Back
Top