A slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=1905.0 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index3916.html slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1905.0 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index3916.html.z x .g^ P, OK text/html ISO-8859-1 gzip 0| Tue, 10 Mar 2020 06:21:26 GMT 0 0 P .g^
Print Page - Apropos of nothing (except of course FFIV)
Board of Slick
Library of the Ancients => Final Fantasy IV Research & Development => Topic started by: chillyfeez on December 19, 2013, 06:29:25 PM
Title: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 19, 2013, 06:29:25 PM
Ok, in the interest of appeasing the programminatrix ;) We can use this thread for stuff that isn't really big enough for its own thread.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 19, 2013, 06:38:42 PM
Yeah, LordGarmonde. You can target the character like normal, but if you perform an action that targets only "hidden" character(s), the action just won't be performed. This includes healing actions.
What I hope to release soon won't be a full game by any stretch, just a playable preview of the full game I'm working on. I have the whole plot planned, and I've got all of the characters made, but I won't have the whole thing done for a loooong time still, I think.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 19, 2013, 07:32:55 PM
Your idea to take away Hide's visual to make the character "invincible" is curious, but how do you plan to limit it? You could tie it somehow into the auto-turn start "clear" that the game uses to rid of Defend or do you plan to use it just as it normally is except without the "hiding" portion of it? I am sure though that you have a plan to work for that.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Displacer on December 19, 2013, 08:01:00 PM
Yea we did kind of hijack her thread didn't we? My apologies for my part in said takeover PP :)
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on December 19, 2013, 08:36:09 PM
It's true - and you can all point the finger at me for much of the recent transpirings :biggs:
My apologies as well; especially to Pinkpuff.
But the corrective measures have been made and so we move on. :cycle:
:edit: Love the name of this new thread btw - perfect!
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 19, 2013, 08:46:34 PM
Many battle commands in my hack are all kinds of messed with, Grimoire. The invincibility Limit skill works like Regen - that is, the character performs an action that turns some stuff on in battle, then auto-readies a second action that ends said stuff.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 19, 2013, 08:47:33 PM
Ah, that's a neat way to go about it. Have you touched the Magic routines at all? And if so, what means did you use to alter them?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 19, 2013, 10:11:01 PM
If you mean individual spell routines - yes, there are some custom routines - mostly monster abilities that mimic blue magics from other FF games. If you mean the actual spellcasting routines - no. Do you have ideas about how they could be improved upon? My goal, since my hack is an after after years sequel, is to not take away the basic feel of battle, but still introduce some new abilities to keep it fresh and exciting.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 19, 2013, 11:29:38 PM
Hmm, yeah I was referring to White/Black/Call/Ninja, the only things I would change in regards to those is have Call be fueled by Wisdom+Will/2 and have Ninja fueled by Agility. I couldn't think of anything else that could be used for the basic spell-casting commands.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 19, 2013, 11:43:09 PM
Can you change Ninja's stat independently of Black's stat? I thought they were the same thing except for the name.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 20, 2013, 12:47:36 AM
They are. Anything past 19 is considered to be fueled by Wisdom. This plan would have to include extra stats to look at past Flare (Ninja) then Wisdom+Will/2 for the Summons and then back to "Spell Power" for monsters spells.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on December 20, 2013, 03:55:32 AM
No apologies needed! That's the nature of conversations, they drift...
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 20, 2013, 09:42:23 AM
They are. Anything past 19 is considered to be fueled by Wisdom. This plan would have to include extra stats to look at past Flare (Ninja) then Wisdom+Will/2 for the Summons and then back to "Spell Power" for monsters spells.
Hmm... tbh, I hadn't looked much at the magic portion of your research. I probably won't touch it for the preview, but it's definitely something to consider for the final product.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on December 21, 2013, 05:23:41 PM
I tried it on my 1.1 ROM clean - then after just opening & saving it with FF4kster - and then after actually changing the first Sing call (to Exit). No trouble - used Sing many times random distribution of the 4 choices. I'm sorry to say that it must be your copy of the ROM. Sorry I can't be of more help on that vivify93 - I hope you get it sorted all sorted out.
Also, as a note - Edward Singing Exit is good for a chuckle - since as the battle fades out it the message pops up with "Nothing Happened" - Has anyone ever looked into reversing that order so it is Message-then-Effect?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 28, 2013, 12:41:07 AM
In theory its not a difficult thing to do. All of that information is, as a rule, at the end of the routine for space saving purposes because the message is loaded by the chosen spell for the effect. It would take a little bit of clever coding, but it can be done.
So, in other news I figured out what makes Cecil and Paladin Cecil the de facto main characters and its a very simple, stupidly simple explanation...
In the event scripts themselves there is oftentimes near the start "Change Character Graphic to 1 (01)" for Dark Knight Cecil and once the Paladin is expected to be in the party that changes to "Change Character Graphic to 11 (0B)". So in essence with enough elbow grease you can have Anyone be the main character... if you're willing to change every instance of the "Change Character Graphic to X" This escaped my noticed because I thought it was looking at something at the end of an address. And with that I think I will soon be able to release my Solo Rydia Challenge Patch. It's a very simple patch with the only purpose is in taking a Child Rydia through the entire game alone.
Good news, main character doesn't Have to be Cecil. Bad news, it means I'll have to look through Every Paladin event and change every instance "Character Graphic 11" to Nothing.
Give and take, as they say.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on December 29, 2013, 01:43:30 PM
"stupidly simple" - Could not have been stated better :wink:
- But I love stuff like that so nice catch.
I just watched a video of someone playing through the SNES FF2 cart glitching their way through trying to set the world record.
The way this guy knows how to exploit the game I'd think it'd be you in disguise - if not someone else on here :tongue:
Check it out if you're bored (or want something running in the background while you're working - guilty!)
Part 1: http://www.youtube.com/watch?v=bn5tvtP6LNk
Part 2: http://www.youtube.com/watch?v=220sKx2AuFo
- My personal favorite is overflowing Tellah's MP and casting Meteo on Baigan - neither he nor his arms saw that one coming. :finger:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 29, 2013, 01:53:22 PM
I started watching this a while back, didn't see too much interesting within the first five minutes and left it there. Though now that you mention a fair amount of glitching (and what a glitch that seems) I'll have to check this out!
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 03, 2014, 04:54:57 PM
Hmm, any more suggestions on what I should look up? Left to my own devices I ordinarily just procrastinate on matters or try to make a new ability or something, but when I have a focused goal I can go a decent way to accomplish it.
I know what you mean - I've had my ASM code for giving items to the Fat Chocobo when characters leave mostly written out for weeks - just haven't finished it off or translated it to hex. I'm not 100% sure on where to stick it in the code so that, of course, will be a factor; but yeah, I know what you mean. I don't have anything that comes to mind (of course I'm sure later when we're all busy...) but there is something I've been thinking (dreaming) about most of the day:
It just strikes me wrong the way this game is set to handle leveling up - look at what we just ran into. The stat gains are fine, 1 byte, enough variance to not bother me in it being stored in a table - for now anyway ;) - but HP & MP gains...I just makes me want to come up with a better way. Just to assure myself I took DK Cecil's data (7B528-7B653 in an unheadered 1.1 ROM) and broke it out into 5 byte segments per level from 10->11 up to 69 -> 70 - just as Square wanted...and yeah, just like I thought - 3rd byte for DK Cecil: 00 all the way to Lv50 then 20 until Lv60 and 40 until Lv70.
- Maybe I've looked too deeply into this - but is there not a pattern there? :wtf: oh Square, there would be no Final Fantasy without you; yet... :sad:
OK - sarcasm aside HP Gain is a similar story, changing only after each set of 10 Levels: 14 -> 1E -> 28 -> 32 -> 3C -> 46
So my idea is this - given that there is a pointer to exploit for every Actor can we not write some code to replace most of the table storage. As I see it has a few advantages:
One of them, obviously is just freeing up some space in the ROM (probably not a lot trading it off for the necessary algorithms) but I think there's some gain to to be had though a more beneficial consequence is that it would eliminate the problem that was just run into swapping characters around. It won't matter that Tellah doesn't have data from Lv 10 - 20: it can be calculated as needed.
Another one (if I'm thinking of this correctly) is that it removes the need for the Shadow Party - right? The big problem Phoenix had was with experience and how to handle it. It would take more than the above - but the same idea. How does everyone feel about the idea of making experience gains likewise a predictable function of level if it is not already - I'll find out ;) But then the only floating issue is stat gain; But that can be done by expanding the data that is there to give everyone a set from leveling from Lv 1 to 2 all the way to 70 and then handle the 70 - 99 as appropriate...or try to pattern/randomize that as well.
What do you think? Anything you got I'd like to hear. I will say this is very much my kind of project so if I can get support for most of the coding I'll be very happy to go through the tables as the are and pull out existing patterns. Whatever can't be patterned directly I'm sure I can find a formula - Excel should be able to - because if it's a formula too complicated for Excel then it can't be coded in Assembly anyway :tongue: Also, I don't just mean I'll put the data in Excel and then just hand it off - I'll write out all the algorithms in terms of logic - I just need good support when it comes to writing the code and then getting it into the game.
Cyan over here has it right - when it comes to coding :isuck:
But I love math - and programming: strangely I'm just really good at one and really bad at the other. :hmm:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 03, 2014, 09:08:58 PM
That is very ambitious! The Level-up system has given me my own kind of headaches, and I would honestly just trade the whole thing for 99 levels of random level ups as FFI did. But I am a lover of the Random (don't get me started how much I absolutely hate FFIV's AI because randomness is not even a possibility, despite it being a large part of FF AI until FFIV.) I still need to think of a way to randomize location and hook together something so the enemy index goes up +1 each map, maybe use that faux random chart from 1900-19FF for my Roguelike project... But I'm digressing...
How long is the code? Chillyfeez found some spare code at "the last ~110 (hex) bytes in the 30000s (LoROM) are free." But... that's battle normally. We don't know how the game would react in certain circumstances when forced to use data from possibly a different bank.
I'm a bit fuzzy on the particulars of where this is all located though, such as where are all these pointers and the like? Perhaps just manually switching the pointers to the Level 70+ data might do what I'm looking to accomplish.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 04, 2014, 10:40:34 AM
Extremely! :laugh:
I actually have a lot to say - I've been working on it on-and-off all night bouncing between that and actual work - stuck working out some algorithms for Photoshop - everything has to have their little querks...but anyway - I'll post my level findings later, I don't want to break my gate now - but I have a question if you are awake :tongue:
What are the mathematical capabilities/limitations of Assembly as you've worked with it through these many FFIV adventures. DK Cecil, for example, has a perfect cubic function for his experience data as a function of level - but cubic functions suck to deal with at this level - I remember that from FORTRAN.
Anyway, I'm interested to hear your thoughts, you've worked out many fine algorithms so I leave the question with you - and anyone interested in coming onboard; of course - all are welcome!
- Also: If you have a good reference for Assembly when it comes to computation I'd welcome that as well - I have my book for C that I use for everything, but they are asking too much of the 68516 :eek:
One more thing while I remember - when you have a minute run the game and watch the RAM at 7E0FFF - one byte before the party data starts - it's cycles like crazy and seems to have quite the range. It runs whenever the world map is up - and other times as well (on the Lunar Whale for example - so that's still counting as out in the world even when on deck) - Anyway, that may be a place to snag an at least partially random value. I'd love to take a look at the table to which you earlier referred as well - very curious to see.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 04, 2014, 11:19:16 AM
Hmm... how do I say this without sound like a complete idiot...
I can understand 65816 ASM for the most part, this is due to over a decade dabbling in hacking and ASM. Starting with Zelda 64 way back in the day, then Final Fantasy Tactics for several years, then I started to take a serious look at FFIV and with the knowledge I learned from that I went back to Zelda 64 where I cracked open some pretty important findings then came back here where now I can read the ASM as if they were words on a page.
But I am Terrible at Math, to be honest I'm not even sure what is meant by a cubic function for experience data as a function of level. I think it may mean that something is being put to the 4th Power? But when it comes to Math, I am a bit of a dunce...
As for what I used for reference, that would be... http://wiki.superfamicom.org/snes/show/65816+Reference
It really helped (and continues to help me) understand the more obscure commands or things that I wasn't sure of. For nearly ten years I was under the impression that BEQ/BNE/ and all of that was referring to if it was equal to some value and knew nothing about CMP's until I started to work with FFIV. Quite embarassing.
But I will take a look at the data if you'd like me to. Maybe I can make some sense out of it... possibly.
Now that is a quickly rotating byte! But what is this data...? I never gave thought to the functions before the Main Stats, there's quite a bit of specifics here it seems.
Thanks for this lead though. It might just be a catalyst down the line.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 04, 2014, 01:07:13 PM
It sounds like we can make a good team then - I can handle the math all you have to do is make it worth something. :tongue:
Though I kid it's kinda true - I could crunch numbers forever over here - but without someone to write usable code it's kind of a dead end project.
You're not a dunce - dunces can't write code especially not the volumes you've engineered - you just don't have an ongoing affair with math like I do that's all :wink:
That said - don't bother with the data (obviously you're not forbidden) but that's what I can contribute - when I finish the analysis I'll have a set of instructions that will say:
If Rosa's Level is between 10 & 70:
Take her current level + 1 (i.e. the level she is going into at this level-up) and multiply that by 3
Add that to Rosa's Reference Value Stored at $XXXXXX
Add this to her last recorded "To Next Level"
... blah blah - whatever it ends up being (it won't be that but along those lines) - but that requires access to a multiplier - and if powers get involved that's a real problem - but the sort of thing I'm no good at.
I've got some tricks up my sleeve to try and keep the math as basic as possible so that the processor at least has a chance.
Quick explanation on functions (my apologies for my presumption) - I've been a TA for years, I should know better...anyway:
Cubic function - fortunately not 4th power, only to the 3rd - but it might as well be to the moon for the level of arithemetic this processor is designed for - and yet what we get out of it will still amaze me forever. Basically what I was getting at (a little in question atm - I found a bug in Excel throwing me off a bit - but it should still work) is that to a very good approximation there is a cubic function that can take as an input your current level and using only that a few reference points I can give you back the Exp. requirement for that level:
So Experience Needed @ Level X = a*X^3 + b*X^2 + c*X^1 + d for a set of constants a,b,c,d determined by modeling the data
- My note about Cecil is that from Level 10 up to 70 I found set of numbers to plug in for a,b,c,& d where the result is close enough to the values in the table to give an R^2 value of 0.9999 which is extremely good about 99.98% accuracy - I wish I could get that with my work data...
So I think that's it for now. Hopefully that description made sense - especially in terms of what I'm planning to hand off at the end of this rainbow. To elaborate a bit more I would think that there will be needed one major algorithms, and then a bunch of break points & shifted references to plug in certain numbers for certain characters - but I think we can do it.
I know the patterns are there - it's just how complicated they are that comes into play. I left Cecil alone for a bit and looked at Rosa's Exp - looking at only the 1st 10 levels I can write a reasonable function that is only to the first power in level - that's doable. So if I can get away with linear (a*X + b) approximations I think I'm home free - but we shall see.
Also furthering the 'you're not a dunce' point - you wrote up code for Magic Swords - which not only acknowledges it as one the best abilities ever - but it's just plain awesome to have the ability at hand. Outstanding work! :childish:
- One last point - I have no idea either what that crazy looping byte is about - maybe the water updating? I agree though, while not a slam dunk solution for a randomizer - definitely a possibly jumping-off point. That's something I'm thinking about for this project as well - very likely whatever we bash out to calculate the experience needed will either over or undershoot the intended value - so I'm thinking maybe that could add a little mystery...I'm with you there too: random is good
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 04, 2014, 01:46:01 PM
Ah, you're a Teacher's Assistant? I plan on trying to become a teacher myself, preferably in the field of History.
Now this is a very ingenious plan you have set up here! It would save So much space to have things compiled in this manner rather than the haphazard experience standards the game sets up for the characters.
"So Experience Needed @ Level X = a*X^3 + b*X^2 + c*X^1 + d for a set of constants a,b,c,d determined by modeling the data"
The only part I worry about is that even the smallest change here might throw off someone's experience to astronomical differences between others.
With Rydia for instance...
Level 2 = a*2^3 + b*2^2 + c*2^1 + d for a set of constants a,b,c,d determined by modeling the data. a=2 b=3 c=4 d=5
2x2^3= 8 + 3x2^3=216 + 4x2^3=512 + 5 = 741 Exp. for Level 2. But maybe you had a specific idea on how to use the variables.
Now with powers... I don't think 65816 supports those, I see no instructions in regards to them in any case. The closest thing I've seen is something that doubles a value, but that's not exactly powers.
But your second idea of not involving powers (you can get away with squaring it, obviously) is probably the one we'll have to go with.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 04, 2014, 02:53:36 PM
Level 2 = a*2^3 + b*2^2 + c*2^1 + d for a set of constants a,b,c,d determined by modeling the data. a=2 b=3 c=4 d=5
2x2^3= 8 + 3x2^3=216 + 4x2^3=512 + 5 = 741 Exp. for Level 2. But maybe you had a specific idea on how to use the variables.
- Bingo! You got it. Sounds great of paper...or rather in type :tongue:
the good thing about that scheme is that the a,b,c, & d are the same over the whole range. I was thinking about the same thing you were - slight changes can indeed propagate into a huge error - 2^3 = 8, no big deal, but 65^3 is 274625 (430C1!) - which by my calculations would mean that we'll be able to code for it by the time the clock reaches half-past impossible
- But I was prepared - I had to rethink a lot of things coming from a 'C'-world over to FORTRAN - I eventually worked though but I got smacked around pretty good on the way. One of the easier tricks - I just call it shimming (but there's a real name for it) - is probably what will end up working out best :
Basically - after working out the main algorithm - look at how far off it is from the real values and see where it's worst off...then for that (and the surrounding levels) have a small adjustment routine - probably calling another constant but I think we can manage the room :P
Also - the algorithm as I have it going in my mind will probably work something like this - if this ends up being indecipherable don't sweat it I'm sure in an hour I won't know what I was even getting at - the need for :sleep: is definitely knocking at the door
I had gotten part way through writing up what unfortunately has the technical name of double divided difference - which sucks as a name...the method is built on addition and subtraction...later at the end you'll need some multiplication to get you from "I just got to Level 50" over to "That means you need this much more experience to hit 51" - Oh and let us not forget Square tapping into the magic gain byte to just to keep things fresh.
- I'm going to call it for now - I got halfway through sketching out the ddd approach so we don't have to worry about cubes (or squares even). The problem was that without either a table or a visual it's much harder to follow - even for me and supposedly I know I'm trying to get at.
- I'll be back later, hopefully with more of a plan than that of the 'Underpants Gnomes' :childish:
Ah, you're a Teacher's Assistant? I plan on trying to become a teacher myself, preferably in the field of History.
Oh cool! Any particular facet of History?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 04, 2014, 03:22:11 PM
I have a vested interest in Ancient Chinese History, but... that does not a job make. Probably World History, American History is not a subject I have any interest in pursuing in much of the long term.
Ah, still compiling the plan you want to use? In the meantime I can find where the game draws the exp. from (well it's pretty obvious from where) and if this routine can be modified for custom code.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on January 04, 2014, 04:04:02 PM
Hi guys - I haven't dropped off the face of the earth. This is just a busy season for me, and I don't have a lot of time to work on hacking, so I don't have much to contribute to the board. I do have a little bit of info about SNES's mathematical capabilities. The only functions it can perform (technically) are addition, subtraction, and multiplication and division by two (with no remainders). So, unfortunately, more complicated mathematical functions need to be expressed in terms of these basic functions. It's possible in theory to do a lot with just addition, but the more complicated the function, the more code you're talking about. I assume the game has specific portions of ROM already devoted to multiplying two numbers, and possibly even computing exponents, and it just JMLs to those portions when it needs to. But that's only speculation. A deep inspection of the code that runs when calculating elemental weakness damage might be revelatory (since multiplication of a figure is certainly taking place there).
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 04, 2014, 06:38:40 PM
OK - I think this will help explain where I'm going with this. As you guys rightfully pointed out - very limited options (on the face at least)
- I did not know about the adherence to binary multiplication - that's good to know, thanks Chillyfeez
Anyway - I plan to use the differences between levels to build up as we are going along. The picture marked "From Table" is what the game has now - values in black are stored on the ROM - so in the case of the game as it is they coded in every level. My plan is to store 4 values per character (and some corrective bytes for each character as they are going along) My picture marks in black the top row, the first tabulated value and the first 3 differences. Just for my own peace of mind I have to say that though this is a divided difference method there will be no division because I'm going to keep everything linear - i.e. no (Level)^2 anywhere. With the 4 values in black I can calculate the calculate the values in red - and then blue at the next level, and then green - and those are all exact. Mathematically speaking they better still be exact because I only have 4 levels and I started off with an exact picture so if I some how lost the information: "whoo smokies..."
:edit: I just looked at my layout again - I made it look harder than it is...that first column of data is what I calculated for the actual Exp Levels...what the ROM stores is the 2nd column, the difference between the experience levels...even less to calculate: score! - Also the number for the first column of Level 13 is wrong - but just ignore that column...two wrongs can make a right...and now back to our program in progress...
So that gets me to Level 13 - but then what where's the next round of data? If you can imagine adding one more block to each I would need the number below 39 - but that depends on the number that should be below 259 - and that depends ... That would be a problem were it not for one thing - there's a pattern down in the 3rd difference (for the low data at least - probably have to shift up a few later) if you use the data from the ROM to keep building the difference table you'll find this sequence:
=> D4(Level) = (2, 4, 3, 3, 2, 4, 3, 3, 4, ...) where the first value corresponds with Level 14 i.e. in math speak: D4 (14) = 2, or on a graph of Level vs 4th Difference there would be a point at (14, 2) (Level is the 'X' coordinate because we know it (independent variable), that's why it's first)
There's not a super stellar pattern here: 2-4-3-3 then 2-4-3-3 again, but then it's 4, so the pattern would have to be at least 9 long (those 9 again) - and that's no pattern at all. But...if you look at just the numbers themselves you'll notice this:
D4 seems to always be: 3 +/- 1
Also just to clarify: that sequence as calculated is 100% exact - I took the original numbers from the ROM and went through each level of calculation to get down to the D3(Level) = (39, 41, 44, 48, 51, 54, 58, 60, 63, 67, 70, 73, 77, 79,...
- So we're not making stuff up...yet :wink:
But that consistency in difference is huge - the average of the 1st 8 from 2, 4, ... is exactly 3 which would mean to a good approximation if I just assume that 4th difference is 3 then I'm probably going to be OK!
And we are... take a look you could try and build the number from scratch - Level 13 has a 3rd difference of 39...which is exactly 3 x 13...then 14 goes with 41 which is almost 14 x 3 = 42...but 3 is a bad multiplier...though I have a question about that (for later). But I can fix that - if I want to stick to powers of 2, if I shift one in 4th Difference then it makes sense to shift back as my starting point...i.e I was trying (Level x 3) = D4...but what about instead starting off at Level 10 (I can start anywhere I want - it just probably won't work most places)...but 10 x 4 = 40...almost 41...11 x 4 = 44, right on the money...12 x 4 = 48, also exact...13 x 4 = 52, 1 off from 51, but then it gets a little worse 54 is 56 = 14 x 4...and so on...
Long story short (too late) with very little effort on my part (other than formatting problems and chasing down a bug in Excel) I can write out a pretty good approximation
In fact, here's what I mean...
When I calculated the D4 values (all the way to 99 - I wasn't doing it out so why not) that value of 79 corresponded to Level 25...which is pretty good - if I had guessed D4 = +3 / Level...3 x 25 = 75, only 4 short...but then if I jump to Level 50...I would guess 150, just adding another 75...it's 158...if I had added 4 to my guess for Level 25 they'd both have been exact...
Thank you all for attending this lecture: I hope it was informative and stimulating :happy:
To be serious, I do let's say half-apologize for going on-and-on I guess I wanted to show off that approach even more than I thought...because truth be told that method is not approved by the American Dental Association...or whatever their little math club is called..."It's a bad strategy because you can basically write it down for someone as 'Take a look at the data and hope you get lucky'" - :bah:
OK - rant over - and just a little more actual business on this...a few other things of note are that those differences of 1, or 2, even 4 - that's a linear difference...i.e. everything in this difference table is just from addition (technically it should be an addition table, we start and add outward) - so what I'm driving at is when I say you're off by 8 in guessing 150 for Level 50: that means 8...it doesn't get worse over time that 8 is always just 8 off...so even if it were 8 off all the way back to 25 you would have missed the total by only 200...and at level 50 the number you're looking for is 874,300...I think it's an acceptable loss, no?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 04, 2014, 07:57:39 PM
Hey Chillyfeez! Always glad to hear from you. Yes, I am wondering about that myself... It probably runs the number through an area a number of times until it reaches its desired goal, if I had to guess.
Phew, now this... this is complicated to wrap my head around. So... Each level will have a sequence that has to be x4 to gain a Level. So at Level 10 you would need 39x4 = which would be 156+... um... I'm sorry this is extremely complicated to me, computations and differences always throw me for a loop. I re-read it three times, but I'm afraid I just can't grasp what is being said. Nor do the charts help me too much. 39+200+815=2139? But... 815 is the experience needed to level up... and 2139 doesn't appear as a level... Oh! That's starting experience, I see. The experience one will have when they level up... that said I'm not sure what the 200-259 or 39 part plays in all of this...
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 04, 2014, 08:03:34 PM
... that said I'm not sure what the 200-259 or 39 part plays in all of this...
because it's a typo and it's supposed to be 220 :tongue:
there are other mistakes in the numbers too...more on that in a minute and it gets a lot easier now that I realized that the game is looking for TNL and not the actual level...a lot easier...I'm writing it up now, be up soon
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 04, 2014, 08:34:13 PM
Ideally I would love our system to be able to calculate from Level 1-70 for every character. That way we could have characters join whenever the modder would like rather than "when their level fits them".
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 04, 2014, 10:57:19 PM
Ideally I would love our system to be able to calculate from Level 1-70 for every character. That way we could have characters join whenever the modder would like rather than "when their level fits them".
It should be no problem - no reason we shouldn't be able to unless there's some weird sneak pointer somewhere that says 'Cecil starts at 10 - live with it' - and if there is such a pointer I say to you go get him! :banonsmash:
Phew, now this... this is complicated to wrap my head around
Boy you said it...in a way I'm kinda kicking myself for not holding off on posting, clearly my ducks were wandering aimlessly...on the other hand I think I've got it.
I'm going to get right to it now and then I'm sure after not too long after posting and the itch will start to formalize it - I just can't seem to help myself.
Anyway the punchline is:
(New TNL) = (Old TNL) + D + (N - 1) x (T - S + 3N/2)
D = 1st Difference, so for Rosa it is 220,
T = 2nd Difference, so in this case 39,
S = Step Size, what is approximated between the bottom moment, 3 in this case
N = Current Level - Starting Level, so for Rosa: Current Level - 10
- I'm not quite happy with it, but it's really not that bad either...
- A little explaination:
This is what that triangle should have been:
Lv 10 to 815 Lv 11 220 <---F'ed up here - I had 200 in the picture...ouch... to 1035 39 Lv 12 259 to 1294 <---Wrote 1292 originally - clearly I flunked out of proofreader school Lv 13
Anyway because there's only one difference between what we need and where things are assumed constant you can pull that formula out recursively. Here's a bit more of that table (copied from excel, no hand typing :P)
The numbers on the outside are what I calculated and in the parentheses are the actual values and error
Well I'm convinced :childish:
Not bad for just saying "eh, let's go with 3" :wink:
you do end up with an N^2 term in it...I'm working on a way to split that up...that's why it took me so long to come back - I stubbornly had to have my copy of the book can't use the internet...oh no...
I do actually suggest keeping a copy of it - it's only 7MBs and it's free - who knows what the future will bring...two months ago I wouldn't have expected to be here with you fine people and combating the Ghost of Square-past.
As for the N^2 term, I can offer the following suggestions:
A) Live with it - I don't know what kind of delay that would cause
B) Try implementing the Square recursion: Sq(N+1) = Sq(N)+ (2 x N) + 1
Seems like a good route, there may already be some code out there
C) Store some of the higher Squares as reference data...that could work well with that last one, say if you want 14^2 start with 10^2 having "defined" it as 100
D) It's also possible I my be able to break this down further into a few easier terms, not sure, but so far no good
E) Last, similar to C but leave some of the reference level up data in the ROM...which may not be bad overall. I could see maybe every 20 levels or so having it just call the tabulated values and then from there calculating the next set, depending on the spacing we could get around large squares that way
Those are my ideas...feel free to discuss, elaborate, or ignore as you see fit :tongue:
As for me, I'm going to keep going through the data and and make sure at least this will work universally...it should, just define a set of parameters (D,T,& S) for each character and they're off...or not off and in early, missing level data should not be a problem.
I'll also look at the HP & MP gains some more, but at first glance it seems like it's best to just leave a set of hard coded values and then point...there's still a lot of wasted room in the ROM...like for Cecil's magic gain...from 4 to 4 every level until 70....Square, Square, Square...
I still remember the first time I found out 'the World was Square' - ah memories :kedgar:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 04, 2014, 11:12:09 PM
Alright, now this suddenly makes sense to me...
Level. 10 815 is the required Exp. to gain a level. At this point it is working off of TNL and is not using any special coding. Level. 11 A default reference of 220 is added as the difference between Level 10 and Level 11. Level. 12 Introduces the 2nd Difference and adds that to the required Level Up from then on, combining that with the Step every level, which continue to goes up by 3 each Level.
And judging by your chart below this matches Almost Identically with the game's sense of progression itself!
This is amazing work! And that you put it in a way that even I could understand it speaks volumes of your talent!
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 04, 2014, 11:28:43 PM
Good - because if you didn't the error would lie with me - there's always a way to explain it to someone - your praise is most kind, internet is my worst - just me, time, and to quote Butter's Stotch "my stupid psychotic brain" - we'll the first two anyway...but I can just go on and on...like right now. :blush:
But please, with me especially, don't hesitate to come back asking again about anything. My neighbor came by asking me to recommend a good text for her - I end up offering to teach her. I'll never shy from people willing to learn. :)
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 04, 2014, 11:38:58 PM
I will keep that in mind. If I'm going to be of any help on this project, I'll need to be on the ball when it comes to certain math equations, especially if I plan on actually programming it into the game.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 05, 2014, 05:46:01 PM
That's a good thing I noticed when it comes to your code: very well commented. I'm sure if we ran into trouble I could check the math following your thorough documentation.
On that front I am currently kicking around two ideas:
One is to keep going with the present approach, but I know it's going to end up more involved than just a set of three numbers for each character, there may need to be an additional parameter, and/or slight modifications to the routines per individual...I sort of had that in mind anyway...a major routine that works for everyone and get's you to 90% accuracy (or so) and then little bits of clean up code, probably split by starting Level: <10, 10, & >10 which divides our heroes into groups of:
- But all that is in the efforts of accuracy for as little deviation from the original levels as possible. I think what I might end up trying (please comment) will be to have a table like there is now for each character, but only store every 10th level (or 15, or whatever) and then have a single formula that can work for every character where the T,D, & S values used for each character aren't fixed through the whole game but have slight variance depending on the nearest Tier Level:
The hope is to be able to change my formula as-it-is from:
(New TNL) = (Old TNL) + D + (N - 1) x (T - S + 3N/2)
to something like:
If New Level is Fixed Then Read TNL from the ROM directly Else Read Base Parameters for Character from ROM & Modify as Needed
(New TNL) = (Old TNL) + D + (N - 1) x T + S * (3/2) * N ( Or Something Similar)
EndIf
The idea being that by changing the parameters along the way I wouldn't need so complicated of a formula - the goal specifically being to eliminate the need for an N*(N-1) term - then it would just be N all the way, never N^2 (or anything worse)
In terms of storage this would require (for experience) would be 18 bytes / character for a total of 216 Bytes of storage for experience. As it is now in the Level Up Storage Bank: 7B528-7C3C8 (3,744 Bytes) over half of it is dedicated to storing the TNL data: 2,112 Bytes as I figure it.
- So with that even if I weren't planning to eventually work out formulas to include Attribute, HP & MP gains (if I get Exp to work, everything else is a cake walk) that's still a bunch of room that, after data rearrangement, could be used to house this algorithm and more.
Let me know if that left anyone confused and I'll try and clarify.
Also, though not the way I think we should go...I did find some info on powers calculated in Assembly; they seemed interesting. :happy:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 05, 2014, 06:07:41 PM
That system looks workable and it seems that we would save Tons of space by using it. Though I am confused why T (when a level is gained) doubles. Or are those referring to the changes that will be made to the algorithm when it reaches that new level base?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 05, 2014, 07:22:31 PM
B) Changes that will be made - it might be 3 x T after that - whatever fits best for everyone that's what I'll do. As for what the parameters are for each character I don't know yet - except for Rosa. She's going to be my model for how to modify T,D, & S at each level gap.
I have a programming question: the pseudo code I wrote shouldn't be hard to implement, right? I feel like when I was looking at some of your code that a big string of BEQ is not out of the question - in my mind that's what I translated as an equivalent for Case. Also - a good insight into my skills as a programmer is the shockingly small amount of time I've actually used Case/Break - I learned If-ElseIf-Else when I first started and I swear my brain refused to change for no reason other than to be difficult.
As for the proposal at hand what I can tell you is that mathematically it's a lot easier to find a linear equation for a small range of data as opposed to a large one. The experience data seems pretty consistent to follow a cubic trend - which is interesting and I have no idea from a game-design stand point why (Level)^3 is the magic way to scale Exp requirements. I think breaking it up into groups of 10 is going to be the easiest all around; so until otherwise stated the division is per 10 levels if I don't specify it directly in the future...but please feel free to offer your opinion.
- On an unrelated note - I was just play testing a ROM after making some map edits (way to go Pinkpuff!!) and I ran into an odd situation. I'm on the moon in the Lunar Subterrane with my pre-Fabul party as I have been for a while. I ran into two Fatal Eyes (my party is all at Lv99) and Edward decided to go hiding when Fatal was cast on him. This only happened once - I tried to do it again on purpose to see if it really happened - but I couldn't reproduce it. It seemed like his timer screwed up as well because he stayed out way beyond his count - people were dying, and coming back while he was still back there...but when I let everyone else die off he did come back after a bit of delay to die in humorous fashion:
["Show"] ------ "00" ------ Dead.... What a way to go - lol
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 05, 2014, 07:33:04 PM
I honestly cannot say whether this will be easy or difficult. It will likely revolve around a lot of beq/bcc to reach the proper level. In the end we might need some outside help as this is entirely new to me in an almost frightening manner. If those values are placed in Rom, it's more a point of grabbing those values (LDAx 0XXXXX) for instance, using X as the character identifier to reach the right section of data. Because of this it would be best if the data stayed uniform in some respects.
Hmm, Fatal cast on Edward causing him to use Hide...
$03/AB4D 29 01 AND #$01 A:0000 X:0000 Y:0012 P:envMxdiZc - Is it Critical? $03/AB4F F0 50 BEQ $50 [$ABA1] A:0000 X:0000 Y:0012 P:envMxdiZc - If not branch to 03ABA1. ------------------------------------------------------------------------------------------------------------------------------------ $03/AB51 BD 00 20 LDA $2000,x[$7E:2080] A:0001 X:0080 Y:0012 P:envMxdizc - Load Character ID into A. $03/AB54 29 1F AND #$1F A:0085 X:0080 Y:0012 P:eNvMxdizc - -Get rid of negative bits. $03/AB56 C9 05 CMP #$05 A:0005 X:0080 Y:0012 P:envMxdizc - Is it Edward? $03/AB58 D0 47 BNE $47 [$ABA1] A:0005 X:0080 Y:0012 P:envMxdiZC - If not branch to 03ABA1.
Are you sure that he wasn't put in Critical by this in some fashion? According to the code that's the only thing which activates Auto-Hide.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 06, 2014, 02:24:16 PM
My only guess is I must have told him to do it without thinking about it - I don't know why, but it only happened once and that's my only explanation because definitely not critical - still had full HP. So, not as weird I thought - but still amusing to see.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 13, 2014, 02:26:43 AM
Moving on from Edward miscommunication... :wink: I've been looking into experience a lot lately. So many numbers... :tongue:
Looking at this was very helpful in wrapping my head around what the game is up to:
... $03/EF77A6 A6LDX $A6 [$00:00A6]A:0005X:0003Y:015CP:envMxdizC - Load X from A6 (I swear the random choice above wasn't even used...) ...
Earlier in the code is:
... $03/EF4F 20 79 83 JSR $8379 [$03:8379] A:0007 X:0000 Y:0159 P:envMxdizC - Put 00-07 into a Random Number Generator (choosing which of the eight selections to take) $03/EF52 AA TAX A:0003 X:0000 Y:0059 P:eNvMxdizc - Transfer A to X. $03/EF53 86 AD STX $AD [$00:00AD] A:0003 X:0003 Y:0059 P:envMxdizc - Store X in AD. ... ----------------------------------------------Later at the end with: -------------------------------------------- ... $03/EF77 A6 A6 LDX $A6 [$00:00A6] A:0005 X:0003 Y:015C P:envMxdizC - Load X from A6 (I swear the random choice above wasn't even used...) ... --------------------------------------------------------------------------------------------------------------------
It's looking in A6 instead of AD where it dumped that random number - it was just bad luck that the load instruction was A6 - leading to (I'm speculating) a typo of A6 A6 instead of A6 AD
- But I may have missed something - I'm not all that much when it comes to Assembly - maybe someday :hmm:
So that's the bulk of the "short post" of these wee morning hours... :wink:
I've got the pseudo-code for calculating TNL values for any Level (under 70)
The short version of the questions I pose are:
1) How close is close enough to what the game intended to charge you for experience/Level: - Is everyone OK with an additional 21,167 added to the 362,228 needed to reach Lv 40 from Lv 39 for Cecil as a Dark Knight? (Ever Level requires a little more than usual - and that does add up...)
2) I have a loop within a loop - does that leave me in bad shape for trying to calculate TNL values? - What about if someone gets many levels@ once (I'm looking at you Paladin Cecil...) - The most complicated instruction in the code is add a few numbers and multiply by 3 - I'm hoping that will give me the edge I need to get away with this approach (Thoughts??)
Consider this a fair warning: another long post awaits the brave traveler who scrolls further...
Having watched Alien through Alien3 this weekend while working out the math for Experience Levels I can't help but wonder if the motto of "The Company" isn't fitting for our band of warriors:
"Weyland-Yutani: Building Better Worlds" - That's our goal for FF4 isn't it? (and to have fun of course!)
Also before decending into the depths...I'm starting to think that my ideas of "short" and "long" posts are similar to the smallest size popcorn at the theater being a 'Large'...
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 13, 2014, 02:40:09 AM
It's kinda a long story...
But I think the pseudo-code is definitely the rug that "really ties the room together" :wink:
Of course everyone else posting updates (and amazing works!) is the inspiration to press on - that and personal frustration with:
Level Data for Dark Knight Cecil: XX XX 00 XX XX | XX XX 00 XX XX | XX XX 00 XX XX | XX XX 00 XX XX …
- Got it - Dark Knight Cecil never, EVER gains magic (though, of course, will be 20 later then 40, ugh...)
Gripes aside the game's approach to calculation TNL values is interesting: In the RAM at any give time (in the last 3 bytes of the 40 byte block for each character) is stored the TNL value from the previous level transition. If you look in FF4kster at DkC, as I've been calling our starting friend for short, the initial data given is TNL = 2403. This value is technically what it would have taken to get from Level 9 to Level 10, where DkC actually starts. So in calculating TNL for DkC to get to Lv 11 the game reads the previous TNL from the RAM and adds to it the difference between that and the next level, which is what is stored in the Level-Up table in the ROM (look at the 1st entry under TNL in FF4kster) - this value is 931. That's where the game comes up with TNL = 3334 (2403 + 931 = 3334) - and when the game starts with an initial EXP load of 3000, that leaves 334 left TNL, as shown on the status screen.
I do actually get this move - storing the differences is easier than the actual amounts, much smaller numbers overall. The fact remains that overall the table-storage route bugs the crap out of me and really limits our ability to mess around with starting levels and swap things around.
To fix this I filled in the gaps in the table, i.e. every character has values for Levels 1 - 69 (not in the ROM - just in my files). I filled in based on averages skewed appropriate given the overall growth rate as exists in the ROM. That done the next step is to settle on an appropriate algorithm to calculate the tabulated values. I've got this worked out more or less now it's a matter of adjusting each character's parameters to minimize the discrepancy between what it calculated and what already exists.
DkC is who I'm looking at for the most part to start and with the parameters chosen I can minimize the calculation error to under 0.9% for any value in the table. This is where opinion comes in:
The highest error for DkC is +0.8%, which means at a given Level if my method is used the game may demand an additional 0.8% experience to advance. To put that in perspective that would mean an additional 2126 exp on top of the 89846 already required (@ Lv 27) or an additional 21,167 added to the 362,228 needed to reach Lv 40 from Lv 39. I always try and skew it so lower levels are most accurate - for DkC he will require no more than an additional 200/Lv from Lv. 10 - Lv. 22 (Even less closer to Lv. 10). I don't think this is going to throw off the gameplay too much, I'm not even sure if I would notice - but I don't know so I'm throwing it out to the experts at large.
Should I live with this kind of discrepancy (as a little added challenge to the game) or work to find an additional algorithm to fix where my base algorithm overshoots. The good part about what I have so far is that it is easy to calculate (in my mind at least) - no crazy squares or cubes of numbers, just some recursion loops. In a nutshell I came up with this:
New TNL = Old TNL + V + (L - F - 1) x A + Sum (X=1 -> L - F - 1){ Sum (Y=1 -> X - 1) { 3 x ( L - F + P + FLOOR((L-F)/5))}}
With V being the 1st entry in the ROM table (931 for DkC) A is the 1st difference - determined from the table originally and is constant (DkC: A = 255) F = Starting Level - DkC: F = 10 L = Current Level P = Adjustment Parameter (Constant and predetermined - for DkC P = 10)
Which I admit even looked nuts when I derived it (Sum within a Sum really) - but writing the pseudo-code helps to clear things up:
Temp = 0
For X = 1 to (L - F - 1)
For Y = 1 to X - 1
Temp = Temp + 3 x ( L - F + P + FLOOR((L-F)/5))
Next
Temp = Temp + A
Next
New TNL = Old TNL + V + Temp
- and though I hate using 'Temp' as a variable name - it's late/early and I don't want to to be creative...
- But that's it. As I figure it each character will need to store five values: (values for DkC shown)
V (931) ~ A (255) ~ P (10) ~ F (10) & 1st TNL (seed to get started, 2403 for DkC)
The above formula is general and only depends on the 4 parameters above (F,A,V, & P) as well as:
Current Level (in the RAM @ 7E1002)
Old TNL (in the RAM @ 7E103D-F)
*Addresses are for the character in Slot 1 (center) - add 40 (hex) for Slot 2, 80 for Slot 3, etc.
This should save 1496 (dec.) bytes less the 12 x 5 = 40 (dec.) to store the parameters for each character. This assumes the Twins to share the same experience values - in the table they are identical most of the time and within the error of calculation otherwise.
Next will be to add into the calculation code the ability to handle HP, MP & Stats - which in comparison should be no problem:
DkC for example has entries of:
20 for Lv 10 - 19 then 30 for Lv 20 - 29 then 40 for Lv 30 - 39 then (you guessed it) 50 for Lv 40 - 49 then 60 for Lv 50 - 59 & finally 70 for Lv 60 - 99
With +MP always 0* and stats increasing only by 1 in a cyclic pattern of attributes
* from http://rb.thundaga.com/chars/lvup_data.txt
Quote from: Details ================================================================= Level Data bytes: ================================================================= Byte 1: Attribute Bonus: ... Byte 2: Hit Point Gain Byte 3: Magic Point Gain; also, around the 50th level gained or so (varies for each character), the ROM begins adding $20, $40, or ($20 + $40) for each subsequent entry for this byte. This may have something to do with how your HP/MP/Exp needed data is updated after you pass level 70. Byte 4: Lower byte for Exp needed to gain a level. Byte 5: Upper byte for Exp needed to gain a level. =================================================================
So at the end of this rainbow should be a very doable replacement for the reference table freeing up 3744 bytes of room (minus cost). (@ 7B528 - 7C3C8 in an unheadered 1.1 ROM)
- Also, if I'm thinking this through correctly (debatable) this should clear up the problems with swapping characters around and not having trouble adapting them to the story - you want a Level 12 Edge that you meet at Kaipo - go for it! Also, the trouble seen with Phoenix's shadow party hack should not be an issue - at the very least when someone comes back just set them to match Cecil's level. (or however seems appropriate)
There's potential - but I'll need help coding it. :tongue:
...that is if whomever read through all this is still alive to tell the tale - jury is still out on myself :wink:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 13, 2014, 11:35:40 PM
This is an incredibly impressive piece of thoughtcraft! Do you have any thoughts on how and where this should be implemented? Finding where the TNL is, appears to already be known, would just need to put your routine in there to get a constant level up without the need for all of the rest, is that right?
I would definitely say that our goal is to build a better (or at least, different). Anything is better than a Peep command, an unused command in "Runs away", and limited functionality on many of the commands ( I still need to do something with Focus and Brace, but I'm not sure what... I'm throwing around the idea of an "Attack Stance" and "Defense Stance" but that is too similar to my Advance command for comfort and Counter seems a near impossibility to set up without knowing where the Actual effects of Statuses are stored. (Some status effects are literally dealt with by accompanying routines (like Fight and Magic) rather than their own.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 14, 2014, 02:28:29 AM
Thank you Grimoire :happy:
The table storing the TNL values runs 7B528 to 7C3C8 - so I expect fill up the front of that with the parameters needed for each character - then have calculation code after it - with plenty of room left over for the future. But my question is - does that work, or is that some part of the ROM that is only good to pull values from. (still trying to grasp the SNES architecture)
You never cease to amaze with your command of...commands :tongue:
Just when I think you must be running out - there's still some left to explore.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 14, 2014, 07:34:46 AM
Well let's see... there is a way to make ASM jump to any value, anywhere. What we will need to do is see where in RAM/LoRom the game draws the TNL from immediately (Had I only realized this some time ago I might have solved my level up problem I was having, now I suspect that the game puts in Level 69's TNL by default once those levels are reached) The first time it is loaded it is clear it is from default information. After that... I'll have to take a look at that when I get home from work and school.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 14, 2014, 11:12:22 AM
Turns out I wasn't scheduled for work today, so maybe i can get to this.
Alright, I've taken a cursory look and the system is a little more complicated than I expected. How it works is that the new TNL pointer does not just Replace the old one at level up, it Adds it onto the currently existing one (may have already been known, new information to me) For instance, when Cecil levels from 10 to 11, his TNL pointer from 63 09 to 63 +(from AD)A3=06 and (From AE)09+03=0D so that makes Cecil's next pointer to be 060D for Level 11. I am baffled as to what or where it is exactly pointing to and from. Though the first one may be so disparate from the other's location, because it is looking from default information.
This is all loaded from 7E289F... 289F was an unknown to me, but it might be some sort of TNL storer.
This seems to be the big notice. 0FB52C+XX amount, depending on character. But that must have been known otherwise the Exp. system in the Level Up Section of FFIVkster shouldn't have worked.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on January 14, 2014, 01:17:00 PM
It's been so long since I worked on that part of it so I have no idea what my sources were, but FF4kster does seem to handle TNL correctly. In fact I think that 31 MP limit is indeed correct as well and that the TNL requirement actually bleeds 3 bits into the MP byte, not two.
I can post my code if you like but it's in FreeBASIC so I have no idea if you'll be able to make any sense of it.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 14, 2014, 01:37:53 PM
It's been so long since I worked on that part of it so I have no idea what my sources were, but FF4kster does seem to handle TNL correctly. In fact I think that 31 MP limit is indeed correct as well and that the TNL requirement actually bleeds 3 bits into the MP byte, not two...
That sounds right on the money to me. The good thing is with the calculation approach the answer is to just set aside 3 bytes for the value from the get-go and that should do it.
As for your code - go for it! The worst that could happen is that I look at it and see the face of Black Mage:
- What is stored in the ROM are the differences of what is carried around in the RAM. Looking back upon when I was working this out initially - in what would now be 'drawing board' teritory :) - The difference table for DkC would read:
Lv RAM ROM (255 Not stored anywhere, FF4 doesn't need it) -------------------------------------------------------------------- 10) 2403 931 <------------- 931 = 3334 - 2403 (Lv. 10 --> Lv. 11) 11) 3334 255 <------------- (That's where I got my 'A' Parameter - see previous post) 1186 <------------- 1186 = 4520 - 3334 (Lv. 11 --> Lv. 12) 12) 4520
So @ Lv 10 the game is carrying around in the RAM the 1st value: 2403 and then the TNL for Lv 10 --> Lv 11 is calculated as: TNL = 3334 = 2403 + 931 which then replaces 2403 in the RAM. The game then adds the next difference to get what you actually need to get to Lv. 12:
(Lv. 11 --> Lv. 12) 4520 = 3334 + 1186
Or recursively as: (for Lv. X --> Lv. X+1) New TNL = Old TNL + Difference (as stored in the ROM)
That's it - I hope it helps and if not please tell me. I know that given the party I was fortunate enough to join on this Forum that you can all understand anything I'm trying to get across - just need put into your own terms instead of mine. :)
Had I only realized this some time ago I might have solved my level up problem I was having, now I suspect that the game puts in Level 69's TNL by default once those levels are reached...
You got it! In fact, I think to play it safe I'll probably just flat out store everyone's Lv 69 TNL; so one more stored parameter per character, but I think the peace of mind is worth it.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 14, 2014, 02:57:12 PM
I can make out a little freebasic, so that shouldn't be too much of a problem. (or at least I could five to six years ago) I am still wondering why they didn't have a basic "this much exp. to next level" instead of this weird TNL + numbers that the game itself uses. I don't see the benefit other than Maybe Slight byte saving, and I mean maybe four or five
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 14, 2014, 03:27:41 PM
Well at the very least I can say this specifically is what allowed me to transition from being surprised and baffled by the coding in this game to just being baffled. I remember in reading some of your code-breakdown things that didn't make sense - didn't work right - weren't even conceived right, so stuff like this is only the beginning.
Giving them the benefit of the doubt (haha) there is some logic in it: addition is higher precision operation than subtraction: so you can take as a rule that if you need all three numbers in this kind of set, but can only store two of them, store the smaller ones and generate the 3rd.
Too bad that logic doesn't apply here. My example can be applied to something like 99818.5488893 + 2564.984984 = 102383.5338733 - very easy to lose digits in subtraction trying to go the other way - but it's all integers in this calculation so that's out. :P Also, since you don't actually use all three numbers, that's out too. I have the difference in my calculation just to build the TNL values, but from the game's perspective the differences don't matter they only utilize the TNL values themselves.
Admittedly, my formula was a pain in the ass to derive and remain accurate without using decimal multiplication or division. So I'm going to assume that they simply went with the path of least resistance - I can't claim I wouldn't have done the same back then but still :sad:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on January 14, 2014, 04:51:26 PM
Ok, well there's documentation over at FreeBASIC.net (http://www.freebasic.net) for the syntax/keywords, and I will be happy to answer any questions to the best of my ability.
(The "&h" prefix is what FreeBASIC uses to indicate a hex number, much like "0x")
dim start as UInteger dim temp as UByte dim actor_index as UByte dim level_ptr as UInteger
start = &h7AB00 + (index - 1) * &h20
temp = ByteAt(start) character_id = temp mod 2^5 if temp and 2^6 then left_handed = true else left_handed = false if temp and 2^7 then right_handed = true else right_handed = false
for i as Integer = level to 69 levelup(i).stat_bonus.amount = ByteAt(level_ptr) mod 2^3 for j as Integer = 1 to 5 if ByteAt(level_ptr) and 2^(2 + j) then levelup(i).stat_bonus.stat(6-j) = true else levelup(i).stat_bonus.stat(6-j) = false next levelup(i).hp_bonus = ByteAt(level_ptr + 1) levelup(i).mp_bonus = ByteAt(level_ptr + 2) mod 2^5 levelup(i).tnl = ByteAt(level_ptr + 3) + ByteAt(level_ptr + 4) * &h100 + (ByteAt(level_ptr + 2) \ 2^5) * &h10000 level_ptr += 5 next
for i as Integer = 1 to 8 after70(i).amount = ByteAt(level_ptr) mod 2^3 for j as Integer = 1 to 5 if ByteAt(level_ptr) and 2^(j + 2) then after70(i).stat(6 - j) = true else after70(i).stat(6 - j) = false next level_ptr += 1 next
end sub
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 14, 2014, 09:33:52 PM
FreeBASIC eh... I say: pretty rad! I'm actually a little bummed to have only just heard of it now. :sad: I also think the amazing results you've had with it make it all the more impressive - but I will freely admit that in the scope of my limited programming abilities I've got a soft spot (or hard ... yeah) for C - always put it up on a pedestal - right, wrong, or indifferent <-- which logically must be wrong: it would be literally impossible for C to actually be the answer for everything - in fact even in my personally history I know where it falls short... but I love it anyway! :childish:
Regarding your code, it really wasn't that difficult to follow (in the how anyway - I'm still working on the 'why's for the last set of steps - I may need help from the teacher on that one :wink: I do like what you sent over - I wouldn't mind reading some more. Even Square get's some credit: +64 for left, +128 for right, +192 for both: makes sense to me!
As for FreeBASIC - it's not just what you've been able to do with it - it's a nice package - it certainly ain't BASIC as I learned it back a thousand years ago :tongue: In fact in front of me currently is a book which reads:
"The QBasic program provides a complete environment for programming in the BASIC language, including extensive online Help."
- Source "Microsoft MS-DOS: User's Guide & Reference (for the MS-DOS Operating System Version 5.0) - (C) Packard Bell 1991
- "online" - LOL - I remember when that word only had the single meaning: at least there's the splif of 'o' vs 'O'
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on January 15, 2014, 03:42:56 AM
FreeBASIC eh... I say: pretty rad! I'm actually a little bummed to have only just heard of it now. :sad: I also think the amazing results you've had with it make it all the more impressive - but I will freely admit that in the scope of my limited programming abilities I've got a soft spot (or hard ... yeah) for C - always put it up on a pedestal - right, wrong, or indifferent <-- which logically must be wrong: it would be literally impossible for C to actually be the answer for everything - in fact even in my personally history I know where it falls short... but I love it anyway! :childish:
I tried several times to learn C but had a lot of trouble just getting simple things working. In FreeBASIC I could just go "print 'hello world'" and hit compile and run and there it is, no problem. If I want to have a multi-file project, I don't have to go worrying about header files and makefiles and all that jazz, I just put "#include 'whatever.bas'" at the top and good to go. Also I used MS-DOS as my main operating system for a very long time (I changed over to Linux as my main somewhere around 2009), and FreeBASIC was actively supporting that platform so it also made sense from that perspective. So after getting used to it I pretty much stuck with it. You have to understand, I am a very lazy puff.
That said, I can usually read C code more or less; my issues with it are more practical than theoretical.
As for FreeBASIC - it's not just what you've been able to do with it - it's a nice package - it certainly ain't BASIC as I learned it back a thousand years ago :tongue: In fact in front of me currently is a book which reads:
"The QBasic program provides a complete environment for programming in the BASIC language, including extensive online Help."
- Source "Microsoft MS-DOS: User's Guide & Reference (for the MS-DOS Operating System Version 5.0) - (C) Packard Bell 1991
- "online" - LOL - I remember when that word only had the single meaning: at least there's the splif of 'o' vs 'O'
Turns out FreeBASIC is actually something like 98% backwards-compatible with the old QBASIC. Though that's mostly for the benefit of being able to compile old legacy programs written decades ago than for writing something in that style now; especially now that it can handle all the amenities one expects of a modern language (pointers, objects, etc).
Regarding your code, it really wasn't that difficult to follow (in the how anyway - I'm still working on the 'why's for the last set of steps - I may need help from the teacher on that one :wink: I do like what you sent over - I wouldn't mind reading some more. Even Square get's some credit: +64 for left, +128 for right, +192 for both: makes sense to me!
I'd be glad to explain anything there. What "last few steps" are you referring to? That last loop there is for parsing the "after level 70" stat ups. The lowest three bits are the amount and the upper five each refer to one of the stats, true if it gets the bonus, false otherwise.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 15, 2014, 05:32:26 AM
Oh yeah - I know what you mean about C. I learned BASIC first - I messed around on my own and it was my first programming class 2nd half of freshman year in high school - I liked it a lot, but C/C++ was the whole next year (with a frankly a better teacher) - and then same teacher for AP C++ the following year, and then senior year I was kind of a TA because the teacher retired and the guy that filled in for the year from the temp agency really didn't know anything - you could say "Fate made us train together..." - lol
Turns out FreeBASIC is actually something like 98% backwards-compatible with the old QBASIC.
I wondered that - I figured it would have been - but I wrote my post right after looking through the list of available operators; which was after looking at a bunch of other lists on the wiki - I may be flawed in my memory but I just don't remember nearly that many choices.
I'd be glad to explain anything there. What "last few steps" are you referring to? That last loop there is for parsing the "after level 70" stat ups. The lowest three bits are the amount and the upper five each refer to one of the stats, true if it gets the bonus, false otherwise.
There you go again - thinking logically - when you're dealing with me "you must unlearn what you have learned" :tongue:
The code is very concise; I don't have time to get lost - and looking at it vs the inside information from my work with leveling up and seeing the result directly in you editor I was able to put it together - my hang up is far more asinine: "2^(j + 2) then after70(i).stat(6 - j)" to which I think: "Hmm...I know it works - so definitely right - so I don't need to think about it from that angle...so then why those numbers...2^(j + 2) = (2^2)x(2^j) = 4 x (2^j)...ok 4...why 4..." and so on...yeah I just have to chuckle about that - of all the things to go chasing down
Though a legit question: Other than FreeBASIC with what other languages are you familiar? I love that this conversation has come up - I have been thinking about such pros & cons and in my head replaying my programming history...I think I'll post some of it over on The Drawing Board - I want to know what programmers think with the hopes that I'll be able to understand (and advance past) some of my hangups with Assembly - we'll see
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on January 15, 2014, 05:56:29 AM
Oh yeah - I know what you mean about C. I learned BASIC first - I messed around on my own and it was my first programming class 2nd half of freshman year in high school - I liked it a lot, but C/C++ was the whole next year (with a frankly a better teacher) - and then same teacher for AP C++ the following year, and then senior year I was kind of a TA because the teacher retired and the guy that filled in for the year from the temp agency really didn't know anything - you could say "Fate made us train together..." - lol
I remember TA-ing; wasn't the worst job in the world by any stretch of the imagination, but I don't miss the marking. Actually I learned almost as much through helping teach as I did through actually taking courses, as I was TAing courses I hadn't taken and didn't know the material already ^_^;
Turns out FreeBASIC is actually something like 98% backwards-compatible with the old QBASIC.
I wondered that - I figured it would have been - but I wrote my post right after looking through the list of available operators; which was after looking at a bunch of other lists on the wiki - I may be flawed in my memory but I just don't remember nearly that many choices.
I think you have to use a special compiler switch or something for the legacy code. "-lang qb" if memory serves.
The code is very concise; I don't have time to get lost - and looking at it vs the inside information from my work with leveling up and seeing the result directly in you editor I was able to put it together - my hang up is far more asinine: "2^(j + 2) then after70(i).stat(6 - j)" to which I think: "Hmm...I know it works - so definitely right - so I don't need to think about it from that angle...so then why those numbers...2^(j + 2) = (2^2)x(2^j) = 4 x (2^j)...ok 4...why 4..." and so on...yeah I just have to chuckle about that - of all the things to go chasing down
But you get it now, yes? We need bits 3-7, so we have j ranging from 1 to 5, so we need j+2 to get (1+2 = 3) to (5+2 = 7).
Though a legit question: Other than FreeBASIC with what other languages are you familiar? I love that this conversation has come up - I have been thinking about such pros & cons and in my head replaying my programming history...I think I'll post some of it over on The Drawing Board - I want to know what programmers think with the hopes that I'll be able to understand (and advance past) some of my hangups with Assembly - we'll see
Hm, depends on your definition of familiar. I find that the structures of programming are pretty universal, so I'm confident I can pick up pretty much any modern language fairly quickly. But I have had some exposure to:
* C/C++, as we discussed * Java * Python * BASIC of various dialects, FB is my favorite * Some functional languages (I did a course on this but remember little from it; I think we did Miranda?) * ASM of course
There might be others I'm forgetting, I'm just writing this post quickly while waiting for class to start ^_^;
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on January 15, 2014, 09:11:47 AM
I remember TA-ing; wasn't the worst job in the world by any stretch of the imagination, but I don't miss the marking. Actually I learned almost as much through helping teach as I did through actually taking courses, as I was TAing courses I hadn't taken and didn't know the material already ^_^;
That's another thing I love about teaching - you really get to know the material - even if you hadn't seen it :wink: I will say I read that as pretty impressive - and having ended up in too many situations of similar circumstance I would really love to hear the details of that adventure - because as similar as components of the setup seem that they might be - I've never actually been in that situation :finger:
I find that the structures of programming are pretty universal
My teacher often said similar: "when you know how to program you can get dropped in any language and you'll come out just fine." That's also quite the list mine is just the two I mentioned and FORTRAN 77 - MATLAB is not a language - I don't care what they say. Also you needn't blush at compliments or praise (btw: 1000+ way to go!) I'm just calling it as I see it...which reminds me:
I did think it over carefully and uh, well...no :tongue:
I hope class is going well (anything good?) - I have one that sucks so bad I have to swap it for something else :lame:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on February 24, 2014, 12:42:31 PM
Here's my spriting process:
1) Open ROM file in Tile Layer - This may work with other programs, but I know it works with Tile Layer Jump to the offset of the image you're editing, and highlight it by right clicking on the first sprite and dragging to the last sprite (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2001.jpg)
2) Export the image to a bmp file (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2002.jpg)
3) Open the bmp in MS Paint. Don't waste your time and effort on a fancy image editing program. Remember, you're editing an image that is, at most, 16 colors, and probably no bigger than 32x32 (unless you're making monsters, but still...). Paint has all the tools you'll need for this process, and won't muddy it up with too many tools you won't need (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2003.jpg)
4) Zoom in as large as possible - 800% for my version of Paint (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2004.jpg)
5)In the Zoom menu, select "Show Grid" (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2005.jpg)
6) Expand your image workspace by clicking on the dot in the center of the lower edge of the image and dragging down. Give yourself lots of room. (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2007.jpg)
7) Arrange the image - by selecting, copying and pasting - into this newly created space. (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2008.jpg)
8) Helpful tip: Create Gridlines around your arranged image so you know the limits of each individual sprite. Also, create a working palette of all of the colors. DON'T use any other color, or Tile Layer will not properly interpret it when you're done. (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2009.jpg)
9) Create your new image (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2010.jpg)
10) When you're done, drag the newly created image sprites back into the space from which they originated (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2011.jpg)
11) Then, reduce the image back to it's original size (ckick and drag that same dot) (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2013.jpg)
12) Save your image (no need to "Save As") (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2014.jpg)
13) Back in Tile Layer, import your image (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2015.jpg)
14) Drag the imported image to its desired location (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2017.jpg)
15) Click in the data area, somewhere other than the imported image, to make the grid reappear over it. this is a necessary step to complete the import. (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2018.jpg)
16) Save your ROM, and voila! (http://memberfiles.freewebs.com/22/01/115500122/photos/spriting-tutorial/Spriting%2019.jpg)
Sounds so easy, doesn't it? It's not. I'm dreading any and all of this that I'll have to do in the future for my hack, but, well, it's a necessary evil.
Hope that helps!
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on February 24, 2014, 02:42:18 PM
Here's my spriting process: ... Sounds so easy, doesn't it? It's not. I'm dreading any and all of this that I'll have to do in the future for my hack, but, well, it's a necessary evil.
Hope that helps!
- Yes - it helps immensely! My thanks and compliments good sir. :yabin:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on February 24, 2014, 10:14:46 PM
It is honestly easier than I thought, but oh how tedious it must be... this would be a point where an editor akin to FFVI's graphics editor would be wonderful. Maybe one day that will be added to FF4kster? Who can say.
Thank you for showing me the method though Chillyfeez.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Dragonsbrethren on March 04, 2014, 03:05:21 PM
YY-CHR has a 32x32 mode that should work with those portraits and can export a bmp if you'd rather work in an actual image editing program (but for pixel are its tools are fine). It's not tedious at all, really.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on March 04, 2014, 03:21:56 PM
Good to know, Dragonsbrethren, but the portrait was just an example (because it was easy to show). Does YY-CHR have other-sized modes as well like, say, 16x24 for (most) battle characters? If so, then this is probably something I should have.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Dragonsbrethren on March 09, 2014, 05:31:55 PM
Not by default, but you can create custom layouts (it ships with one that does SMB1's sprites and tiles).
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on August 03, 2014, 01:07:12 PM
Just a random helpful thing I figured out: You know how, when you are in the menu and you go to Edge's magic screen, it says Ninja instead of Black, but it never does anything like that for any other character, even if you give that character "Ninja" as a command instead of "Black?"
$01/AFB2 C9 12 CMP #$12
12 being Edge's Character ID (Actor, in Ff4kster terms). Change this to, say, C9 03, and Child Rydia will have "Ninja" instead of Edge.
Anyway, thought that may be of use to someone at come point...
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on August 04, 2014, 04:49:06 AM
I'd like to add a box to the Actor editor that says something along the lines of "Replace (Black) with (Ninja) for (Edge)", where all those things in brackets can be selected and will bring up a menu: (Black) could be Black, White, or Call; (Ninja) could be whatever string of text of five letters or less that you type; and (Edge) would bring up the actor selector.
We have the address for which actor it is; do we have addresses for the other info as well?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on August 04, 2014, 05:13:48 AM
Probably easy enough to find now that I know this. I'll put it on my to-do list.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on August 04, 2014, 06:15:27 AM
Thanks! I'll still add the box with just the actor selectable and add the other things in as they're discovered.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on August 14, 2014, 09:33:57 AM
Has anybody else played the android FFIV:TAY?
The graphical style seems to be based on that of the DS remake of FFIV (polygons instead of sprites), whereas every screenshot I've seen before of any version looks more like it's mimicking SNES (or GBA).
While I do loves me some retro gaming, I can appreciate when SquareEnix puts the effort into revamping old favorites, but I find it hard to believe they did it solely for the mobile market (which I imagine is still pretty small vs the console market for the FF series).
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on August 14, 2014, 10:36:08 AM
Indeed I have played a bit of it, I feel though that it is a remnant of larger plans which either due to time or laziness never properly panned out. My thoughts is that this was supposed to be on the 3DS possibly in the episodic format that was used with the original Wii release, but for some reason Nintendo didn't want the idea or partially through development Square-Enix decided that it would be mobile only to go with the new revamped FFIV 3D for the Mobile already out at the time.
It's a distinct possibility that FFIV-3D did really well on the mobile market so they thought to follow up that success and it does seem to have worked. From reviews I've read people seem more satisfied with TAY in 3D than they did with base TAY (Despite it actually losing some content). It is essentially the same game, still the same flawed battle system of FFIV where every normal foe has far too little HP, any improvements from the DS game such as Augments or revamped enemies is completely missing and the only changes are some changes to chests that now contain Adamantite instead of finding it in the Challenge Dungeon final chests in a random fashion.
This is why I feel there was laziness involved, a proper port of the game to the 3D format would have followed in suit with its predecessor, if nothing else they could have at least easily taken the FFIV DS enemies and worked with that, but no.
That said the presentation is much better. Some specific cutscenes have actual emotions, camera angles are put to fantastic and expressions put on the character's faces and the 3D actually looks really good. All in all it is still a solid package, yes it's flawed like the original FFIV, and you can't expect much different going into it (if you've played before which you have not. So it will be a brand new and possibly more well-crafted expereience for you), but it's still a worthy venture and a good pickup for the mobile.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Matequillo on August 14, 2014, 04:03:55 PM
I've played through the whole game on a tablet. I'll stick with the PSP version for future playthroughs though. The only thing I felt improved in this version was learning and leveling up bands by participating in a certain number of fights together. I dislike the content removal and I prefer a regular control pad and buttons. I'm glad they didn't add augments as that was something I hated about FFIV DS.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on August 16, 2014, 02:54:04 PM
I've played through the whole game on a tablet. I'll stick with the PSP version for future playthroughs though. The only thing I felt improved in this version was learning and leveling up bands by participating in a certain number of fights together. I dislike the content removal and I prefer a regular control pad and buttons.
The newest one I played was GBA...shame on me :isuck:
I want to go through the 3D version of FFIV at least (I did go through WiiWare TAY a few times). Should I try an play the DS version of IV or the iOS/Android version?
I'm glad they didn't add augments as that was something I hated about FFIV DS.
I like the idea - but there are way too many - working out getting the right ones is a pain and...most importantly...every video I've every seen makes Kain Cry...just NO! :angry:
And that's just as an observer - I haven't even played it yet but in my head I was thinking of just playing it straight - even if I get augments pretend I didn't.
Some might still be cool as options - maybe even in some of our hacks! :wink: - I know lots of cool things have already been done
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 07, 2014, 02:45:37 PM
Just wanna say, very glad to see slick up and running again. I only have fragments of my summon/special sizes tutorial saved on my own computer. I was beginning to think I might have to learn how to do it all over again.
Thanks to Lenophis and anybody else who was involved in what must have been a nightmare to deal with.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Gedankenschild on December 07, 2014, 05:14:52 PM
Very true! I was just thinking: Had I been working on something that required some of the info you put together here... It would have been simply impossible - no way I could remember that or reconstruct it! Better copy and paste some of this just in case... :whoa:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 07, 2014, 05:16:13 PM
Glad to see you also came back Gedankenschild, your graphics project was one of the most ambitious from a technical standpoint and it looked like you were making good progress!
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Gedankenschild on December 07, 2014, 07:27:11 PM
Glad to see you also came back Gedankenschild, your graphics project was one of the most ambitious from a technical standpoint and it looked like you were making good progress!
Why, thanks. I kept checking and also noticed all of you doing your thing on Romhacking.net! :happy:
I realize I've been so busy with my stuff, I didn't even get to try out some of the stuff you guys have been doing... But it looks like Tomato has Let's Play plans with Combat Boost! That should be interesting to watch, I love his stuff.
And yes, I kept working on the graphics backport and the enemies are pretty much done. There are some things I've been thinking about: The summons use some additional tiles for their different animations in the remake and getting those in would be SUCH a pain in the ass! Not only would all the complicated stuff chillyfeez described concerning summon graphics be necessary. Tables would have to be rewritten and placed elsewhere since they wouldn't fit their original locations in the ROM anymore... :whoa: Now that I type it out I realize I can't be bothered to do it, probably. The perfectionist in me doesn't like it, but I guess some mild pixel artistry will have to do it! Except if there are volunteers... :wink: I'm still contemplating at what point to release a patch. The battle backgrounds simply must be done as well. And gradient menus wouldn't hurt the overall impression at all... Then there's everything outside battle... :childish:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 07, 2014, 08:18:01 PM
Yes, Tomato playing through my mess of a mod is a higher honor than I ever expected.
Sounds like that project is progressing well, but you mean to say that the GBA version actually includes extra animation tiles for the Summons? That's a bit surprising.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Gedankenschild on December 07, 2014, 09:09:38 PM
Well, remember the EvilWall tileset I posted some time ago? The SNES version reuses stuff as much as it can (as you certainly know): Titan, for example, has two animations, right? He doesn't have two independent tilesets, though - the 2nd one reuses parts of the first, like the knee and legs, I think. The WSC/GBA version really doesn't care about space, so they just use two distinct tilesets, including redundancies. However, there are some differences in the two sets that would require additional tiles for a faithfull port - and that leads to the above complications. [...] I could have just put together a pic, but I'm too lazy right now... :tongue:
And your hack is still in development isn't it - no problem beeing messy... :cookie:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 07, 2014, 09:16:01 PM
Ah yes, I had assumed that FFIV SNES did the same thing... I guess I was wrong, that would make sense though that they'd only have to change that portion of the sprite though. I imagine that Chillyfeez would know all about thos peculiarities.
Yeah, Combat Boost is still a work in progress, all of the actual hacking is done by this point (I think!). so now it's down to the modding portion, I'm a little bit stuck on what to do for a challenge dungeon or even where to place it. Since it can only consist of two rooms (the only spare maps, basically) I have to be very careful and deliberate with placement of anything in it.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Gedankenschild on December 07, 2014, 09:38:49 PM
Oh yeah, Chillyfeez wrote it all down - amazing how he figured that out...
An extra dungeon, hmm... The obvious route seems to be the stuff the GBA version did (smaller, of course). Lunar ruins and that Mt. Ordeals dungeon, wasn't it? Maybe a secret path in that small cave where you trade pink tails for the Adamant armor? I always thought there could have been more to that place.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: vivify93 on December 07, 2014, 09:58:28 PM
Yes, Tomato playing through my mess of a mod is a higher honor than I ever expected.
He's technically playing mine, too, along with yours! I don't know if he'll comment about the script, but it made me really excited, since I used Legends of Localization as such a heavy reference for Project II.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 07, 2014, 10:07:42 PM
Yes, graphics, especially in FFIV always come off to me as programmed in a needlessly complex manner.
That would be a neat idea to put a dungeon in the Adamant Cave (That is actually where The After Years' first dungeon is.) if it didn't also require the Hovercraft to get to. the idea was to have this dungeon be available as early as Airship access was granted meaning somewhere in Silvera, Troia, or Eblan. If we had the means to edit the world map warps I would put it in the secret Chocobo Forest to the right of the Troia continent and make it a forest dungeon which is missing in default FFIV... You know what? I should go ahead and make it a forest dungeon anyhow. (At least the opening part of it, with two maps I'm given a little freedom).
He's technically playing mine, too, along with yours! I don't know if he'll comment about the script, but it made me really excited, since I used Legends of Localization as such a heavy reference for Project II.
Technically so, yes. He did catch a few typos and made me realize my inconsistency in regards to Espers and Eidolons.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 08, 2014, 12:35:28 PM
Grimoire, do you want to change the physical location of the chocobo forest warp point, or the parameters? If you just want to change where it warpsto, that can be done pretty easily. Search slick for the research I did on world map triggers. They work exactly like location triggers (except no treasure chests). If you want to change the location on the world map of the warp point, that's tougher because you'd need to change the tile to a trigger forest tile, and as you know editing the world map can be a tricky proposition with the available tools.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 08, 2014, 12:51:51 PM
Grimoire, do you want to change the physical location of the chocobo forest warp point, or the parameters? If you just want to change where it warpsto, that can be done pretty easily. Search slick for the research I did on world map triggers. They work exactly like location triggers (except no treasure chests). If you want to change the location on the world map of the warp point, that's tougher because you'd need to change the tile to a trigger forest tile, and as you know editing the world map can be a tricky proposition with the available tools.
I knew you worked on World Map Triggers, I just forgot that you included your methodology (outside of your tremendous work on how to change map tiles through events and the like). Yes, I'd just want to change the warp rather than the location since we can't easily edit the World Map as of yet and it gives a purpose to that useless Chocobo Forest location and it makes it available as soon as you get the Airship.
I was just thinking about this, but I think there's an easy way to add more warps to the Overworld without removing other ones (outside of the Babil ones) In FFIV DS you couldn't enter castles from their upper sides. On the SNES World Map alone that would give an additional ten warps in the Overworld (technically 12 because of the unused Tower of Babil ones) and in the Underworld it would give two more warps. and all it would take is making two sprite tiles unwalkable. Granted what good this does us without more maps to use is questionable.
:edit: Hmm... the post I've found on decoding world map triggers only has the method, rather than a list. I guess I'll write down the list, unless you've already done so.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 08, 2014, 04:37:51 PM
No, I haven't listed them. That would be helpful, for sure.
And that's a good idea - making only the bottom row of castles warpable, but yes, we'll see how helpful that can be. I have the next two days off... Granted I have some IRL stuff to get done, but I intend to do some hackin', so I will look into an easy method to unlock the unindexed maps. It MUST be possible.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 09, 2014, 07:21:29 AM
I thought the issue with the unused indexes is simply that they have no space allocated for them? Though I would love to be wrong on that.
In any case Chillyfeez I'm having trouble getting new treasure to actually work in this challenge dungeon. The way the Treasure Triggers in FFIV work it seems is that if there was originally nothing at the area, a saved game will assume that it is a treasure already obtained.
Is this also true of your own attempts? I mean, I love my mod, but I'm not really in the mood to play all the way back to that point to get these treasures to show up properly.
:edit: Actually that's not the case at all. I am now starting to worry what the "Treasure Index" bytes at 7E12A0 really mean, could it be that two treasures can have the same code area and getting one means you get the other as well? I had hoped FFIV wasn't so simple with that...
If they do only use 20 bytes that means that there is 32x8 Treasure Chests in the Overworld which is exactly 255, hmm... maybe I'll have to do some research on how many treasure really is in the Overworld.
:edit: There are approximately 240 Used Treasure Indexes for the Oveworld meaning that 15 or so should be free for use.
:edit: There are approximilare 159 Used Treasure Indexes for the Overworld meaning that 96! or so should be free to use.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 09, 2014, 09:20:50 AM
Since a saved game saves whether or not a treasure has been opened, there must be a place in the first 0x1800 bytes of RAM that stores which chests have been opened (because that's what a saved game saves). It's probably a block of 0x40 bytes (256 bits for Overworld, 256 for Underworld/Moon), and works a lot like event flags (when one is opened, a bit gets set). If we could find this, then you could manually reset all chests in your save in order to test out the chests in your challenge dungeon. OK, so... there's a couple of things I'm looking for this morning. I'll get right on it.
:edit: OK, well, treasure flags were super easy to find. They're immediately after event flags - 7E:12A0 - 7E:12DF. Set this whole string back to 00s and all of the treasures in a save will be unclaimed again.
:edit: 2 You're mostly right about the problem with extra maps being lack of space, unfortunately. Map formation pointers are at B8000 (or B8200 with header) through B82FF, and map formation data is B8300 through CFE5F. CFCF9 through CFE5F is empty, but that's not a whole lot of space for a map - 358 (dec) bytes, or about enough space for 3 fully furnished 10x10 rooms. :bah: You'd also have to have the (Underworld/Moon) flag set in the map properties to have your map load from this part of ROM - not really a problem, but an extra thing to consider when setting up NPCs, treasures, and various other elements that use different indices depending on Overworld/Underworld.
Now, because FF4kster condenses data banks to eliminate wasted space, a ROM edited with FF4kster may have a bit more space than a vanilla ROM. Let's see... Nope. Looks like this is actually one place where Square was pretty efficient with their use of space. :lame:
Well, you know what we're gonna hear eventually from somebody if we don't preempt it: "Why don't you just expand your ROM and point to the newly-created larger space?" That, unfortunately, does seem like the only solution that does not involve destroying or shrinking other maps, but you know as well as I that doing so would cause FF4kster incompatibility, which would sort of defeat its own purpose. So you are stuck with the following options (as I see it): 1) find some locations that you don't need at all. The forest clearing after Rydia summons Titan comes to mind - that event could easily happen in the chocobo forest index, or, you know in a field background since there's no forest there anyway. The place in the ending where Palom is bragging to Leonora - isn't that a unique location? Well, you're much more adept at finding superfluous usage in the game than I am, but the point is - it does exist. 2) Shrink some locations' data footprints by removing what doesn't need to be there. For example, if you take the Baron Weapon/Armor shop and remove the empty chest that's in a different Y location than the rest of them, all of the wall decorations except for the Sword, Shield and the torch in the center, the pots, table and chairs in the bottom corners, and the stools in front of the counters (replace with blank counter front), the map goes from 166 bytes to 149. Seventeen bytes isn't that much, but doing this with 256(-ish) maps could free up a lot of space. Hey, blanking out the entire top half of the Bab-il crystal room frees up 255 bytes! Just removing the "edge" of the top, left and right of the oasis in Kaipo, which you never see (replacing it with "center" water tiles) - 31 bytes! So this idea, while it would take a VERY long time, definitely has some potential...
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 09, 2014, 02:02:06 PM
Since a saved game saves whether or not a treasure has been opened, there must be a place in the first 0x1800 bytes of RAM that stores which chests have been opened (because that's what a saved game saves). It's probably a block of 0x40 bytes (256 bits for Overworld, 256 for Underworld/Moon), and works a lot like event flags (when one is opened, a bit gets set). If we could find this, then you could manually reset all chests in your save in order to test out the chests in your challenge dungeon. OK, so... there's a couple of things I'm looking for this morning. I'll get right on it.
:edit: OK, well, treasure flags were super easy to find. They're immediately after event flags - 7E:12A0 - 7E:12DF. Set this whole string back to 00s and all of the treasures in a save will be unclaimed again.
Indeed, I found those a while back (it's even mentioned in my "Start of Game" disassembly, but I'm not sure where I found those in the first place) but forgot about it until I reviewed my notes. Yes, that did work, my concern there though is that it marked a ten in a place that had already used it's 10 bit, which leads me to believe that Treasure Indexes may be generated at game file start in the best case scenario, worst case scenario though is that Treasure Indexes are set and by adding or removing chests I've screwed up some order. I really hope it's not that way.
Quote
:edit: 2 You're mostly right about the problem with extra maps being lack of space, unfortunately. Map formation pointers are at B8000 (or B8200 with header) through B82FF, and map formation data is B8300 through CFE5F. CFCF9 through CFE5F is empty, but that's not a whole lot of space for a map - 358 (dec) bytes, or about enough space for 3 fully furnished 10x10 rooms. :bah: You'd also have to have the (Underworld/Moon) flag set in the map properties to have your map load from this part of ROM - not really a problem, but an extra thing to consider when setting up NPCs, treasures, and various other elements that use different indices depending on Overworld/Underworld.
Yikes! I wonder if I cut it close with the Serpent Road then.
Quote
Now, because FF4kster condenses data banks to eliminate wasted space, a ROM edited with FF4kster may have a bit more space than a vanilla ROM. Let's see... Nope. Looks like this is actually one place where Square was pretty efficient with their use of space. :lame:
Well, you know what we're gonna hear eventually from somebody if we don't preempt it: "Why don't you just expand your ROM and point to the newly-created larger space?" That, unfortunately, does seem like the only solution that does not involve destroying or shrinking other maps, but you know as well as I that doing so would cause FF4kster incompatibility, which would sort of defeat its own purpose. So you are stuck with the following options (as I see it): 1) find some locations that you don't need at all. The forest clearing after Rydia summons Titan comes to mind - that event could easily happen in the chocobo forest index, or, you know in a field background since there's no forest there anyway. The place in the ending where Palom is bragging to Leonora - isn't that a unique location? Well, you're much more adept at finding superfluous usage in the game than I am, but the point is - it does exist. 2) Shrink some locations' data footprints by removing what doesn't need to be there. For example, if you take the Baron Weapon/Armor shop and remove the empty chest that's in a different Y location than the rest of them, all of the wall decorations except for the Sword, Shield and the torch in the center, the pots, table and chairs in the bottom corners, and the stools in front of the counters (replace with blank counter front), the map goes from 166 bytes to 149. Seventeen bytes isn't that much, but doing this with 256(-ish) maps could free up a lot of space. Hey, blanking out the entire top half of the Bab-il crystal room frees up 255 bytes! Just removing the "edge" of the top, left and right of the oasis in Kaipo, which you never see (replacing it with "center" water tiles) - 31 bytes! So this idea, while it would take a VERY long time, definitely has some potential...
That idea really does have a lot of potential, I fear though that people will say the world then feels too "barren", but if I can add new areas with it, it might be worth it. I really like your idea of erasing places that can't be seen and have no value.
:edit: Alright! Let's get to freeing up some space and even some maps...
The first map that can be axed entirely is the room loading to the Baron Prison, there's nothing there. The door can be placed in the actual prison and that map can be salvaged.
Second and third maps may be a little more controversial... the first and second floor of Cecil's Tower. There's nothing on the first floor and a meaningless maid event (helps to show his status, yes I understand, it's just that space is so crucial here...) so entering the door will immediately take the player up to his room.
Fourth is the Forest where you lose Kain as mentioned and last for the Overworld would be the Room w/ Pots in Troia that has some healing item in a pot. You could also get rid of the first floor of the stables (why was it ever underground anyhow? They're Birds!) and the first floor of the Astro Hall.
So that's seven maps which are freed up for use! That might give me more variety than I had though I would have.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 09, 2014, 03:52:44 PM
Quote
Yikes! I wonder if I cut it close with the Serpent Road then.
Yeah, I thought about that kind of situation, too. The game must have some way of knowing, besides just Overworld/Underworld, which 10000 block to look in for map info, since pointers only indicate a place in ROM indexed a maximum of 0xFFFF bytes away, and map data actually spans almost 0x18000 bytes (which represents three different 10000s in LoROM - $17/8000 into the $19/8000s). But FF4kster allows a hacker to easily add massive amounts of data to an Overworld map without messing up anything in the Underworld or Moon sets. I did notice, when tracing map data pointers, that the game compares the current map pointer with the pointer of the next map (which is completely unrelated oftentimes) before loading map data... Maybe it's looking at several pointers to determine where the pointing leads? I may look into that at some point, simply out of curiosity.
Quote
Yes, that did work, my concern there though is that it marked a ten in a place that had already used it's 10 bit, which leads me to believe that Treasure Indexes may be generated at game file start in the best case scenario, worst case scenario though is that Treasure Indexes are set and by adding or removing chests I've screwed up some order. I really hope it's not that way.
My guess is that it has something to do with you editing and testing within an already-played save. You could try, if you think it might help, start a new game, then as soon as C&K leave the castle, open Geiger's hex viewer and jump to 7E:171C in RAM, and change it to read: 01 65 9E 00. That will make the Enterprise appear right outside of Baron and you can fly to your dungeon without visiting any other locations first (cheat up your stats in order to assure survival).
Quote
I fear though that people will say the world then feels too "barren"
I agree. I wonder how much could be freed up just by eliminating parts of locations that are never seen...
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 09, 2014, 04:25:07 PM
Well, the overworld's been cleared out as far as I'm concerned, I took your advice and removed a lot of pots, heads on walls, and a couple of empty Treasure Chests here and there.
Yikes! I wonder if I cut it close with the Serpent Road then.
Yeah, I thought about that kind of situation, too. The game must have some way of knowing, besides just Overworld/Underworld, which 10000 block to look in for map info, since pointers only indicate a place in ROM indexed a maximum of 0xFFFF bytes away, and map data actually spans almost 0x18000 bytes (which represents three different 10000s in LoROM - $17/8000 into the $19/8000s). But FF4kster allows a hacker to easily add massive amounts of data to an Overworld map without messing up anything in the Underworld or Moon sets. I did notice, when tracing map data pointers, that the game compares the current map pointer with the pointer of the next map (which is completely unrelated oftentimes) before loading map data... Maybe it's looking at several pointers to determine where the pointing leads? I may look into that at some point, simply out of curiosity.
Something troubling occurred I had noticed, my Waterfalls Exit map got thrown into several pieces, bizarrely. I just need to copy and paste a default one onto there, but I find it odd that this would occur, as far as I had seen no other map was touched.
Quote
My guess is that it has something to do with you editing and testing within an already-played save. You could try, if you think it might help, start a new game, then as soon as C&K leave the castle, open Geiger's hex viewer and jump to 7E:171C in RAM, and change it to read: 01 65 9E 00. That will make the Enterprise appear right outside of Baron and you can fly to your dungeon without visiting any other locations first (cheat up your stats in order to assure survival).
Indeed, that would work. But to test my theory in full I'd need to start a fresh file to grab every treasure from here to Mt. Ordeals (as apparently in my file in Baron Revisit the bit is already marked), with a super leveled character though I might be able to make it quick, but I do need to test some consequences of changing early magic's power so... maybe another playthrough up till there would be worth it.
Thanks for the Airship hint, I'll make sure to use it.
Quote
I agree. I wonder how much could be freed up just by eliminating parts of locations that are never seen...
Is there anyway to tell how much space I've saved with the changes I've made? I deleted six full maps and changed a vast amount of others to free up space, so I should have a bit more room to work with.
:edit: Oh no! That's an older problem! When did this happen? I wonder now if it has been in since 0.04 or 0.05! Meaning that Tomato might encounter that soon, that's no good!
Also Chillyfeez, how do I tell where my map now begins? If I know where the map begins both unaltered and altered I can quickly fix it, otherwise I have a lot of perfect placement I need to do, which is simply not my strength.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 09, 2014, 05:48:55 PM
Sorry, what's the problem you've encountered?
Easiest way to tell where your map begins is... Figure out which map it is, then count off the pointers. Start at B8000 (178000 in LoROM). The first line (B8000 through B800F) are the pointers for maps 00-07. Second line is 08-0F. Third line is 10-17, etc. Then reverse the pointer bytes and add to B8000 (178000 in LoROM). That's where your map starts.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 09, 2014, 06:01:25 PM
I know what happened... how careless of me... when I was trying to make that clean patch that you eventually had to make for me I accidentally downloaded a 1.0 version and patched Combat Boost with it, not realizing its version. Shockingly it is still mostly stable despite 1.0 mixing with 1.1 except for several maps which are mixed up.
Unfortunately this sets me back a week but those are the only issues that I have seen. No maps past Mt. Ordeals are broken except for several background maps.
This means everything I've released this week has been broken.
Thanks for the pointers to the pointers... hopefully I can get this fixed before long!
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 09, 2014, 06:42:27 PM
I've made a mess of things and can't salvage this. I'm going to have to start back with 0.04, a shame, but I'll just have to be more careful for now on.
:edit: Alright now, looks like things are back to normal. I just copied the default map from 0.04 and things are looking Perfect again, I wasn't set back at all (except for today's work in freeing up space...)
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 09, 2014, 11:47:20 PM
I'm curious - what was going on with your maps, and was it clearing up space in FF4kster that broke them?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 09, 2014, 11:58:59 PM
Oh, no no. FF4kster is completely innocent to what happened. When I was trying to do was set a base patch that you eventually made for me anyhow, I ended up unknowingly downloading an FFII 1.0 ROM. What eventually happened is that I used this as the "unmodified file" eventually when it came to creating 0.05. I thought somehow it "depatched" 1.0 because I noticed no problems at all until I went through several of my recent backups and saw it was there. Somehow patching those two together screwed up several maps in bizarre fashions.
So I went back to 0.04 patched that to a clean rom, copied my maps from there into Combat Boost. Unfortunately that means I had to do the space-saving and room salvaging again, but it really wasn't that bad the second time around.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 10, 2014, 12:20:16 AM
Ah, ok. You mentioned something about a waterfall map that kept recurring and I thought maybe FF4kster was doing that thing it had been doing with dialogue bank 2 (before pinkpuff fixed it), where it recopied everything from the end of the bank over and over again every time the data ewas shortened.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 10, 2014, 01:32:04 AM
Oh it turned out to be several maps that were mixed up, and some were just essentially destroyed. I am 99% certain it was the 1.0 to 1.1 conversion which caused the problems as now everything looks perfectly fine.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 10, 2014, 11:01:49 PM
Haha! Well this became a little unexpected for me, probably inspired because of the time of the year...
So the optional dungeon that replaces the hidden Troian Island Chocobo Forest is now "Everwhite Woods" (except green in battle and the world map.) and I wanted a boss, so I started combing the internet for obscure meanings of "frost" when I found "Black Frost" which was originally going to be the name of the boss then I saw that Black Frost was related to an old Russian god name Korochun, and a little more research showed that a figure named Ded Moroz (Literally translated to Grandfather Frost and hey! Eight letters!)) was the spirit of winter in Russia. He was an old sorcerer who would kidnap children and freeze them to death with a magical staff unless their parents paid a ransom of a gift. In modern times this character is shown as being reformed and now basically acts like Russian Santa Claus...
So... the boss of this optional dungeon is, for all intents and purposes, Santa Claus. Now I just need to find a suitable enemy sprite... when I had him as Black Frost I just used a Zemus Shade as his sprite, but that no longer seems appropriate... this would probably be the best time for a palette swapped Ramuh, if I could get that to work.
Hmm, maybe I can use palette swaps of some characters... maybe use a palette swap of Tellah or FuSoYa to get the desired effect?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 11, 2014, 02:56:35 AM
Hey, that sounds like a cool sidequest. While I never would have thought of a forest dungeon, you're right - it is sort of a Final Fantasy standard that FFIV lacks, so good thinking! Are you looking specifically to use already-in-game sprites for the boss? I'm not sure you'll be able to palette swap Tellah or FuSoYa. I think Character enemies have fixed palettes (that of their ally component). you could copy Indra's sprites into one of those empty banks near the summon images, leaving spaces in the right places so that you can call a regular rectangular size (thereby not wasting a Special Size). I can help with that if you want to take that route.
So just for fun today, I played around with eliminating unseen portions of maps to see how much space I could free up. I also turned the Forest Clearing After Mist into all grass. Altogether, these are the changes I made:
Quote
Remove edge of Kaipo Oasis
Remove top two rows of Mysidia
Remove bottowm two rows of Damcyan sub basement
Extend east wing of Fabul 1F
Clear out post-mist forest clearing (make all grass)
blank out top row of mt hobbs west
blank out top row of mt hobbs east
blank out 5x10 rectangle in northeast AND bottom four rows of mt hobbs save point room
blank out top three rows of mt. ordeals entrance
blank out bottom row, top row of mt. ordeals third station
blank out bottom row, southwest 4x11 rectangle, last four spaces of next to last row and last three spaces
of third to last row of mt. ordeals summit
remove bottom row of tower of zot 6f
remove bottom row of tower of bab-il entrance
eliminate the top 13 rows, the 9 westmost columns and the 8 eastmost columns of the bab-il crystal room
blank out southwest 6x13 rectangle in Giant of Bab-il stomach
remove bottom row of Giant Lung
blank out top three and bottom 13 rows of Two Connected Airships
By doing this, I was able to free up 977 bytes! and with the exception of the Forest Clearing and part of the East wing of the Fabul lobby, all of these changes would be entirely undetectable in normal gameplay. Maximizing the space saved can be a little tricky sometimes. Because of how maps are written, you save the most space by overwriting the unseen spaces with repeats of whichever tile comes immediately before or immediately after (as opposed to just overwriting it with the "blank space" for that tileset). Anyway, that amount of space is larger than the amount needed for the Dwarf castle (I think the largest map, datawise) by over 100 bytes. And I only worked with Overworld maps, so the same could theoretically be done for The Underworld/Moon, too. So idf you're looking for more space for maps... there's some options for you. :)
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 11, 2014, 09:25:38 AM
I had the same fear originally Chillyfeez, then I noticed that enemy PC's had their palette set to their matching Ally ID, I changed that and saw that it did change as expected but yeah... your idea for a normal enemy Ramuh is Much more preferred! If you could assist me with that, it would be very appreciated.
Yes, much of what you suggested I tried as well, I also took the extra step by removing what I felt were unneccessary adornment (Three Stacks of firewood in a place without a fireplace is rather silly) Not sure what you mean extending the East Wing of Fabul 1F though.
I didn't want to really touch the dungeons though since a later goal of Combat Boost, when fully done with the gameplay portion will be to modify normal dungeon maps and make them into different arrangements.
That said, I have no idea how to tell how much space I saved, heh.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 11, 2014, 11:02:06 AM
It's very difficult to see how much space is saved, but after a lot of searching, I figured it out... First of all, I noticed that whatever I did in the over world maps, the pointers for the underworld/moon maps never changed. So the game does read which world you're in before loading map data. Underworld/moon maps always start at C712E. Having noticed that, I then looked at the last map with its own map index in the Overworld (Phoenix's FFTools was key for this process), which is the small dock (used for underground airship docks), map DF. So then, I counted through the pointers to find the one for DF - not hard, every two lines represents 0x10 maps. Assuming no changes are made to the Small Dock map (thereby making it longer or shorter), the difference in pointer value before and after this process represents how much space was saved. In my case, 0x3D1 bytes, or 977. It looks like what FF4kster does with the extra space is... Absolutely nothing, so all data after the small dock is left exactly as is, which is why you can't just look to see how much space is saved. But the space between the end of the small dock and C712E will always be unused.
Sure, I'll be glad to help you copy Indra's sprites to make him usable. I just finished with a couple of days off and am going into the second busiest weekend of the work year, so it may take a couple of days, but if you PM me a patch with your current work in progress, I'll work on it when I get the opportunity.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 11, 2014, 09:39:39 PM
Ah, that is interesting to know, unfortunately FF4Tools no longer work for me since Phoenix's site has gone offline and I could never get the actual tool to work independent of that.
Sure, I'll send you the newest WIP patch in PM then.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 11, 2014, 11:10:24 PM
Ah, that is interesting to know, unfortunately FF4Tools no longer work for me since Phoenix's site has gone offline and I could never get the actual tool to work independent of that.
Really? It's just an HTML file (and a bunch of images). I've run it successfully on a bunch of different devices...
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 11, 2014, 11:21:29 PM
Ah? I could never figure out how to load my ROM into it though. Is there something so plain I'm missing here? Also the PM has been sent (on romhacking.net).
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on December 12, 2014, 01:39:53 AM
Oh, no, it's not designed to load a ROM into it. It simply has an output of hex that you could, theoretically, copy and paste into your ROM using a hex editor... Except no hex editor I've ever used allows you to paste "text" into the hex field. So while I use it regularly as a reference, it rarely ever had for me the practical purpose that I think Phoenix intended. And now everything it does is available to do with FF4kster, so now I use it exclusively as a reference tool.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on December 12, 2014, 02:20:14 AM
Oh, no, it's not designed to load a ROM into it. It simply has an output of hex that you could, theoretically, copy and paste into your ROM using a hex editor... Except no hex editor I've ever used allows you to paste "text" into the hex field. So while I use it regularly as a reference, it rarely ever had for me the practical purpose that I think Phoenix intended. And now everything it does is available to do with FF4kster, so now I use it exclusively as a reference tool.
I thought that was the case, but whenever I open it there's nothing. Map Loading has no maps, events have no events, etc. Is there something crucial I'm missing there?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 06, 2015, 01:32:14 PM
As a big fan of The Hobbit and Lord of the Rings (having read the books and seen all the movies) I've thrown together something for fun that I somewhat doubt I'll ever really try to tackle (mainly because of lack of appropriate sprites) of making a mod of FFIV into the basic plot of the Hobbit movies. 13 Characters lets me use the vast majority of the Dwarves and Gandalf as well as throw in movie-verse Legolas and Tauriel. Fixed levels aren't so bad when you consider that from a logical standpoint the party would be encountering Legolas and Tauriel later in the game and Gandalf should be absurdly powerful because he's Gandalf so the vast majority of the Dwarves start at Level 10, Bilbo and Ori at Level 1 and Kili at Level 5 as being the second-youngest of (movie-verse) group of Dwarves.
Here would be the stat plan, classes, and general overview of role for the characters (stats on a scale of 0-5)
(Level 10) Thorin - MtnKing (Str. 4, Agi. 4, Sta. 5, Wis. 2, Will 0) several fighting related skills, good MP, most HP)
(Level 20) Balin - Advisor (Str.3, Agi. 2, Sta. 3, Wis. 4, Will 5) not-good MP, few fighting skills, several minor magics.)
(Level 10) Dwalin - Warrior (Str. 5, Agi. 3, Sta. 4, Wis. 0, Will 3) Great HP, Great MP, most fighting related skills)
(Level 1) Bilbo - Burglar (Str.2, Agi. 5, Sta. 2, Wis. 3, Will 3) Low HP, Medium MP, Several talk skills, Steal, terrible starting stats.
(Level 10) Fili - Heir (Str. 3, Agi. 3, Sta. 4, Wis. 3, Will 2) - Can equip all weaponry (except legendary equipment.) his skills are similar to Thorin's, he will have Throw (or some variation thereof).
(Level 5) Kili - Archer (Str. 2, Agi. 4, Sta. 2, Wis. 2, Will 4) - Good HP, Low MP, Several long-range skills.
(Level 10)Bofur - Miner (Str. 3, Agi. 3, Sta. 3, Wis. 1, Will 2) - Good HP, Low MP, several bard-like skills.
(Level 10)Gloin - Banker (Str. 3, Agi. 1, Sta. 4, Wis. 3., Will 3) - High HP, Low MP, Some skills...? Gold Toss
(Level 1) Ori - Scholar (Str. 2, Agi. 4, Sta. 1, Wis. 3, Will 4) - Low HP, Decent MP, minor-magics. Uses a Slingshot/ammo combination that cause status ailments.
(Level 50) Gandalf - Wizard (Str. 4, Agi. 3, Sta. 3, Wis. 5, Will 5) Decent HP, Highest MP, all magic, does not increase in stats.
You could also have an autobattle of Bard vs. Smaug using Golbez's battle sprites.
If I was doing this, I'd have to resist the overwhelming temptation to throw in a "spoony" joke :laugh:
Haha, that would be really neat to have a Smaug vs. Bard battle, I really do like his character and I found the movies made him more likable (or maybe more personable) than in the book. But he never really fights alongside the Dwarves and doesn't really fight until the Battle of the Five Armies.
Just a thought Chillyfeez, not directly related to this, but how complete is Golbez's character? Does he have the same linking capabilities as any other character such as a Save/Load/LevelUp slot? Because if the only thing Golbez is lacking is a LevelUp chart, he could easily share another's own. (Maybe even give FuSoYa's entirely to Golbez and give Tellah's to FuSoYa)
By that same accord how complete is Anna as a character? I know that Anna and Golbez both have equipment indexes and I'm aware Golbez has a set of stats, equipment, and command set (even if it just fight and item) but does Anna even have that? Also I guess the elephant in the room is the lack of portrait space for either of them.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on January 06, 2015, 05:23:17 PM
I don't remember specifically which parts of his character are left out, but I don't think it's much beyond graphics and level up chart. For a while, I was using his character for Blank in TfW (why? ...can't remember). The graphics would be a big issue, because they take up so much data. Wouldn't be impossible, though, just... a lot of work. There's also the problem that FF4kster doesn't like Golbez, so you can't really do much with him unless by hand. That's why I eventually stopped using him for Blank.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 06, 2015, 06:08:40 PM
I don't remember specifically which parts of his character are left out, but I don't think it's much beyond graphics and level up chart. For a while, I was using his character for Blank in TfW (why? ...can't remember). The graphics would be a big issue, because they take up so much data. Wouldn't be impossible, though, just... a lot of work. There's also the problem that FF4kster doesn't like Golbez, so you can't really do much with him unless by hand. That's why I eventually stopped using him for Blank.
Ah that's right! Despite there being a fine Golbez sprite sheet in the game with every animation a PC would have, Golbez's sprite defaults to a frog with the job name of emWhit and Anna shows up as a copy of Dark Knight Cecil except her sprite is a Pig, yeah that all seems like a lot of work to fix them up to be usable by any stretch.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on January 07, 2015, 02:01:56 PM
You know how some NPCs are drawn under the main character and some are above? Anybody know what controls that?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 07, 2015, 02:15:23 PM
Hmm, what instances are NPC's considered as Under main character?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on January 07, 2015, 02:22:08 PM
Shoot did I do it again? I thought some NPCs were drawn under and only some were special and drew on top, like the sparkle over Cecil when he turns into a paladin. Are all NPCs drawn over the main char, always?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 07, 2015, 02:45:11 PM
To my knowledge all NPC's draw over the main character. I could be wrong, but I don't recall any instance that an NPC is placed under the main character.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on January 09, 2015, 04:58:30 AM
What causes Sylph to not cost any MP and is it easily fixable?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 09, 2015, 06:23:14 AM
By comparing Sylph's Routine to Odin's Routine which are both very similar something interesting shows up...
Odin's Routine (Important part here...)
$03/DB72 20 7B E0 JSR $E07B [$03:E07B] A:0000 X:0000 Y:00FF P:envMxdiZC - Jump to Subroutine (Unique Rydia one from above decreases MP properly, if Rydia is the target) $03/DB75 20 BC 85 JSR $85BC [$03:85BC] A:0001 X:0000 Y:00FF P:eNvMxdizc - Jump to Subroutine. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $03/85BC C2 20 REP #$20 A:0001 X:0000 Y:00FF P:eNvMxdizc - Reset Processor Status (20?) $03/85BE 8A TXA A:0001 X:0000 Y:00FF P:eNvmxdizc - Transfer X to A. $03/85BF 18 CLC A:0000 X:0000 Y:00FF P:envmxdiZc - Clear Carry Flag. $03/85C0 69 80 00 ADC #$0080 A:0000 X:0000 Y:00FF P:envmxdiZc - Add 80 to A. $03/85C3 AA TAX A:0080 X:0000 Y:00FF P:envmxdizc - Transfer A to X. $03/85C4 7B TDC A:0080 X:0080 Y:00FF P:envmxdizc - Transfer Direct Page. $03/85C5 E2 20 SEP #$20 A:0000 X:0080 Y:00FF P:envmxdiZc - Set Processor Status (20?) $03/85C7 60 RTS A:0000 X:0080 Y:00FF P:envMxdiZc - Return +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $03/DB78 E6 A9 INC $A9 [$00:00A9] A:0000 X:0080 Y:00FF P:envMxdiZc - +1 to A9. $03/DB7A A5 A9 LDA $A9 [$00:00A9] A:0000 X:0080 Y:00FF P:envMxdizc - Load A9. $03/DB7C C9 05 CMP #$05 A:0001 X:0080 Y:00FF P:envMxdizc - Has it gone through five times? $03/DB7E D0 F2 BNE $F2 [$DB72] A:0001 X:0080 Y:00FF P:eNvMxdizc - If not loop back to 03DB72
Sylph's Routine...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ $03/E07B BD 00 20 LDA $2000,x[$7E:2000] A:0000 X:0000 Y:0000 P:envMxdiZc - Load Slot 1's ID. $03/E07E 29 1F AND #$1F A:0081 X:0000 Y:0000 P:eNvMxdizc - Remove 80 from it? $03/E080 C9 11 CMP #$11 A:0001 X:0000 Y:0000 P:envMxdizc - Is it (Adult Rydia) 11? $03/E082 D0 0C BNE $0C [$E090] A:0001 X:0000 Y:0000 P:eNvMxdizc - If not branch to 03E090. -------------------------------------------------------------------------------------------------------------------------------------- $03/E084 AD 8B 26 LDA $268B [$7E:268B] A:0011 X:0000 Y:0000 P:envMxdiZC - Load A from Caster's Current MP. $03/E087 9D 0B 20 STA $200B,x[$7E:200B] A:00BF X:0000 Y:0000 P:eNvMxdizC - Store A in Slot 1's Current MP. $03/E08A AD 8C 26 LDA $268C [$7E:268C] A:00BF X:0000 Y:0000 P:eNvMxdizC - Load A from Caster's Current MP Byte 2. $03/E08D 9D 0C 20 STA $200C,x[$7E:200C] A:0003 X:0000 Y:0000 P:envMxdizC - Store A in Slot1's Current MP Byte 2. ---------------------------------------------------------------------------------------------------------------------------------------- $03/E090 60 RTS A:0001 X:0000 Y:0000 P:eNvMxdizc Return.
This unique formula with Rydia's Odin looks for Rydia specifically to remove the MP and will do it five times in a proper loop. Sylph however does not include that Branch Back so it only ever looks at Slot 1.
Fixing it would require that loop for 5 characters or a more proper way to check to see if it is fully Rydia's character. It's still early so I haven't yet thought it over fully. Maybe someone else can chime in with an actual coded solution.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on January 09, 2015, 09:02:59 AM
Looks to me like, no, it's not easily fixable. That is, there isn't enough space in the Sylph routine itself to rewrite the code so that it works properly. That being said, it would be very easy to write a new routine that handles the MP reduction properly for both spells, but it would have to occupy a new space. Are you sure these are the only two spells that use this subroutine for MP reduction, Grimoire? I mean, that doesn't really matter, I guess, except that if they were, and I wrote a new routine in a new place that doesn't use them, then I would blank out the space they occupy once the new routine is created.
By the way, regarding processor status (since you put those question marks in there): the SNES CPU has eight processor status flags that can either be turned off (reset) or on (set) with these instructions, and the parameter identifies which flag(s) is (are) being affected by bit identification (01, 02, 04, 08, 10, 20, 40, 80). Flags 4 and 5 (10 and 20) are the only ones I've ever seen FFIV use (and flag 4 is rare), and they affect the 16-bit status of the x/y registers and the accumulator (A) respectively. So, SEP #$20 makes the Accumulator 8 bits, and REP #$20 makes it 16 bits (SEP #$10 and REP #$10 do the same for x and y).
I just realized that you may have disassembled that a long time ago, so... sorry if you knew that already.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 09, 2015, 01:23:04 PM
Looks to me like, no, it's not easily fixable. That is, there isn't enough space in the Sylph routine itself to rewrite the code so that it works properly. That being said, it would be very easy to write a new routine that handles the MP reduction properly for both spells, but it would have to occupy a new space. Are you sure these are the only two spells that use this subroutine for MP reduction, Grimoire? I mean, that doesn't really matter, I guess, except that if they were, and I wrote a new routine in a new place that doesn't use them, then I would blank out the space they occupy once the new routine is created.
By the way, regarding processor status (since you put those question marks in there): the SNES CPU has eight processor status flags that can either be turned off (reset) or on (set) with these instructions, and the parameter identifies which flag(s) is (are) being affected by bit identification (01, 02, 04, 08, 10, 20, 40, 80). Flags 4 and 5 (10 and 20) are the only ones I've ever seen FFIV use (and flag 4 is rare), and they affect the 16-bit status of the x/y registers and the accumulator (A) respectively. So, SEP #$20 makes the Accumulator 8 bits, and REP #$20 makes it 16 bits (SEP #$10 and REP #$10 do the same for x and y).
I just realized that you may have disassembled that a long time ago, so... sorry if you knew that already.
I can say pretty authoritatively that Sylph and Odin are the only two routines that use that unique Rydia routine. It is difficult to imagine for what reason they decided to make sure it was Only Rydia that could use these routines properly.
I did know what one of the functions of Set Processor Status was, (turning 8 to 16 bits) but I did not know what the other flags did, now I know, thanks Chillyfeez.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on January 11, 2015, 05:45:57 PM
When statuses are inflicted from physical attacks, the game displays a message like "Fell asleep" or "Swoon" or similar, right? If my memory is not failing me and that is true, do we know where those messages come from?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on January 11, 2015, 08:24:57 PM
You're right that those messages appear... I'd be surprised if they weren't part of the pool of battle messages, though. Or am I misunderstanding the question?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on January 12, 2015, 05:18:51 AM
In FF4kster: Edit Messages -> Battle -> Scroll down til you find 'em -> Edit away!
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on January 12, 2015, 09:35:12 AM
Hmm I didn't see them in the bank of battle messages I pulled from the ROM, are they in the same place as the AI dialogue like "Turned to mist" ?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on January 12, 2015, 11:28:45 AM
My bad. It's not "Battle", it's "Alerts".
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on January 12, 2015, 12:00:07 PM
Ah whew. Mind if I ask where they are stored in the ROM?
:edit: Sorry, I see them now. I totally missed the "battle message" entry in FF4.txt. Thanks for helping me find that!
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on January 30, 2015, 11:17:54 AM
FYI for Pinkpuff, and those of you making events that have this trouble.
I was having difficulty with some event scripts that changed maps leaving a weird location stack when I try to return out of the map at the end of the event. The Dark Elf battle is one in the original game that does this. It turns out that "visual effect" 0x1D (29 decimal) pops 1 off the location stack without actually going anywhere. The Dark Elf script uses two of these to remove the last two map transitions that went over to Edward and back, so when you leave the crystal room in the end it doesn't take you confusingly to Toroia.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on January 30, 2015, 03:35:49 PM
Very good to know. Cool discovery.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on January 30, 2015, 09:52:43 PM
Hah! I was completely unaware. Good find indeed Avalanche.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Pinkpuff on January 31, 2015, 05:53:31 AM
Thanks! Visual Effects config file updated and uploaded!
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on January 31, 2015, 12:45:20 PM
Happy to help.
For what it's worth, here is a short list of those I noted slightly different from the ff4kster dat file. Numbers in decimal. Most aren't really useful outside of their current use, but a few might be.
There are exactly 65 of them total (0-64), and there's a table at 00:C195 (ROM at 4395) with routine pointers for each.
5 - puts tent or cabin sprite on screen when using those items
10 - Warp's mechanism (pop location and go there)
11 - Exit's mechanism (go to bottom of stack)
13 - Parks Ship at dock near Fabul
25 - one of the Baron collapsing hallway; slides map under NPCs
26 - one of the Baron collapsing hallway; slides map under NPCs
27 - one of the Baron collapsing hallway; slides map under NPCs
28 - parks Enterprise just outside of Baron (I think the remote control event)
40 - parks enterprise outside of dwarven castle after entering the underground
45 - fly the big whale (from its helm)
46 - remove the parked Enterprise, wherever it is
47 - whale's overworld/moon transition mechanism
59 - I think where enterprise dips to catch you from falling out of Tower of Babil
62 - fades music volume up (I think)
63 - kill all of party, if Cecil (paladin) is in party he gets 1 HP instead (used in final sequence)
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on February 01, 2015, 04:46:40 PM
Hah! I was completely unaware. Good find indeed Avalanche.
Oh hey, Grimoire, didn't you run into this problem in your hack to change the party by reloading the Big Whale map?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on February 01, 2015, 08:53:20 PM
Now that I think of it, yes... that probably was the problem. But now I don't remember what I was doing where that was the preferred method... oh right! The party clear. Yeah, I'll try that and see if it works.
It worked wonderfully! Great find there Avalanche! That makes it feel So much more natural than "leave the ship, re-enter the ship for everyone to reappear." This makes so much more sense.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on February 04, 2015, 10:11:58 PM
For the treasure chests with monsters inside, how are the encounters/monsters determined?
The 4th byte of the trigger data, where Phoenix wrote "total byte = enemy set in Underground/Moon set", even though the upper 2 bits have other meanings, then they all seem to point to a range of encounters that look to me like they only contain a single Imp. What am I missing?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on February 04, 2015, 11:12:46 PM
I think treasure encounters work sort of like event calls, in that the "treasure encounter" identifier points to a table that specifies an (actual) encounter number. Because the upper two bits are used for other purposes, it'd be the only way to specify that a monster formation above 3F is in the chest.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on February 05, 2015, 09:05:54 AM
Found it. No separate table, it's just a more or less straight offset. When the monster-in-the-chest bit (0x40) is on in the trigger data, here's the formula for what encounter is used: 0x1C0 + (0x20 if current map is >= 256) + (bottom 5 bits of that byte) Or worded differently: If map number is < 256: 0x1C0 + (bottom 5 bits of that byte) If map number is >= 256: 0x1E0 + (bottom 5 bits of that byte)
So that allows 1C0-1DF when in the first 256 maps, 1E0-1FF when on map 256+.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: avalanche on February 05, 2015, 06:36:24 PM
Talk about "apropos of nothing" ...
Dark Knight Cecil using Dart, particularly throwing "item" 0, looks pretty sweet. It's like he's shooting a red energy bolt from his sword.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on February 07, 2015, 10:26:21 AM
Hmm, I just thought of a way of saving at least 8 NPC's in the Underworld and Events...
While recently playing through FFIV:DS I forgot how many useless Trap Doors were in the Sealed Cave, that is completely unnecessary in most respects. Because they each have to vanish they all count as different NPC slots. 15 NPC's, only a few are actually practical (though the scenario guide mentions that the TrapDoor's are mostly found in haunted mansions, which makes me wonder if that was the original plan for the Sealed Cave.)
Let's assume we get rid of all of the TrapDoor's blocking empty rooms (of which there were a lot more than I remembered...)
7 of the 15 Doors lead to Empty Rooms, that seems a bit excessive and we could easily cut down on those, which is something essential for Combat Boost at this point, along with using the Treasure Rooms for other maps.
So...
3F,40,42,43,46,48,4A are all of the Empty Room Trapdoors.
Hmm, maybe the event config should be updated to include these labels of what's behind the Trapdoors rather than the ambiguous hex that is used?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on February 07, 2015, 11:48:13 AM
What about making the door tile an event trigger instead of a warp, then put an invisible warp in the next tile beyond? The same event call could be used multiple times for the trap door battle, then the proper warp follows if the battle is won.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on February 07, 2015, 09:19:55 PM
What about making the door tile an event trigger instead of a warp, then put an invisible warp in the next tile beyond? The same event call could be used multiple times for the trap door battle, then the proper warp follows if the battle is won.
I would think it would make traversing the place much more annoying that Every Time you go to move to another floor or pretty much anything you're forced to fight a TrapDoor.. if I'm understanding this correctly? Also aren't Event Calls a lot more valuable than NPC slots?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on February 07, 2015, 11:51:26 PM
I'm not sure if you fully caught what I was suggesting... But I also didn't think it through thoroughly, so it may be a moot point. ... Or maybe not...
What I was thinking was, where you would normally put the trap door NPC, you put an event trigger instead (fight with trap door). Then, assuming victory, the tile just beyond that would be the warp point. You could use the same event call for every instance of this, except the trap door would re-arm every time. This wouldn't be a huge problem, though in theory...
Ok, here's what I'm thinking: Let's say there's normally a trap door NPC at coordinates 15,5. That means that the door is also at 15,5. You'd have to make sure the door for this tileset is a trigger (I'm not looking, so I don't know). The trigger built into the door would be the event call for the trap door fight (that would be the only component of the event). Then, at 15,4 there would be another trigger point that would function as the warp to the next room. In the next room, instead of a "return" tile, you'd have a warp tile to exit. This warp would warp you to 15,6 so that you don't have to fight the same trap door again if you don't want to (but it would be there again if you did choose to reenter that room). In theory, this would all work. You'd have to eliminate practically all return tiles in the dungeon because of stack issues this would cause otherwise. Some players might object to regenerating trap doors, but it would be consistent with the challenge level of Combat Boost, and a second fight with each would be entirely elective. By doing it this way, you could reuse the same event call for every trap door. Does that make sense? Sorry, I was kind of thinking it out as I typed... But I think it would work.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on February 08, 2015, 01:32:47 AM
I'm not sure if you fully caught what I was suggesting... But I also didn't think it through thoroughly, so it may be a moot point. ... Or maybe not...
What I was thinking was, where you would normally put the trap door NPC, you put an event trigger instead (fight with trap door). Then, assuming victory, the tile just beyond that would be the warp point. You could use the same event call for every instance of this, except the trap door would re-arm every time. This wouldn't be a huge problem, though in theory...
Ok, here's what I'm thinking: Let's say there's normally a trap door NPC at coordinates 15,5. That means that the door is also at 15,5. You'd have to make sure the door for this tileset is a trigger (I'm not looking, so I don't know). The trigger built into the door would be the event call for the trap door fight (that would be the only component of the event). Then, at 15,4 there would be another trigger point that would function as the warp to the next room. In the next room, instead of a "return" tile, you'd have a warp tile to exit. This warp would warp you to 15,6 so that you don't have to fight the same trap door again if you don't want to (but it would be there again if you did choose to reenter that room). In theory, this would all work. You'd have to eliminate practically all return tiles in the dungeon because of stack issues this would cause otherwise. Some players might object to regenerating trap doors, but it would be consistent with the challenge level of Combat Boost, and a second fight with each would be entirely elective. By doing it this way, you could reuse the same event call for every trap door. Does that make sense? Sorry, I was kind of thinking it out as I typed... But I think it would work.
It does indeed make sense, but I've never been a fan of those TrapDoors, nor of the rooms with nothing in them. Your idea would work if I hadn't planned to already cannibalize all of the optional maps in the Sealed Cave for new dungeons. Underworld spare maps are scarce and these seem the best candidates. 7 TrapDoor events and NPC's will be removed and repurposed the 8 that do guard something meaningful, if it's a Treasure Room the TrapDoor's will literally spit the treasure out when you beat them as the second part of their event, thereby the rooms they guard will no longer be necessary and I can free up those treasure indexes as well (not that the Underworld/Moon normally uses even close to 255 treasure spots...)
Title: Re: Apropos of nothing (except of course FFIV)
Post by: chillyfeez on February 08, 2015, 09:35:59 AM
That's cool. Sorry, I misunderstood. I thought you were looking for a way to actually keep those trap door battles. I hate them too, but mostly because one character dying is practically unavoidable. I think I'd be OK with them if their battle script was different.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on February 08, 2015, 09:58:45 AM
That's cool. Sorry, I misunderstood. I thought you were looking for a way to actually keep those trap door battles. I hate them too, but mostly because one character dying is practically unavoidable. I think I'd be OK with them if their battle script was different.
Don't worry when I tackle them, I'll do a lot more than "Target" "Dimension 9" . (Partially because Target is gone, haha!) I'll probably make more use of the "monsters emerging from the door!" setup which I always thought was kind of neat from vanilla FFIV. We'll see when I get there though, but don't worry I don't like battles that have that "do or die" mentality. While I like preferred methods, I try not to make them necessary.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on February 08, 2015, 08:39:27 PM
Would it make any sense (or even be possible) to write a routine specific to sealed cave that would move the event trigger after each encounter. In my head I'm picturing it like:
You go to Door-1 at F1:(X,Y)=(10,10) - Triggering Event-A (Door Battle) and Set Trigger Point of Event-B to F1:(X,Y)=(10,9)
Take a step up, and Trigger Event B: Move Event-A Trigger to F2:(X,Y)=(8,17) Also clear Event-A Flag
Then going to the Door-2 @ F2:(X,Y)=(8,17) would trigger Event-A again, and so on...
This to me would allow for multiple door events without actually having them as separate event entries. There would need to be a list in the ROM somewhere of what the next location is, but that seems doable (right?). The other thing I like about that is because the events are no longer at the old battle sites - those doors would just remain open as one would expect.
I realize that this is getting into full out patch territory - but you guys know me: thinking in every direction except forward... :wink:
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on February 08, 2015, 09:37:04 PM
Would it make any sense (or even be possible) to write a routine specific to sealed cave that would move the event trigger after each encounter. In my head I'm picturing it like:
You go to Door-1 at F1:(X,Y)=(10,10) - Triggering Event-A (Door Battle) and Set Trigger Point of Event-B to F1:(X,Y)=(10,9)
Take a step up, and Trigger Event B: Move Event-A Trigger to F2:(X,Y)=(8,17) Also clear Event-A Flag
Then going to the Door-2 @ F2:(X,Y)=(8,17) would trigger Event-A again, and so on...
This to me would allow for multiple door events without actually having them as separate event entries. There would need to be a list in the ROM somewhere of what the next location is, but that seems doable (right?). The other thing I like about that is because the events are no longer at the old battle sites - those doors would just remain open as one would expect.
I realize that this is getting into full out patch territory - but you guys know me: thinking in every direction except forward... :wink:
The issue appears in this when there is more than one TrapDoor in the room, this may have possibly worked otherwise, but because of the multiple doors it's not really plausible. Good thinking though.
Title: Re: Apropos of nothing (except of course FFIV)
Post by: LordGarmonde on February 08, 2015, 09:47:18 PM
The issue appears in this when there is more than one TrapDoor in the room, this may have possibly worked otherwise, but because of the multiple doors it's not really plausible. Good thinking though.
Right! :sad: - I actually thought of that too as I was laying it out - but then pushed it out of my mind when I remembered that it's like 50/50 whether or not I'll loot the cave our just go straight start-to-finish.
This could work for the Behemoth battles on the way to Bahamut though; right?
Title: Re: Apropos of nothing (except of course FFIV)
Post by: Grimoire LD on February 08, 2015, 10:35:33 PM
The issue appears in this when there is more than one TrapDoor in the room, this may have possibly worked otherwise, but because of the multiple doors it's not really plausible. Good thinking though.
Right! :sad: - I actually thought of that too as I was laying it out - but then pushed it out of my mind when I remembered that it's like 50/50 whether or not I'll loot the cave our just go straight start-to-finish.
This could work for the Behemoth battles on the way to Bahamut though; right?
It would require new code in Bank 00 to look for the map, see the events, and go on from there. As far as the Behemoths are concerned it could work, but it would be a lot of work to set up, it would save some valuable event calls though...