Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Akari

Pages: 1 [2] 3 4 ... 31
26
Add basic dialog support for simple text dialogs (no styling or questions). Few more days to support all FFVII dialog features. It will work like in v0.17 with minimal changes. You can look syntaxis there. Stay tuned =)

Next I add ingame bindings (normal bindings works already for long time).

Do you need something ekse like fade to make all bombing mission work?

27
Dialogue support would be pretty amazing, for some reason I thought most of that was already implemented in field

It was implemented in 0.17 but after second complete rewritting of engine it is gone. I add it to current version as soon as i can.

By the way i believe current version should be 0.22. Last one I release was 0.21 and i see no release since then

28
I add support for "on_interact" callback for entity-s and line triggers.
Could you compile changes and send me back? I don't have compiler here to do it myself. I can add dialog support but it will take a while.

http://vk.com/doc7350946_343148641

29
Also, does field:lock_walkmesh( 37, true ); exist? It doesnt seem to work

Sadly this function not exported to Lua.


Add this to ScriptManagerCommands.h

Code: [Select]
    // walkmesh access
    luabind::module( m_LuaState )
    [
        luabind::class_< Walkmesh >( "Walkmesh" )
            .def( "lock_walkmesh", ( void( Walkmesh ::* )( unsigned int, bool ) ) &Walkmesh ::LockWalkmesh)
            .def( "is_locked", ( bool( Walkmesh ::* )( unsigned int ) ) &Walkmesh ::IsLocked)
    ];





    luabind::globals( m_LuaState )[ "walkmesh" ] = boost::ref( *( EntityManager::getSingletonPtr()->GetWalkmesh() ) );



Quote
Also, how do I set variables?  Like for storing the position of the elevator or for the activation of certain scripts?

You need to store it anywhere in lua where you want )
Luastate is not reloaded after map load. Only entity container reloaded. I created file output\data\scripts\ffvii\data.lua for all this variables.
You can store there like this FFVII.Data.progress_game = 7

30
Thanks, the elevator scene now works properly.  However since I upgraded to the newest Q-Gears I can no longer make shortcuts on the main menu that take me to fields, whenever I skip the opening scene I am unable to move in the fields. My coordinates are setup right
I have added these in the begin_menu and changed the corresponding files and all worked fine in 0.21 but in 0.23 it teleports me to the field but I am unable to move.  I get no walkmesh errors in the console and the player isn't locked, what could be causing this?
Code: [Select]
                elseif self.position == 6 then
                    load_field_map_request( "ffvii_nmkin_1", "" )
                    console( "camera_free false" )
                    console( "debug_walkmesh false" )
                    script:request_end_sync( Script.UI, "BeginMenu", "hide", 0 )
                    FFVII.MenuSettings.pause_available = true

What is version 0.23? Where can I find it?

31
Thanks,  how do I set it up to react to a button press at certain coordinates?  I have tried using on_talk but thats not working,  the original script checks if button [OK] is pressed once but I don't know which button [OK] is in Q-Gears I would guess its shift. However you never have to use [OK] in Q-Gears because there are no texts and the scene where Biggs asks you to say your name is done using walkmesh triangles.

Fixed some problems by downloading the latest Q-Gears source and compiling it. Q-Gears v0.23 (5th cool guys choose to fight)

There is an event called "on_button"

Code: [Select]
on_button = function( self, button, event )
You can find examples in main menu. It catches this buttons: Enter, Escape, Space, LCtrl, Left, Up, Down, Right.
Normally it's bad idea to use buttons directly, so you can create some bind list to associate actions with keys.

32
Is it possible to have entities on the field without models? I need to make a entity "ele" to use as an elevator button so when you press [OK] you activate the elevator push script.

If its not possible then Ill probably add a Shinra Guard as an elevator operator that you talk to and tell him to take you to the floors.

In xml:
Code: [Select]
<entity_script name="Elevator" />
In lua;
Code: [Select]
EntityContainer[ "Elevator" ] = {
    on_start = function( self )
        return 0
    end,
}

Done. You can see entity Director in md1_1 as reference of entity script.

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

https://github.com/q-gears/q-gears-data/blob/master/documents/script_commands.ods

but this is for v0.20

All real methods for current version are here https://github.com/q-gears/q-gears/blob/master/QGearsMain/include/core/ScriptManagerBinds.h
sadly without comments.

34
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  :)

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: [Select]
cl
script_0:

became

Code: [Select]
EntityContainer[ "Cloud" ] = {


3)  First script ("script_0:")

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

Code: [Select]
cl
script_0:
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 );

Everything before first return is initial script.

In qgears this is "on_start" script.

We need to initialize model for entity in qgears

Code: [Select]
        set_entity_to_character( "Cloud", "Cloud" )
        self.cloud = entity_manager:get_entity( "Cloud" )

In ffvii this is done with PC opcode wich translates to

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

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

Code: [Select]
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 )
            end
        end

        entity_manager:set_player_entity( entity_name )
    end
end

It do basicly tha same thing that PC opcode do.

Next is self.cloud = 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.

36
What about cloud model settings, which is the most interesting part?

Code: [Select]
// model data
+00 [][]     0000 - if this is not 0 we add 0x40 bit to 8015190b
+02 []       80 - 0x3f - dead type. 0x80 - play secondary animation
+03 []       00
+04 [][]     0190 - collision radius. Set to 801518e4+6
+06 [][]     0a00 - to 801518ec
+08 [][]     0a00 - to 801518ee
+0a [][]     0000 - to 801518f0
+0c [][]     0000
+0e [][]     fce0
+10 [][]     fc7c - filler?
+12 array of joints (bone indexes)
    02 00 00 00 00 00 0d 08 03 00 03 17 12 00 00 00
+22 [][]     0000 - filler?
+24 array of 8 offsets to something
    00000438 00000438 00000438 00000438 00000438 00000438 00000438 00000438
+44 array of 4 something
    0180 0132 0180 0000
+4c array of 6 something
    0399 fda8 f9ff 0000 fddc 0000
+58 array of 6 something
    fd01 ff58 f9ab 0000 fe30 0000
+64 [][]     012c
+66 [][]     0000 - filler?
+68 array of 32 offsets to animation scripts
    00000190 00000194 0000019c 000001a0 000001b0 000001c0 000001c4 000001cc
    000001d0 000001d4 000001e4 000001e8 000001ec 000001f0 000001f4 00000200
    000001fc 00000210 00000204 00000198 0000026c 00000284 00000318 0000032c
    00000358 0000036c 00000378 00000384 00000338 00000210 00000220 00000230

function action_script_1()
    play_animation(1);
    [ACTION_OPCODE fe]
end;

function action_script_2()
    return_direction(); -- E5
    play_animation(6);
    [ACTION_OPCODE f1]
end;

function action_script_3()
    [ACTION_OPCODE b3]
end;

function action_script_4()
    [ACTION_OPCODE b3]
end;

function action_script_5()
    play_animation(15);
    [ACTION_OPCODE f2]
end;

function action_script_6()
    play_animation(16);
    play_animation(17);
    [ACTION_OPCODE f2]
end;

function action_script_7()
    play_animation(18);
    [ACTION_OPCODE f2]
end;

function action_script_8()
    play_animation(5);
    return_direction(); -- E5
    return_to_idle(); -- EE
end;

function action_script_9()
    [ACTION_OPCODE ab]
end;

function action_script_10()
    play_animation(19);
    return_direction(); -- E5
    return_to_idle(); -- EE
end;

function action_script_11()
    play_animation(24);
    play_animation(25);
    return_direction(); -- E5
    return_to_idle(); -- EE
end;

function action_script_12()
    [ACTION_OPCODE b4]
end;

function action_script_13()
    [ACTION_OPCODE 95]
end;

function action_script_14()
    [ACTION_OPCODE c4]
end;

function action_script_15()
    [ACTION_OPCODE e7]
end;

function action_script_16()
    play_animation(4);
    return_position(); -- FA
    return_direction(); -- E5
    return_to_idle(); -- EE
end;

function action_script_17()
    load_additional_effect(); -- E8
    set_direction(); -- FC
    play_animation(3);
    [ACTION_OPCODE ed]
end;

function action_script_18()
    return_direction(); -- E5
    [ACTION_OPCODE c4]
end;

function action_script_19()
    play_animation(16);
    [ACTION_OPCODE fe]
end;

function action_script_20()
    set_direction(); -- FC
    set_effect("foot_dust"); -- F0
    play_sound_for_attacker(00, 001a); -- D8
    play_animation(26);
    move_to_target("linear_movement", 04b0, 0000, 04); -- D1
    set_effect("foot_dust"); -- F0
    play_animation(27);
    execute_attack(01); -- F7
    play_animation(30);
    play_animation(28);
    return_position(); -- FA
    set_effect("foot_dust"); -- F0
    play_animation(29);
    return_direction(); -- E5
    return_to_idle(); -- EE
end;

function action_script_21()
    set_direction(); -- FC
    play_animation(3);
    [ACTION_OPCODE ed]
end;

function action_script_22()
    set_direction(); -- FC
    set_effect("foot_dust"); -- F0
    play_sound_for_attacker(00, 001a); -- D8
    play_animation(26);
    move_to_target("linear_movement", 04b0, 0000, 04); -- D1
    set_effect("foot_dust"); -- F0
    play_animation(27);
    execute_attack(01); -- F7
    play_animation(30);
    [ACTION_OPCODE 9e]
end;

function action_script_23()
    execute_attack(01); -- F7
    play_animation(34);
    play_animation(35);
    return_position(); -- FA
    set_effect("foot_dust"); -- F0
    play_animation(29);
    return_direction(); -- E5
    return_to_idle(); -- EE
end;

function action_script_24()
    set_direction(); -- FC
    set_effect("foot_dust"); -- F0
    play_sound_for_attacker(00, 001a); -- D8
    play_animation(26);
    move_to_target("linear_movement", 04b0, 0000, 04); -- D1
    set_effect("foot_dust"); -- F0
    play_animation(27);
    execute_attack(01); -- F7
    play_animation(30);
    [ACTION_OPCODE 9e]
end;

function action_script_25()
    return_direction(); -- E5
    [ACTION_OPCODE bd]
end;

function action_script_26()
    return_direction(); -- E5
    [ACTION_OPCODE bd]
end;

function action_script_27()
    return_direction(); -- E5
    [ACTION_OPCODE bd]
end;

function action_script_28()
    set_direction(); -- FC
    set_effect("foot_dust"); -- F0
    play_sound_for_attacker(00, 001a); -- D8
    play_animation(26);
    [ACTION_OPCODE cc]
end;

function action_script_29()
    load_additional_effect(); -- E8
    set_direction(); -- FC
    play_animation(3);
    [ACTION_OPCODE ed]
end;

function action_script_30()
    load_additional_effect(); -- E8
    set_direction(); -- FC
    play_animation(3);
    [ACTION_OPCODE ed]
end;

function action_script_31()
    load_additional_effect(); -- E8
    set_direction(); -- FC
    play_animation(3);
    [ACTION_OPCODE ed]
end;

37
Q-Gears / Re: Current state.
« on: 2014-07-15 18:01:34 »
Excellent, I'll take a look. At the moment I'm updating the code to work on Ogre 1.9 - just need to fix a linking issue with overlays/fonts.

Is there any code already to get field images too? It would be good to get native field images and scripts working, then it would be possible to explore most of the game.

Also out of interest is there anything for FF9 fields and scripts?

My dumper also dumps background images and animations (including palette animations).

FFIX mostly unknown. You can look at FFIX dumpers in util ditectory. It can dump walkmesh, models with animations but no more. And even this features are not well supported.

38
Q-Gears / Re: Current state.
« on: 2014-07-15 15:53:48 »
Quote from: paul
I've been looking here for docs:

http://wiki.qhimm.com/view/FF7/Field/Script/Opcodes

Seems the red ones are not documented? I was going to work on creating the FF7 script to lua loader.

Oh! Year. Most of them are not in first mission scripts and some of them are not well reversed (like movie opcodes). I thiught to add them when I will add following feature but I never did (

I can help you with reversing since I seems the only one who can understand my notes in reversing folder ))

By the way did you see my ffvii field dat dumper in utilites folder? It export native binary script to almost lua )))

39
Q-Gears / Re: Current state.
« on: 2014-07-15 04:44:57 »
Quite slow.. we need more people :) we also need the field op code reversing to be completed.

Which field opcode you need to be reversed? I thought I finished them off )

40
Q-Gears / Re: Current state.
« on: 2014-07-14 12:50:07 »
B... but the whole time, I thought YOU were the developer.... :o

My last commit was almost year ago. Didn't do anything since that time. But I check sometimes how things going.

41
Q-Gears / Re: Current state.
« on: 2014-07-03 16:29:29 »
Hello, long time no see  :)

How is q-gears progress going. Din you manage add something new features?

42
From what I gather I may need to compile ogre using the same libraries that i'm using to compile Q-Gears. I didn't want to have to go that far. As who knows how many depencencies, I'll need to download, to make that compile :D

You don't need compile OGRE, use OGRE 1.8.1 SDK for MinGW.
For boost you need one of 2012 year version (don't remember exactly... maybe 1_47). It has a lot of compile errors in later versions.

You need OGRE for render and boost for luabind (included in src). That's all.

43
Q-Gears / Re: Current state.
« on: 2013-10-07 12:01:29 »
a minor update from my side
I'm currently doing mostly just migration of building to CMake and cleanup ( lots of files moved, sorry for any inconvinience when updating )
I get along with CMake quite well it really does a great job, I did migrate some first Unittests to CMake + CTest and implemented Walkmesh serialization meanwhile
as building works good enough for now, I'll try and concentrate further implementing missing Resource files, next goal is loading of Field map completely from ff7 data, with exception of the script

By the way I suggest you to get rid of my support for usual formats like XML and png, get rid of new directory structure, because it will be easier to support native FFVII pc formats only.
It will be easier to add battle and worldmap this way too.
I wanted to create all work through normal readable formats and export all data to this formats to make game easy to create mods and adding new content. If you move this to native data it's not nessasary leave my things in project. Though you still needs to think something for menu and special effects, cause they are all hardcoded.

44
Q-Gears / Re: Current state.
« on: 2013-09-26 09:37:44 »
Cool. You progress quite well. I didn't have patience myself to get along with Ogre Resource system. Nice job. I watch your commits in merkurial )

45
Q-Gears / Re: Using available Game Engines?
« on: 2013-08-19 08:11:52 »
Using the existing game engine is harder than writing QGears. Writing engine is easy and don't take much time, but gives you flexibility. Most time are spent on reversing and understanding algorythms. you cant use native algorythms with existing engine. You will need to use their algorythms or write them in their script language (it's the same as using C++ but in LUA or Python)

Some times ago I thought about using blender to do ffvii battle. It's cool because you can see models, animations right in 3d editor and edit them as you want. But it's hard to create all battle algorythm in Python.

46
Q-Gears / Re: Current state.
« on: 2013-08-19 08:03:53 »
It's really easy to use native formats. Just build in converters into core and read data from native formats instead of ogre files.

Lately I start to work on battle system implementation in QGears Lua. But I don't have much time now.

48
Q-Gears / Re: FF7 asm
« on: 2013-01-02 19:00:05 »
For FFVII was used version SCUS_941.63. This is US version of game.

49
I'm going through the q gears stuff to fill in some of the newer information. I could've sworn that someone decoded the meaning of the type flags in the skeleton/hierarchy for field models, but the documentation/reverse directory in q-gears doesn't contain it, and the exporter tools don't seem to handle it. Am I imagining this, or have documents and tools been lost? (Yes, I searched the forum.)

I don't remember that there are any flags. Can you post an example?

50
Learn about structure of model settings. there are a lot of interesting data, including the animation scripts. =)

As you may know the game doesn't uses the animations from models, but uses scripts instead. And one game animation may include many model animations )

Pages: 1 [2] 3 4 ... 31