1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-26 16:37:46 +00:00

Add stubs for the other two starting City-States

Also document how to access and play these scenes in USAGE.
This commit is contained in:
Joshua Goins 2025-03-28 22:52:21 -04:00
parent 2bf9385079
commit 6bb6377315
4 changed files with 70 additions and 4 deletions

View file

@ -82,6 +82,10 @@ These special debug commands start with `!` and are custom to Kawari.
* `!spawnactor`: Spawn another actor for debugging
* `!spawnnpc`: Spawn a NPC for debugging
* `!spawnmonster`: Spawn a monster for debugging
* `!playscene <id>`: Plays an event. Only some events are supported for now:
* Territory `181`, Event `1245185` plays the Limsa opening sequence
* Territory `182`, Event `1245187` plays the Ul'dah opening sequence
* Territory `183`, Event `1245186` plays the Gridania opening sequence
### GM commands

View file

@ -0,0 +1,27 @@
--- TODO: find a way to hardcode it this way
EVENT_ID = 1245186
--- load defines from Opening Excel sheet, which has this and we don't need to hardcode it'
POS_START = 2299848
function Scene00000(player)
player:play_scene(EVENT_ID, 00000, 4959237, 1)
end
function Scene00001(player)
player:play_scene(EVENT_ID, 00001, 4959237, 1)
end
function onEnterTerritory(player, zone)
--- move the player into the starting position
start_pos = zone:get_pop_range(POS_START)
player:set_position(start_pos)
Scene00000(player);
end
function onSceneFinished(player, scene)
if scene == 0 then
Scene00001(player)
end
end

View file

@ -0,0 +1,27 @@
--- TODO: find a way to hardcode it this way
EVENT_ID = 1245185
--- load defines from Opening Excel sheet, which has this and we don't need to hardcode it'
POS_START = 4101800
function Scene00000(player)
player:play_scene(EVENT_ID, 00000, 4959237, 1)
end
function Scene00001(player)
player:play_scene(EVENT_ID, 00001, 4959237, 1)
end
function onEnterTerritory(player, zone)
--- move the player into the starting position
start_pos = zone:get_pop_range(POS_START)
player:set_position(start_pos)
Scene00000(player);
end
function onSceneFinished(player, scene)
if scene == 0 then
Scene00001(player)
end
end

View file

@ -274,7 +274,8 @@ impl ChatHandler {
}
}
"!playscene" => {
// only works in ul'dah opening
let parts: Vec<&str> = chat_message.message.split(' ').collect();
let event_id = parts[1].parse::<u32>().unwrap();
// Load the game script for this event on the client
{
@ -290,9 +291,9 @@ impl ChatHandler {
object_type: 0,
},
event_type: 15,
event_id: 0x130003,
event_id,
flags: 0,
event_arg: 182,
event_arg: 182, // zone?
}),
};
@ -329,7 +330,14 @@ impl ChatHandler {
.await;
}
connection.event = Some(Event::new("opening/OpeningUldah.lua"));
let event = match event_id {
1245185 => Event::new("opening/OpeningLimsaLominsa.lua"),
1245186 => Event::new("opening/OpeningGridania.lua"),
1245187 => Event::new("opening/OpeningUldah.lua"),
_ => panic!("Unsupported event!"),
};
connection.event = Some(event);
connection
.event
.as_mut()