Author Topic: hard/balance mod... those interested please let me know :wink:  (Read 21559 times)

secondadvent

  • *
  • Posts: 287
    • View Profile
im actually making enemies keep up with your levels, and trying to keep them strong enough to pose a threat the entire way through the game. i can easily make an enemy be above or lower level than you are (i have it make a random choice right now, from 0-x, so it can be at or a few levels above you constantly, but making them lower is also possible, i'd just have to make error checking so it doesn't make an enemy lv 0 or possibly underflow to 200 some). when i get the equations ready, then the enemies will be getting tweaked and ready for action >:D.

the way things are now, this could easily become a "don't level up too much or you will get pwned!" mod, since hp growth gets much higher, and the stats i plan on keeping very high, to give you a run for your money. the ai will also be worked on to make things even more evil for you, but the stats come first :P. i don't think too many places are going to be safe when i get done with this XD.

ok, the equation i need is kind of like the inverse of the exponential equation (usually needing the square root function), but would have to be done without any exponents or square roots at all, because i do not have the space to implement them (or know how to implement square roots :P), but can't grow extremely fast, and still has to occasionally gain a point or so at higher levels, but not too much. i know it is a lot to ask, but it is the only thing between me and getting the modding on. what it needs to do is model a square root curve similar to this one:

i can easily mod from once i have an equation to make it fit my needs, but without being able to square or use the square root, i'm at a loss as to how to make a curve similar to this one...

an equation like the one used to level the party, but using a few specific things (level, base, possible whole random amounts, and a single value or two that do not need to change) rather than different mods for certain level ranges would be exactly what i am looking for.

hmm... i will see if i can't do just that, make something similar to the used leveling equation, but using an amount that changes as the level increases (as a part of the equation itself with some random factor or something), to a lower multiplier, so a progressive leveling equation that doesn't have an exact flow. i don't know how well the equation will work without a loop (i don't remember the equation off hand >_<), but i will see if i can't tweak it to be more friendly for ai usage.

ok, i have part of it figured out so far on how i will do it, looking something like this:

((base+(gradient*level/100))+(**))/2+(level/num)

**i do not have this part done yet, but it will modify the gradient (lower) and possibly the base (higher) based on the level, and will be added to the base equation and the average will be the result the enemy gets. the second little part is for a slight boost every so often to the stat since what i did do so far seemed to be a little behind what is normally gotten via doing levels separate, and may be removed when i finish it if no longer needed. if i get this one done and it works pretty well, it will be a smaller equation than the one i am having for hp now, but it would be nowhere near as good as the one i have now, so i will stick with the bigger one.

the growth affects the starting point for the specific group of levels higher needed for lower slopes, and the gradient affects the slope itself, and would need to shrink with gained levels. the first 30 levels actually gain a larger slope, then quickly drop (like a roller coaster going up a hill before falling down) over the rest of the levels. all that needs to be done to the equation is having the base slowly then quickly raise (would have to stay close to the amount that would be the final value for the previous base/gradient group, which is harder to do), and the gradient slowly then quickly drop (if it can't be made to slowly increase before the drop, it can just drop slowly, which is easier).

so the hardest part to do is balancing the base's growth amount, because it has to be close to the actual amount that would be earned, and i may have to actually follow through the normal equation to actually see what the growth would look like for every stat on every enemy, which could take some time, unless i figure out a decently close way (cannot be under, because they should never level up and lose stats) to emulate the growth, yet another equation in an equation). the finding the average part just makes the growth more smooth as it switches, and makes the outcome slightly higher (somewhat fixing the issue with the stats being too low as compared to the usual, and at lv99 using the averages, it kind of set the starting and ending points of the growth), but it too may be removed depending on what i come up with.
« Last Edit: 2009-06-29 01:44:35 by secondadvent »

secondadvent

  • *
  • Posts: 287
    • View Profile
ok, i was tinkering around with the hp one (i think i have the other stats equation done, it just needs some tweaking, but isn't the best, but is smaller than i expected, so i am ok with it), and with my current hp equation, the minimum level 99 hp for an enemy is 10k hp... that is a lot of hp (if their base hp were only 1, i cannot directly tweak it any lower than this... this is the absolute minimum, other than from the random variance), but raising the base hp does boost the max hp a good bit at lv 100 (255 has 71k, 1 has 10k, so big difference, and this is without changing the modifier, it can become much higher than this... 2000 base hits 2 million at lv 100, so it can be dangerously high :P).

as of right now, my base stats equation starts a little low (going to add a number to it to correct it for now... adding a 3 byte band aid will be easier than remodeling the entire equation), but does reach a relatively high amount (grows fast then slows down), but i am still having little issues with it wanting to go down a point or so every now and then (only in the 180+ range right now, so no big deal earlier, which works as it should). the enemies do not always gain attack every level up, but will gain enough to make them as strong as needed. if i can tweak the MP enemy to work relatively well, then i should have no problems doing it for other enemies.

the only stats i am worried about are evade and luck (possibly speed as well), because i do not know how well they will react to my equations, but i guess we will find out soon enough :P.

hmm... it's size is actually pretty close to the HP equation's size, so i still expect to have some size issues, but i am beginning to give up on having the size at or around 400-450 bytes max per enemy and still doing what i want it to do... i will just have to work around my issue. or maybe it isn't that big... i use the enemy's level twice (could actually shrink the size by allocating it's level to a variable), an most of the size of the excel equation is just from the ceiling command to emulate ffvii's division, but i do still need to add random mods (will use the same as the hp one, it works well), so it will still increase in size.
« Last Edit: 2009-06-29 02:02:16 by secondadvent »

obesebear

  • *
  • Posts: 1389
    • View Profile
I am definitely looking forward to a more complete release!  Keep going strong!

Izban

  • *
  • Posts: 432
    • View Profile
how long till the first release

secondadvent

  • *
  • Posts: 287
    • View Profile
dunno yet... depends on how smoothly everything flows together. i may make an initial release up to air buster without much other ai modding, so i can get a feel for their new growth, and then i will work on improving their ai... if i do it all now, it will take longer, and they could be less nice.

i think by either late tomorrow or tuesday the enemies should be modded and tested, but the newer ai will not be added in yet. i will go through a few times to see how deadly the enemies will be, at lower levels for now the enemies may be much weaker than at higher levels, but i hope to be able to smooth that out soon after getting the ai done.

the releases will not be that fast, i will have to make the enemies level up nicely (not too hard once i get used to my new equations, essentially copy&paste the equations, and just tweak the values), and make sure their ai works nicely (and if i learn new sections of the unknown ai data, i will be updating the enemies :P), and on top of that, i have to make my other mod, the compressed ai mod progress as well, because i will need as much space as possible for this mod. the ai will become pretty simplistic at first (it already is, and without keeping it exactly like the original, it can be made much smaller doing like 80% or higher of the same thing in very little ai space), but the releases will have better ai than i start with.

basically, since i will be doing two mods at once, it will take a little longer for each release, though in either case i would still need to shrink the ai so it the leveling part would still fit in, i am just taking it a little farther :P. this first release will be by far the worst, and slowest to get out, which will change in the next release, and will have the same distance covered, but with the improved ai (changes as the enemy levels). the first release will only be showing off the enemy leveling ai, and to see what you guys think of it (and to see if i made any bad mistakes :P), which i hope to evolve as i go on as well, so any better methods are still very much welcome ^_^.

and just a fair warning, hp is going to be pretty high in the beginning (and even higher in the late-game O_O), so magic may be even more useful because of this, and physical attacks are going to be very weak compared to the magic at the beginning, but after a good bit of levels, it will become more useful, but i am going to try and make it so that magic will be more useful than physical attacks most of the time (probably have higher mp cost), and the massively overpowered magic will be majorly dumbed down, for example KotR will have a modifier of 14 instead of 80, so slightly less than double the damage a level 1 spell would do, but at 13 hits, that is a lot of damage still, and is still better than say bahamut zero by a decent amount. the party's stats will also be rebalanced, the cap for stats gained by leveling may be reduced (depends on how much of a fight the enemies put up), and either way sources are going to be made much rarer... as rare steals/drops, and no morphing to get them, so if you want higher stats, you will have to work hard for it. limits may be harder to obtain as well, taking more kills and uses to gain a new one, and taking more damage to actually fill the gauge. when the game starts, cloud will be at level 1, and "may" be given a restore materia right off the bat if the enemies are too evil, because in my other mod (one i made for myself, which made it to the shinra building), it took a while to gain enough potions from farming to survive guard scorpion (i do not think this one will be "that" hard at first, but battles will get much harder as you level).

what i am doing right now is adding the equations into the ai, but i know for a fact that the size is going to be pretty big, but will be rather easy to add to every enemy, due to the copy/paste function XD. any tweaking that will need to be done (outside from actually changing the formula) is as easy as finding the modifier i want to change, and changing it, the formula does the rest of the work. i am still having slight trouble with the equation for regular stats, with it being too low at first (added a band-aid), and depending on how i divide the level, it can still end up lowering a stat or two in the 180+ levels, but at that point gaining a level balances out the drop, and still causes more damage, so it could be working on it's own :P. i can fix this easily enough by changing the number level is divided by, but it lowers the overall gain, although i could counteract that with a higher base... see what i mean?

just to show the current equations, so if possible someone can build onto them (by build i mean make better and in a smaller package :P), that would be very much appreciated ^_^. remember, i cannot easily do powers, or square roots (have no idea how to emulate square roots), since there is no known opcode for them, so it has to be done without. the only value that changes over time is the level, so it is the key piece in the equations, and all growths/deductions are based off of it. also, and time a number is divided, the game rounds up to the nearest whole number, so .0000001 is 1 (at least i think it always rounds up with division), and the final result is rounded down to the nearest number. all non-hp stats (except defenses) cap out at 255, and any higher will overflow and that is a bad thing, but defenses should have the ability to be raised past this limit if desire (though most equations would allow for this anyway). the hp growth should start small, and eventually start gaining much more (based on the base amount), and the other stats must grow a good bit at first, and then slow down afterwords. i prefer non-looping equations, because that usually means less work for the game and less space as well, but if you can come up with a really simple loop that would do better than my current method, and take little space, i will use it instead. ok, enough yapping, and now to show the equations:

HP/MP:
(level+(base*random(between 20 and 40)/30))*(level+(base*level/level mod)*random (between 20 and 40)/30*mod)

other stats:
(base*level)/mod+(gradient-(level/level mod))*level/100+mod2

the level mod on the hp/mp one is usually going to be 255, and in the other one will be dependent on the gradient, a high gradient can have a smaller mod, but a small one needs a big mod, because otherwise stats start to drop fast, so it has to be balanced pretty well. i do not have a random mod for the second one yet, because i am still working on the equation, and it will take 2-3 random mods, depending on how i want it to go. i "could make a single random mod as a variable used for all stats, but this way it makes certain enemies more powerful in one stat than others of it's race, and can be worse off in other areas, making them more unique (its teh pokemonz!!!). the mod 2 of the other equation is for the band-aid, adding a number at or around the base amount, since the first few levels are pretty low, due to the base*level/X thing i have, but was the only way i could think to make it work right at the time... i could make it add instead of multiply, but i don't know how it'd effect the stats yet :\.

yep.. yet another humongous post... i need to see someone about that or something o_O.

ok, i noticed that the random mods are not going to work out too nicely, bacause to do a between 20 and 40 thing, i have to add while in the middle of multiplying, and that would not work regularly, so i will have to make a variable to hold the random. because of this, i am only going to use one random instead of two (as in one random amount used for both places, instead of two separate randoms), using the variable instead, which shouldn't make too big of an impact to the overall amount, but won't be as unique anymore (still a 1/20 chance of seeing the same stat enemy, IF they are at the same level. this means it will be this way if i add randomness to the other stats as well, just one variable for the randoms, but each stat will use a different random number, so it will be reset each time. im going to actually have to rewrite the entire thing as i program it in, so that the addition/subtraction is all done last, since i cannot place things in parenthesis to do certain things before others, so for some of it, the size may increase more than it should.

i have hp implemented now, which took 67 bytes to do because of order of operations, if i could use parenthesis, it'd be much smaller, so hopefully it works in-game.

ok, fixed... i forgot to set the variables to be four byte variables... they were overflowing *facepalm*... now it works, and the enemies now have increasing hp levels as they level up.

since the base is going to be manually set by me, there is actually no need whatsoever for the stats in the scene files... calling from those takes 7 bytes per use, and just putting a set number (what their base actually is) takes only two-5 bytes per calling, and i should never need to use over 3 bytes for it, because only hp can go to the 4 byte mark for base, and if i set even 2000 (a two byte value), the lv 99 hp would be around 2 million, the max for two byte values would overflow because it would go too high ^_^.

ok, the second equation is fixed now as well, seems it didn't like me reusing the variables without setting them back to 4 byte variables, which takes no different amount of room in the ai, so no biggie. now the MP enemy has boosted attack (can now work on the other stats), but i am not pleased with the amount... i think i will make attack start in the 20ish area, and just reduce the modifier so that it slows down growth to where i want it to be, but will stay strong throughout, instead of getting strong after leveling a good bit. but that will be for tomorrow, i am going to sleep :P.
« Last Edit: 2009-06-29 22:32:41 by secondadvent »

secondadvent

  • *
  • Posts: 287
    • View Profile
ok, before i work on the actual enemies today, i am going to work on my excel spreadsheet, to add the updated equations in (taken from my test spreadsheet) written in the way they are used in the enemy ai, and using floor/ceiling when it actually happens. this will be for all stats, and should make it easier for me to program the enemies in, just mess around in my spreadsheet, and then put the values into the game, which is much faster and easier (also more accurate) than just going off of in-game data alone, so this should make things easier for future additions.

i also plan on implementing the moves the enemies use (just the name, power, and attack type for now, more can be added as i get farther), and a little defense box that i can change, so that i can make the damage equation put into the spreadsheet with the random variation and defense checking, so that it gives a very accurate in-game value for damage done in an attack. i will likely also make a party data section, so that i can just use the level up formula they use so that i do not have to constantly check for their vitality, and include an armor section so that that defense is accounted for as well (all that would need to be changed is the party's level, and that would also level up the enemy's data as well, so a fully functional spreadsheet working like the game). sources will not be accounted for though (and i plan on making them very hard to get anyway), so the values will be for the absolute highest damage. this may take a couple hours to do, but it will speed up my progress speed for the stat section massively.

so basically, this will emulate the battle, for what every attack would do, accuracy, critical chance, and whatnot, all based off of the enemies themselves. it will also be released with the mod when it comes out, updated to the point i am at, so that you can see what you are up against before actually fighting it (if you want to, or you could just go running in yelling charge! XD).

heh... i saw the mechanics guides update right before my eyes XD... just refreshing the gfaqs page and BOOM! new versions appeared O_o.

i think in the near future i may change back to using loops for the main stats, and instead of making a whole list of values for the gradient used, i will just modify it based on the level, and keep the smaller equations to do the work. it could still end up being the same size or bigger, but would fix the issue with higher level stats, and would be easier to keep track of... so i really cannot say when the next release will be out if i do decide to change that now (not likely), and even if i keep it the same i am still behind schedule. all i can say is, it will be out when i feel it is working decently enough to be released, so i will not be saying exact time frames now, just wait and we will see how long it will take :P.

bah... i do not know how to make a loop in excel >_>. putting in the character stats (and the modified enemy stats, if i return to looping) will be difficult to do... i'd have to make a chart to list every value for every level, but it'd make comparig stats much easier... kinda like with my DQVII chart for recruitable enemies.


ok, what would you guys think if i just used a simplified loop to do what the party's leveling feature did (no 100 stat cap though), and after that was done, added a specific amount (could be random) to act as a piece of "equipment"? it would fix my early problem of having too low of a growth for the stats (which is semi fixed now by doing this, but it causes the stat to grow more, where equipment has no effect on that), and i could modify HP/MP to have an even better equation (since the one i am using, which works wonderfully for the most part, makes the stats too high, with a minimum of 10,000 hp at level 100, which is nice, but i like more freedom ^^), which grows at a much nicer rate, and in a hopefully smaller package. this WILL set me back even more, sadly, but if i can make all of this work very well, the growth of the enemies would be easier to control and mod, and would grow at a much nicer rate, and hopefully allow for more space in the ai to do even more (but the game would have to loop level-1 times, which wouldn't be pretty for the psx version, but in the end i doubt i will be able to fit it into the psx one when i eventually reach the end of my mod anyway :P). i will still keep my current equations for now, but once i make another one work well, the older ones are being replaced.

i think that will have to wait a bit though, i havent played any games (other than to test in vii) in almost a month now, so i think i am going to play nao XD.
« Last Edit: 2009-06-30 02:56:36 by secondadvent »

Chocobo

  • *
  • Posts: 35
    • View Profile


Quote
ok, what would you guys think if i just used a simplified loop to do what the party's leveling feature did (no 100 stat cap though), and after that was done, added a specific amount (could be random) to act as a piece of "equipment"? it would fix my early problem of having too low of a growth for the stats (which is semi fixed now by doing this, but it causes the stat to grow more, where equipment has no effect on that), and i could modify HP/MP to have an even better equation (since the one i am using, which works wonderfully for the most part, makes the stats too high, with a minimum of 10,000 hp at level 100, which is nice, but i like more freedom ^^), which grows at a much nicer rate, and in a hopefully smaller package. this WILL set me back even more, sadly, but if i can make all of this work very well, the growth of the enemies would be easier to control and mod, and would grow at a much nicer rate, and hopefully allow for more space in the ai to do even more (but the game would have to loop level-1 times, which wouldn't be pretty for the psx version, but in the end i doubt i will be able to fit it into the psx one when i eventually reach the end of my mod anyway Tongue). i will still keep my current equations for now, but once i make another one work well, the older ones are being replaced.

I don't get it... STILL! Just what is this 'specific amount'? How could it act as equipment?

secondadvent

  • *
  • Posts: 287
    • View Profile
i would just be adding a set amount to the enemy stats, along with the equation for their level up stats, so without this added amount, they would be pretty weak (like your party without any equipment), and giving the added boost will make them jump up tohigher strengths.

if cloud were to be level 99, and have his max of 100 attack, he'd be pretty decent if his sword had 0 attack (so like a much lower level cloud with a good weapon), but would be better with a weapon, and adding the  set amount to the enemy is like having them have a weapon as well, but it'd be the same weapon for every level (same with armors). i am not actually giving the enemy equipment, i was just comparing what i plan on doing to the party.

i am choosing to do it this way, because it seems to be easier to have a little equation, that raises the stats at an okay rate, and just giving it a little boost, than actually making something really big that does it better, mainly because size is an issue, and i cannot get a good enough equation made to not have to do that :x.

basically, it is just a simple way to fix a big problem, which will last until i find something better, if i ever do. if not, then it works perfectly well on it's own.

alright, looking at the one i was going to switch to, ive decided to stay with this formula and just give the "equipment" boost in it (already giving a little boost, just make it bigger). i know i change my mind a lot, but i can't find anything to fit just right, so i will just have to use what i have.
« Last Edit: 2009-06-30 17:38:11 by secondadvent »

secondadvent

  • *
  • Posts: 287
    • View Profile
okay... now that my school stuff is finally taken care of, i can now get back to hacking (i had to register for summer classes (yes, i know... but only because it is online... i am getting straight a's XD), but the school didn't have my stuff sorted out yet, so i had to call them myself so i could register before the deadline <_<).

not sure if i will pick up today or tomorrow... i haven't gotten more than 15 hours sleep the past week... and it is hard as hell to get any sleep around here to begin with <_<. *shoots self with tranquilizer dart* much... bet... ZZZzzz...

ok, i think i will be staying away from vii for a little bit... so the mod will have to wait :\. if anybody decides to post here, i will answer when i am on, but i think i will be talking less about what i am doing here, until i get something big done, or need some help. *lots of cheering going on in the background because i am not talking much anymore* shut up :P.
« Last Edit: 2009-07-03 00:50:31 by secondadvent »