øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=14;area=showposts;start=465e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2429.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=14e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2429.html.zxѼg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0P.„OKtext/htmlISO-8859-1gzip0|Ö„ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 16:30:32 GMT0ó°° ®0®P®€§²ð®мg^ÿÿÿÿÿÿÿÿV2„ Show Posts - Pinkpuff

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Pinkpuff

466
Final Fantasy IV Research & Development / Re: The Drawing Board
« on: January 15, 2014, 08:14:46 PM »
I'll buy that - that's the kind of back-story that even if ret-conned still feels right. "Unraveling one ancient magical after another with his abilities..." definitely building towards Meteo - Coincidentally a name which if given the space I still wouldn't change: to see a man put all of himself in to trying to kill someone and in trying shouts "METEOR" really just doesn't carry the same force behind it as "METEO" - That may be me though.

Meteo does have a certain uniqueness to it, doesn't it.

That's not bad - not too bad at all; I like it!

On a personal note it would free me of the guilt I can't shake when even thinking of messing with the story in the game - I feel like I'm betraying it - what is that? Honestly now?  :omg: - But back story with new characters: "Golden Ticket" time! As long as there's no George Lucasing - no guilt!

Thanks!

Tellah was always pretty energetic but just imagine what he'd be like with the vigor of youth! Maybe he'd actually be more red-mage-like, with the feather hat and able to equip some swords and such... and I know what a headache this would probably be to implement, but can you imagine Double Cast??

467
Final Fantasy IV Research & Development / Re: The Drawing Board
« on: January 15, 2014, 08:03:45 PM »
Actually if you ask me, a prequel would be an interesting idea for a hack. A sort of "FF4 The Before Years" or something. Young Tellah, young Odin, maybe Palom & Porom's parents (a Time Mage and an Oracle might be interesting for them!), some original characters of course, explore some jobs from other FFs that we didn't get in any other version of FF4 like Geomancer, Mystic Knight, etc. maybe use some of those cool custom commands going on in the other thread...

468
Pretty much, yeah. With XML you define a more or less standard way to represent data, which can be manually edited and expanded at will. Here's and example of what I have in my enemy database:

Yup that's pretty much what I was picturing. FF4kster will still need a ROM file regardless because it gets all sorts of other information from there, including things like the font and menu graphics (so it's literally unusable without a loaded rom). But I can certainly picture something like "export project file" which will create an xml file based on the loaded rom or "import project file" which will read the xml file the user provides and alter the loaded rom according to the specifications.

That said, it probably won't be happening any time soon. It's still evolving at a fairly rapid pace (relatively speaking), and we're still discovering things about the game data that would cause us to have to revisit the structure for some objects fairly frequently. But it does sound like an ideal solution to the problem down the road.

469
Sadly though, using FF4kster with this will almost certainly be disastrous for your rom.
Yeah, I thought of this too, but there is a solution, although it could be awkward to realize: databases. Say, you could save most information in an expandable format as human readable data, like XML. You could dump data to XML and graphics to PNG/BMP, then open a project from there and transform the data into whatever form you desire, being it for the original SNES rom or smaller packages needed by my project. I'll give this a shot soon in order to dump all monster data to a database I will later use for a bestiary; I'll be using a structure that embeds all information for a monster in a single block of data with no shared attributes (i.e. drop lists can be updated to be unique).

Aw yeah, I love it! Just to make sure I understand what you're saying correctly, we could have some kind of agreed-upon "save file" format, different/separate from the actual rom, that both our programs could import/export from?

Quote
And... oh God, Huffman trees... I definitely understand the utility of them but I still get nightmares about those from trying to hack Jeopardy for the NES. I managed to figure out the tree by tracing the code, then found that the answers used a different tree from the clues... and then once I deciphered those I discovered I had no clue how to even go about looking for the pointers... it was a mess. But at least with this, you'll have that kind of information handy right?  :wink:
Mind you, I don't have any idea how this works exactly as I'm only familiar with regular Huffman. xD Kingcom sent me a wall of C/C++ code a long time ago with his own implementation, to test how MultiHuffman would perform on FF4; it did pretty well, even with no DTE or dictionary, but it's only natural as this algorithm was specifically intended to be used on text rather than any other types of data. Surprisingly, the actual decompression code used in game is quite small, like 50-55 lines of assembly at best.

Oh yeah don't get me wrong, Huffman is super efficient! I know nothing about "MultiHuffman" but I assume it's probably even more efficient. But it's just such a pain for hacking ^_^;

470
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 ^_^;

I read that and thought "Yep - I know...it's like the time you just gave and stopped building the greatest editor - yeah, ever"

Oh stop  :blush:
... Though it has broken 1000+ downloads on RHDN! I never thought it would be so popular.

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 ^_^;

471
First off, this looks totally amazing.

Sadly though, using FF4kster with this will almost certainly be disastrous for your rom.

And... oh God, Huffman trees... I definitely understand the utility of them but I still get nightmares about those from trying to hack Jeopardy for the NES. I managed to figure out the tree by tracing the code, then found that the answers used a different tree from the clues... and then once I deciphered those I discovered I had no clue how to even go about looking for the pointers... it was a mess. But at least with this, you'll have that kind of information handy right?  :wink:


472
So will this patch make it so that you:

* Cast instead of physical damage? (so, attacking with ice rod never causes physical damage and always casts Ice-1)
* Cast in addition to physical damage, always? (so attacking with the ice rod always causes physical damage and always casts Ice-1)
* Cast in addition to physical damage, sometimes? (so attacking with the ice rod always causes physical damage but may or may not cast Ice-1)

473
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.

474
Ok, well there's documentation over at 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")

Code: [Select]
sub Character.ReadFromROM(index as UByte)

 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
 
 temp = ByteAt(start + 1)
 sprite = temp mod 2^4
 
 level = ByteAt(start + 2)
 max_hp = ByteAt(start + 9) + ByteAt(start + 10) * &h100
 max_mp = ByteAt(start + 13) + ByteAt(start + 14) * &h100
 
 for i as Integer = 1 to 5
  stat(i) = ByteAt(start + 14 + i)
 next
 
 xp = ByteAt(start + &h17) + ByteAt(start + &h18) * &h100 + ByteAt(start + &h19) * &h10000
 tnl = ByteAt(start + &h1D) + ByteAt(start + &h1E) * &h100 + ByteAt(start + &h1F) * &h10000
 
 actor_index = character_id

 start = &h7B700 + (actor_index - 1) * 2
 level_ptr = ByteAt(start) + ByteAt(start + 1) * &h100 + &h70200 + 5 * (level - 1)
 
 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

475
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.

476
Final Fantasy IV Research & Development / Re: Fun with Summons
« on: January 13, 2014, 08:00:15 AM »
That is almost certainly what is happening. FF4kster saves absolutely everything even if you've changed nothing. For most things, this results in no change, but for some things (definitely messages, and probably events as well), even though there is no functional difference in the gameplay, the underlying representation may not be identical to what was there originally.

For a while I have been thinking of going through and making it so that it detects when you've made a change to a section and only saves that section if something was changed in it. But that might not be for a while yet. It will probably happen around the same time that I go through and put in all the data bleeding safeguards.

477
Final Fantasy IV Research & Development / Re: Fun with Summons
« on: January 13, 2014, 02:37:54 AM »
Would this work?:

1. Make patch for opening events only
2. Apply summon patch to clean rom
3. Apply events patch to summon-patched rom

478
There's no question that they're different tilesets. However it's apparently possible that two different tilesets share the same pointer for the graphic tiles. The ship and airship do seem to have the same pointer as each other, and the Tower, Giant, and Whale all seem to share a pointer as well. The only thing is that the Giant tiles, well, some look fine, but many don't. And I can't get the airship or sea ship tilesets to look correct, even at what should be the correct pointer.

479
Ok so I managed to find almost all the tilesets:

Castle Exterior: EEF40
Sealed Cave: F0220
Town: F1768
House: F2EC0
Castle Interior: F3AC0
Crystal Room: F51E8
Lunar Subterrane: F61A8
Lunar Core: F61A8
Feymarch: F8200
Tower: F9700
Lunar Whale: F9700
Mountain: FD408
Cave: FEA88

The ones missing are the Giant, the Ship, and the Airship.

The Giant I found partial success at the same address as the Tower and Lunar Whale, but while some of the tiles would appear correct, others would not; so if that is the correct address, then there's something else going on for the Giant tileset specifically.

The Airship address I noticed was posted in the first page of this thread, and it is oddly at 4 BPP rather than 3 like the rest of them, but it too does not seem to appear correctly. The ship I have no idea whatsoever. Could be that it shares graphic tiles with the Airship tileset much like the Tower and Lunar Whale; but until I can get the Airship tileset working I don't have any way to verify that.

I can't convert the system to dynamic tile reading until I can get all the tilesets working. Does anyone have any ideas as to where I should go from here?

480
I'm relieved that the map editor is coming along!  :)

Actually the map editor proper is basically done already as of the version currently on RHDN. The only planned features it's missing are copy/paste, and toggle display of NPCs and background map.

Sweet!  Love the copy/paste!  Do you think you could add a clone map feature?

Maybe? Not sure what the point would be though... especially when you could either highlight the entire map, copy it, and paste it to another map, or just set the other map's map index to the map you want it to be a copy of...

In any case, right now my focus is on getting the map tile editor working.