News:

11 March 2016 - Forum Rules

Main Menu

Dragon Warrior 2

Started by joe73ffdq, December 10, 2015, 02:12:34 PM

Previous topic - Next topic

magictrufflez

As a big fan of the DW1 Randomizer and an even bigger fan of DW2, I like this thread.

2 requests if you guys end up putting together a randomizer:  If you mess with the locations, pleasepleaseplease make sure there's some kind of block of randomizing starting areas to be in ridiculous places, and pleasepleaseplease make sure some of the sequence stuff doesn't break.

While the DW1 Randomizer generally works really well, there are some rare occurrences that would make a game unfinishable if they occurred in the randomizing process.  Charlock Castle and Tantegel getting switched was the most ridiculous one, but there was also one where I got locked out of certain chests that held required items because I had found a different item beforehand that would cause the first chest to be unobtainable (the chests were in the shrines).

Since DW2 is a MUCH bigger game, I think there are multiple points where this latter problem could happen, especially since ship travel is a big mobility cutoff.  Sorry if you guys probably already too this into account, but I just thought I'd toss it out there.

gameboy9

#21
Joe,
Thanks for putting all of that together.  I will edit the treasure post to point it to your compilation soon.  Thanks for letting me know which items point to which; that will be a great addition to when I get to the insane randomness levels I'm going to program.

I intend to place the randomizer on romhacking.net when it's in a far more bug-free than it is right now.  Until then, it will be available on Github.

Magictrufflez,
You raise a very good point.  I can tell you that the current randomizer does mess with the treasure locations, but I explicitly programmed for the six key items (Mirror Of Ra, Cloak Of Wind, Golden Key, Jailor's Key, Moon Fragment, and Eye Of Malroth) to be placed in locations prior to which they would be required.

I do not intend to scramble the actual locations at this time.  That would be very interesting, but because of the paragraph above, it would make the treasure placement algorithms VERY difficult...

January 21, 2016, 09:30:30 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

OK, after finding a bunch of issues with the first run, (you can see examples at http://www.twitch.tv/plf99/v/36823988) I fixed those up and made my first "pre-release" here:  https://github.com/gameboy9/DW2Randomizer/releases/tag/0.1.0

Enjoy!

joe73ffdq

This is cool. Dragon Warrior 2, is being worked on by 2 people, and there are 2 different goals in mind.

The randomizer will be an option for some, and I plan on making documents, similar to GFF.


I added something to the list, and will continue to modify it as I get new things. The GG codes will be removed once I have the data, and dont need them as a reference point. There should be a .5 beta in a few weeks, once the character page is complete.

Spell, Enemy attack, Equipment, and Item routines, are the focus right now.

11565-13453 (I think) has the correct JSR (20-20-a0), for all the attacks used in battle. (enemy and character)

19300-19b00, is the ballpark area for out of battle Item routines

The one last thing I really want, is Armor resistances, which should be in the 18000-19300 area.



If anyone cares to look into in rom RNG, I havent used fceux or anything like that, so finding that isnt my forte. Getting lost in the matrix of a hex editor is usually where Im at, and trying to assemble documents.

gameboy9

#23
You know what I'd like to throw into the randomizer?  The removal of the prologue.  I want the game to start where the Japanese started in 1987... with the soldier limping in, saying his spiel, then the game starting.

Why?  Because if you're playing the randomizer, I'm pretty sure you've played the regular game and probably know that Moonbrooke is going to be toast.  :)

Unfortunately, I wouldn't know where to start there...

January 23, 2016, 06:43:53 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

A couple other fun things I've discovered with this randomizer run... (https://www.youtube.com/watch?v=C4WKSbhVVPs)

The jailor's key MUST be in an item store or there's going to be a problem.  (I think, but pretty darn positive about it)
The Staff Of Thunder is still awarded if you change that particular boss fight around.  (I fought a Hibabango and still won the staff)
You CAN defeat three Bazuzus.  :)
If the final boss fight against Malroth is altered, the music changes to the regular battle music.  The end result is the same, however, so it's not that big of a deal.

Here's the second release of the randomizer:  https://github.com/gameboy9/DW2Randomizer/releases/tag/0.2.0

Enjoy!  And now... the real fun begins...

January 25, 2016, 09:23:39 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

Ugh!  This is frustrating.

I can change what magic a person learns, but it does not change the text on the list of spells, fight or command.  But if you select the magic, it will point to the right spell!  (EXAMPLE:  If I changed Heal to Healall, the command text will still say Heal, but when you cast it, it actually WILL cast to Healall)

I'm sure it's a text pointer somewhere, but I can't find it!  ARRRRRRRG!

Until then, I really can't randomize the magic, which is a really good thing to randomize.  UGH!

EvilAsh25

Hi, I wanted to give a huge thanks for digging into DW2.  It is one of my favorite rpgs and there has been so little information on it.

Early last year I decided that I wanted to speedrun this game, and I put a lot of time into it.  The end result was me finding the Falcon Sword equip glitch which I posted on SDA as well as making some improvements to the route. 

Anyway, I wanted to share what information I gathered.  Not sure if any of it is helpful at this point as most of what you have found is the same as I have found in random GameFAQs threads, but I've found some more information in searching for the Japanese version of this game. 

I threw this document together from the JP websites (links to the original pages are in the document) https://docs.google.com/spreadsheets/d/1lgWR1rO8DoJKaUT3aHusIyUc2QzelBh7MRBD81F4N0k/edit#gid=1098843084.  I was in the slow process of building a bestiary based of off this information, but I got distracted with other projects, so it is still unfinished, it looked like this: http://i.imgur.com/XxRwb1o.jpg

Some information that I couldn't find the answers to and I would love to know:

1 - Run chance.  There have been rumors that there is a flat 2/3 success chance every time you run, but I am skeptical.

2 - Encounter rates per tile.  I couldn't find anything on this.

3 - More details on enemy AI.  From the data I collected, it is easy to piece together most enemies' attack chances and such, but it gets really complex with some enemies, like Hargon.  This is my best guess at Hargon behavior: http://i.imgur.com/Nsk6inK.png which may be totally wrong.

Thanks again!

joe73ffdq

Here is everything you need for casting spells. Look in section 4

https://dl.dropboxusercontent.com/u/228695840/%231%20-%20Characters.zip

That process was a pain in the ass. The whole magic section for characters, ended up being more complex then I expected.



Now to test all the Effect bytes for Battle Spells, and then to look for all the Enemy Special Attacks.

Im glad others are getting into DW2 also  :beer:

gameboy9

Here's what I've found since we've talked last:
0x1adcf, 0x1add0, 0x1add1 = Battle speed.  The less the number, the lower number of frames between battle statements.  It was 40, 70, and 255, which is really slow.  I changed it to 1, 40, and 70.
0x11038 = Amount of shaking when taking a hit.  (I changed this to 2 to virtually put a stop to that, speeding up battles)
0x10ae9 = Enemy flashing when they take a hit.  Change that from 4 to 1 to reduce the flashing and increase the battle speed further.
0x3c526 = Number of flashes when casting a spell.  I reduced this from 0a to 01, speeding up battles greatly.  (from about 20 frames to 2)

0x1c1a5 to 0x1c1b1 = Prologue stuff.  Change these 12 bytes to "EA", meaning NOP (no operation) to skip the prologue, albeit in a sloppy way.  Takes three minutes off the run though!

We're up to 0.6.0.  Please check out this release here:  https://github.com/gameboy9/DW2Randomizer/releases

joe73ffdq

#27
I downloaded it, and it doesnt compare, and it brings up the box with an unhandled exception, a few times before the rom would load. The other one works fine.


Here is where Im at. Each Battle Spell has the following.

        Command                      Effect

02 : Select Ally                 00 : One Ally
01 : Select Enemy            01 : All Allies
00 : Open Cast                 02 : One Enemy
03+ : Chance                   03 : One Group
                                         04 : All Enemies
                                         05 : Confusion on random enemy(s)
                                         06 : Revive and or Heal random Ally
                                         07 : havent mapped the rest


         -    Spell Power     -     3 Texts : Spell use, Spell connects, Spell misses     -     MP Cost, MP w Myst hat


There are some interesting things to note here. The Spells are hardcoded, but they have reversed effects.

Heal Spells damage the Enemy
Attack Spells Heal Allies, but still have the shaking
Increase will reduce Enemy HP by that amount
Decrease will Heal Character HP by that amount
Defeat is equivalent to Healall, but I dont know if it revives

Effect 05 and forward, appear to work the same in all spell slots, from the little testing I did.

This all has to be mapped out. There are 3 Main Commands and 5 Main Effects.
Each combo works differently based on the type of Spell.

Heal Spells (3)
Heal Items (3)
Damage Spells (4)
Damage Items (4)
Sleep / Stopspell / Surround
Increase / Decrease
Defeat
Sacrifice

This has been the last weeks process, and I want conclusive results.


Here is some of it so far

                                      +-------------------------------------------------------------------------------------------+
                                      |                                                           Effect                                                                      |
                                      +-----------------+----------------+------------------+-----------------+----------------+
                                      |                            |                         |                           |                           |                         |
                                      |  00 : One Ally      |   01 : All Ally    | 02 : One Enemy | 03 : One Group | 04 : All Enemy  |
                                      |                            |                         |                           |                           |                         |
   +--+------------------+------------------+----------------+-----------------+-----------------+----------------+
   |    |                            |       Heal               |      Heal            |                           |                           |     Damage        |
   |    | 00 : Open Cast   |       Self                |      All               |                           |                           |      All                |
   | C |                            |                            |     Allies            |                           |                           |    Enemies         |
   | o +------------------+------------------+----------------+-----------------+------------------+----------------+
   | m |                            |  Select Enemy     |  Select Enemy  |     Damage         |     Damage          |     Damage        |
   | m | 01 : Enemy         |Heal Random Ally |      Heal            |      One               |  One Group of     |      All                |
   | a  |                            |  can be glitchy     |   All Allies         |     Enemy           |    Enemies           |    Enemies         |
   | n +------------------+-------------------+----------------+----------------+-------------------+----------------+
   | d |                             |      Heal                |      Heal             |                          |                            |  Select Ally       |
   |    | 02 : Ally               |      One                |      All                |                          |                            |     Damage       |
   |    |                             |      Ally                 |     Allies            |                           |                            |  All Enemies     |
   +--+------------------+-------------------+----------------+----------------+-------------------+----------------+



I have 80/256 of the Text laid out, and all dialogue appears to be in this byte sequence.

00 : -- stood guard.
02 : But it wasnt real.
03 : -- attacked!
04 : Before -- was set for battle.
05 : But the -- did not see thee.
06 : -- attacked!
07 : But missed!
08 : -- was wounded.
09 : -- was not hurt.
0a : -- dodged the blow.
0b : -- HP is reduced by xx.
0c : -- HP is reduced by xx.
0d : A tremendous blow!
0e : A heroic attack!
0f : -- broke away and ran.
10 : But there was no escape.
11 : Thy MP is too low.
12 : But the spell was blocked.
13 : -- called for help.
14 : But no help came.
15 : -- came to help.
16 : The enemies was confused.
17 : -- wounds were healed.
18 : But the spell had no effect on --
19 : Thou hast defeated the --
1a : -- chanted the spell of --
1b : Alas, brave -- has died.
1c : -- fell asleep.
1d : -- did not fall asleep.
1e : -- fell asleep.
1f : -- is asleep.
20 : -- woke up.
21 : -- Defense Power decreased by xx
22 : -- Defense Power decreased by xx
23 : -- Defense Power increased by xx
24 : Thou hast defeated --
25 : No more shall -- walk this world.
26 : -- was utterly defeated.
27 : Having run out of power, -- died.
28 : (no text)
29 : And -- spell was blocked.
2a : -- spell was blocked
2b : And -- was surrounded by the Phantom Force.
2c : Then -- was brought back to life.
2d : -- cried aloud the sorcerer's call.
2e : -- fainted when the sorcerer appeared.
2f : Alas, -- was poisoned and lost xx HP.
30 : -- fainted after losing xx HP.
31 : Then -- danced a strange jig.
32 : And -- lost xx MP.
33 : -- blew scorching flames!
34 : -- exhaled a blast of poisonous breath.
35 : -- was poisoned.
36 : -- repelled the poison.
37 : -- blew its sweet scented breath.
38 : -- raised the Wizards Wand overhead.
39 : Tongues of flame shot out of the wand.
3a : -- raised the Staff of Thunder overhead.
3b : Bolts of lightning flashed forth.
3c : -- raised the Thunder Sword overhead.
3d : A clap of thunder Split the air!
3e : -- raised the Light Sword overhead.
3f : A sharp beam streamed from the sword's tip.
40 : It did not work against --
41 : -- raised the Shield of Strength toward the heavens.
42 : No movement was possible, for the curse had frozen --'s body.
43 : The poison was drawn out of --'s wound.
44 : -- returned to life.
45 : cannot use the spell yet.
46 : -- doesnt have any tolls.
47 : Wit and courage have served thee well, for -- has been promoted to the next level.
48 : And earned xx pieces of gold.
49 : Of experience points
4a : Power increased by xx.
4b : Reaction Speed increases by xx.
4c : Maximum HP increases by xx.
4d : Maximum MP increases by xx.
4e : And -- learned one new spell.
4f : (no text)
50 : Take care that thou strays not over the tower's edge.

gameboy9

#28
I forgot one of the other things I found.

0x11d69 = f2 - Change this to FF to remove the mandatory 65,536 experience point minimum requirement for the Moonbrooke Princess.

I believe this function is a CMP $F2 with a branch if it's less than right after that.  So if the X Register (I believe that's what's being used there) is >= F2, then the 65,536 point requirement fires.  Make it less, and then the requirement will affect more princess levels, and, if low enough, would affect the Cannock Prince and I suppose the Midenhall Hero at some point.

Joe, do you mean the compare button on the randomizer is not working?  Can you please post the exceptions you are having please?  I have to say that this isn't the first time I've heard of this.  It's possible that you may need to download the .NET 4.5 runtimes.

Two other things I want to figure out... how to stop printing text one character at a time... and how to double the walking speed.  Unfortunately, for both, those look easier said than done...

joe73ffdq

I got the randomizer working. It didnt start up correctly at first, and now no problem with compare also.

Youre finding stuff I didnt even think about. Im finishing Magic for characters, and then Enemy Magic and Skills next.

One very important thing we need to find, is the holding capacity of 08 for each character.


This is going to be a slower process for me now. Just got a much needed 2nd job, and I also have a 9 year old. Receiving help with this game is awesome, when time is sporadic. DW2 is one of my favorite old school RPG's, purely because of the challenge. My current hacking goal is finding enough data here, and basically making something similar to DQ2 Android in terms of difficulty, but with new locations for most things.

gameboy9

#30
I have figured out two of Evilash's inquiries... the encounter rate, and at least part of the running away rate.

The encounter rate is discovered at 0x1033c-0x10342(minimum).  In ROM order...
(0x1033c) Grass and long grass has a 10/256(1/25.6) chance of an encounter
(0x1033d) Dungeon transitions (i.e. going from room to room) is an 84/256(about 1/3) chance... EXCEPT the Spring Of Bravery dungeon.(and possibly more, but I doubt it)
(0x1033e) The actual dungeon and tower rate is 8/256(1/32).  This is also the rate of dungeon transitions at the Spring Of Bravery.
(0x1033f) Something else is a 4/256(1/64) chance... not sure which terrain it is... (it was determined that it was in the sea)
(0x10340) Forests and deserts is a 16/256(1/16) chance.
(0x10341) Mountains are 25/256(1/10.2) chance!
(0x10342) Swamps is a 16/256(1/16) chance
0x10343, 0x10344, and 0x10345, and the slightest chance possibility of 0x10346 has other values that might be used.  I'm thinking possibly the life crest room has a 16/256 chance instead of the usual 8/256.  The sea cave might have higher values going through lava... again, not sure.

OK, the running away rate... I have a little information on that now.  At least around Hamlin, the chance of running away is 75%, straight.  I say that because the code at 0x0E05C does an "AND $009F", meaning that if memory location 0032 (the random number between 0 and 255) MOD 4 = 3(the value of $009F), then you're not going anywhere.  But 009F might change depending on the scenario, so that's something I have to look up still.  But at least it's a start.

EvilAsh25

Nice finds!  Some thoughts:

Quote from: gameboy9 on February 09, 2016, 05:47:32 PM
(0x1033f) Something else is a 4/256 chance... not sure which terrain it is...

I'm guessing this is Sea tiles?

Quote from: gameboy9 on February 09, 2016, 05:47:32 PM
0x10343, 0x10344, and 0x10345, and the slightest chance possibility of 0x10346 has other values that might be used.  I'm thinking possibly the life crest room has a 16/256 chance instead of the usual 8/256.  The sea cave might have higher values going through lava... again, not sure.

Just a guess, but it feels like the Life Crest room (affectionately called the Hork Pit) is a higher encounter rate than 1/16.  Feels closer to the transition rate you listed. 

gameboy9

#32
So I have to quickly make a correction to the run chances... one of the lines adds $11 to the accumulator... and if THAT MOD 4 == 3, then it's NOT a run fail, but it's effectively a "re-roll"... so it's not 3/4 chances, it's 2/3.  I think those chances reside throughout the entire game.

Also, it turns out that lava through the Sea Cave is the same as an ordinary dungeon tile:  8/256, and the Hork Pit has the same chances as transitioning between rooms:  84/256.

joe73ffdq

#33
I just got a lot done since learning how to edit columns.

https://dl.dropboxusercontent.com/u/228695840/DW2%20Character%20.7.zip


Everything to do with Level ups, Weapons and Armor, Items and Magic, Prices and who can Equip.

Edit : This part is now almost complete. Now I can test the remaining effect bytes, and finish up on the dialogue.

gameboy9

On Saturday, I completed testing for the Dragon Warrior 2 Randomizer and, as promised, uploaded it to romhacking.net.  Please see http://www.romhacking.net/utilities/1183/ for more details.

I have since released a small bug fix, which is here:  https://github.com/gameboy9/DW2Randomizer/releases 

If I don't see any further issues, I will update the program at romhacking.

Enjoy!  :)

joe73ffdq

Here is where I am at, and it took forever due to my ocd with the page layout, which is still a work in progress.


Spells for Characters

(1)

Starting at 127d0, there is the following.

1 for Fight
14 Regular Spells
8 Chance Spells
8 Battle Item Spells

(2)

1278d : 4a - 1/8 Defense
           : ea - 1/4 Defense
           : 0a - 1/2 Defense

This is the Divisor for Increase and Decrease. But it also works with Healing and Damage Spells.

(3)

Power Level 00, for any Spell will use the Divisor.
Power Level 01, for any Spell will be 1/4 Defense.
Power Level 02-ff will be the Raw Power of the Spell.

(4)

Any Spell targeted on Characters, will act as a Healing Spell, except Increase.
Heal, Healmore, and Healall, work as Direct Damage Spells, when targeting Enemies.
Resistance is the same as Damage Spells.

(5)

Healing and Damage Spells, with a Power Level of 00 or 01, Restores or Reduces target HP, based on their Defense.

(6)

Chance cannot be changed. It functions with 8 specific Spells.
You can change each of the 8 Spells, but they cannot be used individually.

(7)

Each of the 8 usable Items in Battle, more or less cannot be changed, because they draw specific Text, which is a byte value, and is from a compressed string of 256 Text.

In this Text string, there are 32 that produce the Spell Casting Effect, 1 for Character Attack, 1 for dodging, 3 for a Character getting attacked, and 4 with the eliminating of all Enemies on screen.

There are 3 Text slots per Spell, but a limited amount of options of what can be changed.


(8

Enemies have there own Spell set, which means the Power Level of Firebal for a Character, did not change the damage from a Magician in Hamlin Region.



--------------------------------------



Thats the meat and potatoes for all the Spell use for Characters. Once I can assemble this part of the documents  :banghead:, then I can move on to Enemy Spells and Skills, and all the parameters for that as well.

Thank you to gameboy9 for all the help in finding further data, I didnt get to yet  :beer:

fedorajoe

Where are item drops assigned to enemies?  Does anyone know?  It's isn't part of the main enemy data set.

Sorry to bump a year-old thread, but I'm working on a hack for this game and this is one of the few questions I can't find an answer to.

Thanks.

joe73ffdq


https://www.dropbox.com/s/oc09gq0ebmpoeyr/DW2.zip?dl=0

Here is the latest collection of data, which covers most of this thread, and there is some new enemy data I completed recently. Im glad to see interest in DW2, and admittedly I must say, that seeing this work expanded upon is really cool  :beer:

I never looked into enemy drops yet, but here is a GG code that should narrow the search. Line 201, in DW2 address list categorically.

Get A Treasure Chest After Every Battle
117e4:72:00 - AESPGYZY


DW2 data might have taken a leap with me, but I want to thank 2 specific people, who found the info first.


AlexKC, who gave me the base to work from  :beer:

https://www.gamefaqs.com/boards/587248-dragon-warrior-ii/67224292


Gameboy9, who created the randomizor, and uncovered a lot of data I wasnt looking for yet. Look through this thread, to make sure you give him credit for his efforts  :beer:


---


The last thing I was trying to figure out, was enemy spell/fire damage output, but couldnt figure it out. As you will see at the end of the enemy page (line 318), I found what looked to work for (01-Firebal), but the range of damage by changing code there was close but not right, and I gave up trying. The one thing I did figure out 1-2 months ago, while I was looking for this, was how Strange Jig works. It is 1/4 current max mp with random, which explained the ridiculous mp loss we couldnt figure out. Puppet Man can steal 25-40 at that point in the game, but then I saw 60-80 when I set mp to max, which indicates an LSR or ASL operation (I think).

There are few other things I would like to find.

Which items and armor protect against enemy attacks, and anything with special properties, ie, gremlins tail or evil shield. Item space is a problem, so placing dragon banes effect into the top armors, would be a good idea. Then turn the dragons bane into a consumable. Also, given the limited equipment options, both the evil shield and bastard sword should be uncursed, and renamed to whatever weapon or shield you want. Last idea here, would be to make one key open all doors.


If all of that was uncovered, then most of the important things would be found.

fedorajoe

Great work on thanks for the update!!!

I'm investigating some of these matters too and will see if I can uncover more.

thepatrickinator

#39
Good luck, Fedorajoe! I apologize for spamming you about the Golbez sprites you're having trouble with. It may not be about the topic about Dragon Warrior 2, but I did what I could do about your Playable Golbez Project. With your permission, I'd love to make Filly Fantasy IV based on your Playable Golbez Hack. I forgot to mention that there's a program called TileShop can help you with Golbez battle sprites as a playable character.