Author Topic: [PSX/PC] Field Editor - Makou Reactor (2.0.0)  (Read 466049 times)

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #750 on: 2017-09-29 02:05:34 »
Damn, thats a massive punch in the guts of my project.

Tom

  • *
  • Posts: 207
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #751 on: 2017-09-30 11:32:42 »
How about adding a new field that identical with the one you maxed out on and finding a clever time in the plot to switch them so it doesn't look awkward.

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #752 on: 2017-10-02 05:25:24 »
I have found a way but i need to be able to get inside the crash dump file so i can see a specific variable

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #753 on: 2017-10-04 13:36:18 »
Tsunamix, if you showed me a real script file you are working on, perhaps I could find a new way you could achieve this subtitle business.  Perhaps not.  But I'd be willing to look.


Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #754 on: 2017-10-04 17:11:58 »
Okay so heres my very 1st scene.
You'll see exactly how what i do works.

The other way i CAN do this is have 4 seperate flevels for each option and the player chooses what they want in 7th heaven.
But that means coding the whole game 4 times....Making the mod massive.

So i created variables from empty ones to use as my stuff. Also here too to use with Makou Reactor.

The dynamic weapons mod uses the Cloud Swords variable that Kal got from somewhere to put inside 7th heavens "7th heaven.var" to allow them to be changed on the fly.All i know is he righ clicks play in 7th heaven and use the variable option to be able to get them.

Hopefully this makes enough sense

https://www.mediafire.com/folder/6nuulpzp1chhq/DLPB
« Last Edit: 2017-10-04 17:26:16 by Tsunamix »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #755 on: 2017-10-04 17:51:45 »
That field has an enormous bug in it - before I even get to the matter at hand.  You have put a loop in the "init" section - meaning the field will never load. The game will hang. And this is in the wrong thread. We need to take it elsewhere.
 You're also duplicating code for no reason

Code: [Select]
If Var[11][243] bitOFF 5 (else goto label 9)
Execute script #2 in extern group Auto Tex (No12) (priority 6/6) - Only if the script is not already running
Create window #0 (X=32, Y=32, Width=125, Height=41)
Displays the dialog "“C’mon,newcomer! Follow me.”" in the window #0
Label 9
If Var[11][243] bitON 5 (else goto label 10)
Execute script #2 in extern group Auto Tex (No12) (priority 6/6) - Only if the script is not already running
Create window #0 (X=8, Y=198, Width=191, Height=25)
Displays the dialog "C’mon,newcomer! Follow me." in the window #0
Label 10

is the same as

Code: [Select]
Execute script #2 in extern group Auto Tex (No12) (priority 6/6) - Only if the script is not already running
If Var[11][243] bitOFF 5 (else goto label 9)
Create window #0 (X=32, Y=32, Width=125, Height=41)
Displays the dialog "“C’mon,newcomer! Follow me.”" in the window #0
Goto label 10
Label 9
Create window #0 (X=8, Y=198, Width=191, Height=25)
Displays the dialog "C’mon,newcomer! Follow me." in the window #0
Label 10

Text will have to be duplicated in order to do subs and no subs... But there should be no reason why (unless there are 128 texts in one field), this will pose a problem.
« Last Edit: 2017-10-04 17:58:18 by DLPB »

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #756 on: 2017-10-04 17:58:37 »
Okay not sure where to take the thread but ill explain why this code has to be exactly the way it is

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #757 on: 2017-10-04 18:14:56 »
What I'd say is this current way will take you years.  Even if you can get it working.  The best way I can find for subs would be to just use an installer.  Have 2 sets of touphscript field files.  You can position the dialogue and ts will do any autosizing. You can use {NEW} if the line is too big for screen.  The issue then is if you want the dialogue boxes removed.  That can be done with a simple exe edit.

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #758 on: 2017-10-04 18:27:42 »
Okay that makes sense. i already have all areas coded up to Aeriths church this way now.
But scenes like tin_1, mds7 ect have way too many lines to be able to duplicate them all.

The scene doesnt crash so not sure what that loop is for.
If you know how i can get the variables from the crash.dmp so i can ad them too 7th heaven.var it's all done. Its ready and i can release pretty much right now a playable demo.

Toughscript is still unclear to me, i did try it before and just couldnt do it. No idea why because it looks simple haha.

OH ALSO
The {NEW} thing doesnt work because it's not a new box so it doesnt have a seperate ID. I cant link Ultrasound to it to play a seperate file
« Last Edit: 2017-10-04 18:37:55 by Tsunamix »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #759 on: 2017-10-04 18:45:04 »
What you'd be forced to do there is make the window time match audio.  Or do it in parts as you prob have been doing.  Either way, it's a colossal task.  It may be better for you to just give up with Subtitles when it's WITH audio - or give up with normal boxes. Choose one or other.  Trust me... Not even I would attempt that.
« Last Edit: 2017-10-04 18:46:42 by DLPB »

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #760 on: 2017-10-04 18:53:57 »
I know what you mean, but at this point im dedicated.
It is colossal work and im still doing it alone.

But on other forums and stuff people have raged at the subtitles so i wanna do my best to make it all optional to keep a good size crowd happy.

All i need is that variable thing. Thats it. And were good again. It will be finished because i can make 2 seperate versions of each area with too many texts and 7th heaven will use it instead based on the variable. Its all good

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #761 on: 2017-10-04 19:02:52 »
That's a fatal flaw in your logic.  FFX didn't add caption boxes - because it was using audio. And no-one raged.  The people raging are asking you to - in my view - do a totally unrealistic amount of work simply to cater to their nostalgia for normal boxes.

If you are using audio... then you have every right to treat it as FFX.  FFX creators did not say "We better add normal boxes".  It's up to you, of course, but catering to both camps may make this job impossible to finish.

Good luck :)

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #762 on: 2017-10-04 19:22:08 »
Maybe, maybe,,,
I prefer the subtitles personally. And i want to do them over the normal boxes.

The followers are complaining because they dont want the subs.
Im choosing to do them for many reasons though.
I'll get it eventually

resinate

  • *
  • Posts: 96
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #763 on: 2017-11-24 09:46:56 »
this is newb to ask this but how do u add a party member lol, im trying to re-add aeirth after cloud says LETS GO but its not working when adding/creating her.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #764 on: 2017-11-24 09:47:38 »
Look at places where party members are added.  This thread isn't for questions on things like this.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #765 on: 2017-12-30 15:23:56 »
Myst6re has graciously added 2 more opcodes that can be used with my new DLL - soon for use to modders. 

1A - Read and Save to whole Savemap
1B - Check if Red is called Nanaki (all case) - for use with my Reunion mod.

Thanks!

Function of 1A will be

Hex:

From (2 byte address - savemap 0000 to 10F5, or 5000 to 50FF (this will use temp bank)
To (2 byte address - same as above)
Absolute Value (max 4 bytes,  ignored if From is not FFFF)
Flag (tells whether from is a pointer, whether To is a pointer, and specifies the byte read/write mode)

Flag:  1,2,3,4 (read/write 1, 2, 3, or 4 bytes)
0x10 (To is a pointer)
0x20 (From is a pointer)
Obviously 0x30 means both are pointers

so if you had (all below are hex)

From: 5000
To: BA4
Absolute : 0
Flag: 11

This would copy a ONE byte value FROM the ADDRESS found at temp bank, Byte 0 TO BA4 (which happens to be Bank 1, Byte 0)
5000 with the flag telling it it's a pointer means that Temp Bank, Byte 0 in this case may have address 200....  so it would be THIS address copied from
« Last Edit: 2018-01-03 15:57:37 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #766 on: 2018-01-04 20:01:37 »
http://blackchocobo.sourceforge.net/wiki/index.php?title=Savemap#Character_Record

Code: [Select]
Write/Read entire savemap (from=1272, to=20670, absValue=0, flag=1)
Write/Read entire savemap (from=1273, to=20672, absValue=0, flag=1)
Write/Read entire savemap (from=1274, to=20674, absValue=0, flag=1)
Var[6][190] = Var[6][190] * 132 (16 bit)
Var[6][190] = Var[6][190] + 84 (16 bit)
Var[6][190] = Var[6][190] + 44 (16 bit)
Var[6][192] = Var[6][192] * 132 (16 bit)
Var[6][192] = Var[6][192] + 84 (16 bit)
Var[6][192] = Var[6][192] + 44 (16 bit)
Var[6][194] = Var[6][194] * 132 (16 bit)
Var[6][194] = Var[6][194] + 84 (16 bit)
Var[6][194] = Var[6][194] + 44 (16 bit)
Write/Read entire savemap (from=20670, to=20670, absValue=0, flag=18)
Write/Read entire savemap (from=20672, to=20672, absValue=0, flag=18)
Write/Read entire savemap (from=20674, to=20674, absValue=0, flag=18)
If Var[6][190] == 0 (else goto label 5)
    If Var[6][192] == 0 (else goto label 5)
        If Var[6][194] == 0 (else goto label 5)
            Game Over
Label 5
The above code with my opcode will check if all 3 members in party have 0 HP and initiate game over if so.  This is more involved than a usual read operation, because it requires finding the current members and then calculating offsets.  Hopefully Myst6re will add a hex toggle, as this looks crap in decimal.  In hex:
Code: [Select]
Write/Read entire savemap (from=4F8, to=50BE, absValue=0, flag=1)
Write/Read entire savemap (from=4F9, to=50C0, absValue=0, flag=1)
Write/Read entire savemap (from=4FA, to=50C2, absValue=0, flag=1)
Var[6][BE] = Var[6][BE] * 84 (16 bit)
Var[6][BE] = Var[6][BE] + 54 (16 bit)
Var[6][BE] = Var[6][BE] + 2C (16 bit)
Var[6][C0] = Var[6][C0] * 84 (16 bit)
Var[6][C0] = Var[6][C0] + 54 (16 bit)
Var[6][C0] = Var[6][C0] + 2C (16 bit)
Var[6][C2] = Var[6][C2] * 84 (16 bit)
Var[6][C2] = Var[6][C2] + 54 (16 bit)
Var[6][C2] = Var[6][C2] + 2C (16 bit)
Write/Read entire savemap (from=50BE, to=50BE, absValue=0, flag=12)
Write/Read entire savemap (from=50C0, to=50C0, absValue=0, flag=12)
Write/Read entire savemap (from=50C2, to=50C2, absValue=0, flag=12)
If Var[6][BE] == 0 (else goto label 5) [16 bit read]
    If Var[6][C0] == 0 (else goto label 5)
        If Var[6][C2] == 0 (else goto label 5)
            Game Over
Label 5
« Last Edit: 2018-01-04 20:04:37 by DLPB »

hay

  • *
  • Posts: 211
  • If I had a buggy, I'd cross the southern desert
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #767 on: 2018-01-15 06:28:24 »
This is pretty fu**ing awesome. Thanks for this amazing piece of softwork.

Chrysalis

  • ESUI Developer
  • Global moderator
  • *
  • Posts: 414
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #768 on: 2018-02-04 09:39:13 »
Is there any documentation to this, or did people just start fiddling and eventually work out how it works?

I am interested in editing the possible chocobo prizes for the chocobo races, and also the enemy spawn chances for battles.

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #769 on: 2018-02-04 19:53:39 »
Is there any documentation to this, or did people just start fiddling and eventually work out how it works?

I am interested in editing the possible chocobo prizes for the chocobo races, and also the enemy spawn chances for battles.

The encounter rates for each field can be seen with Tools -> Encounters. At the top you'll see the Battle Rate. The farther the bar is to the right, the higher the frequency of random encounters.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #770 on: 2018-02-08 06:51:49 »
Time to put this battle mode nonsense to bed.

Because this game is probably the most cobbled together thing I've ever seen, this Field Battle Mode flag (not to be confused with the Battle Type or the Battle Formation flag, set in Scene) stuff is a total nonsense when you look at what's going on.  The game actually only uses 16 bits for the Field Battle Mode - despite the fact there is a "Field Battle Mode (2)" which appears to allow 32 bits.  The engine simply does not support it.  Instead, the flags are converted to a 2 byte value. Regardless of the flag set in Field Battle Mode (1), the same counterpart will be set with Field Battle Mode (2).  Example:

Flag 1 in Field Battle Mode (1) is "Do not show Battle Rewards". This will set the exact same bit in FF7 memory as Flag 1 in Field Battle Mode (2).  The value in memory is 0x80 at CC0DC6.

Field Battle Mode (1) is actually only Flags 0-7 + Flag 16.  Why 16?  because that is the Disable Game Over flag, which gets its own byte to itself (CC0DC5).  In actual fact, this is a shoddy - and I do mean SHODDY - shoehorned fix. Clearly, the 16 bits (instead of 8) is there in Field Battle Mode (1) purely so the Disable Game Over byte can be set.  Flags 8-15 simply cannot be used in Field Battle Mode (1) - though I assume any of those being set to 1 will result in Disable Game Over, since CC0DC5 will then be non zero.

So, what about Field Battle Mode (2)?  Well, this is a jumble too.  The engine makes sure that the flags set here will set the same 2 byte value at CC0DC6 (+ Disable Game Over bit at CC0DC5). Flag 0-7 of Field Battle Mode (2) is the same as Flag 0-7 of Field Battle Mode (1). But Flag 24 becomes the Disable Game Over (it's Flag 16 in Field Battle Mode (1) ).  Flag 16 in Field Battle Mode (2) is Disable Victory Celebration Music, which is actually given the value 0x100 at CC0DC6. It's the only flag that can't be set with Field Battle Mode (1). 

Rather than think of this in terms of field flags, it's much easier to think of it as a memory value.  The value the engine actually makes use of.

The memory values at at CC0DC6/9A88A6 are:

Field Battle Mode (2). Current Makou flags in square brackets.
0x01: Unused [Flag 8]
0x02: Enable countdown timer [Flag 7]
0x04: Preemptive Strike [Flag 6]
0x08: Cannot escape from battle [Flag 5]
0x10: Unused [Flag 4]
0x20: Do not play victory fanfare music [Flag 3]
0x40: Activate Battle Arena [Flag 2]
0x80: Disable Rewards [Flag 1]
0x100: Disable Victory Celebration [Flag 16]
0x200: Unused [Flag 15]
0x400: Unused [Flag 14]
0x800: Unused [Flag 13]
0x1000: Unused [Flag 12]
0x2000: Unused [Flag 11]
0x4000: Unused [Flag 10]
0x8000: Unused [Flag 9]

And Disable Game Over is set as Value 0x01 at  CC0DC5 [Flag 24].  It must be noted that although 24 bits can be reflected from CC0DC5 using Field Battle Mode (2), only the 16 bits at CC0DC6 will be copied to battle memory (9A88A6) making them effective.  Game Over flag is not copied.  The engine checks for it at CC0DC5 - not at 9A88A5 when the battle ends.

Basically, as I noted on the github, Makou Reactor should do away with Field Battle Mode (1) and only allow the "32 bit version"  - although it should simply show to the user flag 1-17, with flag 17 being "Disable Game Over".   In other words, the non usable flags should be hidden and effective ones translated by Makou Reactor.
« Last Edit: 2018-02-08 19:30:03 by DLPB »

KnifeTheSky77

  • *
  • Posts: 548
  • Somnambulistic Paraphile
    • View Profile
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #771 on: 2018-02-08 23:58:35 »
master branch looks a little dusty, what is going on in develop? https://github.com/myst6re/makoureactor/branches.

edit: now I remember why I'm a nodejs dev   :?
« Last Edit: 2018-02-09 00:02:52 by KnifeTheSky77 »

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #772 on: 2018-03-18 23:59:27 »
Is there a particular reason as to why when i step on a new walkmesh i make the game crashes instantly?

sithlord48

  • *
  • Posts: 1632
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #773 on: 2018-03-20 13:55:30 »
master branch looks a little dusty, what is going on in develop? https://github.com/myst6re/makoureactor/branches.

edit: now I remember why I'm a nodejs dev   :?

Myst does not like to work on master he likes to work on the develop branch. Looks like the last merge was a PR i made in december to generate an appimage. Seams that is not working correctly I should lookin to fixing that.

Is there a particular reason as to why when i step on a new walkmesh i make the game crashes instantly?
No one can help you unless you say what version your runing?

try the last stable release..  if that works and you were using master consider making in an issue on github if one does not alreay exsist.

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [FF7PC/PSX] Field Editor - Makou Reactor (1.7.2)
« Reply #774 on: 2018-03-20 16:39:45 »
I'm using the latest version. Sorry i thought that would be a given. It's 1.7.2
« Last Edit: 2018-03-20 21:51:13 by Tsunamix »