[PSX/PC] Battle editor - Proud Clod (1.5.0/FINAL)

  • Thread starter Thread starter nfitc1
  • Start date Start date
Status
Not open for further replies.
It's about as user-friendly as an AI editor can be :-P

And if you want to use it with the PSX version, you need to use CDmage to extract the scene.bin file, edit it as usual, then use CDmage to put the file back into the ISO. As long as you don't make the scene.bin file any bigger, it should work.
 
and i am in the process of making a scene.bin for the psx (or pc for those who want it) that massively shrinks the ai while doing what the ai was intended to do (as well as fixing bugs), so that psx users do not have to worry about this problem too much. though my style of ai editing is a little weird, so those wishing to add to the ai could have trouble, unless they start from scratch :-P.

however, those who only want to change basic stuff, such as stats and enemy moves (not so basic for the moves) should have no limits in the psx one, unlike they do now. gonna take a while, but will eventually get done :-P.

and yeah... unless you know how to program the ai, you aren't going to be able to with this editor... it takes some learning to do.
 
If I edited all monsters, their stats and attacks in one scene.bin and for example secondadvent wrote better AI for them later, would it be possible to copy AI data from one scene.bin to the other without changing other options? I assume it isn't as simple as copy-pasting with hex-editor? If I recall correctly AI-data is all over the place in all scenes.
 
AI data is in one place (more or less). Conveniently, it's right at the end.

However, within the AI section the scripts for each enemy are not all the same size, and there are pointers at the start of the AI section pointing to the beginning of each of the enemies' scripts. If you copy/paste the AI from some enemies in a scene, but not all, you'll need to fix these pointers yourself (otherwise, the game won't know where to look for the second/third enemy's script).

If you copy the AI for all of the enemies in a scene, then you can copy/paste without any problems.
 
Would copying all AI-data from other scene.bin require copy-pasting 256 times (once per every scene. off course excluding those scenes with only dummy/unused enemies) assuming all enemies were changed?
 
it would require that, since there isn't an editor i know of that can directly copy the ai (even this one... i have to manually retype ai for each new enemy, or hex copy it in, and manually rechange the pointers there), so the best way would be to extract all 256 scene files (in my scene.bin there are currently 19 blank scenes, and some more i know i could delete some enemies from, but not the entire scene data), and hax edit the new ai values in from mine, which isn't too hard to do if you know where to copy from, and it'd be a direct paste, filling the extra stuff with FF (null) values, and since the scene.bin is 256 compressed scene files, more of the same value (in this case FF) causes it to shrink much better.

currently with the first reactor's enemies alone, up to and including the guard scorpion, i shrunk the ai 6816 bytes, removed 12 useless scenes (big save in size), and the current scene.bin size is 256 kb (reduces/increases by 8kb whenever it needs more room or has enough free space to shrink, it doesn't directly shrink as it is changed, i.e. a 1kb reduction to a 256kb scene would either become a 248kb scene (if shrunk enough overall), or stay at 256, but with a good bit more room for editing in that area).

guard scorpion actually grew, but this is because i made it more def change friendly, meaning it has the usual in-battle defense, but usually you could make both defenses 255, and it would still have the same def in-battle, since the ai set it to an exact number, not to a relative increase. a section was added to halve the defense (since both games apparently double enemy defense before even the pre-battle ai takes place (likely a core thing), and my ai now halves it, making the defense change more relative, and allowing it to be raised/lowered as desired in an enemy stat editor). once i know how to change the engine to not double the defense anymore i can shrink the size, and if i kept the original direct defense setting, i could actually have saved about 10% of the space that GS takes up (it's ai has a big portion of dialogue in it, wich is where much of the size comes from), however my goal is to make it as hacker friendly as possible, though it will still be good for normal users, just fixing ai bugs and such.

actually, shrinking the ai could improve performance in-game, since a smaller ai takes less time to be completed, causing less wait time between attacks, though most people will not really be able to see the difference. wait time, as in when a move causes the atb to stop isn't what i mean, i mean the time it takes to finish the ai script. smaller ai also means more room to add more to the ai itself, not just the stats, without making it go past the psx size limit :-P.

i think i will make my own thread when i completely finish with the reactor (going back over the ai to see if they can be modified more, and i know some definitely can be), and have some people test them out to see if there are any bugs, but there shouldn't be any in the original enemies i added... just the copied ones since i had to manually retype them, and didn't test them after that :-P. the first reactor enemies are also (most anyway) in the sector 7 train graveyard, and have different formations there, so testing there would be nice as well. if anybody wants to test it, since it wouldn't be a completed release, i will email the scene.bin to you if you want them, becuase i don't want a lot of people wanting them too fast, since it will be a long time until i complete this little project >:D.
 
Last edited:
a section was added to halve the defense (since both games apparently double enemy defense before even the pre-battle ai takes place (likely a core thing), and my ai now halves it, making the defense change more relative, and allowing it to be raised/lowered as desired in an enemy stat editor). once i know how to change the engine to not double the defense anymore i can shrink the size, and if i kept the original direct defense setting
I don't have time to currently test it but does Def and MDf both get doubled by engine? Or only Df?

Either way why change this behavior? This way we easily achieve Def range of 0-510 without any need to tinker enemy AI. Wouldn't it take less space also especially for enemies that had Def stat >255 when you wouln't need any lines of code to boost it's Def stat. And it's also easier and faster to edit only enemy stats when you don't need to worry about their AI.

Now that I think of it all enemy stats should have a multiplier of 2. That way one could create easily enemies with absurd str or mag for example.
 
Last edited:
both def and mdef are doubled by the engine, and yes it is true that enemies would need less room to have their def to go up to 510, since it is doubled initially. but, the thing is, enemies shouldn't need to almost null damage (255, the base max for the defenses halves all damage, except def ignoring things, and 510, the doubled max, would take the damage to pretty much nothing, around 1-100 for powerful attacks, since the damage done is damage = damage * (512 - def) / 512, making 10000 damage taken down to  ~40 damage dealt, a really big decrease. if an enemy had that much defense, then it is likely that they wouldn't have much life, or the fight would be really unnecessarily long, especially since hp can go pretty damn high.

yes, an enemy with 400 defense (200 base) would still take plenty of damage, but if you had a good ai, great moves, and ample hp on it, then that high of defense wouldn't really be needed. the main problem with most of the vii fights, is that the enemy ai is too simple, and their moves too weak. many enemies are too low level to be doing a ton of damage, and some at very high levels would still be very easy since their ai sucks. if you balance out the game well, and make it hard from there, then mass def boosting isn't really necessary, just overkill, and making the fights much longer than needed to be.

i guess that the def doubling is good for now, and will still be needed when my first compressed ai scene.bin is done, since the enemies will still be essentially the same, but when i make my REAL difficulty hack (want this done so that i have plenty of breathing room, and so that psx version users can still enjoy my hack, since it should still fit into the original iso easily), i am hoping that i will have a way to stop the initial doubling, even though it is likely many enemies late-game will be hitting the higher stat marks, and the end game optional bosses will definitely be taking roids, so only a few enemies should need past 255 defense, if they even really need it at all. usually, if you know the enemy ai very well, and have a very nice setup, you should eventually win anyway, but my hack is going to be cruel to the users, so massive defense would just be too much :-P.
 
I know all the formulas. What I meant that wouldn't it be more effient to have all enemies using half of intended def values and have engine double it than have all enemies at their intended def values and use ai-data for those few enemies that have df >255.

But I agree with you that:
More HP, High Defence -> longer fights
Smart/unpredictable AI, High STR/MAG/Speed -> harder fights

Problem is if you make AI too unpredictable it makes coming up with good tactic against that enemy very hard and winning becomes too much based on luck.
 
the problem is that when using a relative boost/redux to alter stats with the ai when the def is auto boosted makes it hard to make the defense not cap out fast, or become too low compared to what it normally would. for example, i have GS adding 106 to the 150 (doubled to 300 in game without my initial def halving) to make it hit the normal 256 mdef at it's initial stage (no counter), def is the normal amount 20 (doubled to 40), and then adding another 128 when it goes to the countering stage (hitting 384 normally), and it's def adds 235 to hit 255 def (275 if i didn't halve them first). now, if i didn't set it's defense to halve (both), here is how things would look at different defense values:

initial stats
base def (b4 doubling) -> 20
base mdef -> 150
stage     def     mdef     half def     half mdef
normal    40      406      20            256
counter  275    534      255           384

an example of increased def through enemy editing
base def -> 128
base mdef -> 255
stage     def     mdef     half def     half mdef
normal    256    616       128          361
counter  491    744       363          489 (capped here)

max def run
stage     def    half def
normal    510    255
counter  745    490 (capped)

as you can see, with the innate def doubling, defense values get way too high for a relative defense boost mimicking the regular game's setup, and even if i reduced the initial mdef by 44 to hit 256 (300-44=256), it would still hit the max as soon as someone put the mdef to 214, and def would still eventually go over max as well. it could be made to reduce more as the base rose, but there would be gaps where the def didn't raise as much, and would take much more room in the ai. simply put, for how i am looking at it, removing the innate def doubling would be a great addition, because you can always toughen up the enemies without going past 255 defenses, as in making them level up, add more life, better ai, stronger hits, and then there is little need for a ton of defense.

not too many attacks would be going past 12000 damage a hit, and enemy hp can go extremely high (if all four bytes of hp for the enemies are able to be used, then they can have up to 4294967295 hp, otherwise it would cap at 16777215, either way, more than enough to not need massive defenses, especially since this isn't ffx where you are pretty much doing 100k a hit, and 16.5 million is a lot of hp, more than any good enemy in vii should ever need), so 500 defense is overkill anyway... if you want an enemy to be immune to a type of attack, you can always either make them null physical elements, or use the ai to turn certain immunities on. that's why i think the def should not be auto doubled, since we no longer need it enabled (didn't really help much anyway since enemies were normally weak anyway).
 
Orginal GS:
Def 40 (2x20)
Enemy data MDef value discarded, AI sets value 256 instead.
2nd Form
      Guard Scorpion's Def = 255
      Guard Scorpion's MDf = 384

Edited GS:
Def 40 (2x20)
MDef 256 (2x128)
2nd Form
      Guard Scorpion's Def = 255 (40+215)
      Guard Scorpion's MDf = 384 (256+128 OR 1,5x256)

Why won't this work? No need to halve Def/MDef


It takes about 1min to dish 1,44M damage. So it would take about 15 minutes to kill something with 16,8M HP :)
But once you get to that point, you have destroyed all the difficulty aspects anyway.
 
Last edited:
it wouldn't work because i am using the original stats, not lowering the initial mdef, and i am making it so that people can raise/lower it's defenses as they desire and still have it work fine, without ever making damage pretty much immune. so what i get is the original 20/40 def, 150/300 mdef, and have to make it work for ANY defense values entered by other people. if this wasnt added, def would always be:

1st - def = X (not changed until second, max 510), mdef = 256
2nd - def = 255 (possible reduction), mdef = 384

mine has a min/max of this in the forms:
1st - def = 0/255, mdef = 106/361
2nd - def = 235/490, mdef = 234/489

meaning that if i used your way, this is how things would be min/max:
1st - def = 0/510, mdef = 0/510
2nd - def = 215/725, mdef (+128) = 128/638, mdef (x1.5) = 0/765

if someone were to raise the defense using yours, they would definitely max out defenses in the second form, and the 1st form could get relatively high as well. i want the def to be raised to equal the normal setting, AND be able to be freely changed without maxing def (512+), and my way seems to work the best. the double def that the engine does is really annoying to me, since you have to work around it, and setting def to max pretty much assures a long, not necessarily hard, battle, where the initial def max would allow you to actually do a decent amount, and then it would make the editor think of other ways to pump up the enemy.

i really should start a topic of my own, so nfitc1 doesn't get flooded with things that aren't about his program... wait... too late :-P.
 
I see your reasoning now but I still don't see anyone putting 510 Def to GS's starting stat.

meaning that if i used your way, this is how things would be min/max:
1st - def = 0/510, mdef = 0/510
2nd - def = 215/725, mdef (+128) = 128/638, mdef (x1.5) = 0/765
I would have complete controll over it's normall stats.
And to prevent Def/MDef overflowing GS could have auto Barrier/MBarrier during 2nd stance.
That is after all the orginal intention of GS's AI.
= Halve all non-piercing damage during counter stance

If you wanted numbers
1st Form
      Guard Scorpion's Def = D (Min-Max 0-510) (Example 40)
      Guard Scorpion's MDf = M (Min-Max 0-510) (Example 256)
2nd Form
      Guard Scorpion's Def = D+((512-D)/2) (Min-Max 256-511) (Example 276)
      Guard Scorpion's MDf = M+((512-D)/2) (Min-Max 256-511) (Example 384)

This way there was no need for halving while keeping full controll over stats (0-510)

By the way, what happens when Def/MDef goes over 512? Do you start doing negative damage (instant death, similar to damage overflow)?
 
Last edited:
no defense doesn't become absorbed (damn >_>), you just act as if you have 512 def, since the amount of damage would always be lower than 1, and the game makes you deal one damage if damage < 1, and enemies weak to an element take double damage, so 2 damage :-P.

adding barrier defeats the purpose of my mod, since i am trying to give the enemies an exact replica of their ai/stats, just with bug fixes, things left out (sweepers smoke shot not adding blind, when blind was definitely intended as an example), and making stat changes hacker friendly. barrier is adding something not normally there. yes mbarrier/barrier would halve the damage, and would only really work for the second stage (a little more reduction for defense), but the first would still be off.

also, talk in my new thread, not here, so we keep his thread clean-ish :-P it is located here: https://www.ff7catalog.com/threads/5607/
 
Last edited:
both def and mdef are doubled by the engine, and yes it is true that enemies would need less room to have their def to go up to 510, since it is doubled initially. but, the thing is, enemies shouldn't need to almost null damage (255, the base max for the defenses halves all damage, except def ignoring things, and 510, the doubled max, would take the damage to pretty much nothing, around 1-100 for powerful attacks, since the damage done is damage = damage * (512 - def) / 512, making 10000 damage taken down to  ~40 damage dealt, a really big decrease. if an enemy had that much defense, then it is likely that they wouldn't have much life, or the fight would be really unnecessarily long, especially since hp can go pretty damn high.

yes, an enemy with 400 defense (200 base) would still take plenty of damage, but if you had a good ai, great moves, and ample hp on it, then that high of defense wouldn't really be needed. the main problem with most of the vii fights, is that the enemy ai is too simple, and their moves too weak. many enemies are too low level to be doing a ton of damage, and some at very high levels would still be very easy since their ai sucks. if you balance out the game well, and make it hard from there, then mass def boosting isn't really necessary, just overkill, and making the fights much longer than needed to be.

i guess that the def doubling is good for now, and will still be needed when my first compressed ai scene.bin is done, since the enemies will still be essentially the same, but when i make my REAL difficulty hack (want this done so that i have plenty of breathing room, and so that psx version users can still enjoy my hack, since it should still fit into the original iso easily), i am hoping that i will have a way to stop the initial doubling, even though it is likely many enemies late-game will be hitting the higher stat marks, and the end game optional bosses will definitely be taking roids, so only a few enemies should need past 255 defense, if they even really need it at all. usually, if you know the enemy ai very well, and have a very nice setup, you should eventually win anyway, but my hack is going to be cruel to the users, so massive defense would just be too much :-P.
well it is a problem with too low hp/def/mdef, I defeated red dragon without it even getting one attack on me, so you could give red dragon very high attack stats and a brilliant AI but it means nothing if it doesnt get a move in, this red dragon I defeated in one move had triple HP over the default, as I triple HP'd most bosses in my game due to fights that way too short, generally speaking I can finish most non boss fights (before modding) without them even getting a turn and most boss fights within 2-3 turns which was just ridiculous, the game seemed to be designed that the player would just rush through it on low level weapons and with no levelling up whatsoever.

The way I see it, every single boss in the game should be capable of withstanding a omnislash attack, kotr should make fights easier but not finish boss's of in one move.  Red dragon I thought at level 54 had the rune blade and omnislash charged up at start of fight, used omnislash which did around 2k per hit, and its dead.  The boss after that which I read many people find hard??? I have never struggled on this boss although it does moderate damage it just dies far too quickly like most other bosses so usually only gets 3 or 4 attacks in at the most.  This boss has strong magic defense (very strong on my mod) however I still beat it fairly fast with physical attacks, it got 6 turns in and it had quadruple over default hp, a dexterity boost of 30 so it had faster charge.  To get level 54 I didnt do much levelling, I did item collecting where I fought battles to stock up on things like ethers and x potions and once I got these to high stock 80+ I then would carry on playing the game, I did a bit of gil saving in junon area, but not what I would call excessive, and this had me on level 54 at the temple of ancients.

So the solution could be to make enemies give way less exp so levelling up is slower and the time you meet bosses you are much lower level but this would then mean getting to the magical level 99 and level 60 points much harder and less likely in a normal game, I do agree enemy AI's need to be improved especially on bosses and of course stronger attacks ones that hurt enough so that you do actually have to heal in battles and even consider fighting on the back row/use sadness, but doing this alone is useless if the enemy gets no attacks in, and the best way to ensure they get attacks in is to boost their hp/dexterity and defenses.
 
this should have been a post in my thread, since i moved over there to keep his thread clean...

first off, i am not really changing any enemies at this point in time, but when i do change things, i plan on reworking a lot of things. for starters, the initial level would be 1, but other mods do that, but i am going to rework the stats to be much lower than normal, sans maybe hp/mp, and make sources harder to obtain (no easy morphing... if anything they would be a rare drop from strong enemies, possibly rare steals as well from other things, but no way to easily stock up). weapon power will take a hit as well, so even at higher levels things will be troublesome (and ultimate weapons will be losing their mass damage boosting, being replaced with normal or other attack mods, but with a higher atk than the rest, and added effects as well), and the enemies will be pumped up, so not only will they become stronger, you become weaker, making extreme damage unlikely.

kotr will also be severely cut down, making each attack weak separately, but will still add up to more than the other summons. enemies will not have guaranteed stats, since i plan on implementing a levl up system for them, automatically using their ai to boost their statuses (levels and such, giving a random amount per level, so each enemy will be different stat wise, and it is possible to fight enemies ranging a few levels below to a few above you, but with a definite minimum, similar to ffviii's levelling system, but i plan on making it better :-P), and change their ai patterns based on their levels. when i finish my true mod (this one i am doing is just for a base that will be easy for anybody to build from, and should always fit back into the psx version unless you massively change the ai, since the size will be significantly lower, allowing for more changes to be made), it should be in no way easy, and tweaking the game after that shouldn't be too hard to do, so if it isn't hard enough, just a few modifications and it will be >:D.

my mod will take a LONG time to complete, especially since i am doing this one first, but when i am done it should give you a challenge :-P. and yes, the enemies will be giving less experience as well, and hopefully i can find something in the ai to check/set the current steal/drop item, so that i can also change the items gotten at will, and possibly give multiple steals from enemies.
 
REQUEST FROM AUTHOR:

Can we keep this topic solely on PrC and its fixes/bugs please? It would be ever so helpful to me in finding issues that need to be resolved. Any AI Editing-related comment should be in a different thread. Please only post in here if you have a problem with PrC or would like to see something added. It is getting too crowded in here.

Thank you.
 
So the solution could be to make enemies give way less exp so levelling up is slower and the time you meet bosses you are much lower level but this would then mean getting to the magical level 99 and level 60 points much harder and less likely in a normal game, I do agree enemy AI's need to be improved especially on bosses and of course stronger attacks ones that hurt enough so that you do actually have to heal in battles and even consider fighting on the back row/use sadness, but doing this alone is useless if the enemy gets no attacks in, and the best way to ensure they get attacks in is to boost their hp/dexterity and defenses.
I started my balance/hard mod from completely different perspective. Average EXP/AP is multiplied by 2 and boss EXP/AP by 5. This way player is about lvl 90 when they reach The Northern Crater and difficulty isn't completely ruined for those who wish to max their levels.
Damage multipliers removed from UWs. I haven't yet decided should I replace it with some other effect or leave them as "normal" weapons.
If Shield protected against non-elemental magical damage I would make KotR hit everyone on the screen (your own party included). So if you wanted to cast it and survive you would need some preparations or final attack+restore/phoenix. In any case the effect can't be made a lot weaker since the animation takes forever so it has to dish some damage. It's the MP cost that is the problem. If it killed you everytime you summoned it requiring you to use final attack+restore for example that would make miming it a lot harder. Or alternatively (1-3)xShield 180-540MP for preparations but if I remember correctly Shield protected only against physical and elemental magic damage. Items excluded.

If you wanted harder battles enemies need to have a lot stronger attacks than they do in vanilla/unmodified game. AI needs to be smart and it needs to react players actions, for example use spells like dispel and debarrier.
What I personally find annoying are the enemies that have 1 basic attack and 1 stronger attack and they choose their attacks completely by change. After that difficulty of the battle becomes dependant on players luck. Does it use it's stronger attack or do I get lucky and it uses it's weaker attack multiple times in a row without using the stronger one. Of course if the attacks had a different Att% with stronger attack having smaller change hitting I could understand why it chooses weaker attack over stronger one.

By the way is it possible to make enemies not use certain spell afer certain events during fight.

Example
start.flag=0

if flag=0
  select all cast Fire3
  if damage > 0
    set flag 0
  else set flag 1
  endif
else chew bubblegum
endif

I haven't touched the actual AI-data yet so I don't know how it looks like or what commands it uses. That's way my crude example


edit: end of OT
spam secondadvent's topic insted from now on https://www.ff7catalog.com/threads/5607/
->
 
Last edited:
REQUEST FROM AUTHOR:

Can we keep this topic solely on PrC and its fixes/bugs please? It would be ever so helpful to me in finding issues that need to be resolved. Any AI Editing-related comment should be in a different thread. Please only post in here if you have a problem with PrC or would like to see something added. It is getting too crowded in here.

Thank you.
i was trying to... i even made my own thread and posted the link to it, but it seems that people like to crowd your topics :-P. something buggy i did notice is that when the scene lookup was off (from shrinking too much), and i allowed PrC to fix it, every time i saved it after that it kept popping up with the same message box, so i am guessing that the scene lookup fix isn't quite working, because when i opened it and updated via hojo and came back here, the scene lookup was apparently fixed. it could possibly be that it doesn't update the kernel as being fixed until after reopening the scene.bin, since i only reopened after coming back from hojo.

also, not directly related to PrC, when i updated a fresh kernel with my mod, the file size actually grew, so that it wouldn't fit into a psx iso (testing to see if def was doubled in the psx one... it is btw), but when i opened it with WM and just saved it, the size became SMALLER than it originally was... what is up with that?

everybody can spam me instead... i dont mind ^^.
 
Last edited:
Status
Not open for further replies.
Back
Top