Bugs, glitches, exploits and improvements - Vicen04/Dw1DataAndPatches GitHub Wiki

Introduction

Here you will find all of the bugs, glitches and exploit fixed with my patches explained. I'll try to link each of them to a video showing the error (most of the videos will not be mine).

List of Glitches

Bank text glitch fix

This is one of the easiest to recognize and see by yourself, whenever you scroll to check your items inside the item bank, the text for the items in your bag will be overwritten and the text will not show anymore.

Here's a video made by me showing the error (click the image to watch the video):

Bank text glitch video

The cause was the box deleting too much at the right side when it tries to clean the box to render the new text, this was caused by the value used to delete any text that was at the current position being too big, which made it delete too much at the right side (it was about 100, the patch reduces it to 28).

Possible minor issue

The patch causes a small visual bug when the name is either too short and an earlier item name was too big or if the name of the item fills the box. It is still better than just being unable to read you items.

Examples from the patch (the images are from the hack, which also includes this patch):

image

The "Big MP flop" name is pretty long

image

Which causes a short name like "Sirloin" to not be able to delete all of the old data

image

Long names like the ones in the image can still delete a bit of the box from your bag

Battle time fix

This glitch was caused by the developers forgetting to add code to do the following:

  • Add an hour to your evolution timer each time an hour pass while battling
  • Reset the daily events if a day passes while battling
  • Update the age of your digimon if a day passes while battling

Here's a video showing the evolution timer not going up (click the image to watch the video on Youtube):

battle hour video

Here's a video from Geta92 showing the other two errors (click the image to watch the video on Youtube):

Geta92 battle video

I do not own the video, all the credit for it goes to Geta92

The fix just adds the code missing, there's no downside for this fix.

You can check the code with the following links:

Battle time original code

Battle time fix code

The original code did not have any lines left, but by optimising it, I was able to fit the missing lines.

Blue Meramon text & Clear Agumon text fix

There's a Blue Meramon in the back dimension and a Clear Agumon in Toy Town that will not start a battle when you interact with them, it will only show the text.

Here's a video showing the issue (click the image to watch the video on Youtube):

Battle text error video

The error was caused by the script that triggers a battle being overwritten by the dialogue, the battle is supposed to happen after you close the window.

image

The script for the Blue Meramon is shown here

image

The script for the Clear Agumon is shown here

image

Here's the script of other digimon which will start a battle, it has some extra commands compared to the earlier images which are used to start the battle

I just made the dialogue shorter to be able to write the missing commands in the script.

Brains tech learning text fix

Usually when you learn a technique from brains training, the technique name and the other text looks broken, just like this:

image

Example of how it looks in vanilla

If you pay close attention to it, you can see that it actually only renders about half of the technique name, the next text starts just next to it with "was mastered", cuts it in the middle of the first "a" and then it moves it to the next line and cuts short also the "mastered".

The problem was basically the code doing a weird rendering there...

If you're curious about how the fix was done, it is inside the "digimon patches" folder.

This is how looks after is has been fixed:

image

Fixed example; yes, I'm using Weregarurumon for the fixed example

Digitamamon restaurant menu fix

This is both a glitch and an exploit.

Due to an error in the script, you are able to eat the meals offered by Digitamamon without the need of being hungry.

Here's a video made by Geta92 explaining the glitch:

Digitamamon video

The video is not mine, all the credit goes to Geta92

To add to the video, as mentioned above, the error is caused by the script.

When you try to eat a meal, the game checks 3 things:

  • You having enough money to pay.
  • You being hungry (which writes the next value).
  • The meal choosen (this uses the same value as the one for deciding which digimon appears at the restaurant).

The issue comes with the "you being hungry" check, when the game tries to do that check, if it fails, rather than sending you to the rejection dialogue, it will go to the "meal choosen" check, which only needs a number between 0 and 3 to work, so if you're lucky enough, you would be able to eat even if you were not hungry. Since choosing a meal while hungry also overwrites that value, being hungry will guarantee that you can eat as much as your money permits.

To fix this, all I had to do was to make the "You being hungry" check, rather than trying to do the next check, go to the rejection dialogue after it fails.

This patch is exclusive to the Maeson version, since it was a request from him.

Evolution item flag fix

Using an evolution item will disable stat gains until you reset the game, this can be an annoying glitch.

Video from Geta92 showing it:

Evo item flag video

The video is not mine, all the credit goes to Geta92

This is caused by the developers enabling a flag that is never disabled later.

When you use an evolution item, a temporary flag that let's the game know it should disable stat gains is activated, the problem is that the flag is never deactivated anywhere in the code, which it should be.

The fix was to disable that flag after any kind of evolution happens (including the one caused by the item).

Evolution item rejection fix

Fresh and In-training digimon were able to eat evolution items, since the level is not the correct to evolve, the evolution would not trigger, but the item is wasted. Fresh digimon were able to eat any evolution item while In-training digimon only Ultimate evolution items.

Here's a video with the error:

Item rejection video

The issue was the extremely roundabout way the code was written:

  • It checks if the digimon is 1 level above of the evolution item
  • It checks if the digimon is 2 levels below the evolution item
  • It checks if the digimon is the same level as the evolution item
  • If any of the above is true, reject the item

As you can see, this does not take into account all of the possible cases (like Fresh always being 3 levels below or more). My fix was pretty simple: check it once with the best check.

So now it just does this:

  • Check if the digimon is 1 level below the evolution item, if this is false, reject the item.

Forget moves fix

This is a very annoying glitch. When you lose all your lives, the game has to choose which movements you should forget as a penalty, but due to a few errors in the code, the game removes a lot more movements than what was intended.

Here's a video by Geta92 showing the error:

Forget moves video

The video is not mine, all the credit goes to Geta92

To fix this error, I had to rewrite all the code from that function since almost all of it was written in the wrong way.

It is going to be a bit complicated to explain why this happens, but here's an explanation:

Digimon World Forget moves explanation 1

Image showing how the moves are seen by the game code

The game uses a bit flag system, it is a simple system:

  • If a movement has been learned it will show as a 1, if the move it has not been learned yet, it will show as 0. Each number is a bit.

This image shows how it looks when all the moves are active. Each color represents a move type, and is at follows:

  • Red is the Fire type moves.
  • Yellow is the Air type moves.
  • Light blue is the Ice type moves.
  • Gray is the Mech type moves.
  • Green is the Earth type moves.
  • Purple is the Fighting type moves.
  • Brown is the Filth type moves.

All of the moves are handled in two groups, the image shows the two groups and how they are divided.

Now, the error caused by the code:

Digimon World Forget moves explanation 2

Image showing the error with the code

When the code has to select a move, by an oversight of the developers, it only generates flags for the moves inside the blue brackets. The moves inside the red brackets are set to 0.

Why does that happen?

Because the operation to set the flags is supposed to give a 4 byte (32 bits) value, but the code only uses the first 2 bytes (16 bit) when it tries to set the new values for the flags (it actually does something a bit different, but it is easier to explain it in this way).

Because of that error, all of the remaining moves are set to 0, which causes this:

  • Choosing a move from the Group 1 will restart all the flags from the Ice and Mech moves as shown in the image.
  • Choosing a move from the Group 2 will restart all the flags from the Filth move and the last move from the Fighting type (which is a version of dynamite kick).

Not only it will delete the move choosen, but it will also delete the later moves from each group.

Get evolution fix

This is a glitch that happens pretty often.

Here's a video with an explanation, check the description for the details:

Evolution glitch video

This glitch is caused by an oversight from the developers, the evolution score calculation is something like this:

(HP and MP are divided by 10 before the stat is added)

evolution score = sum of all the stats required / amount of stats required.

The problem comes when you can evolve to more than 2 digimon, then it will do the calculation multiple times, if an option has a lower evolution score than the previous one, the "amount of stats required" and the "evolution score" are not reset, which makes the next calculation look like this:

evolution score = (sum of all the stats required + old evolution score) / (amount of stats required + old amount of stats required).

To put an example using the video, this example is when I was trying to evolve to Kokatorimon:

  • Birdramon only uses the speed:

Birdramon score = 108 / 1 = 108

  • Airdramon uses MP, speed and brains:

Airdramon score = ((1016/10) + 108 + 101) / 3 = 103 (lower than Birdramon score)

  • Kokatorimon only uses the HP:

Kokatorimon score = ((2162/10) + 103) / (1 + 3) = 79 (glitched, the expected was 216)

The digimon ended up evolving to Birdramon due to the glitch.

My patch ensures that the "amount of stats required" and "evolution score" are always reset as intended.

Patch versions

There's a standalone version which only fixes the error.

There's my hack which includes a fix for this error but uses different code since it merges two functions together and adds the extra digimon.

There's the Maeson version, the code is mostly the same as my hack, but there are 3 different values used to determine the stat requierement of the extra digimon (made to fit his requirements).

Giromon's Jukebox fix

This is one of the most famous bugs, so I'll not include a video this time.

When you try to play songs from Giromon's jukebox, the game will freeze after you scroll to certain songs.

This error is caused by how the text for the list is handled:

  1. The text is loaded in the memory
  2. The game gets the lenght of the text and a character limit for the box it will draw
  3. The game checks if the text lenght is smaller than the character limit in a weird way: divides the amount of characters by 2, then it substracts the amount of characters from the character limit. This makes a new vale that I'll call "filler". (The issue is here)
  4. Then make a loop that will keep going until the "filler" becomes 0:
    1. In each of these loops, the "filler" value will be reduced by 1.
    2. In each of these loops, write into memory empty characters, where it is written is based on where the text is located in the code, it will start at the first byte after the text.

The error is caused by the step 3:

  • If the text lenght divided by 2 is still bigger than the character limit, then the "filler" value will be negative.
  • The game only stops the loop if "filler" is exactly 0, this means that step 4 will continue writing into memory until the value overflows, becomes positive due to the overflow and then is reduced until it becomes 0.

That does corrupt the memory a lot since it writes data way past when it should, it also can just write until the game is out of memory.

The character limit for the Giromon jukebox is 24 characters (empty spaces included), but some of the translated song names have a character count bigger than the limit, such as: "Trash Mountain Night Theme" (26 characters and the one that freezes the game if you scroll up), "Tornament Championship Theme" (28 characters, wrong spelling and freeze if you scroll down), "Non Bewildering Forest Night Theme" (wrong name and 34 characters) and "The Ancient Region of Dino Glacial Time Zone Night Theme" (56 characters, more than twice the limit).

My patch does fix this by changing how step 3 works:

  • The game checks if the text lenght is smaller than the character limit, if by any chance it is bigger, then it just ignores step 4.

The patch also changes the title of the songs to fit the screen better and fixes the name of the "Mt. Infinity" song.

Possible issues

This code was not exclusive to the Jukebox, it is shared by a few other lists, I had to change them too to fit the code changes.

Without the title song changes, the text will just overflow the box, which leaves some text outside of the box which is not cleaned until another box with a long title appears or you close the jukebox.

You may not like some of the new titles.

Jijimon prosperity fix

This is just a minor glitch.

Here's a video showing the glitch:

Prosperoty glitch video

If you have reached 100 prosperity, Jijimon is supposed to give you a Tamer level and a medal. This will not happen if your current Tamer level is 10 (Legend), which is the maximum Tamer level

The problems comes with the script to give you the medal being locked behind the script that gives you an extra Tamer level: Since the script determines that you already have the maximum Tamer level, it does not give you a Tamer level (which would be reset to 10 anyway), which in turn stops the script and skips the part that gives you the medal.

My fix just changes the script a bit, so it also accepts the maximum Tamer level.

Mojyamon animation fix

Here's a video that shows the glitch and the patch:

Mojyamon animation

The fix does the following:

  1. It will not move slowly towards the player if you speak with him constantly
  2. It will not go out of bounds over time if its dancing really happy.

It will not move slowly towards the player if you speak with him constantly

The animation when Mojyamon dances moves it a bit foward and then a bit backwards in a loop, it is very difficult to notice, but it happens. The movement foward happens in the first frames, which triggers the glitch of Mojyamon clipping into the player if you speak to it in succession for long enough.

The patch has removed that small movement, now it should just stay in place even if you keep speaking with it.

It will not go out of bounds over time if its dancing really happy

The animation when is dancing really happy (happens when you have traded all the items with Mojyamon) has a small error in the movement calculation, it moves Mojyamon 8 units in the Z axis each iteration rather than making it going back to the original position. This makes Mojyamon go out of bounds if it dances long enough.

The patch makes the calculation work in the intended way, so now it goes back to the original position.

MP Consumption fix

This is one of the most famous bugs.

When you get the MP Consumption bonus in a battle, the game will show glitched text and then freeze.

Here's a video showing the error made by Zoso9391:

MP Consumption bug

The video is not mine, all the credit goes to Zoso9391

This error is just a text error and that's all, the developers forgot to let the game know when it should stop reading the text, so it keeps reading until it runs out of memory and crashes the game. The text format is different from the dialogues in the game (which have a failsafe), this one just read bytes and transform then into characters.

Omnidisk fix

The Omnidisk used to ignore the stat limit boost which all disks should have, this could lead to errors when you try to use other disks to boost your digimon.

Here's a video with the error by Geta92:

MP Consumption bug

The video is not mine, all the credit goes to Geta92

The fix for this error is not exactly ideal, there were not enough lines in the code to add the limit to the Omnidisk.

The solution was to use the code from each of the buff disks (the basic ones, not the super) separately inside the Omnidisk code, since that ones have the right limit. This was achieved by recalling the funtion that is in charge of the disks so it activates each disk.

Recycling shop text fix

This is a fix for a small text issue that happens in the recycling shop, as seen here:

image

Broken recycling shop, ignore the bits, that's a different issue

This is caused by the code trying to use the normal code for selling items rather than a different variant which is used to sell items, which would display this fine.

More details about the fix can be found in the repository.

This is how it should look:

image

Fixed version

image

Seeling items for comparison

Rotation Fix

The game is unable to handle 180 degree rotations, it will just be unable to rotate and it will freeze the game.

Here's a video from SydMontague that shows the error:

Rotation bug

The video is not mine, all the credit goes to SydMontague

The video may not explain it, but the Softlock seen is what happens when the game tries to perform a 180 degree rotation of a character during a cutscene.

The error is caused by an oversight from the developers, in the code there's two ways to handle the rotation difference calculation:

  • Rotations counter clockwise are smaller than clockwise, which triggers code A.
  • Rotations counter clockwise are bigger than clockwise, which triggers code B.

180 degrees are not handled (clockwise equal counter clockwise), which causes the game to keep trying the rotation, which in turn, softlocks the game.

My patch just does the following to the rotation difference calculation:

  • Rotations counter clockwise are smaller than clockwise, which triggers code A.
  • Everything else triggers code B.

The digimon randomizer also has a Rotation patch, mine is just written in a different way, but it fixes the error too.

Save data text fix

Sometimes your save data file will look like this:

image

Image showing the error, which can be seen in the file 2 and 4

This error happens due to how the code saves the names:

  • The code will use a function that reads the names either until it cannot read any more text or until it reaches the character limit set (6 characters for the player name, 16 characters for a digimon species).
  • That name then is set to be stored and then later, when the game loads, displayed in the save file data.

Now, the issue comes with that "reads the names either until it cannot read any more", why is this an issue?:

  • Let's say you have a digimon with a long name like H-Kabuterimon, you save your game and continue.
  • The digimon dies of old age, so now you start with a new digimon.
  • You keep playing and now you have an Agumon.
  • You decide to save the game.
  • The game will try to store that digimon name, but it will stop reading after the "n" of Agumon.
  • Then it will try to put that on the place where the old name was, this name is only 6 characters long, so it will only overwrite 6 characters.
  • Now the digimon species in the save data file will look like this: Agumonterimon.

The patch just makes the game keep reading until it reaches the character limit, which will make it overwrite always all the old data, there's no risk since the character limit makes sure it does not go over to read other data and it doesn't read more than necessary.

Sleep hunger math error Fix

This can be a very annoying glitch and was more or less the reason I started doing these patches (and then my hack), it was originally a huge problem Maeson's hack was facing, since the changes for that hack was triggering this glitch a lot. I decided to help him by fixing the glitch.

Here's a video from Get92 explaining the glitch:

Hunger sleep glitch

The video is not mine, all the credit goes to Geta92

To explain how it was fixed, I'll first explain what is the cause of the glitch:

Each digimon from Rookie to Ultimate has set times when it becomes hungry (with a maximium of 8), when it becomes sleepy (it can be earlier if the digimon is tired) and when it wakes up. Fresh and In-Training have just simple code that says it has to become hungry and sleepy quickly.

Take note that the next feed time is not set until the food bubble dissapears

To get the time when a digimon becomes hungry, the game does the following:

  1. Create a loop that tries to check each time to feed from the digimon.
  2. Get the last time the digimon had to be feed, use it to compare each time in the loop:
    1. If the last time the digimon was feed is bigger or the same as the current in-game time, then check if the current time in the loop is bigger than the last time the digimon was feed, if this is true, stop the loop.
    2. If the last time the digimon was feed is smaller, check if the current time in the loop is bigger than the current in-game time, if this is true, stop the loop.
  3. If a time was not set in step 2, start the loop again and try to set the first time in the list that is bigger than the current in-game time.
  4. If step 2 and 3 fail, just set the first time in the list as a time to feed.

It may sound complicated, hopefully this example will make it easier:

Palmon has the following feed times: 2 | 6 | 10 | 14 | 18 | 22 . A total of 6 feed times.

It also has a SUNUP sleep cycle, which means it will go to sleep at 16 and wake up at 1 of the next day.

If Palmon becomes hungry at 2 and you feed Palmon in time, the game will just look for the next time to set. It will do step 1 and step 2.1 in this case:

  1. The loop for each value
  2. The last time it was feed is 2, the current time is 2 too. This will go to 2.i
    1. It will check for each possible value, starting with 2, which does not fit the criteria, then it will go to 6, which fits the criteria to set the next feeding time and stop the loop.

With that, the new feeding time has been set as 6.

If Palmon becomes hungry at 2 but you feed Palmon in the next hour or not feed at all, the game will go to step 2.2 rather than 2.1, since the current time now is bigger than the old feeding time.

The issue comes when you sleep at your normal time:

  1. Palmon sleeps at 16 as intended, this will make the game look for a new feeding time later, since the time has changed by a lot.
  2. The current feeding time should be 18, since it ahould either have been feed at 14 or just not feed, so the time was set automatically.
  3. The game sets the time now to the waking up time, which would be 1.
  4. The game then proceeds to search for the time Palmon should be feed. The current time is smaller than the old feeding time ( 1 < 18), so it will go to 2.i.
  5. ISSUE: It will check each time until it finds a time that is bigger than the old feeding time, in this case, Palmon has a feeding time at 22. The game will set the next feeding time to 22 because it actually fits the criteria for 2.i. (22 > 18).
  6. Since it is 1 currently, Palmon will not become hungry until the 22 hours of that day, which in fact, it will feel like it never gets hungry.

Sleeping again that day at 16, will make the game do everything from step 1 here, but rather than using a 18, it will be a 22. Since there's no feeding time that is bigger than 22 for Palmon, this time the search for a feeding time will go to step 3, and that will set the feeding time to a correct one.

How did I fix the issue:

I just added an extra check inside 2.i:

2.i. NEW If the last time the digimon was feed is bigger or the same as the current in-game time, then check if the current feeding time in the loop is bigger than the last time the digimon was feed and the current in-game time does not have a difference bigger than 12 hours with the current feeding time in the loop, if this is true, stop the loop.

From the Palmon example, this will change step 5: It does fit the criteria of being bigger (22 > 18), but the difference between the current in-game time and the feeding time selected is bigger than 12 ( 22 - 1 = 21, 21 > 12), this will make it countinue looping until it goes to step 3, which will set the correct time.

As an extra note

While I have only mentioned sleep, this could technically happen with any sort of event that skips a large amount of time, such as Monochromon's shop minigame.

Sleep regeneration HP/MP overflow fix

A glitch that is difficult to trigger during normal gameplay.

When you sleep either with the rest pillow or in a favorable area for your digimon and the digimon has a high HP/MP, sleeping at the same hour the digimon is supposed to wake up will overflow your HP/MP stats, causing them to become neagtive which will corrupt the stats.

Here's a video from Geta92 showing the issue:

HP/MP sleep overflow glitch

The video is not mine, all the credit goes to Geta92

To explain the error, first I'll explain how the code handles sleep:

To start, the calculation is done before the game sets the new time, so it uses the time when the digimon goes to sleep.

WHen a digimon goes to sleep, it will regenerate a certain amount of HP/MP using 3 variables: the hours it has slept, the amount of HP/MP and a bonus.

There are two types of bonus:

  • Area bonus triggered by sleeping in a liked/disliked area: a liked area gives a 1.2 bonus, a disliked area a 0.8 bonus.
  • Rest pillow bonus: 1.2 bonus.

Both bonus can be triggered at the same time.

The game uses this formula to calculate the amount of sleep:

  • If the wake-up hour is bigger than the current in-game time: "wake-up hour" - "current in-game time"
  • If the wake-up hour is smaller or the same as the current in-game time: 24 - "current in-game time" + "wake-up hour"

Here's the formula to calculate the HP/MP to heal: ((max HP/MP * (random(10) + 70))/ 100) * ((hoursSlept * 100/standardSleepTime) * bonus) / 100

The data type used to store the HP/MP is a WORD, which can represent 65536 values, but it is divided in positive with a maximum of 32767 and negative with a minimum of -32768.

Here's then how it sets the new current HP/MP: new current HP = current HP/MP + sleepHeal HP/MP.

After the new current HP/MP is calculated, the game will check if it is bigger than the Max HP/MP, if by any chance the value is bigger, it will set the value to the max HP/MP.

When you sleep at the same time your digimon was supposed to wake up, the game believes that your digimon has slept for 24 hours.

This will cause an overflow then the new HP/MP is set which will transform it into a negative value, the negative value is technically smaller than the max HP/MP so the check done later will not fix this error.

Using the video, here's is how it may look in the code:

Here's the formula to calculate the HP/MP to heal: ((9999/9999 * ((5*) + 70))/ 100) * ((24 * 100 / 9) * 1.2) / 100 = 23,997/23,997 (not the exact number)

*I have set the random number to 5 to 75

Here's then how it sets the new current HP/MP: new current HP/MP = 9999/9999 + 23,997/23,997 = 33.996/33.996 (this is bigger than the max value of a WORD)

How the game then views this value: new current HP/MP = -31.539/-31.539

How did I fix this?

I just a small change in the formula to calculate the amount of sleep:

  • If the wake-up hour is bigger or the same than the current in-game time: "wake-up hour" - "current in-game time"
  • If the wake-up hour is smaller than the current in-game time: 24 - "current in-game time" + "wake-up hour"

This change avoids the error in which the game sets the hours the digimon has slept as 24.

Sukamon stat gains fix

In the original game, when you evolve from Sukamon to any digimon in a natural way (Vademon or Etemon), the digimon won't get any stat gains, rather than that, the game will erroneously believe that you are evolving back to the digimon it was before it evolved to Sukamon, so it will give the same stats as when you use KingSukamon to de-evolve the digimon.

Here's a video from Geta92 showing the glitch:

Sukamon stats glitch

The video is not mine, all the credit goes to Geta92

The patch does fix this, so Sukamon now is able to have stat gains like any normal digimon (this includes earning a tamer level).

The game harcoded the following: when a Sukamon is evolving, the stats from the old digimon + half of the stats earned as Sukamon are given.

Now with the patch, it only does that if the digimon that Sukamon is evolving into is also the same as the digimon the Sukamon was before.

Possible issues

To make this patch, I had to remove one of the special stat gains digimon, which will now get normal stat gains, this digimon is Devimon, now rather tham having no stat gains, it will earn at least 1 stat in brains.

If your Sukamon naturally evolves to the exact same digimon, it will not get any stat gains (Etemon -> Sukamon -> Etemmon, Vademon -> Sukamon -> Vademon).

Tankmon missing Tech

Tankmon has an error on its data which makes it unable to use a move in battle, here's a video showing the error:

Tankmon missing Tech video

The issue is mainly caused by having the wrong movement set in its data:

  • Tankmon has "Fire Spit" as a movement inside the data, thanks to my research to find the movements list that enable the digimon to use the move, I know that Tankmon is fully unable to use "Fire Spit".
  • Whenever Tankmon tries to use the move, the game checks if Tankmon is able to use the move.
  • Since Tankmon is not allowed to use that move, the game will just not load the movement itself and will only play the animation of Tankmon.

I know that Tankmon is able to use "Prominence Beam" thanks to the movements lists, so it probably is the case of the developers just setting the wrong move in its data: "Prominence Beam" has the ID 1, "Fire Spit" has the ID 2.

It is easy to see why this error could happen, the patch just sets the correct ID.

Textbox Choice fix

This is a glitch complicated to explain.

Here's an example of a glitch caused by this, the video is from Geta92:

Tournament glitch

The video is not mine, all the credit goes to Geta92

That's not the only glitch that can happen, that exact same piximon choice box can also overwrite the prosperity value.

Now, to explain how that glitches can happen, I'll explain how these textboxes with choices are handled:

  • Each textbox points to a different part of the script, when you select a box, the game will just jump to that script and execute all the commands there until the command to close the box and stop the script is reached.
  • However, when you press triangle, with how the code was written and with some script missing in a fex textboxes, rather than just close the box, the game will jump to a few bytes after the first choice and then continue from there. This can happen with Piximon shop textbox, the Meteoromon textbox and the WaruMonzaemon textbox as far as I'm aware, there's supposed to be one in the debug menu but I have not tested it.

In both cases it will end up with the box being closed, but since pressing triangle makes the script execute in an position that could have been not intended, the game may execute data that wasn't intended to be a command, as a command.

The fix could take quite a bit of time to explain and also would be pretty difficult to understand, so I would recommend to read the code from this patch if you want to know everything about it, a short version would be:

  • Now when you press triangle, the script will just execute the "close window" command in the earlier mentioned cases.

Original idea

Originally I designed the code to actually choose the last option of the choices, which usually was just a text to refuse or leave that option. Some choices did have something different as the last choice (like the tournament first textbox choice), so I decided to not use the code, since it would mean I had to also rewrite some of the script and text attached to them.

Possible issues

  • I have not tested all of the textboxes, due to the huge amount of them the game has.

Tournament Schedule Text Fix

There's a well know issue where sometimes the tournaments are displayed in the incorrect row:

image

Image showing the error, the "O" (cool) and the "M" (mech) are in the wrong place, it is easy to spot since MegaSeadramon should be able to join the "O" cup

This is due to a limitation in the code, the game renders the text in rows and each is done separately:

  • When the game tries to render the text, it will loop for each character to check which kind of character it is and how to render it, then it will be set to render based on the position for that character.
  • After it has been rendered, the width of that character will be added to the current X position to set a new X position.
  • If a character is supposed to be a blank space, it will just try to add the last rendered character width position.

That comes with an issue, what happens if the first character that has to be rendered is a blank space? Well, the game will just not add any width position since it does not have any data set there yet and there's no earlier character that has been rendered, so the rendering will be displaced. The image is an example.

The patch actually does not change the text code at all, it just changes what it is stored to render later when there's no tournament data at that position: rather than an empty character, I decided just to render a "D" with no colour.

This should set the width necessary to avoid the displacements and also, since it doesn't have any color, it should be invisible so the "D" will not appear.

Various text missing fix

There are various instances in the game where the text is corrupted and it is not displayed in the game, but, it is stored in memory. I just fixed the part corrupted.

One of the most famous example is Myotismon's text about SkullGreymon:

image

Image showing the error, it is similar for all the text corrupted

The problem itself is the "00 00" Which uses the "END", it is a mark to let the game know that it should stop rendering.

All of the errors have this "END ?" which makes the game unable to display text past that point, there's also some leftover text from an earlier part from the dialogue, I just had to remove that "END ?" while cleaning a bit the leftover text.

List of Improvements

Better learning chances

This is divided in two patches:

  1. Better learning moves in battle
  2. Better brains learning moves

Both just increase the chances to learn movements, the first one for movements in battle and the second one for Brains training.

This can be applied to vanilla and my hack, it does work in Maeson's too, but I would recommend to not apply it on that hack, since Maeson changed the chances himself for his hack and it would be overwritting his work.

BGM patch

This patch just makes the BGM not stop after you move to a map with the same BGM:

  • Usually when you move to a different map, the game stops the music.
  • When the script to play a BGM is used (which is usually triggered when you enter a map, the game also stops the music.
  • Both are not fully necessary if the BGM is the same, since the code to actually set and play the BGM already checks if the BGM is the same or not and stops it in that case to play the new BGM. There are a few exceptions since a few maps are not supposed to have a BGM (which is mostly the lava cave).

The patch just removes the instances that stop the BGM when you move to a different map which are kind of unnecessary.

The standalone version only removes the instances that stop the BGM.

The Vice hack and Maeson hack also change a bit the script, so the BGM stops after the Volcano stops for the first time (after beating Meramon).

Bonus try

This section refers to three different patches:

Bonus try fix

This is inside the Improvement section since I decided not only to fix, but to improve a bit the way the bonus try works.

How the bonus try was supposed to work:

  1. The game creates a random number between 0 and 9, and uses that to know if the player has a lucky spin or not.
  2. If the value is between 5 and 8 (both included), the bonus try will trigger the normal lucky spin and will attempt to help you obtain three in a row of normal images (gold poop not included). If the value is 9, , the bonus try will trigger the "gold poop" lucky spin and it will try to help you obtain gold poops. It helps if you are short on 1 or 2 spaces to land on the same image as the row before, however, if its the row 3, it will not help if the row 1 and 2 don't match.
  3. If the player has no help, it will try to avoid 3 in a row in the last slot, with an intended 25% chance of not screwing the player (which never activates due to an error). Also, if you don't have the gold poop help, but have the normal one, it will try to avoid giving you three gold poops with also a 25% chance (which never activates due to an error) of not screwing you.

Fixing it would mean to just remove the error which impides that 25% chance to trigger, but I decided to just make the game ignore the code which makes the third slot not land on the intended image if you don't have the right lucky spin.

Super helpful bonus try

This patch has the fix from earlier and an extra change in the step 2:

  • OLD: It helps if you are short on 1 or 2 spaces to land on the same image as the row before, however, if its the row 3, it will not help if the row 1 and 2 don't match.

  • This patch: It will make you always match the three slots (or at least that's the intended behaviour)based on the lucky mode activated.

Ultra lucky bonus try

This patch includes both earlier patch and also changes the numbers that trigger the lucky spins:

  • OLD: If the value is between 5 and 8 (both included), the bonus try will trigger the normal lucky spin and will attempt to help you obtain three in a row of normal images (gold poop not included). If the value is 9, , the bonus try will trigger the "gold poop" lucky spin and it will try to help you obtain gold poops.

  • This patch: If the value is between 1 and 6 (both included), the bonus try will trigger the normal lucky spin and will attempt to help you obtain three in a row of normal images (gold poop not included). is between 7 and 9 (both included), the bonus try will trigger the "gold poop" lucky spin and it will try to help you obtain gold poops.

Here's a video showing the two extra patches:

Bonus try patches

Learn multiple techs in battle

A video showing how it works:

Learn more techs

This patch allows the digimon to be able to learn more than 1 tech at the end of a battle (if you are lucky enough, of course) which is something that can make learning techs a lot more comfortable.

The code to learn techs originally worked in the following way:

  1. Handle all the code to check if you can learn a tech.
  2. If it is succesful, add the tech you can learn to an array.
  3. After all the possible techs have been handled, if the array has at least 1 tech, go to step 4.
  4. Generate a random number between 0 and the array size, then learn the move in the position of the random number.

The patch changes step 4, now it does the following: 4. Learn all the moves in the array.

The patch works in Vanilla, my hack and Maeson's hack.

Short Introduction

Video showing the patch:

Short intro

This patch makes the introduction last only a few textboxes, skipping most of the explanation. This patch is intended for veteran players that like to replay the game a lot.

It is just a feature requested, it works with Vanilla, Maeson's hack and my hack.