Author Topic: Q-Gears Field Module - Midgar Conversion Project [Replaced by Finishing Touch]  (Read 21379 times)

Tom

  • Moderator
  • Crazy poster
  • *
  • Posts: 206
  • Karma: 38
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #50 on: 2014-12-12 21:25:17 »
A little treat  ;)

Hopefully this weekend ill finish some more scripts but for now enjoy the room everyone loves, the debug room :D


Cloud gets ontop of the pipe in nmkin_2


And unlocks a new area!

Also Akari, hows progress on the Dialogue coming along,  its needed to finish the next fields of the bombing mission.
« Last Edit: 2014-12-13 08:35:06 by Tom »

Akari

  • Moderator
  • Freak
  • *
  • Posts: 759
  • Karma: 25
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #51 on: 2014-12-13 15:47:27 »
I implementing text manager to work with localized dialogs now. After that i hope to add counter and it's done. I will add texts for first 3 location to test how it's work )

sithlord48

  • Moderator
  • No life
  • *
  • Posts: 1421
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #52 on: 2014-12-13 16:30:14 »
will you be commiting these changes to our github . if not where can we find them?

Akari

  • Moderator
  • Freak
  • *
  • Posts: 759
  • Karma: 25
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #53 on: 2014-12-13 19:15:59 »
will you be commiting these changes to our github . if not where can we find them?

I will commit when everything will be finished and tested.

sithlord48

  • Moderator
  • No life
  • *
  • Posts: 1421
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #54 on: 2014-12-14 14:14:15 »
just pm me your username on github so i can add you to the project team.

paul

  • Moderator
  • Crazy poster
  • *
  • Posts: 180
  • Karma: 33
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #55 on: 2014-12-14 18:40:46 »
Feel free to PM me too in case hes not online as I'll be able to add you too.

Also I'll explain how we split up the repo recently:

https://github.com/q-gears/q-gears

This contains only the engine code now, no binaries or data, not even in the history (to remove the copyrighted data which would end this project).

This repo has the following submodules:

https://github.com/q-gears/q-gears/tree/master/dependencies

To 3rd part things, finally there is one more:

https://github.com/q-gears/q-gears/tree/master/output

Which links to the data repo:

https://github.com/q-gears/data

Which contains all data to run qgears (and some copyrighted data too, I guess at some point we need an installer to generate this from the users installed copy of the game). The code and data repos weigh in at about 20MB.

And the other final repo is:

https://github.com/q-gears/q-gears-reversing-data

Which has everything that didn't fit in to either of the code or data repos. This one is huge (1GB) and still has full history too.


Akari

  • Moderator
  • Freak
  • *
  • Posts: 759
  • Karma: 25
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #56 on: 2014-12-15 07:07:39 »
I implementing text manager to work with localized dialogs now. After that i hope to add counter and it's done. I will add texts for first 3 location to test how it's work )

Text manager finished. Language changing finished. Now it's time for some variables in text (like names of characters)

paul

  • Moderator
  • Crazy poster
  • *
  • Posts: 180
  • Karma: 33
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #57 on: 2014-12-15 15:50:37 »
I've updated the build to use CPack to build a DEB file if on Linux or build an MSI on windows. Still needs some work, license needs adding, MSI banner image, include the OGRE config for qgears.exe include OGRE DLLs on Windows etc.

sithlord48

  • Moderator
  • No life
  • *
  • Posts: 1421
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #58 on: 2014-12-15 18:37:48 »
I've updated the build to use CPack to build a DEB file if on Linux or build an MSI on windows. Still needs some work, license needs adding, MSI banner image, include the OGRE config for qgears.exe include OGRE DLLs on Windows etc.


cool i see you beat me to it lol

Akari

  • Moderator
  • Freak
  • *
  • Posts: 759
  • Karma: 25
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #59 on: 2014-12-16 08:50:57 »
Text manager finished. Language changing finished. Now it's time for some variables in text (like names of characters)

Text includes finished. It include text in other text or dialog. Dialog is text with defined width and height of dialogbox. Because dialogs in different localization has different dialogbox size. This format used in xenogears and FFIX because it's more localization friendly.
Text includes can be used to include item names and character names in dialogs.

Example

Code: [Select]
    <text name="item_potion">Potion</text>
    <text name="item_potion">ポーション</text>

    <dialog name="receive_potion" width="138" height="25">Received “<include name="item_potion" />”!</dialog>
    <dialog name="receive_potion" width="164" height="25">『<include name="item_potion" />』を手にいれた!</dialog>

     message:show_dialog( 2 , "receive_potion", 200, 140 )
« Last Edit: 2014-12-16 08:58:04 by Akari »

sithlord48

  • Moderator
  • No life
  • *
  • Posts: 1421
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #60 on: 2014-12-16 13:00:47 »
i started to work more on cpack and noticed we are currently installing the lua stuff (lua submodule is using cmake to install as well) . i have added a check for arch so we can detect 32 or 64 bit.  also included the project icon and desktop file. hopefully i can have our debs being created with cpack correctly very soon .  mostly i need to figure out how not to package lua with q-gears.

zerotacg

  • Fast newbie
  • *
  • Posts: 41
  • Karma: 9
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #61 on: 2014-12-16 19:25:12 »
it seems lua is bundled due to the git submodule integration of it and using the complete source
you could remove that and extend the initial cmake script to find the lua library as well and then just link against it similar to [2]

[1] https://github.com/q-gears/q-gears/tree/master/dependencies
[2] https://github.com/q-gears/q-gears/blob/master/CMakeLists.txt#L48

paul

  • Moderator
  • Crazy poster
  • *
  • Posts: 180
  • Karma: 33
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #62 on: 2014-12-16 23:14:41 »
Its possibly to specify which executables to include in the package too, if you do that LUA won't appear.

Edit: Saw what you guys where saying in IRC. I don't think we should use IS because it isn't free and isn't supported by CPack, we need anyone to be able to compile the installer and to only maintain one CPack script for all platforms. For NSIS VS WIX is more native than NSIS too, see:

http://stackoverflow.com/questions/1903145/nsis-vs-wix-vs-anyother-installation-package

unless there is some other reason to use NSIS over WIX? Also the intention is that the scripts will be converted automatically - without any goto's. I'm working on the script decompiler that should generate structured code (no goto's). It will be a while before this works though.
« Last Edit: 2014-12-16 23:34:23 by paul »

sithlord48

  • Moderator
  • No life
  • *
  • Posts: 1421
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #63 on: 2014-12-17 16:20:07 »
Its possibly to specify which executables to include in the package too, if you do that LUA won't appear.

Edit: Saw what you guys where saying in IRC. I don't think we should use IS because it isn't free and isn't supported by CPack, we need anyone to be able to compile the installer and to only maintain one CPack script for all platforms. For NSIS VS WIX is more native than NSIS too, see:

http://stackoverflow.com/questions/1903145/nsis-vs-wix-vs-anyother-installation-package

unless there is some other reason to use NSIS over WIX? Also the intention is that the scripts will be converted automatically - without any goto's. I'm working on the script decompiler that should generate structured code (no goto's). It will be a while before this works though.

i don't care how or what is used for the windows installer as long as it works with cpack and doesn't affect my ability to make a correct install for linux. as for the NSIS vs WIX i have personally only ever used NSIS to make installers and i know that does work with cpack.

Tom

  • Moderator
  • Crazy poster
  • *
  • Posts: 206
  • Karma: 38
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #64 on: 2014-12-18 20:02:22 »
Installer update:
Ive built the dialogues and working functions (Enough to install qgears) now working on the background images.
Startup screen:

Component selection:

Install type selection:

KnifeTheSky77

  • Freak
  • *
  • Posts: 520
  • Karma: 18
  • Somnambulistic Paraphile
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #65 on: 2014-12-19 04:46:47 »
It looks true to the original installer... very Windows 95, much nostalgia

Tom

  • Moderator
  • Crazy poster
  • *
  • Posts: 206
  • Karma: 38
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #66 on: 2014-12-19 20:25:15 »
Installer perfected
Will install Q-Gears into Program Files (x86)\Q-GEARS\q-gears


Akari how is dialog support coming along?
« Last Edit: 2014-12-20 13:30:37 by Tom »

Akari

  • Moderator
  • Freak
  • *
  • Posts: 759
  • Karma: 25
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #67 on: 2014-12-24 14:42:24 »
Akari how is dialog support coming along?

Working on inserting random image into text.

KnifeTheSky77

  • Freak
  • *
  • Posts: 520
  • Karma: 18
  • Somnambulistic Paraphile
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #68 on: 2014-12-25 01:14:04 »
Edit: oh yes, pictures for the buttons end up in text boxes. Keep it up!  :mrgreen:

paul

  • Moderator
  • Crazy poster
  • *
  • Posts: 180
  • Karma: 33
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #69 on: 2014-12-27 14:15:00 »
For the script decompiler I'll be using Michael Madsen's work from SCUMMVM. There will be a few extra bits required but at the moment its looking pretty simple to do.

The current test outputs this:

Code: [Select]
00000000: SETBYTE 80, 20, 66
00000004: SETBYTE 80, 21, 66
00000008: SETBYTE 80, 22, 66
0000000c: SETBYTE 80, 23, 255
00000010: RET
00000011: STPAL 0, 13, 0, 255
00000016: IFUB 80, 20, 98, 3, 38 (False target address: 0x41)
0000001c: PLUS 80, 20, 16
00000020: PLUS 80, 21, 16
00000024: PLUS 80, 22, 16
00000028: MPPAL2 0, 85, 80, 0, 16, 20, 21, 22, 255
00000032: WAIT 256
00000035: CPPAL 0, 0, 16, 0
0000003a: LDPAL 0, 16, 13, 255
0000003f: JMPB 41 (Jump target address: 0x16)
00000041: IFUB 80, 20, 4, 2, 38 (False target address: 0x6c)
00000047: MINUS 80, 20, 24
0000004b: MINUS 80, 21, 24
0000004f: MINUS 80, 22, 24
00000053: MPPAL2 0, 85, 80, 0, 16, 20, 21, 22, 255
0000005d: WAIT 256
00000060: CPPAL 0, 0, 16, 0
00000065: LDPAL 0, 16, 13, 255
0000006a: JMPB 41 (Jump target address: 0x41)
0000006c: JMPB 86 (Jump target address: 0x16)

Which decompiles to this

Quote
00000000: UnknownKernelFunction_128();
00000000: UnknownKernelFunction_128();
00000000: UnknownKernelFunction_128();
00000000: UnknownKernelFunction_128();
00000000: UnknownKernelFunction_0();
00000000: SetPalette();
00000016: do {
00000016:   while (!foo) {
0000001C:     UnknownKernelFunction_234();
0000001C:     UnknownKernelFunction_36();
0000001C:     UnknownKernelFunction_231();
0000001C:     UnknownKernelFunction_230();
00000041:   }
00000041:   while (!foo) {
00000047:     UnknownKernelFunction_135();
00000047:     UnknownKernelFunction_135();
00000047:     UnknownKernelFunction_135();
00000047:     UnknownKernelFunction_234();
00000047:     UnknownKernelFunction_36();
00000047:     UnknownKernelFunction_231();
00000047:     UnknownKernelFunction_230();
0000006C:   }
0000006C: } while(true);

The code is here:

https://github.com/paulsapps/SUDM

Apart from a few minor fixes the only code I had to add to make this work is here:

https://github.com/paulsapps/SUDM/tree/master/decompiler/ff7_field

The CFG:


« Last Edit: 2014-12-27 14:22:26 by paul »

KnifeTheSky77

  • Freak
  • *
  • Posts: 520
  • Karma: 18
  • Somnambulistic Paraphile
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #70 on: 2014-12-27 16:52:28 »
Brilliant! How far off is it from spitting out usable LUA scripts?

paul

  • Moderator
  • Crazy poster
  • *
  • Posts: 180
  • Karma: 33
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #71 on: 2014-12-27 17:09:56 »
Depends how many more bugs or issues I find in its output, feel free to chip in though ;)

Field script output
Code: [Select]
var_80_20=66;
var_80_21=66;
var_80_22=66;
var_80_23=255;
return;
SetPalette(0,13,0,255);
do {
  while (var_80_20 < 98) {
    var_80_20 += 16
    var_80_21 += 16
    var_80_22 += 16
    MulitplyPallete();
    Wait(256);
    CopyPallete();
    LoadPallete();
  }
  while (var_80_20 > 4) {
    var_80_20 -= 24
    var_80_21 -= 24
    var_80_22 -= 24
    MulitplyPallete();
    Wait(256);
    CopyPallete();
    LoadPallete();
  }
} while(true);

World map script progress
Code: [Select]
00000202: reset stack (0)
00000203: push byte from bank 0 897 (2)
00000205: jump if false 25 (0)
00000207: reset stack (0)
00000208: push byte from bank 0 897 (2)
0000020a: push byte from bank 0 897 (2)
0000020c: push constant 1 (2)
0000020e: push sub (2)
0000020f: write bank (0)
00000210: reset stack (0)
00000211: push byte from bank 0 897 (2)
00000213: push constant 0 (2)
00000215: push equal (2)
00000216: jump if false 25 (0)
00000218: unknown 320 (0)
00000219: return (0)

00000203: if (!897) {
00000211:   if (!897  0) {
00000218:     kernel_unknown_800();
00000219:   }
00000219: }
00000219: return;

And all of wm0.ev:

http://pastebin.com/Gqq7M111
« Last Edit: 2014-12-29 16:27:12 by paul »

Tom

  • Moderator
  • Crazy poster
  • *
  • Posts: 206
  • Karma: 38
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #72 on: 2015-01-09 17:29:29 »
Surprise surprise :D  Cloud riding the Midgar Train
New ways to reach levels:


Cloud taking the Midnight Midgar Train


Weird to have a walkmesh on the seats!?


Akari: Have you progressed with dialogue support?
« Last Edit: 2015-01-10 07:06:21 by Tom »

Akari

  • Moderator
  • Freak
  • *
  • Posts: 759
  • Karma: 25
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #73 on: 2015-01-12 12:15:42 »
Quote
Akari: Have you progressed with dialogue support?

Finish with button image exporting and inserting. Now fixing small bug with clipping during dialog closing (image not clipped).

Next target will be timer.

Tom

  • Moderator
  • Crazy poster
  • *
  • Posts: 206
  • Karma: 38
    • View Profile
Re: Q-Gears Field Module - Midgar Conversion Project
« Reply #74 on: 2015-01-12 13:13:11 »
Are the dialogs rendered properly without the pixel bug? Currently there is a bug with the way windows are displayed explained in the images below:

Example bugged dialogue:


The bug shown up close:


The dialogs normally have rounded corners, straight lines and nicer fonts like shown here: