Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions data/games/frlg/maps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,22 @@ A collision-free `MB_COUNTER` (PewterCity_Museum_1F (11, 5)) is floor: the
counter only lets the player talk across it.

NPCs and pickups keep source event, script and optional local-ID provenance.
A person who wanders or walks back and forth has a `wander` box: their start
tile +- the pret movement range, kept inside the map
(`IsCoordOutsideObjectEventMovementRange()`). Back-and-forth walkers and
`*_UP_AND_DOWN`/`*_LEFT_AND_RIGHT` wanderers keep to their axis.
A person who walks a sequence of directions (`MOVEMENT_TYPE_WALK_SEQUENCE_*`)
has a `path` instead: legs `[direction, tiles]` (north/east/south/west) walked
in order from their `coord`, back to it and over again, e.g. Route 11's Dave
`[["south", 4], ["east", 8], ["west", 8], ["north", 4]]`. The generator walks
pret's rule on the map's collision, behavior and elevation grids
(`MoveNextDirectionInSequence()` and `MovementType_WalkSequence*_Step1()` in
`src/event_object_movement.c`): at the edge of their range they turn to the
next direction; any other collision (a wall, ground at another elevation, a
person who stands still) makes them walk in place for good, which the last
leg marks with a third element, `["east", 3, "stuck"]`. A walk that does
neither fails the generator. Every FRLG sequence walker returns to its start;
`npc_path.path_tiles()` expands legs to tiles.
`source_event` is a zero-based source array index, not an in-game object ID.
An item ball's `item` and `quantity` come from the pinned catalog
(`data/maps/item-identities.json`) or, for a map it doesn't list, from the
Expand Down
8 changes: 7 additions & 1 deletion data/games/frlg/maps/base/CeladonCity.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@
"source_script": "CeladonCity_EventScript_Poliwrath",
"source_local_id": "LOCALID_CELADON_POLIWRATH"
},
{"name": "little_girl", "coord": [11, 18], "source_event": 3, "source_script": "CeladonCity_EventScript_LittleGirl"},
{
"name": "little_girl",
"coord": [11, 18],
"path": [["east", 4], ["south", 4], ["west", 4], ["north", 4]],
"source_event": 3,
"source_script": "CeladonCity_EventScript_LittleGirl"
},
{
"name": "woman_2",
"coord": [18, 22],
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/base/MtMoon_1F.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
{
"name": "lass",
"coord": [33, 4],
"path": [["west", 5], ["south", 3], ["east", 5], ["north", 3]],
"trainer": {"sight": 2, "looks": ["north", "east", "south", "west"]},
"source_event": 3,
"source_script": "MtMoon_1F_EventScript_Miriam"
Expand Down
2 changes: 2 additions & 0 deletions data/games/frlg/maps/base/Route11.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
{
"name": "youngster",
"coord": [28, 10],
"path": [["south", 4], ["east", 8], ["west", 8], ["north", 4]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 3,
"source_script": "Route11_EventScript_Dave"
Expand Down Expand Up @@ -135,6 +136,7 @@
{
"name": "youngster",
"coord": [50, 14],
"wander": {"min": [50, 10], "max": [50, 18]},
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 7,
"source_script": "Route11_EventScript_Yasu"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/base/Route12.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@
{
"name": "rocker",
"coord": [13, 92],
"path": [["west", 4], ["north", 4], ["south", 4], ["east", 4]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 5,
"source_script": "Route12_EventScript_Luca"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/base/Route14.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
{
"name": "biker",
"coord": [10, 37],
"wander": {"min": [10, 31], "max": [10, 43]},
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 8,
"source_script": "Route14_EventScript_Lukas"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/base/Route19.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
{
"name": "swimmer_m_water",
"coord": [18, 33],
"path": [["west", 5], ["north", 3], ["east", 5], ["south", 3]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 3,
"source_script": "Route19_EventScript_Matthew"
Expand Down
3 changes: 3 additions & 0 deletions data/games/frlg/maps/base/Route20.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
{
"name": "swimmer_m_water",
"coord": [23, 10],
"path": [["east", 5], ["south", 4], ["west", 5], ["north", 4]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 4,
"source_script": "Route20_EventScript_Dean"
Expand All @@ -119,13 +120,15 @@
{
"name": "swimmer_m_water",
"coord": [111, 9],
"path": [["north", 3], ["west", 5], ["south", 3], ["east", 5]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 6,
"source_script": "Route20_EventScript_Barry"
},
{
"name": "swimmer_m_water",
"coord": [106, 11],
"path": [["south", 3], ["west", 5], ["north", 3], ["east", 5]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 7,
"source_script": "Route20_EventScript_Darrin"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/base/Route21_North.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
{
"name": "swimmer_m_water",
"coord": [12, 44],
"path": [["west", 4], ["north", 2], ["east", 4], ["south", 2]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 2,
"source_script": "Route21_North_EventScript_Spencer"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/base/Route25.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
{
"name": "youngster",
"coord": [36, 4],
"wander": {"min": [36, 1], "max": [36, 7]},
"trainer": {"sight": 2, "looks": ["north", "east", "south", "west"]},
"source_event": 7,
"source_script": "Route25_EventScript_Chad"
Expand Down
2 changes: 2 additions & 0 deletions data/games/frlg/maps/base/Route8.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,15 @@
{
"name": "biker",
"coord": [14, 16],
"path": [["east", 5], ["south", 2], ["west", 5], ["north", 2]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 13,
"source_script": "Route8_EventScript_Ricardo"
},
{
"name": "biker",
"coord": [24, 17],
"path": [["east", 5], ["north", 5], ["south", 5], ["west", 5]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 14,
"source_script": "Route8_EventScript_Jaren"
Expand Down
8 changes: 7 additions & 1 deletion data/games/frlg/maps/base/SilphCo_5F.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,13 @@
"source_event": 4,
"source_script": "SilphCo_5F_EventScript_Grunt1"
},
{"name": "scientist", "coord": [2, 7], "source_event": 8, "source_script": "SilphCo_5F_EventScript_Scientist"}
{
"name": "scientist",
"coord": [2, 7],
"wander": {"min": [0, 7], "max": [4, 7]},
"source_event": 8,
"source_script": "SilphCo_5F_EventScript_Scientist"
}
],
"items": [
{
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/base/SilphCo_7F.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
{
"name": "worker_m",
"coord": [9, 14],
"wander": {"min": [8, 14], "max": [10, 14]},
"source_event": 7,
"source_script": "SilphCo_7F_EventScript_WorkerM2",
"source_local_id": "LOCALID_SILPH_CO_7F_WORKER_M2"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/base/VictoryRoad_2F.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
{
"name": "man",
"coord": [26, 6],
"path": [["south", 4], ["east", 4], ["west", 4], ["north", 4]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 3,
"source_script": "VictoryRoad_2F_EventScript_Vincent"
Expand Down
8 changes: 7 additions & 1 deletion data/games/frlg/maps/runtime/CeladonCity.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@
"source_script": "CeladonCity_EventScript_Poliwrath",
"source_local_id": "LOCALID_CELADON_POLIWRATH"
},
{"name": "little_girl", "coord": [11, 18], "source_event": 3, "source_script": "CeladonCity_EventScript_LittleGirl"},
{
"name": "little_girl",
"coord": [11, 18],
"path": [["east", 4], ["south", 4], ["west", 4], ["north", 4]],
"source_event": 3,
"source_script": "CeladonCity_EventScript_LittleGirl"
},
{
"name": "woman_2",
"coord": [18, 22],
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/runtime/MtMoon_1F.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
{
"name": "lass",
"coord": [33, 4],
"path": [["west", 5], ["south", 3], ["east", 5], ["north", 3]],
"trainer": {"sight": 2, "looks": ["north", "east", "south", "west"]},
"source_event": 3,
"source_script": "MtMoon_1F_EventScript_Miriam"
Expand Down
2 changes: 2 additions & 0 deletions data/games/frlg/maps/runtime/Route11.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
{
"name": "youngster",
"coord": [28, 10],
"path": [["south", 4], ["east", 8], ["west", 8], ["north", 4]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 3,
"source_script": "Route11_EventScript_Dave"
Expand Down Expand Up @@ -135,6 +136,7 @@
{
"name": "youngster",
"coord": [50, 14],
"wander": {"min": [50, 10], "max": [50, 18]},
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 7,
"source_script": "Route11_EventScript_Yasu"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/runtime/Route12.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@
{
"name": "rocker",
"coord": [13, 92],
"path": [["west", 4], ["north", 4], ["south", 4], ["east", 4]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 5,
"source_script": "Route12_EventScript_Luca"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/runtime/Route14.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
{
"name": "biker",
"coord": [10, 37],
"wander": {"min": [10, 31], "max": [10, 43]},
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 8,
"source_script": "Route14_EventScript_Lukas"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/runtime/Route19.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
{
"name": "swimmer_m_water",
"coord": [18, 33],
"path": [["west", 5], ["north", 3], ["east", 5], ["south", 3]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 3,
"source_script": "Route19_EventScript_Matthew"
Expand Down
3 changes: 3 additions & 0 deletions data/games/frlg/maps/runtime/Route20.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
{
"name": "swimmer_m_water",
"coord": [23, 10],
"path": [["east", 5], ["south", 4], ["west", 5], ["north", 4]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 4,
"source_script": "Route20_EventScript_Dean"
Expand All @@ -119,13 +120,15 @@
{
"name": "swimmer_m_water",
"coord": [111, 9],
"path": [["north", 3], ["west", 5], ["south", 3], ["east", 5]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 6,
"source_script": "Route20_EventScript_Barry"
},
{
"name": "swimmer_m_water",
"coord": [106, 11],
"path": [["south", 3], ["west", 5], ["north", 3], ["east", 5]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 7,
"source_script": "Route20_EventScript_Darrin"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/runtime/Route21_North.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
{
"name": "swimmer_m_water",
"coord": [12, 44],
"path": [["west", 4], ["north", 2], ["east", 4], ["south", 2]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 2,
"source_script": "Route21_North_EventScript_Spencer"
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/runtime/Route25.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
{
"name": "youngster",
"coord": [36, 4],
"wander": {"min": [36, 1], "max": [36, 7]},
"trainer": {"sight": 2, "looks": ["north", "east", "south", "west"]},
"source_event": 7,
"source_script": "Route25_EventScript_Chad"
Expand Down
2 changes: 2 additions & 0 deletions data/games/frlg/maps/runtime/Route8.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,15 @@
{
"name": "biker",
"coord": [14, 16],
"path": [["east", 5], ["south", 2], ["west", 5], ["north", 2]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 13,
"source_script": "Route8_EventScript_Ricardo"
},
{
"name": "biker",
"coord": [24, 17],
"path": [["east", 5], ["north", 5], ["south", 5], ["west", 5]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 14,
"source_script": "Route8_EventScript_Jaren"
Expand Down
8 changes: 7 additions & 1 deletion data/games/frlg/maps/runtime/SilphCo_5F.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,13 @@
"source_script": "SilphCo_5F_EventScript_Grunt1",
"coord": [9, 21]
},
{"name": "scientist", "source_event": 8, "source_script": "SilphCo_5F_EventScript_Scientist", "coord": [2, 7]}
{
"name": "scientist",
"wander": {"min": [0, 7], "max": [4, 7]},
"source_event": 8,
"source_script": "SilphCo_5F_EventScript_Scientist",
"coord": [2, 7]
}
],
"items": [
{
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/runtime/SilphCo_7F.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
{"name": "worker_m", "source_event": 6, "source_script": "SilphCo_7F_EventScript_WorkerM1", "coord": [13, 14]},
{
"name": "worker_m",
"wander": {"min": [8, 14], "max": [10, 14]},
"source_event": 7,
"source_script": "SilphCo_7F_EventScript_WorkerM2",
"source_local_id": "LOCALID_SILPH_CO_7F_WORKER_M2",
Expand Down
1 change: 1 addition & 0 deletions data/games/frlg/maps/runtime/VictoryRoad_2F.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
},
{
"name": "man",
"path": [["south", 4], ["east", 4], ["west", 4], ["north", 4]],
"trainer": {"sight": 1, "looks": ["north", "east", "south", "west"]},
"source_event": 3,
"source_script": "VictoryRoad_2F_EventScript_Vincent",
Expand Down
Loading
Loading