Posts for chozandrias


Experienced Forum User
Joined: 1/16/2017
Posts: 12
For disassembling RNG, I could use all the help I can get. I have no experience with those kinds of systems and I don't know what to expect from a SNES.
Experienced Forum User
Joined: 1/16/2017
Posts: 12
Experienced Forum User
Joined: 1/16/2017
Posts: 12
Another video showcasing more of my methods for tasing: Link to video
Experienced Forum User
Joined: 1/16/2017
Posts: 12
Here is an example video of what my Lua botting looks like so far. Trying to automate as much as possible at this point :) Link to video
Experienced Forum User
Joined: 1/16/2017
Posts: 12
I'm not 100% on how cheats work but, if they modify anything in memory and the game doesn't do anything to change that value, it will be stuck giving infinite ammo in your case until you manually reset the value or you load a state in the game before you entered the cheat.
Experienced Forum User
Joined: 1/16/2017
Posts: 12
With some changes to the emulator, I finally got a first dungeon to sync. Link to video Compromises were made to time by waiting time in order to get the right stats on level-ups and waiting for crits. Time can probably be improved in this segment.
Experienced Forum User
Joined: 1/16/2017
Posts: 12
Yeah you gotta consider your demographic. What group is bigger? 18+ or younger? Who do you want more of? You really can't have AO games on websites like this without a disclaimer and I'm sure with how little there are, it wouldn't be worth it to restrict people just for those few games.
Post subject: I've been busy
Experienced Forum User
Joined: 1/16/2017
Posts: 12
Hey guys, I've been working with Zeromus to figure out how to script some things I needed in LUA. He also built some new versions of Bizhawk so that I could run these scripts. One of them I use to find the frame where an enemy misses me, one for finding crits and one for finding a battle that gives me the enemies I want.
local missSprite
local framesUntilMiss = {}
framesUntilMiss.melee = 491
framesUntilMiss.ranged = 173
local memDomain = "VRAM"
local startFrame = emu.framecount()
local moveFrameInput = 0
local frameToInput = startFrame + moveFrameInput
local foundEnemyMiss = false
local melee = true
emu.limitframerate(false)
function gameInfo()

	if(emu.framecount() == frameToInput) then
		joypad.set({["P1 A"] = true})
	else
		joypad.set({["P1 A"] = null})
	end

	memory.usememorydomain(memDomain)
	missSprite = memory.read_u16_be(0x0544)
	if(melee) then
      gui.drawText(5,5, "Enemy Miss In: " .. (startFrame + framesUntilMiss.melee - emu.framecount()))
	  if emu.framecount() >= (startFrame + framesUntilMiss.melee + moveFrameInput) then
	  	if tonumber(missSprite) == 17952 then
	  		client.togglepause()
	  	else
	  		moveFrameInput = moveFrameInput + 1
	  		frameToInput = startFrame + moveFrameInput
	  		tastudio.setplayback(startFrame)
	  	end
	  end
	else
	  gui.drawText(5,5, "Crit in: " .. (startFrame + framesUntilMiss.ranged - emu.framecount()))
	end
end

while (foundEnemyMiss ~= true) do
  gameInfo()
  emu.frameadvance()
end

local critSprite
local monster2HP
local monster3HP
local framesToCrit = {}
framesToCrit.melee = 75
framesToCrit.ranged = 173
local memDomain = "VRAM"
local startFrame = emu.framecount()
local moveFrameInput = 0
local frameToInput = startFrame + moveFrameInput
local foundCriticalHit = false
local melee = false
emu.limitframerate(false)

function gameInfo()

	if(emu.framecount() == frameToInput) then
		joypad.set({["P1 A"] = true})
	else
		joypad.set({["P1 A"] = null})
	end

	memory.usememorydomain(memDomain)
	critSprite = memory.read_u16_be(0x0544)
	
	if(melee) then
	gui.drawText(5,5, "Crit in: " .. (frameToInput + framesToCrit.melee - emu.framecount()))
  if emu.framecount() >= (startFrame + framesToCrit.melee + moveFrameInput) then
  	if tonumber(critSprite) == 13348 then
  		client.togglepause()
  	else
  		moveFrameInput = moveFrameInput + 1
  		frameToInput = startFrame + moveFrameInput
  		tastudio.setplayback(frameToInput-1)
  	end
  end
	else
	gui.drawText(5,5, "Crit in: " .. (frameToInput + framesToCrit.ranged - emu.framecount()))
  if emu.framecount() >= (startFrame + framesToCrit.ranged + moveFrameInput) then
  	if tonumber(critSprite) == 13348 then
  		foundCriticalHit = true
  		client.togglepause()
  	else
  		moveFrameInput = moveFrameInput + 1
  		frameToInput = startFrame + moveFrameInput
  		tastudio.setplayback(frameToInput-1)
  	end
  end
end
end

while (foundCriticalHit ~= true) do
  gameInfo()
  emu.frameadvance()
end

local monster1HP
local monster2HP
local monster3HP
local framesToBattle = 115
local memDomain = "WRAM"
local startFrame = emu.framecount()
local moveFrameInput = 0
local frameToInput = startFrame + moveFrameInput
local foundEncounter = false


function gameInfo()

	if(emu.framecount() == frameToInput) then
		joypad.set({["P1 Down"] = true, ["P1 R"] = true})
	else
		joypad.set({["P1 Down"] = null, ["P1 R"] = null})
	end

	memory.usememorydomain(memDomain)
	monster1HP = memory.read_u8(0x009567)
	monster2HP = memory.read_u8(0x00959C)
	monster3HP = memory.read_u8(0x0095D1)
	
  gui.drawText(5,5, "Battle in: " .. (frameToInput + framesToBattle - emu.framecount()))
  if emu.framecount() >= (startFrame + framesToBattle + moveFrameInput) then
  	if (tonumber(monster1HP)) >= 14 and (tonumber(monster2HP)) >= 14 and (tonumber(monster3HP)) >= 14 and (tonumber(monster3HP)) ~= 91 then
  		 if (emu.framecount() == startFrame + 115) then
			while emu.framecount() ~= startFrame + 385 do 
				gui.drawText(5,25, "Script removing control in: " .. startFrame + 385 - emu.framecount() .. " frames")
				emu.frameadvance()
			end
		foundEncounter = true
	end
  	else
  		moveFrameInput = moveFrameInput + 1
  		frameToInput = startFrame + moveFrameInput
  		tastudio.setplayback(frameToInput-1)
  	end
  end

end

while (foundEncounter ~= true) do
  gameInfo()
  emu.frameadvance()
  if(foundEncounter) then client.togglepause() end
end

Post subject: Is this even possible
Experienced Forum User
Joined: 1/16/2017
Posts: 12
So I am trying to build a LUA script for my TAS. Basically, the battle I get into is completely based on what frame I press a direction on the D-pad to land on a tile and start the battle. My traditional method is press down, wait and see what the enemies are in a battle and if I don't like the result, press down a frame later instead and repeat until I'm satisfied (sometimes takes 100 tries/frames). I have found the values in memory that show all of the 3 monster's HP so when I am looking for a favorable battle, I just wait until all 3 monster's HP show up at 14 or more, signifying that I have 3 of the right type. I'm looking through the TASEditor documentation Here and Here but, I'm not seeing anything for telling TAStudio to rewind to the frame that I grab when I start the script. Is this the case that I can't jump around my video with any lua methods or am I missing something? Edit: Zeromus saved my life with his most recent build of bizhawk. I can now run tastudio.setplayback([int][string]) to jump around in the piano roll! This is the crappy code I have written so far
local monster1HP = 0x009567
local monster2HP = 0x00959C
local monster3HP = 0x0095D1
local framesToBattle = 101
local memDomain = "WRAM"
local startFrame = emu.framecount()
local moveFrame = 0

function gameInfo()
  memory.usememorydomain(memDomain)

  monster1HP = memory.read_u8(0x009567)
  monster1HP = memory.read_u8(0x00959C)
  monster1HP = memory.read_u8(0x0095D1)

  if emu.framecount() >= (startFrame + framesToBattle + moveFrame) then
  	gui.drawText(5,25, "battle!")
  	if monster1HP >= 14 and monster2HP >= 14 and monster3HP >= 14 then
  		gui.drawText(5,15, "3 centepedes")
  	end
  	if monster1HP <= 12 or monster2HP <= 12 or monster3HP <= 12 then
  		moveFrame++
  		emu.setplayback(startFrame+moveFrame)
  	end
  end

end

while true do
  gameInfo()
  emu.frameadvance()
end
This is exactly what I am going for: http://recordit.co/kWLWoK8PY6
Post subject: I was actually having the same issue today
Experienced Forum User
Joined: 1/16/2017
Posts: 12
I talked to Zeromus who is one of the main developers for BizHawk and we both discovered that when I ran the game through steam, it wasn't saving my config that I changed bizhawk's core from performance mode to compatibility mode. You definately want to make sure you are running in compatability mode for making a TAS. I lost about 8 hours of work today because I didn't on accident. Edit: also make sure you run the program in admin mode just in case.
Post subject: Inindo - Way of the Ninja!
Experienced Forum User
Joined: 1/16/2017
Posts: 12
I figured instead of keeping my notes local, I would post my findings here. If anyone would like to join me in unraveling this game let me know! As far as I can tell, the last two addresses listed there manipulate all the RNG (But I don't know the formula yet). So far all I have tested directly are the amount of steps until your next battle and your chance to escape. [/img][/userfile]
Post subject: Finding the RNG in memory
Experienced Forum User
Joined: 1/16/2017
Posts: 12
Hey guys, I am really new to doing TAS' and have been trying to read as much as I can. I just started working on Inindo for the SNES and I am currently trying to find anything that might determine RNG in memory. Since the game is pretty much a black box, what are the general techniques and principles used in order to discover anything that determines RNG in memory? So far, the closest thing I have found is a value that is set when you enter a dungeon to determine how many steps until your next encounter but, I don't know what generates that value.