Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
A sequel to an infamous game, I made a small WIP because I have too much free time. Differences between the 2 versions: This is only relevant for the TAS; other differences I skip. *The RAM addresses of Speed and Power are offset by +0x10. Ie. If an address in Speed was at 0x0000, then the same one in Power will be in 0x010. *Rival uses Gyuun in Speed, Doon in Power. **Gyuun seems easier to defeat than Doon; takes 1 less turn **Both game rival fights give the exact same amount of XP however *Most other bosses are alike; down to the XP given. ** The last fight with the thieves have slightly different Denjuu, but they end up dying just as fast ** Some bosses seems "slower" despite having the same speed stat *Certain NPCs appear sooner/latter; ie. Ruscus appears at a low level area at level 23 in Speed, but much latter as level 51 in Power. Doon's 2nd and 3rd fight take far longer than Gyuun's. Just make sure: * Scrippa's ally is able to deal 10+ damage on Demerus * Cotta's ally is either Kaya, or Akretto (Grassland) for Ryuugu. * Get 11 DP drinks either through fight, or grass. Never in chests or stores. This game is otherwise super linear. Edit: Information posting here for easier search: All addresses relevant to the run appear to be on IWRAM in BizHawk (0x30000000 region in VBA) Some RAM Addresses are located here: http://datacrystal.romhacking.net/wiki/Keitai_Denjuu_Telefang_2:RAM_map Not listed, but can be useful include: *3000410 - Battle? *300041C - Denjuu you're going to fight *300042C - Game state for battles (1 is start, 3 is battle, 5 is win, 7 is recruit, 8 is items. Forcing it to 7 can also recruit bosses) *3002870 - Battle win/lose boolean (1 is win) *3002888 - Boss Battle ID (which boss you are on; trainer fights use this along with some other thing) *3002A00 - Item dropped after battle *3002A0B - Damage dealt (applies to both you and foe) *3002B06 - Move used/using *3002B84 - Opponent selected *3002C14 - Hit/Miss (61 is hit, 64 is miss; in decimal) *3002C16 - Battle related; see below *3002C22 - seems to be related to critical hit; it appears to be 1 when a crit appears, but freezing it at 1 does not cause the crit. *3004102 - Denjuu that you're recruiting *30042D2 - Friend Denjuu attacking Oh, and the addresses for Denjuu is listed wrong. It's actually: *30041F2 - Denjuu 1 ID *300422A - Denjuu 2 ID *3004262 - Denjuu 3 ID The offsets for the above correspond to the following: +0x1 - LV +0x2 - HP(Current) +0x3- HP(Max) +0x4 - DP (basically special power meter) +0x5 - SPD +0x6 - ATK +0x7 - DEF +0x8 - SPEC +0xA - Personality/Nature +0xB - FD +0x15 - Friend denjuu +0x16 - First move +0x1E - Second move +0x26 - Third move? +0x2E - Fourth move? For those not aware what I am talking about, just use this script: Post #439938 Edit: More battle addresses + Fixed some things on Denjuu Edit 2: While holding "AB" for dialogue goes past it, it appears it loses 1 frame every single new box. Holding only "B", but pressing "A" at select parts is better. Edit 3: Battle state 3002C16 and values 0x0- battle start 0x1 - battle start 0x2 - item category select (menu before 0x16) 0x3 - attack animation 0x4 - no idea, but it then advances to 0x5 0x5 - determines when attacks crit and damage dealt. 0x6 - attacking; when the number pops up 0x7 - decrement 3002A0B and HP by 1 (you or the opponent depending on turn) 0x8 - WIN!/LOSE! depending on whose turn 0xA - damage dealt number fade away? 0xB - next turn? 0xC - you or the opponent dies (depending on the turn) 0xF - you or opponent blinking; right before getting attacked 0x10 - attacking 0x12 - other menu (items,run,etc) 0x13 - main attack select menu 0x14 - normal attack select 0x15 - special (denjuu) attack select 0x16 - items select 0x17 - you, the human, retreating offscreen 0x18 - bringing up menu 0x12 0x19 - pressing A on an item to use on opponent 0x1A - using items on opponent 0x1B - pressing B from above 0x1C - pressing A on an item to use on yourself 0x1D - using items on yourself 0x1E - pressing B from above 0x1F - You or your opponent's turn start 0x20-0x21 - select opponent to attack 0x22 - right after selecting opponent 0x23 - pressing B when selecting opponent 0x24 - determines opponent move used. 0x27 - opponent moving back offscreen 0x28 - opponent moving back on screen 0x2F - opponent's turn 0x30 - pressing left during menu 0x13 0x31 - checking your own...things? (LV/TP/SE/SP) during your turn by pressing left 0x32 - pressing right during above 0x36 - Your ally arrived (changing to this value during opponent's turn will cause you to hijack their choice then attack yourself!) 0x37 - some ally arrived message 0x38 - opponent ally arrived 0x39 - pressing right during menu 0x13 0x3A - checking the opponents LV/TP/SE/SP during your turn by pressing right 0x3B - pressing left during above 0x3F - determines hit/miss. 0x40 - jumping back animation when attack misses 0x41 - attack missed message 0x55 - sends your friend to do a bit of damage. 0x5C- "Telefang Start!" message fade away 0x5D - "Telefang Start!" message fade away 0x79 - Something about status, and not affected 0x7A - Some status (sleeping?) 0x88 - Determines if ally appears to help you attack before your turn 0x89-0x8B - bring up main attack menu (0x13) Edit 4: All addresses for Power is basically the same as speed but +0x10. For example, for speed, enemy battle addresses are 0x41F2, 0x422A, 0x4262. In power, you add +0x10, so it becomes 0x4202, 0x423A, 0x4272 Edit 5: IWRAM 0x3910 and addresses around that part seems to be for items in stores. Not sure how chest data are stored, since for instance 0x360C is the chest in map 1, but nowhere else. Edit 6: NPCS and Objects on overworld is stored like this Up to 22 NPC structures, stored between 30034D0 - 3003770 each with size 0x20 Edit 7: Music = 0x4AE2 1 - Recruit intro 2, 3 - Game intro theme 4 - Credits 5 - Battle Start 6 - Battle 7 - Rival 8 - Other bosses 9 - Last boss 10 - Win 11 - Lose 13 - Recruit 14 - Item 15 - Game Over 16 - Unused 17 - Human World 18 - Most overworld areas 19 - Desert 20 - Sea 21 - Kufumoku Mountain, Ujichichi Mountain 22 - Antenna Tree 23 - Cave 24 - Cave 2 (Chiawata Cave, Uraani Cave, Barusuta Cave) 25 - Bandit's Hideout 26 - Kamishino Ruins 27 - Barusuta Forest 28 - Holy Land Iasuka 29 - Helchika Village, Bijinia Village 30 - Takadama Village, Meribaro Village, Kiwatora Village 31 - Chiawata Village, Uraani Village 32 - Shop 33 - Evolve Center 34 - Phone Shop 35 - Lab (Human World) 36 - Evolve 37 - Evolved (Lab) 38 - Story related; before rival fight 1 39 - Story related; Success? 40 - Story related; leaving the human world again to find the crooks 41 - Story related; Emergency? 42 - Story related; the 3 Crooks 43 - Diabolos Theme (Overworld) 44 - Menu 45 - 105 are phone ringtones https://docs.google.com/spreadsheets/d/1wloZT-1KjMWVzKzmdTyBMEh_oONX2vgT0MfLbJAND_A/edit?usp=sharing
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
I'm sory, but... I JUST FOUND A HUGE SEQUENCE BREAK!!!OMG!!! and that's it. EDIT: It's a save glitch that allowed me to completely skip the rival battle!
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Hmm.... It seems that skipping the rival battle will yield unwanted results. I think I got an idea on what to do, but it may or may not work. I'll try it out now.
Active player (315)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
I played only the first game (advertised as "Pokemon Diamond" hah) a looooong time ago, in the GBC. It was much more interesting than Pokemon Gold/Silver. This sequel doesn't look bad...
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Ok, I recruited a level 47 Denjuu (Picture below) at a normally unreachable location due to the plot. I then used it to kill off most of my opponents in 1-2 turns. I'll post the WIP once I gain the ability to push heavy objects.
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
It looks interesting so far, the save glitch is cool, but also slightly annoying. Did you try to get the passthrough in as few saves as possible? I think I counted 5....
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
DarkKobold wrote:
It looks interesting so far, the save glitch is cool, but also slightly annoying. Did you try to get the passthrough in as few saves as possible? I think I counted 5....
About that.... Since skipping the battle prevents plot progress, I used the glitch to recruit a high leveled partner to kill everything else within 3 turns. It took sometime, but I believe it's worth it as it drastically shortens the next 12 or so battles.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Ok, 32 minutes into the game, unlocked the ability to push heavy objects, got 2 new recruits, 1hko 2 bosses, and gained a new phone. The Wip Here. Note: I used the save glitch to avoid grinding my levels up to fight the bosses. Unfortunately, I think it took too long..... I'm still wondering is it worth the time to easily kill the next 11 bosses...
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Decided to redo the first rival battle in hopes of some possible improvement. I'll post a wip of it once I finish the battle. Edit: I believe I found the RNG that determines what happens during a battle! It's the addresses 03000840 and 03000841. The later increases by one every time the former increases by 255. Causing them to stay constantly at the same value seems to result in the same attack, recruit, and spoil in battle.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Well, looks like I managed to squeeze in 142 frames at the first rival battle. I'd actually saved alot more before, but it caused the herb I got to be replaced with another item, thus messing up that "improvement". WIP Here Time was saved by KOing the bird Denjuu earlier.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Ok, I recruited the level 47 Denjuu again, this time faster than before due to the use of evolution. WIP Here. Note: I wasted around 1k frames evolving and gained it all back plus 216 frames during the battle.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Update time! As much as would have wanted to occur, it seems that it is slower to fight the level 47 Denjuu without evolving. No matter what, I can't seem to be able to defeat the bird without losing too much time mainipulating its behavior. That said, I will now try to improve my previous Wip. Edit: Not sure if this will work, but.... I've optimized most of the running and enemy movements before the Lv 47 battle. Now all I need to do is hex-edit in the battle(hope it works) and post the WIP here.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Finally made it to the third village, saving 424 frames from the previous WIP. Optimized movement and found a way to somewhat mainipulate enemy movement. WIP Here Edit: Finally Posted Wip.
NitroGenesis
He/Him
Editor, Experienced player (556)
Joined: 12/24/2009
Posts: 1873
What rom are you using, I'm getting a desync. I am using "Keitai Denjuu Telefang 2 - Speed (Japan) [F1].GBA"
YoungJ1997lol wrote:
Normally i would say Yes, but thennI thought "its not the same hack" so ill stick with meh.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
NitroGenesis wrote:
What rom are you using, I'm getting a desync. I am using "Keitai Denjuu Telefang 2 - Speed (Japan) [F1].GBA"
Th rom's name is: 0420 - Keitai Denjuu Telefang 2 - Power (J)
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Not sure if I'm lucky or not, but I've somehow managed to obtain several healing items whislt trying to mainipulate the Denjuu's movement. I am not sure if the items would do any good, but I kept them anyway. I'm now trying to get the insect-like Denjuu to get to a better spot. I will post the Wip once this is done.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Here it is, the Wip. I uprooted weeds to mainipulate the foes to move away from my destination. I was very lucky to have the insect run towards me before the battle. I delayed quite a bit during the battle to score a critical hit; this allowed me to save 30 DP. I had to use Kotta for the battle as Rex couldn't defeat the insect within 2 turns, even with critical hits on both turns.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
I found a new way to rush through the early parts of the game thanks to a minor oversight at the beach right after the first town: While you can't normally battle it this early, running to the wall would provoke it, allowing it to be fought. This allows me to recruit a level 28 monster with a special attack that through brief testing, allows most bosses up to the desert to be OHKO'd. It has 52 HP, which while that means a lot faster battle to recruit compared to the above WIP, it also means I'll have to either heal or wait for enemies to miss (depending on the situation). Edit: すばやさ "speed/agility" こうげき "attack/offensive" ぼうぎょ "defence/defensive" でんま (no idea) Thanks to the ppl on wikia :P
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
jlun2 wrote:
It has 52 HP, which while that means a lot faster battle to recruit compared to the above WIP, it also means I'll have to either heal or wait for enemies to miss (depending on the situation).
I'm finally done compiling all the sell prices of the first 127 items. Any item beyond 127 is a glitched graphic, with 142 - 255 being recolors of the same messed up sprite. I still have no clue what some of the items do, but from simple checking, it seems all stores buy the items at the same price. Edit: Great news! I believe I found the RNG determining drops.....from grass: 0x03005E10 - 4 bytes - unsigned/hex For example, changing it to the following gives herbs d28de7bb However, I'm certain there's more to it since changing address: 0x03002A1C seems to give a different drop too. Edit 2: 0x03005E08 - 2 bytes unsigned/hex I believe this is related since changing this to 1d20 with the above value being d28de7bb simultaneously gives you 1 herb drop followed by 4 coin drops. Also, it doesn't seem to have any effect until you recruit Rex. :P Edit 3: It appears on BizHawk, these are all IWRAM addresses. Also 0x0840 appears to be a frame counter that also affects hits. In that case, the easiest approach would be to bot the crap out of battles and see which all outcomes beforehand for idk, the first 65,000 frames, recording everything a value does.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
So I finally made a playthrough using cheats so that even if I lose I would still "win" in order to see how long the game would at least be without battles. It took over 1 hour and 30 minutes. http://tasvideos.org/userfiles/info/33467226742199528 Used BizHawk 1.11.7 I predict with battles, it would probably add an hour. Edit: Bot script for 1.11.7
memory.usememorydomain("IWRAM")

local frame_start = emu.framecount()

function waitframe(frame)
	while (frame >= 0) do
		emu.frameadvance()
		frame = frame-1
	end
end
--[[Start the script as you select an opponent to attack
Algorithim:
1. Record current frame
2. Make a savestate
3. Press "A"
4. Advance 100 frames
5. Check to see if attack hit/missed. If missed, skip to step 7. If hit proceed to next step
6. Check if it had critical hit. If so stop. If not, continue. Don't check if move is ID 0xC2
7. Load the state
8. Advance 1 frame
9. Repeat from step 2
]]--
while true do
	local frame_now = emu.framecount()
	local frame_dif = 0	--difference between this frame and start frame
	if (frame_dif ~= (frame_now - frame_start)) then
		savestate.saveslot(1)
	end
	joypad.set({A = 1})
	emu.frameadvance()
	waitframe(100)
	console.log("Reached 1")
	if memory.readbyte(0x2C14) == 61 then
		break 
	else
		frame_dif = frame_dif + 1
		savestate.loadslot(1)
		console.log("Dif"..(frame_now - frame_start))
		console.log("Frame now: "..frame_now)
		--console.log("Reached 2")
	end
	emu.frameadvance()
end
Will expand on it.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
These are the mandatory boss battles that occur: Boss 1 (ID 1?) - Rival (Gyuun (Basic) & cohorts) PhoneID 10 110 48 GameID 190 117 35 Levels 11 8 6 Health 48 17 15 Speed 28 13 13 Attack 19 13 14 Defence 19 21 14 Denma 32 18 12 BOSS 2 (ID 1) - Anpipit (Desert) & cohorts PhoneID 43 156 104 GameID 30 165 111 Levels 16 12 11 Health 48 26 35 Speed 21 28 15 Attack 26 22 20 Defence 26 20 18 Denma 40 22 11 BOSS 3 (ID 2) - Gymnos & cohorts PhoneID 159 158 157 GameID 168 167 166 Levels 22 16 12 Health 77 44 27 Speed 32 20 17 Attack 41 26 19 Defence 35 25 21 Denma 33 34 22 BOSS 4 (ID 3) - Cabot (Basic) & cohorts PhoneID 55 124 0 GameID 45 131 0 Levels 22 19 0 Health 63 49 0 Speed 38 35 0 Attack 34 31 0 Defence 43 29 0 Denma 31 38 0 BOSS 5 (ID 4) - Mystacea (Basic) & cohorts PhoneID 85 30 64 GameID 75 17 54 Levels 24 20 20 Health 77 44 53 Speed 40 30 18 Attack 36 30 30 Defence 35 40 40 Denma 41 23 28 BOSS 6 (ID 5) - Mentalis (Basic) & cohorts PhoneID 26 49 63 GameID 13 53 36 Levels 28 22 25 Health 85 51 48 Speed 39 42 28 Attack 48 37 38 Defence 40 37 35 Denma 47 43 36 BOSS 7,8,9 (ID 6) - Hermit (Desert) & cohorts PhoneID 99 99 0 GameID 104 104 0 Levels 31 31 0 Health 85 54 0 Speed 48 48 0 Attack 54 54 0 Defence 45 45 0 Denma 61 54 0 BOSS 10 (ID 7) - Hermit (Desert) w/o cohorts PhoneID 99 0 0 GameID 104 0 0 Levels 31 0 0 Health 85 0 0 Speed 48 0 0 Attack 54 0 0 Defence 45 0 0 Denma 61 0 0 BOSS 11 (ID 8) - Demerus (Desert) & cohorts PhoneID 109 99 99 GameID 116 104 104 Levels 42 35 35 Health 109 57 57 Speed 57 53 53 Attack 63 57 57 Defence 58 50 50 Denma 56 57 57 BOSS 12 (ID 2?) - Rival v2 (Gyuun (Aquatic) & cohorts) PhoneID 12 57 25 GameID 192 12 47 Levels 42 40 40 Health 98 65 67 Speed 57 46 55 Attack 59 56 57 Defence 58 56 56 Denma 57 61 44 BOSS 13 (ID 3?) - Rival v3 (Gyuun (Forest) & cohorts) PhoneID 13 31 31 GameID 193 18 18 Levels 52 47 47 Health 114 65 65 Speed 63 57 57 Attack 72 64 64 Defence 70 64 64 Denma 65 70 70 BOSS 14 (ID 10) - Easydog & cohorts PhoneID 133 136 48 GameID 142 145 35 Levels 52 48 46 Health 147 80 77 Speed 67 65 86 Attack 75 73 69 Defence 72 68 70 Denma 64 64 80 BOSS 15 (ID 11) - Ryuuguu PhoneID 135 0 0 GameID 144 0 0 Levels 56 0 0 Health 148 0 0 Speed 72 0 0 Attack 82 0 0 Defence 78 0 0 Denma 89 0 0 BOSS 16 (ID 12) - Enteioh & cohorts PhoneID 157 137 94 GameID 166 146 97 Levels 58 55 50 Health 160 82 74 Speed 77 66 61 Attack 74 71 72 Defence 79 75 69 Denma 98 55 51 BOSS 17 (ID 13) - Diabolos (Natural-2) & cohorts PhoneID 175 136 137 GameID 199 145 146 Levels 80 72 72 Health 221 138 110 Speed 131 113 102 Attack 135 106 95 Defence 144 99 96 Denma 150 93 96 Using the level 47 mentioned above, I believe it's possible to make it at least to boss 12 without problems. It becomes a lot more difficult however, since the last 5 bosses all have over 100 HP. I might have to check if it's worth recruit the level 28 due to this. Edit: https://docs.google.com/spreadsheets/d/1VcsEQ5pH-WzHRjSN0XP5qRe1-xCY1UOZ8uTsFZOF7R4/edit?usp=sharing All fights + notes Edit:Download telefang2.lua
Language: lua

memory.usememorydomain("IWRAM") --[[ Example for the below: 41F2 - EID 41F3 - ELV 41F4 - EHP(Current) 41F5 - EHP(Max) 41F6 - EDP 41F7 - ESPD 41F8 - EATK 41F9 - EDEF 41FA - ESPEC 41FC - Nature 41FD - FD 4207 - 1st move 4209 - 1st move power 4210 - 2nd move 4211 - 2nd move power 4218 - 3rd move 4219 - 3rd move power 4220 - 4th move 4221 - 4th move power 4228 - next denjuu's turn ]]-- local Map = {} --Because some of the maps have values all over the place function assign_multi(string,...) for i, v in ipairs(arg) do Map[v] = string end end --Check if power or speed version; they have addresses in different places function version() if memory.read_u32_le(0x0000A8,"ROM") == 0x574F5032 then return "Power" elseif memory.read_u32_le(0x0000A8,"ROM") == 0x45505332 then return "Speed" else return "NA" end end --checks the mouse position during a click relative to the client and see if its within some range function get_mouse_pos(x,y,width,height) mx = input.getmouse().X my = input.getmouse().Y --input.getmouse() is already relative to client :) if (mx >= x and mx <x>= y and my <= y+height) then return true end return false end assign_multi("Bandit's Hideout",98,99,100,101,102,103,104) assign_multi("Barusuta Forest",63,64,65,66,67,68,69,70) assign_multi("Bijinia Desert",75,76,77,78) assign_multi("Bijinia Village",20,46,97,131,132) assign_multi("Chiawata Cave",49,50,51,52,53) assign_multi("Chiawata Forest",2,3,133) assign_multi("Chiawata Village",47,87,139,167) assign_multi("Helchika Desert",71,72,73,74) assign_multi("Helchika Village",96,129,130,140) assign_multi("Hiero Loophole",25,26,27,28) assign_multi("Holy Land Iasuka",136,142,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164) assign_multi("Human World",48,128,134,143,165) assign_multi("Kamishino Ruins",106,107,108,109,110,111,112,113,114,115) assign_multi("Karatsumu Cave",116,117,118,119,120,121,122,123,124,125,126,127) Map[82] = "Kiwatora Coast" assign_multi("Kiwatora Field",6,7) assign_multi("Kiwatora Village",19,45,81,95) assign_multi("Kufumoku Mountain",15,23,24) assign_multi("Meribaro Forest",4,5) assign_multi("Meribaro Village",18,44,80,93,170) assign_multi("Takedama Cave",21,22) Map[0] = "Takedama Forest" assign_multi("Takedama Village",16,39,40,41,42,138) assign_multi("Tekku Sea",135,137) assign_multi("Tokaribe Coast",83,84,86) assign_multi("Tokaribe Field",1,85) assign_multi("Tokaribe Village",17,43,79,94,169) assign_multi("Ujichichi Mountain",29,30,31,32,33,34,35,36,37,38,89,90,91,92) assign_multi("Uraani Cave",54,55,56,57,58,59,60,61,62,105) assign_multi("Uraani Forest",8,9,11,12,13,14) Map[10] = "Uraani Tides" assign_multi("Uraani Village",88,141,166,168) local Picture_Book = { [0] = 15,[1] = 16,[2] = 17,[3] = 176,[4] = 177,[5] = 18,[6] = 19,[7] = 20,[8] = 21,[9] = 22, [10] = 23,[11] = 24,[12] = 25,[13] = 26,[14] = 27,[15] = 28,[16] = 29,[17] = 30,[18] = 31,[19] = 32, [20] = 37,[21] = 38,[22] = 39,[23] = 40,[24] = 33,[25] = 34,[26] = 35,[27] = 36,[28] = 41,[29] = 42, [30] = 43,[31] = 44,[32] = 45,[33] = 46,[34] = 47,[35] = 48,[36] = 49,[37] = 178,[38] = 179,[39] = 180, [40] = 50,[41] = 51,[42] = 52,[43] = 53,[44] = 54,[45] = 55,[46] = 56,[47] = 57,[48] = 58,[49] = 59, [50] = 60,[51] = 61,[52] = 62,[53] = 63,[54] = 64,[55] = 65,[56] = 66,[57] = 67,[58] = 68,[59] = 69, [60] = 70,[61] = 71,[62] = 72,[63] = 73,[64] = 74,[65] = 75,[66] = 76,[67] = 77,[68] = 78,[69] = 79, [70] = 80,[71] = 81,[72] = 82,[73] = 83,[74] = 84,[75] = 85,[76] = 86,[77] = 87,[78] = 181,[79] = 182, [80] = 183,[81] = 184,[82] = 185,[83] = 186,[84] = 187,[85] = 88,[86] = 89,[87] = 90,[88] = 188,[89] = 189, [90] = 190,[91] = 191,[92] = 192,[93] = 193,[94] = 91,[95] = 92,[96] = 93,[97] = 94,[98] = 194,[99] = 195, [100] = 95,[101] = 96,[102] = 97,[103] = 98,[104] = 99,[105] = 100,[106] = 101,[107] = 102,[108] = 103,[109] = 196, [110] = 197,[111] = 104,[112] = 105,[113] = 106,[114] = 107,[115] = 108,[116] = 109,[117] = 110,[118] = 111,[119] = 112, [120] = 113,[121] = 114,[122] = 115,[123] = 116,[124] = 117,[125] = 118,[126] = 119,[127] = 120,[128] = 121,[129] = 122, [130] = 123,[131] = 124,[132] = 125,[133] = 198,[134] = 199,[135] = 126,[136] = 127,[137] = 128,[138] = 129,[139] = 130, [140] = 131,[141] = 132,[142] = 133,[143] = 134,[144] = 135,[145] = 136,[146] = 137,[147] = 138,[148] = 139,[149] = 140, [150] = 141,[151] = 142,[152] = 143,[153] = 144,[154] = 145,[155] = 146,[156] = 147,[157] = 148,[158] = 149,[159] = 150, [160] = 151,[161] = 152,[162] = 153,[163] = 154,[164] = 155,[165] = 156,[166] = 157,[167] = 158,[168] = 159,[169] = 160, [170] = 161,[171] = 162,[172] = 163,[173] = 164,[174] = 165,[175] = 166,[176] = 167,[177] = 168,[178] = 169,[179] = 170, [180] = 0,[181] = 1,[182] = 2,[183] = 3,[184] = 4,[185] = 5,[186] = 6,[187] = 7,[188] = 8,[189] = 9, [190] = 10,[191] = 11,[192] = 12,[193] = 13,[194] = 14,[195] = 171,[196] = 172,[197] = 173,[198] = 174,[199] = 175} --Attack names local Attacks = { [0] = "????",[1] = "Spark",[2] = "Falling Star",[3] = "Pillar of Fire",[4] = "Small Fire",[5] = "Will-o\'-the-Wisp",[6] = "Flame Shot",[7] = "Raging Fire",[8] = "Fire Wheel",[9] = "Disk Cutter", [10] = "Wheel",[11] = "Chainsaw",[12] = "Drill",[13] = "Rocket Punch",[14] = "Twin Drill",[15] = "Rotation Cutter",[16] = "Spiral Cutter",[17] = "Waterfall",[18] = "Soap Ball",[19] = "Water Drop", [20] = "Water Gun",[21] = "Wave Crash",[22] = "Squall",[23] = "Icicle Trap",[24] = "Watersprout",[25] = "Rock Claw",[26] = "Boulder Roll",[27] = "Sand Vortex",[28] = "Boulder Ball",[29] = "Boulder Avalanche",[30] = "Shake-Out", [31] = "Falling Rocks",[32] = "Small Quake",[33] = "Vaccum Cutter",[34] = "Shock Wave",[35] = "Whirlwind",[36] = "Gust",[37] = "Flap",[38] = "Tornado",[39] = "Gale", [40] = "Kamaitachi",[41] = "Ion Ball",[42] = "Positive Electricity",[43] = "Electric Claw",[44] = "Discharge",[45] = "Electric Shock",[46] = "Electric Arrow",[47] = "Big Electric Current",[48] = "Electric Field",[49] = "Claw", [50] = "Iron Claw",[51] = "Scales",[52] = "Ring",[53] = "Bite",[54] = "Beak",[55] = "Kicking",[56] = "Continuous Kicking",[57] = "Sabre",[58] = "Tail",[59] = "Suddenness (1)", [60] = "Suddenness (2)",[61] = "Jump",[62] = "Tentacle",[63] = "Numb Tentacle",[64] = "Body Blow",[65] = "Spit Spray",[66] = "Headbutt",[67] = "Suddenness (3)",[68] = "Horn",[69] = "Iron Horn", [70] = "Wing",[71] = "Thorn",[72] = "Rush",[73] = "Drain",[74] = "Bloodsuck",[75] = "Strike",[76] = "Razor Punch",[77] = "Hammer Punch",[78] = "Lick",[79] = "Needle", [80] = "Suddenness (4)",[81] = "Scissors",[82] = "Petal",[83] = "Feather Sabre",[84] = "Feather Knife",[85] = "Acupuncture",[86] = "Poison Sting",[87] = "Numbing Sting",[88] = "Hoof",[89] = "Suddenness (5)", [90] = "Suddenness (6)",[91] = "Whiplash",[92] = "Electric Wire",[93] = "Digestive Fluids",[94] = "Melting Fluids",[95] = "Stab",[96] = "Continuous Stab",[97] = "Ice Rock",[98] = "Big Wave",[99] = "Whirling Tides", [100] = "Ice Bullet",[101] = "Blizzard",[102] = "Big Water Pressure",[103] = "Big Tsunami",[104] = "Ion Beam",[105] = "Small Bolt",[106] = "Plasma Laser",[107] = "Lightning Strike",[108] = "Thunder Storm",[109] = "Mega Bolt", [110] = "Electric Hell",[111] = "Ibo Ibo Missile",[112] = "Gatling Gun",[113] = "Rapid-Fire Missile",[114] = "Bazooka",[115] = "Drill Missile",[116] = "Homing Missile",[117] = "Bombing",[118] = "Wave Attack",[119] = "Aura Wave", [120] = "Sandstorm",[121] = "Big Stream Pressure",[122] = "Vacuum Hole",[123] = "Hurricane",[124] = "Black Hole",[125] = "Heat Beam",[126] = "Small Burn",[127] = "Small Flame",[128] = "Flamethrower",[129] = "Fire Breath", [130] = "Big Burn",[131] = "Suddenness (7)",[132] = "Bomb Rock",[133] = "Small Rock",[134] = "Sand Prison",[135] = "Mega Quake",[136] = "Mega Rock",[137] = "Meteor Drop",[138] = "Diamond Rain",[139] = "Mushroom Bomb", [140] = "Egg Bomb",[141] = "Bomb",[142] = "Wave Beam",[143] = "Beam Light",[144] = "Blaster",[145] = "Suicide Attack",[146] = "String Discard",[147] = "Adhesive Liquid",[148] = "Smokescreen",[149] = "Flash", [150] = "Dust Cloud",[151] = "Recovery",[152] = "Big Recovery",[153] = "Shout",[154] = "Stare",[155] = "Glare",[156] = "Quick Step",[157] = "Speed Up",[158] = "Charging",[159] = "Big Charging", [160] = "Ultrasonic",[161] = "Curse Song",[162] = "Iron Defense",[163] = "Venom",[164] = "Poison Gas",[165] = "Numb Gas",[166] = "Cure",[167] = "Alarm Clock",[168] = "Roar",[169] = "Hot Wind", [170] = "Shrill Voice",[171] = "Cold Air",[172] = "Sleep Gas",[173] = "Lullaby",[174] = "Meditate",[175] = "Denma Barrier",[176] = "Persist",[177] = "Support",[178] = "Defense",[179] = "Shield", [180] = "Blessing",[181] = "Contemplate",[182] = "Hide",[183] = "Dive",[184] = "Skin Thicken",[185] = "Avoid",[186] = "Spore Shed",[187] = "Tongue Sticking Out",[188] = "Provoke",[189] = "Denma Seal", [190] = "Denma Drain",[191] = "Twister Song",[192] = "Energy Break",[193] = "Mega Break",[194] = "Count Down",[195] = "Strawberry Kiss",[196] = "Injection Plug",[197] = "Deflation Spiral",[198] = "Hot Bath",[199] = "Nove Smasher"} --List of Denjuu by names, sorted by Index local Denjuu = { [0] = "Muscovy (Basic)",[1] = "Muscovy (Natural)",[2] = "Muscovy (Aquatic)",[3] = "Major (Basic)",[4] = "Major (Grassland)",[5] = "Fraby (Basic)",[6] = "Fraby (Mountain)",[7] = "Fraby (Sky)",[8] = "Kagu (Basic)",[9] = "Kagu (Natural)", [10] = "Purchera (Basic)",[11] = "Purchera (Sky)",[12] = "Purchera (Forest)",[13] = "Mentalis (Basic)",[14] = "Mentalis (Natural)",[15] = "Mentalis (Forest)",[16] = "Mentalis (Grassland)",[17] = "Karinota (Basic)",[18] = "Karinota (Grassland)",[19] = "Karinota (Mountain)", [20] = "Chukar (Basic)",[21] = "Chukar (Natural)",[22] = "Chukar (Mountain)",[23] = "Chukar (Aquatic)",[24] = "Laperouse (Basic)",[25] = "Laperouse (Natural)",[26] = "Laperouse (Desert)",[27] = "Laperouse (Grassland)",[28] = "Anpipitto (Basic)",[29] = "Anpipitto (Sky)", [30] = "Anpipitto (Desert)",[31] = "Ruficors (Basic)",[32] = "Ruficors (Grassland)",[33] = "Ruficors (Aquatic)",[34] = "Cotta (Basic)",[35] = "Cotta (Natural)",[36] = "Cotta (Desert)",[37] = "Rupicola (Basic)",[38] = "Rupicola (Grassland)",[39] = "Rupicola (Sky)", [40] = "Willcock (Basic)",[41] = "Willcock (Natural)",[42] = "Willcock (Forest)",[43] = "Skrippa (Basic)",[44] = "Skrippa (Aquatic)",[45] = "Cabot (Basic)",[46] = "Cabot (Natural)",[47] = "Makyuretto (Basic)",[48] = "Makyuretto (Natural)",[49] = "Makyuretto (Grassland)", [50] = "Makyuretto (Forest)",[51] = "Coronet (Basic)",[52] = "Coronet (Aquatic)",[53] = "Coronet (Grassland)",[54] = "Tataupa (Basic)",[55] = "Tataupa (Desert)",[56] = "Tataupa (Forest)",[57] = "Chigomozu (Basic)",[58] = "Chigomozu (Natural)",[59] = "Koikaru (Basic)", [60] = "Koikaru (Natural)",[61] = "Koikaru (Forest)",[62] = "Pewee (Basic)",[63] = "Pewee (Natural)",[64] = "Pewee (Aquatic)",[65] = "Pewee (Mountain)",[66] = "Chapmani (Basic)",[67] = "Chapmani (Natural)",[68] = "Hyuming (Basic)",[69] = "Hyuming (Natural)", [70] = "Hyuming (Mountain)",[71] = "Pamirio (Basic)",[72] = "Pamirio (Natural)",[73] = "Pamirio (Sky)",[74] = "Pamirio (Desert)",[75] = "Mistashi (Basic)",[76] = "Mistashi (Forest)",[77] = "Mistashi (Aquatic)",[78] = "Parrotto (Basic)",[79] = "Parrotto (Natural)", [80] = "Nebularia (Basic)",[81] = "Nebularia (Natural)",[82] = "Granti (Basic)",[83] = "Granti (Nautral)",[84] = "Granti (Desert)",[85] = "Penelope (Basic)",[86] = "Penelope (Aquatic)",[87] = "Penelope (Mountain)",[88] = "Ardea (Basic)",[89] = "Ardea (Natural)", [90] = "Ardea (Forest)",[91] = "Cerator (Basic)",[92] = "Cerator (Natural)",[93] = "Cerator (Mountain)",[94] = "Alpina (Basic)",[95] = "Alpina (Natural)",[96] = "Alpina (Aquatic)",[97] = "Alpina (Sky)",[98] = "Isuka (Basic)",[99] = "Isuka (Grassland)", [100] = "Bicolour (Basic)",[101] = "Bicolour (Natural)",[102] = "Hermit (Basic)",[103] = "Hermit (Natural)",[104] = "Hermit (Desert)",[105] = "Hermit (Grassland)",[106] = "Phoebe (Basic)",[107] = "Phoebe (Aquatic)",[108] = "Phoebe (Desert)",[109] = "Blossom (Basic)", [110] = "Blossom (Mountain)",[111] = "Rabricol (Basic)",[112] = "Rabricol (Natural)",[113] = "Rabricol (Aquatic)",[114] = "Demerus (Basic)",[115] = "Demerus (Natural)",[116] = "Demerus (Desert)",[117] = "Sparsa (Basic)",[118] = "Sparsa (Natural)",[119] = "Sparsa (Forest)", [120] = "Purprea (Basic)",[121] = "Purprea (Sky)",[122] = "Purprea (Grassland)",[123] = "Etopirika (Basic)",[124] = "Etopirika (Natural)",[125] = "Etopirika (Forest)",[126] = "Regulus (Basic)",[127] = "Regulus (Desert)",[128] = "Regulus (Sky)",[129] = "Akretto (Basic)", [130] = "Akretto (Natural)",[131] = "Akretto (Grassland)",[132] = "Akretto (Mountain)",[133] = "Seiran (Basic)",[134] = "Seiran (Mountain)",[135] = "Tectus (Basic)",[136] = "Tectus (Natural)",[137] = "Serrata (Basic)",[138] = "Serrata (Sky)",[139] = "Serrata (Forest)", [140] = "Kaya (T2)",[141] = "Beebalm (T2)",[142] = "Easydog (T2)",[143] = "Ruscus (T2)",[144] = "Ryuuguu (T2)",[145] = "Kanzou (T2)",[146] = "Ornithogalum (T2)",[147] = "Teletel (T2)",[148] = "Dendel (T2)",[149] = "Suguri (T2)", [150] = "Suguline (T2)",[151] = "Saiguliger (T2)",[152] = "Punica (T2)",[153] = "Punisto (T2)",[154] = "Oshe (T2)",[155] = "Barriarm (T2)",[156] = "Bashou (T2)",[157] = "Gentiana (T2)",[158] = "Gonum (T2)",[159] = "Gust (T2)", [160] = "Storm (T2)",[161] = "Tsunonasu (T2)",[162] = "Gigagigearth (T2)",[163] = "Liriope (T2)",[164] = "Lirimonarch (T2)",[165] = "Waratah (T2)",[166] = "Enteiou (T2)",[167] = "Gumi (T2)",[168] = "Gymnos (T2)",[169] = "Gymbaron (T2)", [170] = "Gymzyrus (T2)",[171] = "Gymzatan (T2)",[172] = "Angios (T2)",[173] = "Angigorgo (T2)",[174] = "Angipower (T2)",[175] = "Angioros (T2)",[176] = "Fungus (T2)",[177] = "Fungwar (T2)",[178] = "Funboost (T2)",[179] = "Funblade (T2)", [180] = "Rex (Basic)",[181] = "Rex (Natural-1)",[182] = "Rex (Desert)",[183] = "Rex (Forest)",[184] = "Rex (Natural-2)",[185] = "Doon (Basic)",[186] = "Doon (Natural-1)",[187] = "Doon (Sky)",[188] = "Doon (Aquatic)",[189] = "Doon (Natural-2)", [190] = "Gyuun (Basic)",[191] = "Gyuun (Natural-1)",[192] = "Gyuun (Aquatic)",[193] = "Gyuun (Forest)",[194] = "Gyuun (Natural-2)",[195] = "Diablos (Basic)",[196] = "Diablos (Natural-1)",[197] = "Diablos (Mountain)",[198] = "Diablos (Grassland)",[199] = "Diablos (Natural-2)"} --Addresses I'm interested regarding speed version local Speed = { Enemy = {0x41F2,0x422A,0x4262}, State = 0x042C, Map = 0x4F90, Player_X = 0x4CF8, Player_Y = 0x4CFC, Money = 0x4CF4, Boss = 0x2888, Move = 0x2B06, Story = 0x4DD7, Music = 0x4AE2 --Seems like it's the background music ID; can use this to check if in battle } --Addresses I'm interested regarding power version local Power = { Enemy = {0x4202,0x423A,0x4272}, State = 0x043C, Map = 0x4FA0, Player_X = 0x4D08, Player_Y = 0x4D0C, Money = 0x4D04, Boss = 0x2898, Move = 0x2B16, Story = 0x4DE7, Music = 0x4AF2 } local Enemy_data = { Level, HP_Max, HP_Now, DP, Speed, Attack, Defence, Special, Nature, FD, Friend, Attack1, Attack2, Attack3, Attack4, Next } while true do local Addresses local toggle = 0 local NPC = {x,y,xcam,ycam,state} local num --For NPC while version() ~= "NA" do Addresses = (version() == "Power" and Power or Speed) gui.text(0,45,"BOSS: "..memory.readbyte(Addresses.Boss).." State: "..memory.readbyte(Addresses.State).."Story:"..memory.readbyte(Addresses.Story)) gui.text(0,250,"("..string.format('%.6f',memory.read_u32_le(Addresses.Player_X)/65536.0)..","..string.format('%.6f',memory.read_u32_le(Addresses.Player_Y)/65536.0)..")") gui.text(0,265,"$: "..memory.read_u32_le(Addresses.Money)) gui.text(0,280,"Move: "..memory.readbyte(Addresses.Move)) --Just in case something happens that causes map to go above 170 if Map[memory.readbyte(Addresses.Map)] ~= nil then gui.text(0,235,Map[memory.readbyte(Addresses.Map)].."("..memory.readbyte(Addresses.Map)..")") end --Checking if in battle if (memory.readbyte(Addresses.Music) >= 5 and memory.readbyte(Addresses.Music) <9> 0 and toggle <4> 0 then --gui.drawText(0,30,"E"..toggle..Denjuu[memory.readbyte(Addresses.Enemy[toggle])].."("..memory.readbyte(Addresses.Enemy[toggle])..")".."&"..Denjuu[memory.readbyte(Addresses.Enemy[toggle]+21)].."("..memory.readbyte(Addresses.Enemy[toggle]+21)..")",null,null,10,null,null) gui.drawText(0,30,"E"..toggle.." ID:"..memory.readbyte(Addresses.Enemy[toggle]).." Friend:"..memory.readbyte(Addresses.Enemy[toggle]+21),null,null,10,null,null) gui.drawText(0,40,"LV:"..memory.readbyte(Addresses.Enemy[toggle]+1).." HP:"..memory.readbyte(Addresses.Enemy[toggle]+2).."/"..memory.readbyte(Addresses.Enemy[toggle]+3).." DP:"..memory.readbyte(Addresses.Enemy[toggle]+4).." ",null,null,10,null,null) gui.drawText(0,50,"SPD:"..memory.readbyte(Addresses.Enemy[toggle]+5).." ATK:"..memory.readbyte(Addresses.Enemy[toggle]+6).." DEF:"..memory.readbyte(Addresses.Enemy[toggle]+7).." SPEC:"..memory.readbyte(Addresses.Enemy[toggle]+8).." ",null,null,10,null,null) gui.drawText(0,60,Attacks[memory.readbyte(Addresses.Enemy[toggle]+22)].." | "..Attacks[memory.readbyte(Addresses.Enemy[toggle]+30)].." ",null,null,10,null,null) gui.drawText(0,70,Attacks[memory.readbyte(Addresses.Enemy[toggle]+38)].." | "..Attacks[memory.readbyte(Addresses.Enemy[toggle]+46)].." ",null,null,10,null,null) end if toggle == 4 then for i=1,3 do if memory.readbyte(Addresses.Enemy[i]+1) > 0 then --Since id can be 0, check if level is greater than 0 instead. Also make sure it only appears during battle gui.drawText(0,10+(20*i),"E"..i.." ID:"..memory.readbyte(Addresses.Enemy[i]).." LV:"..memory.readbyte(Addresses.Enemy[i]+1).." HP:"..memory.readbyte(Addresses.Enemy[i]+2).."/"..memory.readbyte(Addresses.Enemy[i]+3).." DP:"..memory.readbyte(Addresses.Enemy[i]+4),null,null,10,null,null) gui.drawText(0,20+(20*i),"SPD:"..memory.readbyte(Addresses.Enemy[i]+5).." ATK:"..memory.readbyte(Addresses.Enemy[i]+6).." DEF:"..memory.readbyte(Addresses.Enemy[i]+7).." SPEC:"..memory.readbyte(Addresses.Enemy[i]+8),null,null,10,null,null) end end end end --Checking if overworld music is playing to display npc data if memory.readbyte(Addresses.Music) >= 17 and memory.readbyte(Addresses.Music) <= 43 then for i = (version() == "Power" and 0x34E0 or 0x34D0), 0x3810, 0x20 do --Power and Speed is offsetted by +0x10 difference if memory.readbyte(i) ~= 0 then NPC.xcam = memory.read_u16_le(i+0x2) NPC.ycam = memory.read_u16_le(i+0x4) NPC.x = string.format('%.1f',memory.read_u32_le(i+0xC)/65536.0) NPC.y = string.format('%.1f',memory.read_u32_le(i+0x10)/65536.0) NPC.state = memory.readbyte(i+0x1F) num = math.floor((i-0x34D0)/0x20)+1 --So it would be 1 offset gui.drawText(NPC.xcam-20,NPC.ycam,"X"..NPC.x.." Y"..NPC.y.."s"..NPC.state,null,null,10,null,null) gui.drawText(NPC.xcam-5,NPC.ycam-20,num,null,null,10,null,null) end end gui.text(0,295,"Num: "..num) end emu.frameadvance() end emu.frameadvance() end
Edit: So...apparently the ID addresses are correct, but it uses a different number than the one shown on the phone. Bleh. Edit2: Added map names; works for all 171 maps. Also supports power version now. Edit3: Added Denjuu + Attack names, and allowed multiple ways to display data Edit4: Added Overworld object/npc display + check if in battle using music
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
jlun2 wrote:
Edit: Great news! I believe I found the RNG determining drops.....from grass: 0x03005E10 - 4 bytes - unsigned/hex For example, changing it to the following gives herbs d28de7bb
Freezing the following addresses *03000840 *03005E08 *03005E10 (Remove 0300 and set domain to IWRAM if using BizHawk) causes values for damage dealt, hit/miss, crit to stop rerolling if 03002C16 is frozen at 0x5/0x3F. Unfreezing any one of these however starts it again. Not sure why there's 3 addresses for RNG though. Edit: Things to check *See if Power version has any different useable Denjuu *See if the secret level 30 Denjuu actually helps at all or nah Edit 2: The secret Denjuu (Rupicola (Basic) lv 30) *Allows me to skip Scrippa (The blue thing) *Rival v2/v3 now both takes 4 turns rather than 1 *Cotta (Basic) lv 47 is still recruited for the last boss, but much later *I ended up being level 41 at the last boss. *I consume 6 DP drinks; 1 of which is the bottled version Edit 3: Ruscus and it's special This denjuu has an incredible special that hits based on target's HP. It can also be used during the fight against Ryuuguu. The problem basically this: 1. On speed version, this denjuu appears before the village you see your dad. However, it's at level 23. The special is learnt at level 30. 2. On power version, it appears much later at the cave where you fight Ryuuguu. It is also level 50+. However, that's very late, and so only 3 bosses will ever see it. Additionally, the encounter rate for this is low; it does not appear wandering, and instead you have to rely on luck to encounter other wandering monsters in addition to Ruscus. This takes time to waste turns just for Ruscus to arrive. I might just end up using Rupicola and Cotta instead.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Not related to the TAS, but helps a lot to beat the game quickly Download telefang2 hotkeys.lua
Language: lua

memory.usememorydomain("IWRAM") --function for checking an input with how many frames to delay function inputdelay(inputs, delay) local is = input.get() local start = false if inputs ~= nil and (is[tostring(inputs)] ~=nil) then --console.log(is) --debugging while (delay > 0) do emu.frameadvance() delay = delay -1 end start = true return start end return start end --Check if power or speed version; they have addresses in different places function version() if memory.read_u32_le(0x0000A8,"ROM") == 0x574F5032 then return "Power" elseif memory.read_u32_le(0x0000A8,"ROM") == 0x45505332 then return "Speed" else return "NA" end end local Speed = { Player_X = 0x4CF8, Player_Y = 0x4CFC, State = 0x042C, Recruit = 0x4102 } local Power = { Player_X = 0x4D08, Player_Y = 0x4D0C, State = 0x043C, Recruit = 0x4112 } while true do local Addresses local x local y while version() ~= "NA" do Addresses = (version() == "Power" and Power or Speed) if inputdelay("C",30) then memory.writebyte(Addresses.State,7) --Instant recruit elseif inputdelay("V",30) then memory.writebyte(Addresses.State,8) --Instant win (5 for xp, 8 for item interface) end if (joypad.getimmediate().L == true) then if (joypad.getimmediate().Left == true) then x = memory.read_u32_le(Addresses.Player_X)-65536*3 elseif (joypad.getimmediate().Right == true) then x = memory.read_u32_le(Addresses.Player_X)+65536*3 else x = memory.read_u32_le(Addresses.Player_X) end if (joypad.getimmediate().Down == true) then y = memory.read_u32_le(Addresses.Player_Y)+65536*3 elseif (joypad.getimmediate().Up == true) then y = memory.read_u32_le(Addresses.Player_Y)-65536*3 else y = memory.read_u32_le(Addresses.Player_Y) end memory.write_u32_le(Addresses.Player_X,x) memory.write_u32_le(Addresses.Player_Y,y) end gui.text(0,20,"For keyboard: C:Recruit V: Win") gui.text(0,40,"For joypad: Hold L: Walk thru walls") gui.drawText(0,140,"Recriut (ID):"..memory.readbyte(Addresses.Recruit),null,null,10,null,null) emu.frameadvance() end end
Basically allows to skip battles, recruit anyone, and walk through walls. Still need to make the recruit part better so it won't freeze out of battle + recruit denjuu 2 & 3, not just 1. Edit 2: Here's another lua file that has nothing to do with the TAS, but can generate tables of the battles for wikis: Download telefang2 table.lua
Language: lua

memory.usememorydomain("IWRAM") --function for checking an input with how many frames to delay function inputdelay(inputs, delay) local is = input.get() local start = false if inputs ~= nil and (is[tostring(inputs)] ~=nil) then --console.log(is) --debugging while (delay > 0) do emu.frameadvance() delay = delay -1 end start = true return start end return start end --Check if power or speed version; they have addresses in different places function version() if memory.read_u32_le(0x0000A8,"ROM") == 0x574F5032 then return "Power" elseif memory.read_u32_le(0x0000A8,"ROM") == 0x45505332 then return "Speed" else return "NA" end end local Speed = { Enemy = {0x41F2,0x422A,0x4262}, Boss = 0x2888 } local Power = { Enemy = {0x4202,0x423A,0x4272}, Boss = 0x2898 } --IDs to Picture Book numbers local Picture_Book = { [0] = 15,[1] = 16,[2] = 17,[3] = 176,[4] = 177,[5] = 18,[6] = 19,[7] = 20,[8] = 21,[9] = 22, [10] = 23,[11] = 24,[12] = 25,[13] = 26,[14] = 27,[15] = 28,[16] = 29,[17] = 30,[18] = 31,[19] = 32, [20] = 37,[21] = 38,[22] = 39,[23] = 40,[24] = 33,[25] = 34,[26] = 35,[27] = 36,[28] = 41,[29] = 42, [30] = 43,[31] = 44,[32] = 45,[33] = 46,[34] = 47,[35] = 48,[36] = 49,[37] = 178,[38] = 179,[39] = 180, [40] = 50,[41] = 51,[42] = 52,[43] = 53,[44] = 54,[45] = 55,[46] = 56,[47] = 57,[48] = 58,[49] = 59, [50] = 60,[51] = 61,[52] = 62,[53] = 63,[54] = 64,[55] = 65,[56] = 66,[57] = 67,[58] = 68,[59] = 69, [60] = 70,[61] = 71,[62] = 72,[63] = 73,[64] = 74,[65] = 75,[66] = 76,[67] = 77,[68] = 78,[69] = 79, [70] = 80,[71] = 81,[72] = 82,[73] = 83,[74] = 84,[75] = 85,[76] = 86,[77] = 87,[78] = 181,[79] = 182, [80] = 183,[81] = 184,[82] = 185,[83] = 186,[84] = 187,[85] = 88,[86] = 89,[87] = 90,[88] = 188,[89] = 189, [90] = 190,[91] = 191,[92] = 192,[93] = 193,[94] = 91,[95] = 92,[96] = 93,[97] = 94,[98] = 194,[99] = 195, [100] = 95,[101] = 96,[102] = 97,[103] = 98,[104] = 99,[105] = 100,[106] = 101,[107] = 102,[108] = 103,[109] = 196, [110] = 197,[111] = 104,[112] = 105,[113] = 106,[114] = 107,[115] = 108,[116] = 109,[117] = 110,[118] = 111,[119] = 112, [120] = 113,[121] = 114,[122] = 115,[123] = 116,[124] = 117,[125] = 118,[126] = 119,[127] = 120,[128] = 121,[129] = 122, [130] = 123,[131] = 124,[132] = 125,[133] = 198,[134] = 199,[135] = 126,[136] = 127,[137] = 128,[138] = 129,[139] = 130, [140] = 131,[141] = 132,[142] = 133,[143] = 134,[144] = 135,[145] = 136,[146] = 137,[147] = 138,[148] = 139,[149] = 140, [150] = 141,[151] = 142,[152] = 143,[153] = 144,[154] = 145,[155] = 146,[156] = 147,[157] = 148,[158] = 149,[159] = 150, [160] = 151,[161] = 152,[162] = 153,[163] = 154,[164] = 155,[165] = 156,[166] = 157,[167] = 158,[168] = 159,[169] = 160, [170] = 161,[171] = 162,[172] = 163,[173] = 164,[174] = 165,[175] = 166,[176] = 167,[177] = 168,[178] = 169,[179] = 170, [180] = 0,[181] = 1,[182] = 2,[183] = 3,[184] = 4,[185] = 5,[186] = 6,[187] = 7,[188] = 8,[189] = 9, [190] = 10,[191] = 11,[192] = 12,[193] = 13,[194] = 14,[195] = 171,[196] = 172,[197] = 173,[198] = 174,[199] = 175} --Attack names local Attacks = { [0] = "????",[1] = "Spark",[2] = "Falling Star",[3] = "Pillar of Fire",[4] = "Small Fire",[5] = "Will-o\'-the-Wisp",[6] = "Flame Shot",[7] = "Raging Fire",[8] = "Fire Wheel",[9] = "Disk Cutter", [10] = "Wheel",[11] = "Chainsaw",[12] = "Drill",[13] = "Rocket Punch",[14] = "Twin Drill",[15] = "Rotation Cutter",[16] = "Spiral Cutter",[17] = "Waterfall",[18] = "Soap Ball",[19] = "Water Drop", [20] = "Water Gun",[21] = "Wave Crash",[22] = "Squall",[23] = "Icicle Trap",[24] = "Watersprout",[25] = "Rock Claw",[26] = "Boulder Roll",[27] = "Sand Vortex",[28] = "Boulder Ball",[29] = "Boulder Avalanche",[30] = "Shake-Out", [31] = "Falling Rocks",[32] = "Small Quake",[33] = "Vaccum Cutter",[34] = "Shock Wave",[35] = "Whirlwind",[36] = "Gust",[37] = "Flap",[38] = "Tornado",[39] = "Gale", [40] = "Kamaitachi",[41] = "Ion Ball",[42] = "Positive Electricity",[43] = "Electric Claw",[44] = "Discharge",[45] = "Electric Shock",[46] = "Electric Arrow",[47] = "Big Electric Current",[48] = "Electric Field",[49] = "Claw", [50] = "Iron Claw",[51] = "Scales",[52] = "Ring",[53] = "Bite",[54] = "Beak",[55] = "Kicking",[56] = "Continuous Kicking",[57] = "Sabre",[58] = "Tail",[59] = "Suddenness (1)", [60] = "Suddenness (2)",[61] = "Jump",[62] = "Tentacle",[63] = "Numb Tentacle",[64] = "Body Blow",[65] = "Spit Spray",[66] = "Headbutt",[67] = "Suddenness (3)",[68] = "Horn",[69] = "Iron Horn", [70] = "Wing",[71] = "Thorn",[72] = "Rush",[73] = "Drain",[74] = "Bloodsuck",[75] = "Strike",[76] = "Razor Punch",[77] = "Hammer Punch",[78] = "Lick",[79] = "Needle", [80] = "Suddenness (4)",[81] = "Scissors",[82] = "Petal",[83] = "Feather Sabre",[84] = "Feather Knife",[85] = "Acupuncture",[86] = "Poison Sting",[87] = "Numbing Sting",[88] = "Hoof",[89] = "Suddenness (5)", [90] = "Suddenness (6)",[91] = "Whiplash",[92] = "Electric Wire",[93] = "Digestive Fluids",[94] = "Melting Fluids",[95] = "Stab",[96] = "Continuous Stab",[97] = "Ice Rock",[98] = "Big Wave",[99] = "Whirling Tides", [100] = "Ice Bullet",[101] = "Blizzard",[102] = "Big Water Pressure",[103] = "Big Tsunami",[104] = "Ion Beam",[105] = "Small Bolt",[106] = "Plasma Laser",[107] = "Lightning Strike",[108] = "Thunder Storm",[109] = "Mega Bolt", [110] = "Electric Hell",[111] = "Ibo Ibo Missile",[112] = "Gatling Gun",[113] = "Rapid-Fire Missile",[114] = "Bazooka",[115] = "Drill Missile",[116] = "Homing Missile",[117] = "Bombing",[118] = "Wave Attack",[119] = "Aura Wave", [120] = "Sandstorm",[121] = "Big Stream Pressure",[122] = "Vacuum Hole",[123] = "Hurricane",[124] = "Black Hole",[125] = "Heat Beam",[126] = "Small Burn",[127] = "Small Flame",[128] = "Flamethrower",[129] = "Fire Breath", [130] = "Big Burn",[131] = "Suddenness (7)",[132] = "Bomb Rock",[133] = "Small Rock",[134] = "Sand Prison",[135] = "Mega Quake",[136] = "Mega Rock",[137] = "Meteor Drop",[138] = "Diamond Rain",[139] = "Mushroom Bomb", [140] = "Egg Bomb",[141] = "Bomb",[142] = "Wave Beam",[143] = "Beam Light",[144] = "Blaster",[145] = "Suicide Attack",[146] = "String Discard",[147] = "Adhesive Liquid",[148] = "Smokescreen",[149] = "Flash", [150] = "Dust Cloud",[151] = "Recovery",[152] = "Big Recovery",[153] = "Shout",[154] = "Stare",[155] = "Glare",[156] = "Quick Step",[157] = "Speed Up",[158] = "Charging",[159] = "Big Charging", [160] = "Ultrasonic",[161] = "Curse Song",[162] = "Iron Defense",[163] = "Venom",[164] = "Poison Gas",[165] = "Numb Gas",[166] = "Cure",[167] = "Alarm Clock",[168] = "Roar",[169] = "Hot Wind", [170] = "Shrill Voice",[171] = "Cold Air",[172] = "Sleep Gas",[173] = "Lullaby",[174] = "Meditate",[175] = "Denma Barrier",[176] = "Persist",[177] = "Support",[178] = "Defense",[179] = "Shield", [180] = "Blessing",[181] = "Contemplate",[182] = "Hide",[183] = "Dive",[184] = "Skin Thicken",[185] = "Avoid",[186] = "Spore Shed",[187] = "Tongue Sticking Out",[188] = "Provoke",[189] = "Denma Seal", [190] = "Denma Drain",[191] = "Twister Song",[192] = "Energy Break",[193] = "Mega Break",[194] = "Count Down",[195] = "Strawberry Kiss",[196] = "Injection Plug",[197] = "Deflation Spiral",[198] = "Hot Bath",[199] = "Nove Smasher"} --List of Denjuu by names, sorted by Index local Denjuu = { [0] = "[[Muscovy (Basic)]]",[1] = "[[Muscovy (Natural)]]",[2] = "[[Muscovy (Aquatic)]]",[3] = "[[Major (Basic)]]",[4] = "[[Major (Grassland)]]",[5] = "[[Fraby (Basic)]]",[6] = "[[Fraby (Mountain)]]",[7] = "[[Fraby (Sky)]]",[8] = "[[Kagu (Basic)]]",[9] = "[[Kagu (Natural)]]", [10] = "[[Purchera (Basic)]]",[11] = "[[Purchera (Sky)]]",[12] = "[[Purchera (Forest)]]",[13] = "[[Mentalis (Basic)]]",[14] = "[[Mentalis (Natural)]]",[15] = "[[Mentalis (Forest)]]",[16] = "[[Mentalis (Grassland)]]",[17] = "[[Karinota (Basic)]]",[18] = "[[Karinota (Grassland)]]",[19] = "[[Karinota (Mountain)]]", [20] = "[[Chukar (Basic)]]",[21] = "[[Chukar (Natural)]]",[22] = "[[Chukar (Mountain)]]",[23] = "[[Chukar (Aquatic)]]",[24] = "[[Laperouse (Basic)]]",[25] = "[[Laperouse (Natural)]]",[26] = "[[Laperouse (Desert)]]",[27] = "[[Laperouse (Grassland)]]",[28] = "[[Anpipitto (Basic)]]",[29] = "[[Anpipitto (Sky)]]", [30] = "[[Anpipitto (Desert)]]",[31] = "[[Ruficors (Basic)]]",[32] = "[[Ruficors (Grassland)]]",[33] = "[[Ruficors (Aquatic)]]",[34] = "[[Cotta (Basic)]]",[35] = "[[Cotta (Natural)]]",[36] = "[[Cotta (Desert)]]",[37] = "[[Rupicola (Basic)]]",[38] = "[[Rupicola (Grassland)]]",[39] = "[[Rupicola (Sky)]]", [40] = "[[Willcock (Basic)]]",[41] = "[[Willcock (Natural)]]",[42] = "[[Willcock (Forest)]]",[43] = "[[Skrippa (Basic)]]",[44] = "[[Skrippa (Aquatic)]]",[45] = "[[Cabot (Basic)]]",[46] = "[[Cabot (Natural)]]",[47] = "[[Makyuretto (Basic)]]",[48] = "[[Makyuretto (Natural)]]",[49] = "[[Makyuretto (Grassland)]]", [50] = "[[Makyuretto (Forest)]]",[51] = "[[Coronet (Basic)]]",[52] = "[[Coronet (Aquatic)]]",[53] = "[[Coronet (Grassland)]]",[54] = "[[Tataupa (Basic)]]",[55] = "[[Tataupa (Desert)]]",[56] = "[[Tataupa (Forest)]]",[57] = "[[Chigomozu (Basic)]]",[58] = "[[Chigomozu (Natural)]]",[59] = "[[Koikaru (Basic)]]", [60] = "[[Koikaru (Natural)]]",[61] = "[[Koikaru (Forest)]]",[62] = "[[Pewee (Basic)]]",[63] = "[[Pewee (Natural)]]",[64] = "[[Pewee (Aquatic)]]",[65] = "[[Pewee (Mountain)]]",[66] = "[[Chapmani (Basic)]]",[67] = "[[Chapmani (Natural)]]",[68] = "[[Hyuming (Basic)]]",[69] = "[[Hyuming (Natural)]]", [70] = "[[Hyuming (Mountain)]]",[71] = "[[Pamirio (Basic)]]",[72] = "[[Pamirio (Natural)]]",[73] = "[[Pamirio (Sky)]]",[74] = "[[Pamirio (Desert)]]",[75] = "[[Mistashi (Basic)]]",[76] = "[[Mistashi (Forest)]]",[77] = "[[Mistashi (Aquatic)]]",[78] = "[[Parrotto (Basic)]]",[79] = "[[Parrotto (Natural)]]", [80] = "[[Nebularia (Basic)]]",[81] = "[[Nebularia (Natural)]]",[82] = "[[Granti (Basic)]]",[83] = "[[Granti (Nautral)]]",[84] = "[[Granti (Desert)]]",[85] = "[[Penelope (Basic)]]",[86] = "[[Penelope (Aquatic)]]",[87] = "[[Penelope (Mountain)]]",[88] = "[[Ardea (Basic)]]",[89] = "[[Ardea (Natural)]]", [90] = "[[Ardea (Forest)]]",[91] = "[[Cerator (Basic)]]",[92] = "[[Cerator (Natural)]]",[93] = "[[Cerator (Mountain)]]",[94] = "[[Alpina (Basic)]]",[95] = "[[Alpina (Natural)]]",[96] = "[[Alpina (Aquatic)]]",[97] = "[[Alpina (Sky)]]",[98] = "[[Isuka (Basic)]]",[99] = "[[Isuka (Grassland)]]", [100] = "[[Bicolour (Basic)]]",[101] = "[[Bicolour (Natural)]]",[102] = "[[Hermit (Basic)]]",[103] = "[[Hermit (Natural)]]",[104] = "[[Hermit (Desert)]]",[105] = "[[Hermit (Grassland)]]",[106] = "[[Phoebe (Basic)]]",[107] = "[[Phoebe (Aquatic)]]",[108] = "[[Phoebe (Desert)]]",[109] = "[[Blossom (Basic)]]", [110] = "[[Blossom (Mountain)]]",[111] = "[[Rabricol (Basic)]]",[112] = "[[Rabricol (Natural)]]",[113] = "[[Rabricol (Aquatic)]]",[114] = "[[Demerus (Basic)]]",[115] = "[[Demerus (Natural)]]",[116] = "[[Demerus (Desert)]]",[117] = "[[Sparsa (Basic)]]",[118] = "[[Sparsa (Natural)]]",[119] = "[[Sparsa (Forest)]]", [120] = "[[Purprea (Basic)]]",[121] = "[[Purprea (Sky)]]",[122] = "[[Purprea (Grassland)]]",[123] = "[[Etopirika (Basic)]]",[124] = "[[Etopirika (Natural)]]",[125] = "[[Etopirika (Forest)]]",[126] = "[[Regulus (Basic)]]",[127] = "[[Regulus (Desert)]]",[128] = "[[Regulus (Sky)]]",[129] = "[[Akretto (Basic)]]", [130] = "[[Akretto (Natural)]]",[131] = "[[Akretto (Grassland)]]",[132] = "[[Akretto (Mountain)]]",[133] = "[[Seiran (Basic)]]",[134] = "[[Seiran (Mountain)]]",[135] = "[[Tectus (Basic)]]",[136] = "[[Tectus (Natural)]]",[137] = "[[Serrata (Basic)]]",[138] = "[[Serrata (Sky)]]",[139] = "[[Serrata (Forest)]]", [140] = "[[Kaya (T2)]]",[141] = "[[Beebalm (T2)]]",[142] = "[[Easydog (T2)]]",[143] = "[[Ruscus (T2)]]",[144] = "[[Ryuuguu (T2)]]",[145] = "[[Kanzou (T2)]]",[146] = "[[Ornithogalum (T2)]]",[147] = "[[Teletel (T2)]]",[148] = "[[Dendel (T2)]]",[149] = "[[Suguri (T2)]]", [150] = "[[Suguline (T2)]]",[151] = "[[Saiguliger (T2)]]",[152] = "[[Punica (T2)]]",[153] = "[[Punisto (T2)]]",[154] = "[[Oshe (T2)]]",[155] = "[[Barriarm (T2)]]",[156] = "[[Bashou (T2)]]",[157] = "[[Gentiana (T2)]]",[158] = "[[Gonum (T2)]]",[159] = "[[Gust (T2)]]", [160] = "[[Storm (T2)]]",[161] = "[[Tsunonasu (T2)]]",[162] = "[[Gigagigearth (T2)]]",[163] = "[[Liriope (T2)]]",[164] = "[[Lirimonarch (T2)]]",[165] = "[[Waratah (T2)]]",[166] = "[[Enteiou (T2)]]",[167] = "[[Gumi (T2)]]",[168] = "[[Gymnos (T2)]]",[169] = "[[Gymbaron (T2)]]", [170] = "[[Gymzyrus (T2)]]",[171] = "[[Gymzatan (T2)]]",[172] = "[[Angios (T2)]]",[173] = "[[Angigorgo (T2)]]",[174] = "[[Angipower (T2)]]",[175] = "[[Angioros (T2)]]",[176] = "[[Fungus (T2)]]",[177] = "[[Fungwar (T2)]]",[178] = "[[Funboost (T2)]]",[179] = "[[Funblade (T2)]]", [180] = "[[Rex (Basic)]]",[181] = "[[Rex (Natural-1)]]",[182] = "[[Rex (Desert)]]",[183] = "[[Rex (Forest)]]",[184] = "[[Rex (Natural-2)]]",[185] = "[[Doon (Basic)]]",[186] = "[[Doon (Natural-1)]]",[187] = "[[Doon (Sky)]]",[188] = "[[Doon (Aquatic)]]",[189] = "[[Doon (Natural-2)]]", [190] = "[[Gyuun (Basic)]]",[191] = "[[Gyuun (Natural-1)]]",[192] = "[[Gyuun (Aquatic)]]",[193] = "[[Gyuun (Forest)]]",[194] = "[[Gyuun (Natural-2)]]",[195] = "[[Diablos (Basic)]]",[196] = "[[Diablos (Natural-1)]]",[197] = "[[Diablos (Mountain)]]",[198] = "[[Diablos (Grassland)]]",[199] = "[[Diablos (Natural-2)]]"} while true do local Addresses while version() ~= "NA" do Addresses = (version() == "Power" and Power or Speed) if inputdelay("C",30) then local file = io.open("test.txt", "w+") io.output(file) --Write the top part first io.write("{|class=\"wikitable sortable\"\n! colspan=\"14\" | ID: "..memory.readbyte(Addresses.Boss).."\n|-\n! colspan=\"2\" | Name\n! colspan=\"4\" | Attacks\n! ID\n! Picture Book\n! Level\n! HP\n! Speed\n! Attack\n! Defence\n! Special\n") for i = 1,3 do --[[Offsets in decimal i+1 = LeveL i+3 = HP (Maximum) i+5 = Speed i+6 = Attack i+7 = Defence i+8 = Denma/Spec i+22 = Attack 1 i+30 = Attack 2 i+38 = Attack 3 i+46 = Attack 4 --]] if memory.readbyte(Addresses.Enemy[i]+1) > 0 then io.write("|-\n| "..Denjuu[memory.readbyte(Addresses.Enemy[i])].."<br>\n| Pic\n| "..Attacks[memory.readbyte(Addresses.Enemy[i]+22)].."\n| "..Attacks[memory.readbyte(Addresses.Enemy[i]+30)].."\n| "..Attacks[memory.readbyte(Addresses.Enemy[i]+38)].."\n| "..Attacks[memory.readbyte(Addresses.Enemy[i]+46)].."\n| "..memory.readbyte(Addresses.Enemy[i]).."\n| "..Picture_Book[memory.readbyte(Addresses.Enemy[i])].."\n| "..memory.readbyte(Addresses.Enemy[i]+1).."\n| "..memory.readbyte(Addresses.Enemy[i]+3).."\n| "..memory.readbyte(Addresses.Enemy[i]+5).."\n| "..memory.readbyte(Addresses.Enemy[i]+6).."\n| "..memory.readbyte(Addresses.Enemy[i]+7).."\n| "..memory.readbyte(Addresses.Enemy[i]+8).."\n") console.log("Done!\n") end end io.write("|}") io.close(file) emu.frameadvance() end emu.frameadvance() end emu.frameadvance() end
I can change this to the TASVideos wiki format later I guess.
Skilled player (1742)
Joined: 9/17/2009
Posts: 4984
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Rather late, but I believe I figured out where overworld NPCs addresses are. Also, it seems for the ones that move, they remain at their own location if offscreen far enough, so that should make manipulating certain Denjuu walk cycles somewhat easier. Edit:
Language: lua

memory.usememorydomain("IWRAM") --[[ SystemID GBA 3570 w u 0 IWRAM wtf? 3572 w u 0 IWRAM x cam 3574 w u 0 IWRAM y cam 3576 b h 0 IWRAM sprite related 357C d 3 0 IWRAM x 3580 d 3 0 IWRAM y 3584 d h 0 IWRAM z? 3588 d 3 0 IWRAM movement 358E b h 0 IWRAM nth sprite in area 358F b h 0 IWRAM state ]]-- local NPC = { x,y,xcam,ycam,state } while true do local num = 0 for i = 0x34D0, 0x3790, 0x20 do if memory.readbyte(i) ~= 0 then NPC.xcam = memory.read_u16_le(i+0x2) NPC.ycam = memory.read_u16_le(i+0x4) NPC.x = string.format('%.1f',memory.read_u32_le(i+0xC)/65536.0) NPC.y = string.format('%.1f',memory.read_u32_le(i+0x10)/65536.0) NPC.state = memory.readbyte(i+0x1F) num = math.floor((i-0x34D0)/0x20)+1 --So it would be 1 offset --gui.drawText(xcam,ycam,"X"..x.." Y"..y.."i"..num.."s"..state,null,null,10,null,null) gui.drawText(NPC.xcam,NPC.ycam,num,null,null,10,null,null) end end gui.text(0,70,num) emu.frameadvance() end
Edit: At the very first cave, this already influences the 2 Denjuu to the right of the cave when you go grab the first key; it's possible for them to wander far enough such that they "stop" at different locations, thus changing where they wander once they appear on screen again. Also, moving diagonally for the "stairs" in certain areas such as the first cave is faster than moving straight through it.