Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: Tsunamix on 2017-05-11 13:52:18

Title: Flevel Stuff
Post by: Tsunamix on 2017-05-11 13:52:18
Okay so i've changed this thread to just home any questions i'll have with this stuff instead
Title: Re: Flevel timer
Post by: DLPB_ on 2017-05-11 14:04:47
You'll have to send a picture of makou's windows.  That's too confusing for me to follow.
Title: Re: Flevel timer
Post by: Tsunamix on 2017-05-11 14:08:44
Edited
Title: Re: How to edit wold map scripts
Post by: Tsunamix on 2017-05-11 22:43:17
Different cameras are solved. I can work them perfectly now.

So last thing I need now is to be able to control scripts or behavior on the world map. Please help me out here.  Its the last step for my little side project.
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-05-12 05:12:44
There is no script editor for world map. No real documentation to it.  No one I know has successfully changed wm script (aside from text based stuff).  Myst6re does plan to make an editor one day.
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-05-17 23:32:27
Okay so in Makou Reactor, im working these IF statements. Most of which are obvious.
However what do these options mean:

IF 20 ! 4
IF 20 & 4
IF 20 ^ 4

Numbers are random here, just need to know what ^, ! and & mean in this scenario
Title: Re: Flevel Stuff
Post by: gjoerulv on 2017-05-18 00:14:01
I assume those are bit operators

& = AND
! = NOT
^ = XOR

It's better to look at it in binary
20 = 1 0100
4 = 100

Wiki on operators:
https://en.wikipedia.org/wiki/Bitwise_operation (https://en.wikipedia.org/wiki/Bitwise_operation)

EDIT:
I also assume the IF statement resolves to TRUE as long as the output is not zero. Unless there is some condition. For example (IF variable1 & variable2 = 4) { something happens here if true }.
In this case if variable1 = 20 and variable2 = 4 the statement would be true because 20 AND 4 = 4.

Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-05-18 00:20:46
Aha thanks. I'm trying to find a work around to the timer.

I can only have 1 countdown timer but i essentially need 2.
Got any ideas?

Okay so on the savemap list i found total gametime var:

0x0BB5
z_8[10]   1 byte   Game Timer Minutes

What is this in Makou Reactor though?
I tried using a normal work it out method and guessed it to be [1][17] but i guess i'm wrong.

Reason for guessing that is because the countdown timer is:

0x0BB9
z_8[14]   1 bytes   Countdown Timer Minutes

Which is 4 above it.
When i tried to work out a pattern i found that the love points corresponded to this pattern.

Can anyone teach me what these mean how how to work out their Var in Makou Reactor?
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-05-20 22:12:28
Use The Reunion Database. See the Savemap tab. There you will find I have converted to actual memory addresses - and field var banks. Note that there are only 5 save banks.  Field uses different vars depending on if they are 8 bit or 16 bit, something I am going to highly recommend Myst6re simplifies in Makou Reactor.  It would also be nice if the main wiki were updated to use the system I have used in The Reunion Database.

Also see my other post: http://forums.qhimm.com/index.php?topic=15763.msg221251#msg221251

Also note that Ochu allows logging and editing of vars.  It will make it much easier for you.
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-05-20 22:33:40
Ahh great news. But just to let you know the list is down.
When you click "Please see the Reunion database" it's gone
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-05-20 22:45:26
That's because I edited it to tell you to go and look at the Reunion thread.  That;s where The Reunion Database is. First post.

Also...

https://github.com/myst6re/makoureactor/issues/66
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-05-20 22:56:37
Si i think i was correct in saying game time in minutes was Var [1][16] but my code was off then.

I'm basically looking for another way to use a time system. I have the countdown and the game time. Countdown works fine but couldn't get get game time to respond in any way
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-05-20 23:00:22
The game timer itself is outside of the 5 save banks, so you can't address them in realtime from what I can remember. Only the 5 "banks" can be accessed by field script. Game time is only saved to a bank at save time from the menu.
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-05-20 23:02:40
So i can't make a script in Makou saying if Gametime < 10:00 do this?
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-05-20 23:09:14
So i can't make a script in Makou saying if Gametime < 10:00 do this?

Nope. Not without editing the executable to save game time in real time to a spare var ( a field save bank). It would require some basic assembly.  Let me check with Ochu to make sure.

Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-05-20 23:13:30
Alright. So unless someone does this i'll scrap the idea then. Too much hassle.
Would be very handy though
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-05-20 23:17:55
I was wrong.  See The Reunion Database and Ochu.  It's being written in real time.

DC08EC   1   16   H   Game Timer Hours
DC08ED   1   17   H   Game Timer Minutes
DC08EE   1   18   F/H   Game Timer Seconds
DC08EF   1   19   H   Game Timer Frames

Basically, for under 10 minutes, you'd check that [1][17] < 10 and that [1][16] = 0.

Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-05-20 23:20:24
So it must have been a code problem in Makou then. I figured it was 1 17.
Alright i'll see what i can do then.

Cheers man
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-05-20 23:21:36
Definitely look at Ochu in the MemLog area.  You can even query specific current values.  Like I did here:

Quote
1, 17

I put that in the box and clicked "Query". Remember that Bank 1 = Field 1/2.

Quote
DC08ED 0BB5 [1,17](Field Time): 34

In other words, the Minutes count in my game is 0x34. My hours is 0xFF :P  255 hours is the maximum time that can be used by field script.  The menu allows much further (when edited - I've made it 999 hours decimal). I edited it this way btw...  I didn't lit play over 255 hours.
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-05-20 23:24:06
Alright will do. Your always handy. Haha
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-06-15 23:20:31
Anyone happen to know 2/3 vars i need?

1. Enable the materia in the menu
2/3. Enable Disable customization of the materia (Like in the Kalm Flashback)

EDIT: I got part 1
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-06-16 17:21:06
How can i convert this to Variables in Makou reactor?

0x1D   1 byte   Equipped armor

I wanna find a way to unequip current armor and possibly equip another automatically
Title: Re: Flevel Stuff
Post by: sithlord48 on 2017-06-17 19:58:00
I don't think the field script has access to the character files..
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-08-20 04:49:52
Is there any possible way of resetting the in game time?

Like If Game time = 2 minutes.
Reset Game time
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-08-20 12:36:15
I don't think the field script has access to the character files..

But it will have when my DLL gets released ;) and if Myst6re adds the opcode to Makou.

Quote
Is there any possible way of resetting the in game time?

Like If Game time = 2 minutes.
Reset Game time

Again, that's outside of the 5 banks.  See the Savemap.
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-08-20 19:49:17
Yeah what i'm looking to do is turn the game clock into an actual clock.
So it goes to X time of my choice and then restarts. Then i can use that system for any number of things.

Providing i can alter it at will. Possibly speed it up?
I know that it uses Vars 1 16-18 but i cant seem to get any changes
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-08-20 20:53:33
It doesn't use the 5 banks.  You can't.
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-08-20 21:20:35
Crap, okay. I'll make my own clock lol. Thanks anyway
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-08-20 23:55:12
Well, you could use the countdown timer to do it - I guess. But otherwise, my DLL will allow you to mess with the clock, but who knows when I will finally get that monkey off my back.
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-08-21 00:09:59
I got a clock working, It's perfect :D

Using an open Var and its the value it uses.
Title: Re: Flevel Stuff
Post by: DLPB_ on 2017-08-21 00:10:39
How are you doing it?  Got a picture?
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-08-21 00:38:54
Im gonna try expand it as best i can before posting anything yet. Wanna be sure.

Basically i re purposed an empty variable to act as a counter based on the change in Gametime.

Here ya go
(http://i.imgur.com/FXobGXH.png)
Title: Re: Flevel Stuff
Post by: Kaldarasha on 2017-08-21 06:37:47
This shouldn't be handled by a script in the flevel. For this we need a global script which works scene independent (though it does need to know if it should be executed on the field or not). After all a day, night and weather cycle effect needs to be also present on the world map and battles.
Title: Re: Flevel Stuff
Post by: Tsunamix on 2017-08-21 14:54:47
I'm not sure if it can happen during the other two. I need a script editor for the world map and i have no clue how to effect battles in this way