Quick Research & Development Thread
View Single Post
August 24th, 2013 (08:26 PM). Edited August 24th, 2013 by SBird.
Join Date: Aug 2009
Quote originally posted by
I think a saddle would work. However, your method is much more difficult than mine. The structure of OWs involves 4 different tables, and each sprite, just for headers and pointers, nevermind the images themselves, would need at least 30 bytes, per image. For my idea, we would just read directly from an image table with 12 bytes max (pokemon number (2bytes), img pointer (4 bytes), palette pointer (4 bytes)). And we wouldn't have to deal with all of the extra data that OWs have.
Also, I'm sad to say, that on Emerald, there is no hack to allow more than 256 OWs. Right now, emerald is already at 240. This would limit you to an extreme amount unless you port over JPAN's massive OW hack.
On another note, we could also just hack the OW loader, so that when it is loading the bike, we simply push it to a different table, but using all of the same parameters as the bike. Then we wouldn't need to worry about expanding OWs.
If Jambo is interested, he could code it into a move himself, since he knows how to, but I don't know if this would be his thing.
If you do want to continue with the bike OW thing, go to RHO. I just finished code to force an immediate OW switch that doesn't require a reload of the screen or warping.
View original post
I don't think it would be a problem to expand the OW table or at least use some sort of switch to use an alternate table if needed. I did not try it though. I already have my code to change the OW. Actually as said i'm only hijacking the loader routine and switching out the parameter(which is passed by r0 or r1, not quite sure at the moment) to make the game load a different OW. It does not actually effect how the sprite is handled by the game, so if you load a sprite without running animation you won't have one, the game will just accept it as being the new hero OW. If you do load a sprite with a few extra frames it will be no problem eighter, they are just not used. Also if you replace the bike and use the bike routine one will be able to "ride" a pokémon. If it is needed you would also have to expand the OW table. In fact this is (i guess) regulated by a simple cmp opcode to check if the passed argument is greater than the fixed value, if it is, it handles it differently and I guess OWs over 255(1byte) will be killed by the standardized lsl lsr structures that classifies the argument as a byte value, leaving only the last 8 bit of the parsed value. If someone wants to increase the amount of OWs in the table he would have to a) repoint the table to somewhere in the rom, b) increase the parsed value to at least half-word size and c) bypass the compare that is used by the game to check wether the OW is one of the "special treated" ones. Maybe you could arrange it so that those won't get lost and you just load your real OWs above the byte border again. I don't know exactly what those few OWs are for, but I guess if you are able to keep them you always should because it's part of the main game.
I did once write a routine to at least use more than one OW table therefore I know that it's working, but I did not test to expand the current table at all. I just don't see any obstacles(I did not look at JPANs routines eighter, since they are all for Firered and I guess at least in the part of how the game handles overworlds those two have some differences, at least in FR OWs are also captable of executing scripts if the right sort of behavior byte is set, this is not the case in Emerald)
Well I guess i will try to use some sort of item first, for the moment I just can't come up with another solution probably it is also possible to implement some sort of "professional tamer" who allows you to "set" your saddle to a specific pokémon which of course can be "ridden" so you have an actual explanation for the player. Still using a ride move would be the best solution(in my opinion) but who knows what the future brings...
Edit: I guess if one expands the OW table he is also not able to use the new OW regularly on a map, at least advance map does not allow half word sized values. I don't know if this is also stored in byte form but it should'nt bother the game if it loads it from a dynamic ram adress like a in-game variable or something, you can basically store the "new bike" OWs and everything you do not need to use like regurarly on a map beyond the byte limit and your regular ows befor that. I don't know how JPAN worked himself arround this problem, I'm pretty sure advance map and other mapping tools won't support entrys beyond one byte if the map structure does not allow it. JPAN would have to hack the whole map structure which would make all the normal maps unuseable and the tools had to adapt themselves which is also unknown to me(Maybe i'm just uninformed)
View Public Profile
Send a private message to SBird
Find all posts by SBird
Find threads started by SBird
Ignore Posts by SBird