Monster World IV [T-de]

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

User avatar
ArcadeTV
Interested
Posts: 13
Joined: Sat Jun 03, 2017 8:37 am
Location: DE
Contact:

Monster World IV [T-de]

Post by ArcadeTV » Tue Jun 06, 2017 11:09 am

Hi guys,
I started a translation-project for Monster World IV a while ago and I'm very pleased to say that it comes along nicely.
The current version patch is supposed to be used with Virtual Console version of the rom (AF050C46).

Features:
-Disabled the jap Version by re-activating and inverting the regionlock with a custom screen.
-All GFX with engl. text were changed
-Status reached RC1, everything was translated, the rest is just optimizing.

Here are some GSX savestates for convenience:
https://www.dropbox.com/s/alanag4lvejh6 ... S.zip?dl=1

I have some issues that I can't seem to be able to sort out though, so I was hoping some expert here could give me a hand or two...

1. Issue: Changing the credits:
When I change the credits all the spaces change to garbage.
-> -solved- :!:



2. Slower movement for the strings in the intro (spirit-voices)
-> -solved- :!:
There was a script-table at 0x02C760 where all the parameters for the animation could be adjusted.

3. Changing the Save Type from SRAM to E2PROM

I'm trying to find out if the cart could be easily changed to E2PROM-savetype by modifying the header.
Wonderboy V (also a Westone game) has both SRAM and E2PROM routines, which can be switched by changing these:

0x01B2: F840 -> E820
0x01BA: 0001 -> 03FF

I think this is false for the VirtualConsole rom, but might be true for the jap version.
Unfortunately I totally lack the skills to find out on my own.



4. (not important, but I'd love to know how) Enemy strength property.

While I'm also writing a strategy guide for the game, I'd love to know more about the game's hitpoint system. I'm not a crack with romhacking and I need some advice, which byte to observe in which debugger to learn how many hitpoints an enemy has and how this is affected by using different/better swords.
Right now I'm curious how much damage is taken by different enemy hits.


Any help with this is very much appreciated!
Thank you!
Last edited by ArcadeTV on Tue Jun 13, 2017 8:58 pm, edited 3 times in total.

User avatar
flamewing
Interested
Posts: 36
Joined: Tue Sep 23, 2014 2:39 pm
Location: France

Re: Monster World IV [T-de]

Post by flamewing » Tue Jun 06, 2017 12:18 pm

I can help a lot with this, since I have been disassembling this game (I started with the original Japanese version, but then swapped to the nearly identical virtual console multilingual version). I won't be able to help right away because I just moved to France and an still getting settled in; but some things I can give right away:
  • Lua HUD for Gens rerecording. I don't think this is the newest version I have in my computer, but it already has a lot of stuff. You can see the hitpoints of several enemies, as well as post-hit invulnerability timers, hotboxes, terrain and sprite collision boxes, speed and so on.
  • The game uses scripts for everything; I have decoded a lot of those, but there is a lot more to decode. Things that use scripts include losing of levels, the object manager, treasure spawns in chests, mappings used for animations, etc.
  • Text is also displayed by a script, generally one character every few frames, and some scripts allow speeding this up to 1 character per frame.
  • In addition to scripts, the game also uses lots of tables of pointers; done of them are tables of pointers to tables of pointers, and there are a few tables of pointers to tables of pointers to tables of pointers. Yeah... It is very easy to corrupt things like what you have if you overrun the space for a character without updating the pointers of the next ones.
  • I haven't decided the at format yet, so I am interested in anything you have. I have found 4 or 5 different art formats, and I only know text and uncompressed for sure.

User avatar
ArcadeTV
Interested
Posts: 13
Joined: Sat Jun 03, 2017 8:37 am
Location: DE
Contact:

Re: Monster World IV [T-de]

Post by ArcadeTV » Tue Jun 06, 2017 12:45 pm

@flamewing, that sounds promising!

I'm a webdeveloper, not usually a romhacker - so I've put my stuff together within a content management (joomla) and I'm reading and writing binary data in PHP - may sound weird but works well for me.

I created a parser for the text-engine that helps me with control-bytes while creating the translation.

Here are all the controllers that I have identified so far:

[spoiler]
BD
Stops the text animation and displays an arrows that points down, indicating there is more text to come.
Text animation continues once a button is pressed.


BE
<BE XX> is an animation Controller where XX works with any number.
The higher the value for XX, the slower the text will slide in.

Values found in the rom are:

00 - practically disables the animation and text is displayed instantly.
04 - a bit faster than the default text animation.
08 - a bit slower than the default text animation.


BF02
<BF02> clears the current textbox. The following text fill start fresh from the upper left.


BF03
<BF 03 XX> changes the font color. Has to be terminated by <BF 03 1F> to end coloring.

Many different values for XX work, but only these were found in the ROM:
18 - RED
1B - BLUE
1E - YELLOW
1A - DARK BLUE
0F - Transparent Background.

Pretty much all values from 0x10 to 0x1F look okay.

Example:
<BF 03 18>This Text is RED<BF 03 1F>
<BF 03 1B>This Text is BLUE<BF 03 1F>
<BF 03 1E>This Text is YELLOW<BF 03 1F>

Notes:

Additionally the font can have an outline by using <B7 01>


BF04001E
<BF 04 00 1E> brings up the option-panel with BUY and QUIT.

Works with <BF07 XXXXXX> where XXXXXX is the absolute offset for the string to be displayed when QUIT was selected.


BF040027
Displays the YES/NO option.

When the options are displayed, the max textlength per line is 17 characters.
BF05
This controller seems to have 2 functions:

In regular textboxes:

<BF050000>
Sets the virtual cursor of the textbox to its initial position on the upper left without clearing the textbox.
All text that follows will overwrite the text that is already present inside the textbox.

In title screens:

<BF050X00>
Controls the horiz.alignment of a string
e.g. on the banner-titles before each episode.
Value of X is the padding to center the string.

When the string is 16 characters long X is 0.
When the string is 14 characters long X is 1.
When the string is 12 characters long X is 2.
When the string is 10 characters long X is 3.
and so on..
Can be calculated by 16-stringlength.


BF07
<BF 07> specifies where the String for an answer is located when the selected option was -NO-.

Dependancies:
A YES/NO-option has to have been triggered before with <BF 04 00 27>

Example:
Question String.
<BF 04 00 27><BF 07 15 B7 87>
Answer-String if YES was selected.

At offset 0x15B787: Answer-String if NO was selected.


BF08
<BF08> disables that the player can speed up text-animation by pressing the B button.
Text will be displayed as formatted.


BF09
When <BF 09 XX> occurs, the textbox stops and waits for the time specified in XX.
All values for XX seem to work, but only these were found in the ROM:
0F - 15ms
14 - 20ms
1E - 30ms
28 - 40ms
2D - 45ms
3C - 60ms
5A - 90ms
78 - 120ms
B4 - 180ms

Pretty much all values from 0x10 to 0x1F look okay.

Example:
This is displayed instantly.<BF 09 5A> This is diplayed after 90ms.


BF0A
Unknown Controller <BF 0A XX>
Occurs exclusively with XX = 01 in all 4 dialogues, when the rescued spirits talk to you.


BF0B
When <BF 0B XX> occurs, the game displays the screen to save your progress and writes the data upon save with the name specified in XX.
List of Bytes is incomplete, but these were found in the ROM so far:
ED - Ice Pyramid 1
0B - Stream Sanctuary
CF - ?
CE - ?
31 - ?

Notes:
After Save you are redirected back into the game,
untested if the dialog continues on Save/Abort or if the textbox will be closed.


BF0C
Unknown Controller <BF 0C>


BF0D
Unknown Controller <BF 0D>


BF0E
Unknown Controller <BF0E XX>


BF0F
Unknown Controller <BF 0F XX XX>


BF11
Unknown Controller <BF11>


BF13
<BF13> tells the textbox to accept button-presses as input.
These will be converted to symbols, in relation to the pyramide-riddle.

The basic syntax is as follows:
<BF13 (01, 02 or 03 in any combination and order) 00 PPPP>
Bytes 01, 02 and 03 equal the A, B and C button inputs.
00 terminates the custom code sequence.
PPPP is a 2-Byte relative pointer that jumps to the location of a string when the correct input was given.


BF14
SPHINX Controller <BF14 WWWW TTTT>
W and T are Pointers.
W points to the location when your answer is wrong,
T to the location when the time is up.


BF1500
When a question is asked by the SPHINX <BF 15 00> in the end of the string indicates that the correct answer is YES.
Contrary to <BF 15 01> which indicates that the correct answer is NO.


BF1501
When a question is asked by the SPHINX <BF 15 01> in the end of the string indicates that the correct answer is NO.
Contrary to <BF 15 00> which indicates that the correct answer is YES.


BF16
<BF 16> stopps the background music when it occurs inside a string as soon as the animation reaches it.


BF17
<BF 17> restarts the background music when it occurs inside a string as soon as the animation reaches it.
Works only if the sound has been disabled by <BF 16> before.


BF18
<BF18 XXXX XXXX> triggers an event, for example a gate opens or the sphinx throws you into the spikes under her.


BF19
Unknown Controller <BF 19 XX XX XX>
Only occurs in the first dialog when Ashas father speaks to her.


BF1A
Genie Animation Controller <BF 1A XX XX XX XX XX>
<BF1A 3F1816 00 80> Normal pose
<BF1A 3F1816 02 80> Raises arms
<BF1A 3F1816 04 80> Peels his ear


BF1B
Shop Controller <BF1B | XX YY ZZ | PYPY | PNPN>
Opens the shopping screen and displays max 3 items specified in XX, YY and ZZ.
When one of these values is 00, then there is no item in this place on the screen.

Last 4 bytes are pointers, each 2 bytes long, relative to the first byte of the pointer:
PY is used when you buy an item and leave the shop.
PN is used when you don't buy anything and leave the shop.

Example:
This will display the shop with 2 items, the rightmost being empty.
The answer upon buying an item will be -Thanks- and if no item was bought it's -poor girl!-
Hey, wanna buy anything?<BD><BC><BF1B 01 02 00 0004 000A>Thanks<BD><FF>poor girl!<BD><FF>


BF1C
Unknown Controller <BF 1C XX>


BF1E
Conditional Healing Controller <BF1E XX XX>
Occurs only in menu-item-strings for medicine and herb, and within a dialogue where you are healed (starting at 0x158216).
The Controller checks whether you need to be healed or skips to a relative offset defined in XX XX.

Example:
This herb restores Asha's Life a little.<BD><BF1E005B><BF02>Use it?<BF040027><BF07156E05><BF0D><FF>
The first part of this string is diplayed as usual, then <BF1E> checks if your life is full - if that's true it points to <005B> which is <FF> to close the dialogue. If the condition is false (your energy is not fully charged) the text continues and the question -use it?- is being asked. This results in the question will never be asked as long your energy bar is full.


E4
Display random strings within a dialogue <E4 XXXX YYYY> where YYYY is a relative pointer.

Example:
This is displayed always<BC>
<E48000YYYY>
<E4C000YYYY>
Alternative Text 1<FF>
Alternative Text 2<FF>
Alternative Text 3.<FF>

Notes:
First alternative text does not need a controller.
XXXX seems to be the order of strings, bus is unclear at this moment!


E7
Conditional Text-Skip Controller.



<E7 XX PPPP> jumps to a relative pointer PPPP when condition XX is met.
Used for example in the sphinx-riddle when it asks if you carry a goldbar. While the controller skips bytes the text-flow can lead to <Answer-is-YES> or <Answer-is-NO> controllers.


E8
Unknown Controller <E8 XX XX XX>

F8
<F8 XX XX>
Meaning is unclear at this time.
Occurs often togehter with condition-controller <FC XX XX YY YY>


FA
Unknown Controller <FA XX XX>


FB
Sound Controller <FB XX>
Plays a sound within the current dialogue.
<XX> addresses the sound to be played. Many values work, but depending on the selected sound, the background-music may stop eventually.

Common values found in the strings are:
<FB 14> Jingle 1
<FB 2E> Jingle 2
<FB 33> Not enough gold

Values match those of the hidden SOUND TEST MENU:
(On the title screen, when NEW GAME appears after you pressed START,
press UP, DOWN, UP, DOWN, LEFT, LEFT, RIGHT, RIGHT to open the SOUND TEST MENU)

00:OVERTURE
01:OVER THE CLOUDS
02:ARABESQUE COURT IN DREAM
03:MAIN THEME
04:STREAM SANCTUARY
05:BIRTH OF PEPELOGOO
06:LAMP DE GODJARRE
07:LONG DISTANCE
08:LABYRINTH ON THE SKY
09:KOOL DUDE
0A:PREMONITION
0B:KINGDOM OF RAPADAGNA
0C:TRY THE TRIAL
0D:VOLCANIC CAVE
0E:HEART OF ICEGRAVE
0F:HEAD BANGER
10:MALEVOLENT DEITY
11:FINALE PART 1
12:A CRADLE SONG OF PEPELOGOO
13:TALES FROM MONSTER WORLD
14:JINGLE 1
15:FINALE PART 2
16:ACENSION TO HEAVEN
17:CONQUERS THE DUNGEON
18:JUMP
19:ATTACK
1A:ROPE RIDE
1B:ROPE FALL
1C:SLAPPED
1D:DAMAGE 1
1E:DAMAGE 2
1F:FALL
20:LANDING
21:SLASH
22:CATHEDRAL
23:FADE INTO DARKSIDE
24:REBIRTH
25:DOOR
26:SCN CHG
27:PEPE VOICE 1
28:PEPE VOICE 2
29:ITEM EXIST
2A:ITEM GET
2B:LIFE
2C:RES KEY
2D:RES BTTN
2E:JINGLE 5
2F:SPLASH
30:EN DEAD
31:SLIP
32:TRUE
33:FALSE
34:COUNT
35:SAVE
36:LOAD
37:FLOW
38:DEFENCE
39:PEPE VOICE 3
3A:BOX OPEN
3B:TREE
3C:EGG FALL
3D:EGG CRACK
3E:EGG HATCH
3F:CRYS FLASH
40:TOW APPEAR
41:WARP
42:BOMB USE
43:TOW STOP
44:UTSUSEMI
45:SCOOP UP
46:EXT BUCKET
47:EXT BREATH
48:PEPE ENTER
49:CARPET
4A:CRITIC
4B:EAT A NUT
4C:DEATH CRY
4D:DEATH OF PEPELOGOO
4E:SPIRITS
4F:GET MEAT
50:FX OFF
51:SONG OFF
52:FINALE 3



FC
<FC XX XX YY YY> refers to a condition XXXX that has to be true to display the string at offset of YYYY relative to YYYY.
Strings exist where two <FC>-conditions are present.

Dependancies:
It seems that <F8 XX.XX> is connected to this, but its purpose is unclear at this moment.

Example:

<FC (01 65) (00 11)>
Text #1 if condition is false.<FF>
Text #2 if condition is true.<FF>
- If condition (0165) is true, Text #2 is displayed, which is 0x0011 (17) characters from the 3rd byte of this controller.

Known Values for XXXX:

0165 - gave water to adventurer and saved his life.


FC75FC81FEFC41
Unknown Controller <FC 75 FC 81 FE FC 41>


FD
Conditional Controller <FD XX XX PP PP>
PPPP is a relative pointer.


FE
<FE 00 XX> skips the following XX bytes.
<FE FF XX> jumps back to FF-XX bytes.


FF
<FF> marks an end and closes the textboxes.
[/spoiler]

User avatar
ArcadeTV
Interested
Posts: 13
Joined: Sat Jun 03, 2017 8:37 am
Location: DE
Contact:

Re: Monster World IV [T-de]

Post by ArcadeTV » Tue Jun 06, 2017 3:49 pm

@flamewing

The LUA hud sounds awesome! I have no clue how to use it though :(
When I open GensRerecording and load mw4-hud.lua (or any other .lua file) I always get
cannot open : Invalid argument

Is there a guide for dummies like me?

THANKS!

User avatar
flamewing
Interested
Posts: 36
Joined: Tue Sep 23, 2014 2:39 pm
Location: France

Re: Monster World IV [T-de]

Post by flamewing » Tue Jun 06, 2017 5:23 pm

I will see about updating it and adding a release; there are some files that need to be generated with the build script in order the script to work (and the script is Unix-only).

User avatar
ArcadeTV
Interested
Posts: 13
Joined: Sat Jun 03, 2017 8:37 am
Location: DE
Contact:

Re: Monster World IV [T-de]

Post by ArcadeTV » Tue Jun 06, 2017 6:38 pm

Oh yes, please! :-)

User avatar
flamewing
Interested
Posts: 36
Joined: Tue Sep 23, 2014 2:39 pm
Location: France

Re: Monster World IV [T-de]

Post by flamewing » Tue Jun 06, 2017 9:09 pm

Here it is.

Some of my notes:

All MW4 scripts share a common opcode block: opcodes $E0 to $FF are the same for nearly all scripts (there are a few exceptions). Scripts for different purposes add additional opcodes, typically in the $00-$1F range.

The common opcode block is as follows:
  • $E0: Crash
  • $E1 XX: Play music with id = XX
  • $E2: Clears byte $FFFFCC85
  • $E3: Sets byte $FFFFCC85 to $FF and clears byte $FFFFCC86
  • $E4 XXXX RRRR: Branch on random: if random() <= $XXXX, branch by signed displacement $RRRR
  • $E5 TT WW XX YY RRRR: Something related to wind tunnels; $RRRR is a signed displacement
  • $E6 TTTT WWWW: After $TTTT frames, set bitfield flag $WWWW to true
  • $E7 II RRRR: Branch if have item specified by $II; $RRRR is a signed displacement
  • $E8 II RRRR: Branch if don't have item specified by $II; $RRRR is a signed displacement
  • $E9 WWWW: Set water level to $WWWW
  • $EA XXXX YYYY WWWW HHHH RRRR: Set water tunnel 1: checks if Asha is inside active rectangle, $RRRR is relative displacement to water tunnel data
  • $EB RRRR: Set water tunnel 2: $RRRR is a relative displacement with various object data, I am not sure what
  • $EC PF XXXX YYYY PP CC MM TT: Create simple object; $PF are pattern flags, $PP is priority, $CC and $MM are related to animation (it would take too long to explain), $TT is the subtype and $XXXX and $YYYY are the position
  • $ED XXXX YYYY WWWW IIII: Create chest: $XXXX and $YYYY are position, $WWWW is a bitfield flag ('chest open'), and $IIII is either a displacement for an object list or a single object ID
  • $EE RRRR: Set camera data; $RRRR is a relative displacement with camera data
  • $EF II: Remove item with ID $II from inventory
  • $F0 II RRRR: Branch if have item specified by $II; $RRRR is a signed displacement
  • $F1 XXXX YY IIII: If in region given by $XXXX, $1YY0, with width 8 and 0 height, start dialog with ID $IIII
  • $F2 PPPPPPPPPP RRRR: If in wide region specified by the packed coordinates $PPPPPPPPPP, branch to signed displacement $RRRR
  • $F3 PPPPPPPPPP: Set camera to $PPPPPPPPPP, which is packed min x, min y, max x and max y for camera
  • $F4 XX YY PPPPPP: Unknown, but $PPPPPP is a full 24-bit address and the others are packed coordinates
  • $F5 XX YY WWWW: Unknown, but $WWWW is a word and the others are packed coordinates
  • $F6 UU UU UU UU UU UU UU UU: Unknown
  • $F7 XY XX YY CC TT UU UU UU: Create special object
  • $F8 WWWW: Set bitfield flag $WWWW
  • $F9: Nop
  • $FA WWWW: Clear bitfield flag $WWWW
  • $FB XX: Play sound effect with id = XX
  • $FC WWWW RRRR: Branch by signed displacement $RRRR if bitfield flag $WWWW is set
  • $FD WWWW RRRR: Branch by signed displacement $RRRR if bitfield flag $WWWW is clear
  • $FE RRRR: Jump by relative displacement $RRRR
  • $FF: End of script
Here it is.

Some of my notes:

All MW4 scripts share a common opcode block: opcodes $E0 to $FF are the same for nearly all scripts (there are a few exceptions). Scripts for different purposes add additional opcodes, typically in the $00-$1F range.

The common opcode block is as follows:
  • $E0: Crash
  • $E1 XX: Play music with id = XX
  • $E2: Clears byte $FFFFCC85
  • $E3: Sets byte $FFFFCC85 to $FF and clears byte $FFFFCC86
  • $E4 XXXX RRRR: Branch on random: if random() <= $XXXX, branch by signed displacement $RRRR
  • $E5 TT WW XX YY RRRR: Something related to wind tunnels; $RRRR is a signed displacement
  • $E6 TTTT WWWW: After $TTTT frames, set bitfield flag $WWWW to true
  • $E7 II RRRR: Branch if have item specified by $II; $RRRR is a signed displacement
  • $E8 II RRRR: Branch if don't have item specified by $II; $RRRR is a signed displacement
  • $E9 WWWW: Set water level to $WWWW
  • $EA XXXX YYYY WWWW HHHH RRRR: Set water tunnel 1: checks if Asha is inside active rectangle, $RRRR is relative displacement to water tunnel data
  • $EB RRRR: Set water tunnel 2: $RRRR is a relative displacement with various object data, I am not sure what
  • $EC PF XXXX YYYY PP CC MM TT: Create simple object; $PF are pattern flags, $PP is priority, $CC and $MM are related to animation (it would take too long to explain), $TT is the subtype and $XXXX and $YYYY are the position
  • $ED XXXX YYYY WWWW IIII: Create chest: $XXXX and $YYYY are position, $WWWW is a bitfield flag ('chest open'), and $IIII is either a displacement for an object list or a single object ID
  • $EE RRRR: Set camera data; $RRRR is a relative displacement with camera data
  • $EF II: Remove item with ID $II from inventory
  • $F0 II RRRR: Branch if have item specified by $II; $RRRR is a signed displacement
  • $F1 XXXX YY IIII: If in region given by $XXXX, $1YY0, with width 8 and 0 height, start dialog with ID $IIII
  • $F2 PPPPPPPPPP RRRR: If in wide region specified by the packed coordinates $PPPPPPPPPP, branch to signed displacement $RRRR
  • $F3 PPPPPPPPPP: Set camera to $PPPPPPPPPP, which is packed min x, min y, max x and max y for camera
  • $F4 XX YY PPPPPP: Unknown, but $PPPPPP is a full 24-bit address and the others are packed coordinates
  • $F5 XX YY WWWW: Unknown, but $WWWW is a word and the others are packed coordinates
  • $F6 UU UU UU UU UU UU UU UU: Unknown
  • $F7 XY XX YY CC TT UU UU UU: Create special object
  • $F8 WWWW: Set bitfield flag $WWWW
  • $F9: Nop
  • $FA WWWW: Clear bitfield flag $WWWW
  • $FB XX: Play sound effect with id = XX
  • $FC WWWW RRRR: Branch by signed displacement $RRRR if bitfield flag $WWWW is set
  • $FD WWWW RRRR: Branch by signed displacement $RRRR if bitfield flag $WWWW is clear
  • $FE RRRR: Jump by relative displacement $RRRR
  • $FF: End of script
Dialog is more complicated. The master dialog loop has 9 states:
  • 0: run dialog script
  • 1: delayed run dialog script
  • 2: wait button press
  • 3: scroll line
  • 4: scroll half-line
  • 5: decompress art
  • 6: yes-no prompt handler
  • 7: spell code handler
  • 8: sphinx handler
These are changed by the script and by each other. The first two states run the "master dialog script":
  • $00-$AF: opcode is index into lookup table of indices into dialog table; ends frame
  • $B0-$B3 II: opcode combines with parameter to form index into dialog table; ends frame
  • $B4-$B7 II: call dialog: the low 2 bits of opcode byte are an index into a table of tables, the $II byte is an index into that table; the next $FF opcode will terminate the innermost dialog and return to the one that called it
  • $B8: Sets a dialog flag (8 ) and clears another ($10), neither of which I am sure about
  • $B9: Sets two dialog flags (8 and $10), neither of which I am sure about
  • $BA: Draw BG square 1
  • $BB: Draw BG square 2
  • $BC: Do line break; changes to scroll line mode (3)
  • $BD: Show blinking arrow and change to wait button press mode (2)
  • $BE TT: Set dialog delay to $TT
  • $BF XX+: Run dialog code
  • $C0-$DF: crash
  • $E0-$FE: common opcodes above
  • $FF: if executing an inner dialog, return to calling dialog; otherwise, end dialog mode
The $BF script goes as follows (all entries start with the $BF):
  • $00: set H40 dialog mode
  • $01: Run stored dialog
  • $02: Clear dialog box
  • $03 BF: Sets foreground and background colors to the specified nibbles
  • $04: Start Yes-No prompt
  • $05 CC LL: Set cursor position to column $CC, line $LL
  • $06 BF bf: If first option in prompt is selected, set color as $03 BF; otherwise, set color as $03 bf
  • $07 PPPPPP: if second option is selected, branch to 24-bit absolute address $PPPPPP
  • $08: Toggle 'allow fast-forward' mode
  • $09 TT: Delay, in frames, between each character (unless B is pressed and fast-forward mode is enabled)
  • $0A VV: Set spell color to $VV
  • $0B GG: Set savegame gate to $GG (see cheat screen)
  • $0C: Run spawned item script (used for chests)
  • $0D: Set 'item used' flag, for pause menu
  • $0E LL: Set Pepe level to $LL
  • $0F GGGG: Store gold value
  • $10 RRRR: If total gold is not less than stored gold value, branch to relative signed offset $RRRR
  • $11: Adds stored gold value to total gold
  • $12: Subtracts stored gold value from total gold
  • $13: Handle spell code (state 7)
  • $14: Sphinx riddles: generates 10 random questions and changes to sphinx mode (state 8 )
  • $15 VV: Set riddle answer: Sets what is the correct answer of a riddle
  • $16: Pause music
  • $17: Resume music
  • $18 GGGG SSSS: Set current gate ID to $GGGG and a flag value to $SSSS (forces transition after dialog)
  • $19 MM TT PF: Set Asha's animation to parameters (takes too long to explain)
  • $1A OO CC MM TT PF: Set animation of object $OO to parameters
  • $1B I1 I2 I3 RRRR SSSS: Do shop; $I1, $I2, $I3 are item IDs, $RRRR and $SSSS are relative signed offsets
  • $1C II: Remove inventory item $II
  • $1D HH: Heal $HH health
  • $1E RRRR: Branch to relative signed offset $RRRR if at full health
  • $1F: crash
That is a small sample of all I have, but it is what is most relevant for you, I think. That will do for now.

User avatar
ArcadeTV
Interested
Posts: 13
Joined: Sat Jun 03, 2017 8:37 am
Location: DE
Contact:

Re: Monster World IV [T-de]

Post by ArcadeTV » Tue Jun 06, 2017 9:28 pm

:shock: omg!
Why did I spend countless hrs tryin to find out on my own?

This is stunning, thanks for sharing!
Will play around with it as soon as I'm awake and back at the computer.

User avatar
flamewing
Interested
Posts: 36
Joined: Tue Sep 23, 2014 2:39 pm
Location: France

Re: Monster World IV [T-de]

Post by flamewing » Tue Jun 06, 2017 9:59 pm

If it serves as consolation, I also spent countless hours in the partial disassembly I have... and there is still a LOT of stuff to do. There are several different kinds of script that the game uses, and most of which I haven't decided on full yet; the is a threading mechanism which is a pain to make sense of, several art formats I still have no clue about...

User avatar
ArcadeTV
Interested
Posts: 13
Joined: Sat Jun 03, 2017 8:37 am
Location: DE
Contact:

Re: Monster World IV [T-de]

Post by ArcadeTV » Wed Jun 07, 2017 7:01 am

I can't get any lua script to work, still getting the "cannot open : Invalid argument" message :(

I'm using win7/64 on a mac with parallells, may this be an issue?

edit:
Got it working! Had to move the directory to c:/ instead of any long desktop paths, now it runs smoothly!

I have to say, this is just awesome! I totally love it! Can't imagine how much time went into this, it's just incredible.

User avatar
flamewing
Interested
Posts: 36
Joined: Tue Sep 23, 2014 2:39 pm
Location: France

Re: Monster World IV [T-de]

Post by flamewing » Wed Jun 07, 2017 9:36 am

Hm, I never tried it in paths with spaces; will see about fixing it.

User avatar
ArcadeTV
Interested
Posts: 13
Joined: Sat Jun 03, 2017 8:37 am
Location: DE
Contact:

Re: Monster World IV [T-de]

Post by ArcadeTV » Wed Jun 07, 2017 9:46 am

It works like a charm, except for the pepe-tab:
it won't reactivate once you hide it ;)

I have some questions about the gamesystem:
  • Is there a difference on taking damage when wearing different armors or are armors just affecting the amount of red hearts?
  • Are Shields just for defense agains certain attacks or do they alter anything else?
  • What does raising Pepe's level actually do? (I guess nothing since it is a debug-feature, right?)

User avatar
flamewing
Interested
Posts: 36
Joined: Tue Sep 23, 2014 2:39 pm
Location: France

Re: Monster World IV [T-de]

Post by flamewing » Wed Jun 07, 2017 10:37 am

ArcadeTV wrote:[*]Is there a difference on taking damage when wearing different armors or are armors just affecting the amount of red hearts?
They just change the number of red hearts, IIRC; I will double check it, but I am almost 100%sure of this one. Oh, and there is the debug armor, which allows changing Pepe's level.
ArcadeTV wrote:[*]Are Shields just for defense agains certain attacks or do they alter anything else?
I will have to double check, but from memory, it is just protection from certain kinds of attacks.
ArcadeTV wrote:[*]What does raising Pepe's level actually do? (I guess nothing since it is a debug-feature, right?)
You raise Pepe's level whenever you give him one of the fruits. He also gains levels when you lose him and again when he comes back to fight the queen. If Pepe is already spawned you will not see any immediate differences when raising his level; but change screen and he will change to his new, bigger, appearance.

User avatar
flamewing
Interested
Posts: 36
Joined: Tue Sep 23, 2014 2:39 pm
Location: France

Re: Monster World IV [T-de]

Post by flamewing » Wed Jun 07, 2017 7:39 pm

Regarding weapons, armor and shield:
  • Weapons have 3 properties: damage (done on every hit), magic damage (done every N hits) and magic damage hit counter (either 0 to disable or the N above). After you kill 100 enemies with a given sword, it will do magic damage every 3 hits instead.
  • Shields have a defense mask and a deflect limit. If the attack type matches one of the bits set in the defense mask, the deflect counter is incremented and compared to the deflect limit; when they are equal, the attack is nullified and the deflect counter is reset to zero.
  • Armor increments the number of hearts; and the debug armor allows changing Pepe's level.
That is all of the effects of gear. While disassembling the game, I did come across another category of items that are completely unused except for some leftover RAM and layout space set aside for it. There is even a type of gear you can assign to it: bracelets. You can see it in a VRAM viewer in the pause screen. There is no evidence left about what they would do, but I guess it might be magic.

If you have more doubts, ask away; and I will try to answer. Keep in mind that there is a lot I still don't know about the game...

User avatar
ArcadeTV
Interested
Posts: 13
Joined: Sat Jun 03, 2017 8:37 am
Location: DE
Contact:

Re: Monster World IV [T-de]

Post by ArcadeTV » Wed Jun 07, 2017 8:29 pm

This is absolutely cool. I just love how you know all that stuff. I've been trying to dig into this game for appx half a year now and I really appreciate all the info. Thank you so much for it!

While playing with your Lua script, I made a Monster-Wiki, writing down how many hitpoints an enemy has. I'd love to know how much damage they cause.. there are monsters like the first Blob or the Mummy who won't harm you, at least not by only touching them. Projectiles are a different matter - the mummy itself just dodges you, its projectiles on the other hand hurt you.
Does your script show the amount of damage taken from a hit somewhere so that I could make a table containing "hitponts" and "strength" for enemies?


The other thing I'm trying to do is not that interesting, but more important I'm afraid... I trying to slow down the "spirit voices" from the intro.
I've been playing around with ram-searches and watches in Gens, trying to find something useful, but no luck yet.
There's 0x00FFDEBD, which seems to be the x-position of a text-object, but when I set it to 0x00 it only causes the object to sit on a position, not altering the amount of time used to animate it. Also the Asha-sequence after the voices-intro will bug-out because it seems to rely on that value too.

I did some counting though...

A Text-Object is moving 1 pixel per frame and faded (in or out) every 4 frames, 7 states of fading exist, so it likely uses 28 frames to do the fade-effect. After that it moves another 64 frames (if I counted correctly) in the state of being completely faded-in.
So it should be 28 frames fading-in, then 64 frames moving and 28 frames fading-out. That's 120 and maybe some frames not visible so my guess is to look out for something around 128.

Could you think of anything to look for to accomplish that? Any hint is highly welcome.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests