Project forums > Q-Gears

Q-Gears Field Module - Midgar Conversion Project [Replaced by Finishing Touch]

(1/20) > >>

When I first downloaded Q-Gears 0.21 I was slightly disappointed that only the first 3 fields are playable, so I'm converting ff7 fields to Q-Gears fields so theres more to do in Q-Gears other than run around the train station and the bombing mission starting fields.

New Notice: The replacement project for this is Finishing Touch which you can find here:
You can even download whatever progress is made and play it yourself, not just look at screenshots I upload :)

Notice: This project has been abandoned in favor of SUDM, the automatic Field Script decompiler you can find here: If you want to see the fields that were done up to this point you should download the Q-Gears repository and it will be in the output folder.  (Or download the q-gears-data repository and find them in maps/ffvii/ )

=[ Conversion Progress ]=
(Debug Room) startmap: Complete!
md1stin: Q-Gears
md1_1: Q-Gears
md1_2: Q-Gears
nrthmk: Complete!
nmkin_1: Imported, partial scripts
elevtr1: Complete!
nmkin_2: Complete!
nmkin_3: Imported, partial scripts
nmkin_4: Imported, no scripts
nmkin_5: Imported, no scripts
tin_3: Imported, no scripts

Here is what I got so far:
Images are 5000KB bitmaps so you might have to wait a while if you are on a slow line.
Start menu with shortcuts to the new fields

North Mako Reactor outside

Now were inside the reactor, without even having to hack the gate codes.

Looks like Cloud and Barret are stuck in the elevator!

Cloud and Jessie head deeper into the reactor!

The train leaves at 00:00 Midgar Standard Time!

I hear you asking, how do we get these fields ingame!?
You can get them by downloading the github q-gears and compiling it.


--- Quote ---The hardest part in converting the fields is getting the field scripts to work.  Having slight trouble with the elevator scene because I do not know how to get the cloud model that has the elevator slam button animation working.  Any help would be appreciated  :)
--- End quote ---

Scripts exporting is a bit tricky because you need a bit of manual work to do it. In existed field files I already rename a lot of things to increase readability.

1) Scripts exported to text file (md1_1_script.txt)

There you will find raw script to lua conversion. Most of implemented functions ready to use when they converted. Others need to be reworked.

2) You need to cteate entity layout manually.

EntityContainer = {}

EntityContainer[ "entity_name_goes_here" ] = {

After export you get original entity name. They are abbreviated and may be different in different fields though they represent same model. That's why I renamed them.

--- Code: ---cl
--- End code ---


--- Code: ---EntityContainer[ "Cloud" ] = {
--- End code ---

3)  First script ("script_0:")

In ffvii first script has two parts: initial and normal.

--- Code: ---cl
0441 (end 0441): -- assosiate entity with model (CHAR) argument doesn't matter
0443 (end 0443): set_entity_to_character( "cl", 0 );
0445 (end 0445): return
0446 (end 0446): cl:set_move_speed( 1.875 )
044a (end 044a): jumpto( 044a );
--- End code ---

Everything before first return is initial script.

In qgears this is "on_start" script.

We need to initialize model for entity in qgears

--- Code: ---        set_entity_to_character( "Cloud", "Cloud" ) = entity_manager:get_entity( "Cloud" )
--- End code ---

In ffvii this is done with PC opcode wich translates to

--- Code: ---0441 (end 0441): -- assosiate entity with model (CHAR) argument doesn't matter
0443 (end 0443): set_entity_to_character( "cl", 0 );
--- End code ---

set_entity_to_character  is located in output\data\scripts\ffvii\field.lua

--- Code: ---set_entity_to_character = function( entity_name, character_name )
    if character_name == FFVII.Party[ 1 ] and entity_name ~= "" then
        if System.MapChanger.point_name ~= "" then
            local point = entity_manager:get_entity_point( System.MapChanger.point_name )
            if point ~= nil then
                local x, y, z = point:get_position()
                local rotation = point:get_rotation()
                local player = entity_manager:get_entity( entity_name )
                player:set_position( x, y, z )
                player:set_rotation( rotation )
                player:set_solid( true )
                player:set_visible( true )

        entity_manager:set_player_entity( entity_name )
--- End code ---

It do basicly tha same thing that PC opcode do.

Next is = entity_manager:get_entity( "Cloud" )

This finds entity with name Cloud which described in XML file and store referensce to it in local variable to get access to it.

That\s all for now. Try to look at exported script and existed script files to understand how it works. I can add more later.

Keep it up folks! Thanks for the devotion in this project!

Is there some sort of reference that describes all the field commands and what their arguments/parameters are?


--- Quote from: Tom on 2014-11-15 14:44:25 ---Is there some sort of reference that describes all the field commands and what their arguments/parameters are?

--- End quote ---

but this is for v0.20

All real methods for current version are here
sadly without comments.


[0] Message Index

[#] Next page

Go to full version