Qhimm.com Forums

Final Fantasy 8 => FF8 Tools => Topic started by: JeMaCheHi on 2015-07-31 00:19:31

Title: [PSX/PC] Battle Structure Editor - Cactilio (v0.1)
Post by: JeMaCheHi on 2015-07-31 00:19:31
Cactilio (the Spanish name for Cactuar) is a little program to edit the battles structure on FF8. It's the first time I code a GUI program so... be comprehensive ah?  ;D Also, any advice/constructive criticism will be appreciated.

(http://i.imgur.com/wO8zEPU.png)

  How to use it:

Screenshot:
(http://i.imgur.com/Ol2p7O9.png)
 
TODO:

If you don't understand something about how scene.out works, you should take a look at this links:
Thanks to kaspar01, who made a list of stage name which was very useful: http://forums.qhimm.com/index.php?topic=15906.msg225667#msg225667 (http://forums.qhimm.com/index.php?topic=15906.msg225667#msg225667)
Thanks also to myst6re, whose src from Deling was very useful when I felt lostwith Qt.

Changelog:
v0.2
  Improved GUI
  Fixed enemy coordinates. Now you can set them from -32768 to 32767, a more logical range.
  Fixed some stage names (to be honest, don't even remember which ones...)
v0.1
  Initial release

Download Cactilio v0.2 (https://goo.gl/9TCHnN)
Github page here (https://github.com/JeMaCheHi/Cactilio)
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Kefka on 2015-07-31 11:50:51
That looks very promising, JeMaCheHi! Great work, man! I'll definitely experiment with this!
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: sithlord48 on 2015-07-31 12:19:42
qt is great. if you need some help packaging for linux let me know i can help (or with qt in general )

edit: no source :( . i can't even build and test it now :(
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: JeMaCheHi on 2015-07-31 13:57:32
Thanks for your support guys :)
@sithlord48: I'm still trying to figure out how to set a repo on github, when I'm done with it, I'll post the link. Anyway... I'm afraid that there's no much to see on the source :(
EDIT: Done :D
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: sithlord48 on 2015-07-31 17:52:26
awesome i will try to look at it when i have the time
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Maki on 2015-07-31 19:58:20
This tool is handy. Will make use of it to test those damn cameras (where they are in file, and how they are formed there, as I currently have opcodes and addresses of final camera position in memory).

Also, just to make fun and fight three bosses at the same time in some funny place. :D
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: sithlord48 on 2015-08-04 02:51:34
I have finally looked at your source and have some notes to share with you. As well as some general Qt stuff since you are new to qt. Myself have been using qt to develop some programs for at least last 6  years now. Black Chocobo being my first real use of Qt for anything like a program an end user would ever touch. I have helped with a few other qt projects as well since then most (all?) of them being from  myst6re. Please allow me to share some stuff i have learned  while using Qt. I'm a bit obsessive of my programs and how they act and how they will be interacted with so i tend to try to make them "perfect" as i can reguardless of where/ how  its run.

General:
Project.pro.user file should not be part of your source. This file should be generated by Qt Creator when the pro file is opened.

The .pro  File:
This file is really the heart of your program (even more so when you do releases for many oses) Give it some extra love and you can have it do lots for you this fill will be used almost exclusively to generate the build files that your compiler will use so it can save alot of time with getting the program deploy ready for what ever os your building it for.
there are some good examples in our community: Black Chocobo  (https://github.com/sithlord48/blackchocobo/blob/master/Black_Chocobo.pro) Makou Reactor (https://github.com/myst6re/makoureactor/blob/master/Makou_Reactor.pro) Hyne (https://github.com/myst6re/hyne/blob/master/Hyne.pro) Deling (https://github.com/myst6re/deling/blob/master/Deling.pro)

Gui :
Always use layouts. The top level of the main window should be in a layout and anything in any kind of  container groupbox, tabwidget, frame, etc.. should also have a layout . This is Very important and will make the difference between your program being unuseable or useable for someone! When layouts are used the items sizes will be choosen at runtime and resize events will correctly resize things.
you can see the difference here ( this is just opened on a 3840X2160 screen) No Layouts (http://i60.tinypic.com/2ag4t9w.png) And With Layouts (http://i61.tinypic.com/vhzuzc.png) This is you Gui i have only added layouts for your stuff in groupboxes and your top most layout. you can not see it  but you can try it ,resize your current gui setup you will just have blank space in the new area because you widgets will not respond to the change.
now if you try the UI i modified you will see that when the window is resized the content is also resized. This happens just because we set a layout for the top. Here is the UI that i added layouts to https://goo.gl/yiQxPv just copy it to a text file and name it mainwindow.ui .

Avoid Setting fixed sizes and if you must for controls you should try to base your sizes off the size of the expected input as if the user font is larger then yours the control may be to small for the content this will fix that to some extent. Also  do some kind of scaling for DPI this is a new problem w/ HiDpi screens... my dpi is 196 so when the assumed 96 dpi is used everything is so tiny on my screen and sometime just unuseable. This is really a toolkit issue there should be fixes to Qt for it .This has been delayed for now possibly so a long term stable version of qt 5 can be released first. For now this should help if your app ever makes it on to a HiDPi screen . See the init_display code for this (widget (https://github.com/sithlord48/ff7tk/blob/master/widgets/DoubleCheckBox.cpp)). i use a scaleX  and scaleY   and scale any sizes i need to such as MaximumSize, MininumSize and FixedSize this way on a standard screen they will remain the same size (dpi should be 96 and therefore scale should be 1 ) and on any screen with a higher Dpi I it will scale to a hopefully correct size.

Can you now fix your About window so it will be readable on my screen? 

Translations:
You can easily get qt to translate your strings in the future if you decide. Wraping up your strings with tr() will enable Qt to translate those strings if you decide to make translation files. load more info can be found on the qt projects page about it http://doc.qt.io/qt-4.8/i18n-source-translation.html

Look and Feel:
 Qt is very good at making itself feel like a native application and but there are some things you can do to help it feel even more native.You can use the system native icons for things QIcon::fromTheme() (http://doc.qt.io/qt-4.8/qicon.html#fromTheme) you will still need to provide a fallback icon if the system one can't be found. You can also provide hints on what roles (http://doc.qt.io/qt-4.8/qaction.html#menuRole-prop) different menu entries that they can be placed in the correctly locations on Mac Os, Android and others  where the menu structure will be removed from the window. Or you can do the complete opposite and set up a stylesheet and force your program to look the same everywhere like my  older Black Chocobo Releases (http://sourceforge.net/projects/blackchocobo/files/1.9/1.9.8/).

thats about all i have for now.  sorry for the wall of text hopefully it helps you .
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: JeMaCheHi on 2015-08-04 15:14:45
I have finally looked at your source and have some notes to share with you...
...
thats about all i have for now.  sorry for the wall of text hopefully it helps you .

Oh my.... holy crap. Never expected such amount of feedback... And I LOVE walls of text if they are sooo helpful as yours! I'll use your advice to enhance the app. To be honest, I rushed the release so everyone could experiment with this as soon as possible. From now on, I can calmly polish it. Let's see...

General: Actually, I forgot to remove it from github sync files, because I made the repo in a rush xD. If you had not point this out, it would probably have remained here forever.

Pro file: I think I need a deep study on this, I didn't even read documentation about it

Gui: Wow, lots of tips here... I love it. I took good note of everything. Layers everywhere. Also copied your .ui file, but I think I can tweak it a little more so stuff remains more centered. Anyway, as I told you before, I made it in a rush. I don't even like to use the form. I'll end up fully remaking the GUI just using code. The forms seem to me like... losing control of what your program does.  About that "HiDPi" screens... I didn't even know about their existence... Anyway, I'll redo the code for the about dialog and push a commit. If I understood everything, you'll be able to see it correctly and even to resize it without trouble.

Translation: Another good point, and I really appreciate your interest here. I always was curious about how myst6re did translate Deling. However... don't think a translation is needed here. I mean, this is a very simple app...

Look and Feel: There's no much to say here... I used a couple of icons because I wanted to experiment with them but they was not really needeed... Anyway that QIcon::fromTheme() method seem to be really powerful, and will be useful in future projects, indeed.

As you can see, I still have much to do with Qt, but now that I have a base project to start with, I just have to start tweaking and enhancing stuff. Thanks thanks thanks :D
Keep looking at github
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: sithlord48 on 2015-08-04 15:33:05
its ok that you rushed to give us something to play with your not near release and thats just fine projects need to start somewhere. . HiDpi is a thing and its making redo my widgets and stuff as they were not ready for hiDpi if you do it now you save that time. Glad i can help if you have any questions just ask im usually on irc and i do accept PMs here.
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Kefka on 2015-08-09 13:34:36
JeMaCheHi, I was wondering about one thing: I've read on several forums that enemy levels are usually either 80% or 120% of your party's average level, but certain locations have eceptions:

In the Lunatic Pandora, all enemies are at level 1
In the Fire Cavern, all enemies are at level 5
On the Islands closest to Heaven and Hell, all enemies are at level 100
In the Deep Sea Research Center, all enemies get +15 added to their levels
In Ultimecia's Castle, all enemies have a random level from 1 to 100


Do you know where this data is stored, and do you think it might be possible to make it editable in the future? It's just that since the enemies' max levels are also in the scene.out file, I was guessing/hoping that the way enemy levels are calculated might be there, too. I'd like to make storyline bosses to be either at a minimum level, or to be always a couple levels ahead of the party's level.
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Maki on 2015-08-09 14:28:29
Fixed level byte is currently known. See wiki. Cactillo IS able to edit this level. See in top right corner.
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Kefka on 2015-08-10 07:02:15
It seems to me that this is the max level, rather than a fixed level, or is it? Because all storyline bosses have a value that is exactly 100 above their max level, e.g. Norg and his pots have a max level of 27, and in Cactilio the value is 127.

Edit: No wait, it is actually both! After taking a closer look at it, I've noticed the following: values from 1-100 are fixed levels, just like the wiki says, but values above 100 seem to be the max levels (that's what the wiki doesn't know yet). Interestingly, not all enemies in the Fire Cavern have level 5, like so many sources say. The Red Bats have a fixed level of 4.

Edit2: I think I'm beginning to understand the higher values of the level byte as well.

Values above 200 seem to be those special level conditions that I mentioned before, because all monsters in the lower depths of the Deep Sea Research Center have a value of 215. (However, those in the upper half have a value of 210. Does that mean that their levels always get +10 added? I don't think I've ever noticed that in game, and all sources I find on the web only ever talk about the +15 levels.)

All monsters in Ultimecia's Castle have a value of 252, so this must be the random level from 1-100. Alright, great, then I think we've covered pretty much anything about enemy levels, right?
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: JeMaCheHi on 2015-08-11 14:54:33
It seems to me that this is the max level, rather than a fixed level, or is it? Because all storyline bosses have a value that is exactly 100 above their max level, e.g. Norg and his pots have a max level of 27, and in Cactilio the value is 127.

Edit: No wait, it is actually both! After taking a closer look at it, I've noticed the following: values from 1-100 are fixed levels, just like the wiki says, but values above 100 seem to be the max levels (that's what the wiki doesn't know yet). Interestingly, not all enemies in the Fire Cavern have level 5, like so many sources say. The Red Bats have a fixed level of 4.

Edit2: I think I'm beginning to understand the higher values of the level byte as well.

Values above 200 seem to be those special level conditions that I mentioned before, because all monsters in the lower depths of the Deep Sea Research Center have a value of 215. (However, those in the upper half have a value of 210. Does that mean that their levels always get +10 added? I don't think I've ever noticed that in game, and all sources I find on the web only ever talk about the +15 levels.)

All monsters in Ultimecia's Castle have a value of 252, so this must be the random level from 1-100. Alright, great, then I think we've covered pretty much anything about enemy levels, right?

Yes, as you pointed, values from 1 to 100 are the fixed ones (that's for sure) and from 101 to 200 seem to be the max levels, but didn't had time to test it enough so I can assure it 100%. From 201 to 255 seem to be the (grouplevel)+(certain value) as you said, (this is used mostly on deep sea center) but there certain values that I tested that doesn't fit this. For example, the Tear's Point enemies have a level of 255, and they seem to have random levels. Also, Omega Weapon has a level of 254, but as far as I know, he always have a level 100... There's a lot of confusion here, so I didn't dare to write a "correct" version on wiki yet. Also, I'm short of free time this days...
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Kefka on 2015-08-11 15:21:19
Also, Omega Weapon has a level of 254, but as far as I know, he always have a level 100...

For Omega Weapon, it depends on what version of the game you have. On the Playstation version he's always at Level 100, but on the PC version he averages with your party just like most monsters.
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: JeMaCheHi on 2015-08-11 20:46:40
For Omega Weapon, it depends on what version of the game you have. On the Playstation version he's always at Level 100, but on the PC version he averages with your party just like most monsters.

Oh man... epic fail then hahaha. This happens when you assume things u.u
Anyway... are you sure he scales with your party level? In that case he should have a value "200", for a max level of 100, scaling with party members. Anyway, if you're really interested in this, you should refer to the research thread and post there your findings, that way, every discussion about battle structure will be recorded there :) (http://forums.qhimm.com/index.php?topic=15816.0)
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: JeMaCheHi on 2015-10-05 19:13:31
I completely forgot to upload the new changes to the application... there you have the 0.2
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Question on 2016-10-15 07:55:24
This doesnt appear to allow you to edit the level scaling formulae...(like how deep sea research center adds +15 to the level of enemies) :(
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Girl next door on 2016-10-15 19:50:14
What do you want to do exactly ?
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Kefka on 2016-10-17 15:31:07
This doesnt appear to allow you to edit the level scaling formulae...(like how deep sea research center adds +15 to the level of enemies) :(

Well, you can't edit the formulae themselves, but you can choose which level scaling formula to apply in which battle:

values from 1-100 are fixed levels
values from 101-200 are the max levels (used by most storyline bosses)
values above 200 are those that get a certain number of levels added to the calculated average level (monsters in the Deep Sea Research center have a value of 215 here)
There seem to be some special values too, like 252 being random levels from 1 to 100 (used by random encounters in Ultimecia Castle)

See also mine and JeMaCheHi's posts above.

@JeMaCheHi:

I was playing around with adding additional enemies to some encounters, but sometimes it is rather difficult to judge where you have to place an enemy without it being partly off-screen or overlapping with other enemies. So I was wondering if it's possible to add a battle view preview like ProudClod has for FF7. This would make editing monster formations way easier.
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Girl next door on 2016-10-17 20:01:12
And I found that 254 is the exact average of party members levels. Also, it's always this exact value
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: volvania on 2016-10-18 12:53:01
you can use hex editor and use scene.out  the coordinate is there  and all the other variable u can edit it takes time without an editor but it get the job done http://wiki.qhimm.com/view/FF8/BattleStructure
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Kefka on 2016-10-18 14:58:18
And I found that 254 is the exact average of party members levels. Also, it's always this exact value

Ah, this is good to know, thanks. It always bugged me when I was looking for a certain enemy and needed it at a high level for draw/steal purposes, and then it's level was too low because it was 20% below my average.
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: resinate on 2016-11-02 04:32:42
im really confused. how do i extract this file and re-import it into iso/img files
Title: Re: [FF8] Battle Structure Editor - Cactilio (v0.1)
Post by: Divatox on 2017-10-29 05:52:15
So i have a question, to see if i understand:

Encounter ID - 216
Enemy name - Abaddon (boss)
Battle Scene - Salt Flats

Change Abaddon for another enemy OR put more Abaddons just changing the Enemy Slot (1 to 8 its so much O_o )? And give the level 100 to them?
Title: Re: [PSX/PC] Battle Structure Editor - Cactilio (v0.1)
Post by: qotsaninsoadkorn on 2018-06-20 15:51:47
thanks for this tool...
seems very nice to switch up the mix of enemies in group vs group battles especially...
tried out some areas like...

119= galbadia - edea/seifer part 1
120= galbadia - edea/seifer part 2
244= edea's parade vehicle - turtapod switch to other for eg... <<<
317= ODIN's Room
326= Bahamut - deep sea research center
328= tears point = few random encounters decent area for late game testing here maybe...
330= tears point
340ish -350 deep sea research random battles
354 = Ultima Weapon - Deep Sea Research
363 = Sphinxara - boss - Ultimecia's Castle
Title: Re: [PSX/PC] Battle Structure Editor - Cactilio (v0.1)
Post by: qotsaninsoadkorn on 2018-08-24 21:31:47
been using this so much...
i've just realized that replacing DUMMY com000.dat with BAHAMUT's
could help me create NEO BAHAMUT... Diff Stats / Spells / items / Card etc...

(https://s2.nofilecdn.io/g/3oJ69GDIelZdXAaHZTBTEAjieBOT8E4TX7VvbDUiFINp1nOQ9HsNmHfwZG79rt2o/2018-08-25+05_28_54-FINAL+FANTASY+VIII.jpg/p)

This is great... since i could choose DUMMY in CACTILIO...
but i'd love for an update to it which includes a small cleanup to the Enemy List...
maybe numbered (matching their com???.dat number)
that way... we can still replace the other DUMMY's
c0m144.dat -> c0m199.dat
so ... Dummy 144 would be the c0m144.dat...
Title: Re: [PSX/PC] Battle Structure Editor - Cactilio (v0.1)
Post by: qotsaninsoadkorn on 2019-04-06 15:22:52
checked and the creator of this tool hasn't been online in years it seems...
"Last Active: 2016-03-21 15:37:11"

:P would love to continue hoping for updates... specifically a small update adding the requested dummy swap feature...
Title: Re: [PSX/PC] Battle Structure Editor - Cactilio (v0.1)
Post by: Kitsune on 2023-01-28 12:05:50
Hi!

I search an info about Strike back and preemptive attack in Final Fantasy VIII (if possible PSX version but don't know if it change about the version)

I have found this formula in a document on the web:

Code: [Select]
-------------------------------
10.2  Back Attack, Struck First
-------------------------------

To determine whether you get an advantage/disadvantage over the enemy:

  rnd = [0..255] + EncounterMod
  if (rnd < 20) "Back attack!"
    else if (rnd < 236) no change
      else "Struck first!"

  Note: EncounterMod can be either 0 or 20, depending on the enemies.

  Probability of..
    "Back attack!"    20/256 or  0/256    7.8% or  0%
    no change             216/256            84.3%
    "Struck first!"   20/256 or 40/256    7.8% or 15.6%

  Note: Equipping the "Alert" party ability reduces "rnd" by 20, essentially
        increasing the odds of "Back attack!" and decreasing odds of
        "Struck first!"

Back attack:
All allies will start with 100% of the ATB bar filled.
Enemies start with 0% of the ATB bar filled.

Struck first:
All allies will start with 0% of the ATB bar filled.
Enemies start with 100% of the ATB bar filled.

No change:
All enemies' and allies' starting ATB bar calculated normally, see section 3.1
for more details.

Source: https://gamefaqs.gamespot.com/ps/197343-final-fantasy-viii/faqs/58936 (https://gamefaqs.gamespot.com/ps/197343-final-fantasy-viii/faqs/58936)

I search for the EncounterMod variable, it must be either 0 or 20 but I don't find anything on the web about it and monsters or battle scene.
If you have an answer? Thanks.