News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Reduce random encounters (snes rpg's)  (Read 812 times)

miaz

  • Newbie
  • *
  • Posts: 3
    • View Profile
Reduce random encounters (snes rpg's)
« on: June 06, 2020, 01:01:44 am »
Ive been getting in to some classic rpgs as of late, but have unfortuenatly had to quit altogether (star ocean), or just kinda been annoyed (super mario rpg), because of the staggering amount of random encounters.

How difficult is it to sort this kinda thing out? I understand its different game to game, and since
SMRPG works a bit like chrono trigger, as in, its not even random, maybe its easier/harder?

Games id love to play are Treasure of the rudras, tales of phantasia (which ive played before, and even back then i hated the random encounters), and star ocean.
But really, all of the games i never played on the snes, which are far more than the ones i did play.

If anyone knows of a hack (could be part of a bigger hack), that allows for reducing enemies/increasing exp/money, for any of the snes rpg's, please let me know.
And if you know how to make such a hack, id love to know.

Tony H

  • Full Member
  • ***
  • Posts: 122
    • View Profile
    • The Code Hut
Re: Reduce random encounters (snes rpg's)
« Reply #1 on: June 06, 2020, 09:37:54 am »
Have you checked for Game Genie codes that reduce or stop random encounters:

https://gamehacking.org/system/snes
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

FAST6191

  • Hero Member
  • *****
  • Posts: 2810
    • View Profile
Re: Reduce random encounters (snes rpg's)
« Reply #2 on: June 06, 2020, 11:46:15 am »
Generally speaking

Increased exp codes are usually they find the exp counter/gold gained at the end of battle screen and do a shift on it (it is why they typically take the form of 2x, 4x, 8x, 16x or indeed half, quarter, eighth and so on).

No random battles typically start life as replicating the effect of a potion/pickup that prevents battles, or maybe if an animation (which can include fast travel and menu options) takes place on the world map/dungeon and they don't want a random battle popping up in that there will be a function.
Some games go further and will have things like only easy battles, only hard battles or only boss battles (which might be the same as no random encounters if bosses/required battles are handled differently) and at that point you gain a few more options.
They can be slightly harder cheats to find than simple consumables you can have dozens of to repeatedly use and search for and instead will have to look for a flag somewhere. The simple search technique will eventually yield results (especially if you drop a savestate before the gobbling a potion/equip. Note that sometimes an equip effect will only happen when you press OK and go back to the game so be aware of that.), alternatively with a bit of effort with an equip or consumable you can follow it back from either a button press or it subtracting one from the count.
Some games will have things like weak enemies run away but that is usually more for things on the world map than "all of a sudden the world goes blurry" random battles and responds to your level or apparent level/stats and can possibly be duped accordingly.
While EXP/gold codes usually take the form of the shift thing then if there is an item to increase it (rarely seen in games like this but not unheard of -- usually castlevania RPG type things which are the GBA on up and western dungeon crawlers) then that can also be something you can try.




If you can live with turning such things on and off (if playing on an emulator you can even automate it with a script to poke cheat enable and disable button every so often -- something on for half the time means half the attacks or near enough).

After this we actually get to deal with the game proper. Various techniques for how games decide random battles. A common one is when you leave a town, dungeon or return from another battle the game will fire the random number generator. In that many steps (occasionally it is a time instead) in pops the next random battle.
Some will instead run the numbers every step or unit time (seconds, frame count/vblank count,... various choices for those) and fire up the battle accordingly.
You can get some idea what it is by whether the battles trigger when standing still, or standing still and then first step after moving with both of those being more time based approaches but that means little. Depending upon how many steps, and if going through a zone change/door/pipe resets it, you might still find it by doing a counter search with a cheat search type setup for something increasing or decreasing until it hits a number. Otherwise find something that reliably changes when in battle mode, and at that point tracing time to work back through things until you find the counter. Find the counter and you can possibly do a cheat to say double it (and half the battles) or hold it off, or just ignore cheats and find something in the game code that handles it and change the probabilities there.
Some fun with savestates can also determine some things (save having just done a battle/exited a town/.... and count the steps you take/time you take until a battle, move in a different direction and try again, walk back and forth... and if it is the same every time for that state then you have some info) or simply reload to reset the counter such that a changed value search becomes easier.

There are a few others -- might not be random and instead fixed steps, might have a terrain factor in how many steps (path is safer than forest, or indeed grass in pokemon), might have zones doing different things (more for 3d games but not unheard of in 2d) and thus different RNG values playing to (if you can find the border/cutoff you can try to also skip between the regions when moving places to avoid a battle or two, but that is more of a speedrunner strategy than anything you want to do for fun).

Option 2. If playing on an emulator then they often have turbo mode options. Stick a toggle on that and fire it when in battles -- if such things fly by at 400% speed (or higher) then things get far more agreeable for a lot of people. Such things seldom exist for hardware and in those cases animation speed increases are the order of the day and those are rather harder to pull off (though not impossible nor only the best hackers sort of thing).


Not every game will fall to this, and some will see you have to get your hands dirty with a disassembler, but most of that is stuff I would expect someone just getting into cheats or hacking to be able to do or have as a my first project that yields end results. The exp/gold shift technique might require a bit of thought too -- you will want to detect you are at a suitable point like the end screen (if this value is in memory then do this), and do the shift just the once (doing it every frame tends to be more of an infinite/max exp or crash the game job) which you may have to note somewhere else that it has been done)

miaz

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Reduce random encounters (snes rpg's)
« Reply #3 on: June 13, 2020, 02:21:16 am »
Have you checked for Game Genie codes that reduce or stop random encounters:

https://gamehacking.org/system/snes

I have, but unfortunately theyre all 'all-or-nothing'. Id like to keep maybe 25% of the encounters,
0% just feels stupid. But ill keep looking.
Thanks though.


Generally speaking....


Thanks for that very detailed answer, unfortunately its all too complex for me. But once i know what im doing, ill get back to that.
For now my solution will just have to be 'Option 2', im currently playing on a snes classic,
not using retro arch, so im gonna have to sort that out first, but not untill i have completed terranigma and smrpg.

aqualung

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: Reduce random encounters (snes rpg's)
« Reply #4 on: June 13, 2020, 03:14:22 pm »
Post edited. What I've said was already said in a previous post.

FAST6191

  • Hero Member
  • *****
  • Posts: 2810
    • View Profile
Re: Reduce random encounters (snes rpg's)
« Reply #5 on: June 14, 2020, 09:45:40 am »
I have, but unfortunately theyre all 'all-or-nothing'. Id like to keep maybe 25% of the encounters,
0% just feels stupid. But ill keep looking.
Thanks though.


Thanks for that very detailed answer, unfortunately its all too complex for me. But once i know what im doing, ill get back to that.
For now my solution will just have to be 'Option 2', im currently playing on a snes classic,
not using retro arch, so im gonna have to sort that out first, but not untill i have completed terranigma and smrpg.

All or nothing is one thing. However if cheats enabled is a key, and cheats disabled is another key then you can automate that easily enough. Don't know about on a SNES classic but on a PC having a script poke usually one of the F keys, waiting 4 seconds poking the other F key it needs to do the opposite, waiting 12 seconds (75% of the time off or on or whatever) and repeats until stopped is trivial -- it might even be the example project for any scripting program you care to use. Also if you have any kind of muscle memory for something like saving a work in progress then it can be doable by yourself as well if there is a button combo.

Skip the exp stuff for now then. By the time you have done the other things then it should be within range.
If you can do the thing where you want infinite ammo so you start a search, fire a bullet, search for anything that changed (or maybe decreased), fire a bullet, search... maybe don't fire a bullet and search for anything that remained the same, fire a bullet... to get infinite ammo you can do this.

My general approach would be get the item that allows it. Assuming I don't want to give myself infinite items and fumble with the menus chug a potion every however many seconds/steps then you get to find a flag in memory.
As firing a bullet/using mana/using an item/jumping in a pit to die/gaining score/... is easy and has a quick reset time until you can try again a lot of the time it can be quicker to source then than flags but flags are still doable.
If you can wait around and it tells you something wore off then then do that. If it is going to be next 5 minutes/500 tiles then that gets more tedious (though the turbo button can help with this).
In that case I would probably mess around with savestates. Take one before you glug a potion* or use an equip (more on equips shortly), start the search, use a potion, see what changed, wait a second or two, see what remains the same (might not work if it is a straight timer with no straight flag but worth trying anyway), wait a bit, see what remains the same, possibly restore a save, see what changed, don't use a potion yet but see what stayed the same, use a potion, repeat until you have a manageable list of things to watch.
If it is an equip and you don't want to waste a slot then they can be done much the same way. I will note some games only apply the flag when you press OK or even get back into the game/out of the menu. To that end cycling between two things in a menu might not gain you much so to play it safe, or maybe just if the "simpler" option does not work at first then start in the game and get back into the game before doing the search.

*if it is a late game item and you don't have a save or savetate to play with to find it them item cheats can usually be twisted. Just life infinite ammo if you can buy say loads of the boring and basic potion/starting dagger/... you can find infinite of those. Most items will then be either a slightly different location (byte 1 of this table is potion count, byte 2 is bigger potion, byte 3 is full potion you only get in the late game....), or have a item code attached to the number of them in your inventory (think how you might do a spreadsheet or table in a text graph, except rather than text in most old games you have a number).



On EXP then multipliers are nice but if you fancy making a code you might be able to set baseline EXP to something else just like an infinite life cheat (search, do a battle and gain some EXP, search again, do a battle, search, maybe do nothing and then search for anything that remained the same... if you have a quick to defeat enemy** that won't take consumable items that is worth say 1 exp then even better). Worst case there is some games might get a bit confused if you set the EXP over the next level cap so in that case make sure you set it 1 below and then next exp gain/battle it will sort it for you.
You have to cycle out cheats as you want but if you keep a note of what things are doing what you can still do the battles but gain the same effective end result/power levelling. Most codes you find on cheat websites will be max exp/near as makes no difference max exp but that is great as most cheat codes are of the form "type of cheat they are, location in memory of this, data to put there" so you just change the data to put there from max/ridiculous value to not a lot. Go one more if you want and have a button activator to say add 1000 to it.

**nothing wrong with giving yourself infinite life, nice late game equips or super stats to speed this up/make life easier.