The field script I wrote for that port were very much optimized from their originals, I had removed GOTOs from nearly everywhere and replaced them with IF/ELSEs and structured code, functions like locking the player and menu and making player invisible were grouped. The fields do NOT use opcodes but LUA commands. We don't "change an opcode and see what happens"
FFVII.Data.triangleId = entity_manager:get_entity( "Cloud" ):get_move_triangle_id()
if (FFVII.Data.triangleId == FFVII.Data.expectedTriangleId) then
if (FFVII.Data.progress_game < 7) then
entity_manager:player_lock( true )
-- field:menu_lock( true )
background2d:scroll_to_position( -96 * 3, 60 * 3, Background2D.SMOOTH, 1.066667 )
script:request( Script.ENTITY, "Cloud", "scene_part_1", 6 )
FFVII.Data.progress_game = 7
script:request_end_sync( Script.ENTITY, "Biggs", "scene_part_2", 6 )
script:wait( 0.2 )
script:request_end_sync( Script.ENTITY, "Jessie", "scene_part_3", 6 )
script:wait( 0.333333 )
script:request_end_sync( Script.ENTITY, "Biggs", "scene_part_4", 5 )
script:wait( 0.266667 )
script:request_end_sync( Script.ENTITY, "Cloud", "scene_part_6", 6 )
script:wait( 0.266667 )
script:request_end_sync( Script.ENTITY, "Barret", "scene_part_8", 6 )
script:wait( 0.4 )
-- music:execute_akao( 0x20, 52, 64 )
script:wait( 0.266667 )
-- music:execute_akao( 0x20, 32, 64 )
script:request( Script.ENTITY, "DoorLeft", "open", 6 )
script:request( Script.ENTITY, "DoorRight", "open", 6 )
script:wait( 0.333333 )
script:request( Script.ENTITY, "Jessie", "scene_part_10", 6 )
script:wait( 1 )
script:request( Script.ENTITY, "Biggs", "scene_part_11", 6 )
script:wait( 0.2 )
script:request( Script.ENTITY, "Wedge", "scene_part_12", 6 )
script:wait( 0.5 )
script:request_end_sync( Script.ENTITY, "Barret", "scene_part_13", 6 )
-- Prepare map change
script:request( Script.ENTITY, "Barret", "scene_part_15", 6 )
script:wait( 1 )
-- field:movie_set( 20 )
FFVII.Data.bMoviePlaying = 1
-- field:play_movie()
load_field_map_request("ffvii_md1_2", "md1_1_Director_on_update_addr_1044")
entity_manager:player_lock( false )
-- field:menu_lock( false )
end
end
That is what field script looks like. And yes its very documented, there is a page that contains these commands and another one explaining what they do.
https://github.com/q-gears/q-gears/wiki/Field-Script-Command-ReferenceThe main problem that keeps Q-Gears behind is the lack of C++ programming on the side of the engine / converter. However if we were to use Akari's Engine the conversion would be cut to bits because we would just use the original data anyways.
Remember: All the data conversion must be done programmatically because we can not distribute converted data! This means each user will have to have
a program that converts all the original data to the XYZ's Engine Data and the conversion can not be done by hand. Unless off course the engine can use the original data.