News: 11 March 2016 - Forum Rules

Author Topic: Dragon Warrior IV (double experience)  (Read 1560 times)

EDR

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Dragon Warrior IV (double experience)
« on: December 25, 2020, 02:58:17 pm »
Hi there :D I want to ask you something, it is possible to multiply the experience and gold gained after battles?

(it's for the NE's version of the game)


Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 693
  • I am the baldest romhacker
    • View Profile
Re: Dragon Warrior IV (double experience)
« Reply #2 on: December 26, 2020, 01:15:07 am »
It's possible. Find where game reads gold and exp, and double this amount. Either by editing data, or by affecting data right after it was read by code.

FAST6191

  • Hero Member
  • *****
  • Posts: 3244
    • View Profile
Re: Dragon Warrior IV (double experience)
« Reply #3 on: December 26, 2020, 05:26:12 am »
To expand a bit then yeah two approaches

1) Somewhere in the game (possibly monster stats table) will be how much experience and gold drop there is. Go down the list doubling things and you have your hack. Bit tedious but gets the job done, and can allow some finer grain control (not to mention if there are drop rates for things then you usually have them in the same tables) if you would rather not have certain enemies/sections benefit your play too much.
2) Edit the after battle results in memory. This is what most cheats on later systems that do the whole 0.5x,2x,4x,8x,16x... gold/experience bit will do. The multiplying by two also speaking to how they tend to do it, that being shifts* which the simpler cheat options most NES devices and emulators go in for will probably lack (they tend to be more raw memory reads and maybe an IF ELSE). That said if doing it as a ROM hack you probably can find a way for it to add up everything for the individual monsters (assuming it does that rather than have a fixed value, per level, by location...) and then chucking in a nice little shift (6502 has options for both left and right shifts in case you decided you want a 0.5x "hard mode") before it displays and adds it to your experience/gold pool.

2) obviously will be assembly but probably one of the easier options here -- do a normal cheat search to find the gold and exp locations. Set a break on write for those and win a battle. When it writes it then the emulator will flash up and say something wrote it and what did it as well as what the previous however many instructions leading to that were. Follow it back up until you get a suitable point (might have to do another break if you have to go really far back to get to before the on screen results are shown so you can have them be "correct" but no big deal) and add in a shift (or more likely a jump to somewhere else, the shift and whatever you broke by adding a jump before jumping back, or if you can combine both gold and exp into one setup then do that).

*in case you were unfamiliar. Every schoolboy will tell you multiplying by 10 is easy as you just add a 0 on the end, though the better ones will tell you you shift the decimal point around. Computers not using decimal but binary meaning if you shift the data around you multiply it not by 10 but by 2 (binary is called base 2 after all).

For some games there will be a third option. If there is a mode where you gain double exp (winning a battle with no damage, surprise attack, simple random bonus option, because of an item you have, because it is a flashback sequence, levelling catchup mechanic... plenty of games have different things but the same end result) and/or gold then there might well be a flag or multiplier somewhere in the mix for that. Find it and edit that by cheat in the case of a flag or forcing it to take the max bonus path. I tend not to see this for NES games though, even 16 bit era this is rare for and is something I tend to associate more with PS1 on up to today (as well as contemporary handhelds to that).

EDR

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Dragon Warrior IV (double experience)
« Reply #4 on: December 29, 2020, 12:32:17 am »
Hi Hero user i managed to find where's the experience is with cheat engine, so OK i found it but every time is in constant change... how i can multiply it by four?

FAST6191

  • Hero Member
  • *****
  • Posts: 3244
    • View Profile
Re: Dragon Warrior IV (double experience)
« Reply #5 on: December 29, 2020, 08:25:46 pm »
Hi Hero user i managed to find where's the experience is with cheat engine, so OK i found it but every time is in constant change... how i can multiply it by four?

Experience in general or experience for the battle when it is still yet to be added to the total?

If doing an assembly hack you could get away with either but for a simpler approach the second one is better.

I am not sure what you mean by constant change. I would expect different battles to have different results if different enemies (or bonus conditions) are faced.

Multiplying by 4.
As mentioned above computers tend to count in binary rather than base 10 like most humans. This means that multiplying by 2 is as easy for computers (give or take overrun) as multiplying by 10 is when doing maths as a human. This is to say you shift the "decimal" point, still called shift in electronics/computers. All but the very simplest CPUs will have shift options within them.
Some cheat engines will allow you to do shifts inside them, older ones for older consoles tend to be more limited if doing it in hardware (some emulators can do their own thing, usually mimicking options seen on later systems, but it is not all that common). In this case you would want to do two shifts (2x2 = 4 after all).
I don't know what language you speak but for the sake of having something
https://studyrocket.co.uk/revision/gcse-computer-science-aqa/computational-thinking-and-problem-solving/binary-arithmetic

Anyway if it is total experience
I would copy the experience to another area. Then compare it every so often. If it is different you calculate the difference, multiply by 4, add that to the old total and set the total experience the game uses as the one you just calculated.

If it is in end of battle screen (or battle itself) and you don't have a shift then I would try to intercept it as it calculates it (is this what you mean by constant change? It adds up each monster you defeated maybe) before it adds it to the total. If it does calculate it at the end screen then you will need to be doing some tracing most likely (set a break on write to that area and follow along as it adds everything up and eventually puts it on the total experience or checks to see if you levelled up or whatever it does).

Alternatively you do still have the option of finding the experience list for each enemy and multiplying that by 4 manually.

EDR

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Dragon Warrior IV (double experience)
« Reply #6 on: December 30, 2020, 06:47:41 pm »
Experience in general or experience for the battle when it is still yet to be added to the total?

If doing an assembly hack you could get away with either but for a simpler approach the second one is better.

I am not sure what you mean by constant change. I would expect different battles to have different results if different enemies (or bonus conditions) are faced.

Multiplying by 4.
As mentioned above computers tend to count in binary rather than base 10 like most humans. This means that multiplying by 2 is as easy for computers (give or take overrun) as multiplying by 10 is when doing maths as a human. This is to say you shift the "decimal" point, still called shift in electronics/computers. All but the very simplest CPUs will have shift options within them.
Some cheat engines will allow you to do shifts inside them, older ones for older consoles tend to be more limited if doing it in hardware (some emulators can do their own thing, usually mimicking options seen on later systems, but it is not all that common). In this case you would want to do two shifts (2x2 = 4 after all).
I don't know what language you speak but for the sake of having something
https://studyrocket.co.uk/revision/gcse-computer-science-aqa/computational-thinking-and-problem-solving/binary-arithmetic

Anyway if it is total experience
I would copy the experience to another area. Then compare it every so often. If it is different you calculate the difference, multiply by 4, add that to the old total and set the total experience the game uses as the one you just calculated.

If it is in end of battle screen (or battle itself) and you don't have a shift then I would try to intercept it as it calculates it (is this what you mean by constant change? It adds up each monster you defeated maybe) before it adds it to the total. If it does calculate it at the end screen then you will need to be doing some tracing most likely (set a break on write to that area and follow along as it adds everything up and eventually puts it on the total experience or checks to see if you levelled up or whatever it does).

Alternatively you do still have the option of finding the experience list for each enemy and multiplying that by 4 manually.

Hi, yeah is the experience for the battle when it is still yet to be added to the total here's a video
https://www.youtube.com/watch?v=LYh8h_rmd2o