Dragon Warrior Monsters/ROM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
m (Xkeeper moved page Dragon Warrior Monsters:ROM map to Dragon Warrior Monsters/ROM map: normalize subpages and titles)
(some personality info)
Line 355: Line 355:
  ROM0:0309 CD 13 10        call 1013
  ROM0:0309 CD 13 10        call 1013
  ROM0:030C C3 8B 02        jp  028B
  ROM0:030C C3 8B 02        jp  028B
== Bank 41 ==
There's a table at ROM41:4007 which points to the various string tables stored in this bank.
=== Personality name tables ===
ROM41:4997 personality name pointer table, size of 2x27, all pointing to within this bank.
    These are indexed by (idx(Charge) * 9 + idx(Mixed) * 3 + idx(Cautious)) where idx(x) is:
    * 0 if x >= 0xC0
    * 1 if 0x40 <= x < 0xC0
    * 2 if x < 0x40
    Effectively this means the indexes are best to worst, worsening Cautious first, then carrying from Mixed, etc.
ROM41:7159 personality names start here, each terminated by F0, in the order specified by the pointer table.
== Personality adjustment tables ==
These tables are 4x8, each row containing 1 byte each of the adjustments for Charge, Mixed, Cautious, and Motivation respectively. Each table represents what happens when you select a certain Plan in battle. The row corresponds to a combination of the monster's current Motivation and level. Note that selecting Fight makes no adjustments to personality stats.
=== Run ===
ROM50:59B0
    -4, 0, 0, -10  # Motivation < 151  &&      Level <  10
    -3, 0, 0, -5  # Motivation < 151  && 10 <= Level <  20
    -2, 0, 0, -3  # Motivation < 151  && 20 <= Level <  30
    -1, 0, 0, -2  # Motivation < 151  &&      Level >= 30
    -8, 0, 0, -15  # Motivation >= 151 &&      Level <  10
    -6, 0, 0, -10  # Motivation >= 151 && 10 <= Level <  20
    -4, 0, 0, -5  # Motivation >= 151 && 20 <= Level <  30
    -2, 0, 0, -3  # Motivation >= 151 &&      Level >= 30
=== Charge ===
ROM57:70A9
    7, -1, 0, 3  # Motivation < 151  &&      Level <  10
    5, -1, 0, 2  # Motivation < 151  && 10 <= Level <  20
    3, -1, 0, 1  # Motivation < 151  && 20 <= Level <  30
    2, -1, 0, 1  # Motivation < 151  &&      Level >= 30
    10, -1, 0, 4  # Motivation >= 151 &&      Level <  10
    7, -1, 0, 3  # Motivation >= 151 && 10 <= Level <  20
    5, -1, 0, 2  # Motivation >= 151 && 20 <= Level <  30
    5, 0, 0, 1    # Motivation >= 151 &&      Level >= 30
=== Mixed ===
ROM57:70C9
    0, 7, -2, 3  # Motivation < 151  &&      Level <  10
    0, 5, -2, 2  # Motivation < 151  && 10 <= Level <  20
    0, 4, -1, 1  # Motivation < 151  && 20 <= Level <  30
    0, 3, -1, 1  # Motivation < 151  &&      Level >= 30
    0, 10, -3, 4  # Motivation >= 151 &&      Level <  10
    0, 7, -2, 3  # Motivation >= 151 && 10 <= Level <  20
    0, 5, -1, 2  # Motivation >= 151 && 20 <= Level <  30
    0, 5, 0, 1    # Motivation >= 151 &&      Level >= 30
=== Cautious ===
ROM57:70E9
    -2, 0, 7, 3  # Motivation < 151  &&      Level <  10
    -2, 0, 5, 2  # Motivation < 151  && 10 <= Level <  20
    -1, 0, 4, 1  # Motivation < 151  && 20 <= Level <  30
    -1, 0, 3, 1  # Motivation < 151  &&      Level >= 30
    -2, 0, 10, 4  # Motivation >= 151 &&      Level <  10
    -2, 0, 7, 3  # Motivation >= 151 && 10 <= Level <  20
    -1, 0, 5, 2  # Motivation >= 151 && 20 <= Level <  30
    0, 0, 5, 1    # Motivation >= 151 &&      Level >= 30
=== Command ===
ROM57:7109
    0, 0, 0, -1  # Motivation < 151  &&      Level <  10
    0, 0, 0, -2  # Motivation < 151  && 10 <= Level <  20
    0, 0, 0, -2  # Motivation < 151  && 20 <= Level <  30
    0, 0, 0, -1  # Motivation < 151  &&      Level >= 30
    0, 0, 0, -1  # Motivation >= 151 &&      Level <  10
    0, 0, 0, -2  # Motivation >= 151 && 10 <= Level <  20
    0, 0, 0, -2  # Motivation >= 151 && 20 <= Level <  30
    0, 0, 0, -1  # Motivation >= 151 &&      Level >= 30
{{Internal Data|game=Dragon Warrior Monsters}}
{{Internal Data|game=Dragon Warrior Monsters}}

Revision as of 05:22, 12 February 2024

Chip tiny.png The following article is a ROM map for Dragon Warrior Monsters.

Bank 0

rst 00

ROM0:0000 E1               pop  hl
ROM0:0001 87               add  a
ROM0:0002 85               add  l
ROM0:0003 6F               ld   l,a
ROM0:0004 3E 00            ld   a,00
ROM0:0006 8C               adc  h
ROM0:0007 67               ld   h,a
ROM0:0008 2A               ldi  a,(hl)
ROM0:0009 66               ld   h,(hl)
ROM0:000A 6F               ld   l,a
ROM0:000B E9               jp   hl
ROM0:000C 2A               ldi  a,(hl)
ROM0:000D 66               ld   h,(hl)
ROM0:000E 6F               ld   l,a
ROM0:000F C9               ret  

rst 10

ROM0:0010 FA 00 40         ld   a,(4000)
ROM0:0013 F5               push af
ROM0:0014 7C               ld   a,h
ROM0:0015 EA 00 21         ld   (2100),a
ROM0:0018 CB 37            swap a
ROM0:001A 1F               rra  
ROM0:001B E6 03            and  a,03
ROM0:001D EA 00 41         ld   (4100),a
ROM0:0020 29               add  hl,hl
ROM0:0021 26 00            ld   h,00
ROM0:0023 01 01 40         ld   bc,4001
ROM0:0026 09               add  hl,bc
ROM0:0027 CD 08 00         call 0008
ROM0:002A F1               pop  af
ROM0:002B EA 00 21         ld   (2100),a
ROM0:002E CB 37            swap a
ROM0:0030 1F               rra  
ROM0:0031 E6 03            and  a,03
ROM0:0033 EA 00 41         ld   (4100),a
ROM0:0036 C9               ret

rst 38

ROM0:0038 1E 01            ld   e,01
ROM0:003A 1A               ld   a,(de)
ROM0:003B 3C               inc  a
ROM0:003C 12               ld   (de),a
ROM0:003D C9               ret  

rst 40

ROM0:0040 F3               di   
ROM0:0041 C3 6E 03         jp   036E
ROM0:0044 01 1A 18         ld   bc,181A
ROM0:0047 B8               cp   b
ROM0:0048 C3 EA 2E         jp   2EEA
ROM0:004B FA 90 CD         ld   a,(CD90)
ROM0:004E 18 B0            jr   0000

rst 50

ROM0:0050 D9               reti 

0:0051

ROM0:0051 FA 02 C0         ld   a,(C002)
ROM0:0054 B7               or   a
ROM0:0055 C9               ret  

rst 58

ROM0:0058 C3 DD 2E         jp   2EDD
ROM0:005B D9               reti 

rst 60

ROM0:0060 D9               reti 

0:0061

ROM0:0061 F3               di   
ROM0:0062 F5               push af
ROM0:0063 C5               push bc
ROM0:0064 D5               push de
ROM0:0065 E5               push hl
ROM0:0066 21 40 FF         ld   hl,FF40
ROM0:0069 CB 86            res  0,(hl)
ROM0:006B CB 8E            res  1,(hl)
ROM0:006D 21 C2 DD         ld   hl,DDC2
ROM0:0070 34               inc  (hl)
ROM0:0071 FA 84 C9         ld   a,(C984)
ROM0:0074 B7               or   a
ROM0:0075 20 34            jr   nz,00AB
ROM0:0077 3C               inc  a
ROM0:0078 EA 84 C9         ld   (C984),a
ROM0:007B CD 90 FF         call FF90
ROM0:007E CD F7 0E         call 0EF7
ROM0:0081 80               add  b
ROM0:0082 06 0A            ld   b,0A
ROM0:0084 21 8E 00         ld   hl,008E
ROM0:0087 2A               ldi  a,(hl)
ROM0:0088 E2               ld   (ff00+c),a
ROM0:0089 0C               inc  c
ROM0:008A 05               dec  b
ROM0:008B 20 FA            jr   nz,0087
ROM0:008D C9               ret  

0:008E

ROM0:008E 3E C0            ld   a,C0
ROM0:0090 E0 46            ld   (ff00+46),a
ROM0:0092 3E 28            ld   a,28
ROM0:0094 3D               dec  a
ROM0:0095 20 FD            jr   nz,0094
ROM0:0097 C9               ret  

0:0098

ROM0:0098 13               inc  de
ROM0:0099 CD 90 12         call 1290
ROM0:009C CD 00 40         call 4000
ROM0:009F CD BA 17         call 17BA
ROM0:00A2 AF               xor  a
ROM0:00A3 EA 84 C9         ld   (C984),a
ROM0:00A6 E1               pop  hl
ROM0:00A7 D1               pop  de
ROM0:00A8 C1               pop  bc
ROM0:00A9 F1               pop  af
ROM0:00AA D9               reti 

0:00AB

ROM0:00AB CD C2 00         call 00C2
ROM0:00AE AF               xor  a
ROM0:00AF E0 0F            ld   (ff00+0F),a
ROM0:00B1 FA 99 C9         ld   a,(C999)
ROM0:00B4 E0 FF            ld   (ff00+FF),a
ROM0:00B6 FB               ei   
ROM0:00B7 CD ED 04         call 04ED
ROM0:00BA E1               pop  hl
ROM0:00BB D1               pop  de
ROM0:00BC C1               pop  bc
ROM0:00BD F1               pop  af
ROM0:00BE CD A7 04         call 04A7
ROM0:00C1 D9               reti 

0:00C2

ROM0:00C2 21 91 C9         ld   hl,C991
ROM0:00C5 2A               ldi  a,(hl)
ROM0:00C6 E0 42            ld   (ff00+42),a
ROM0:00C8 2A               ldi  a,(hl)
ROM0:00C9 E0 43            ld   (ff00+43),a
ROM0:00CB 2A               ldi  a,(hl)
ROM0:00CC E0 4A            ld   (ff00+4A),a
ROM0:00CE 2A               ldi  a,(hl)
ROM0:00CF E0 4B            ld   (ff00+4B),a
ROM0:00D1 2A               ldi  a,(hl)
ROM0:00D2 E0 47            ld   (ff00+47),a
ROM0:00D4 2A               ldi  a,(hl)
ROM0:00D5 E0 48            ld   (ff00+48),a
ROM0:00D7 2A               ldi  a,(hl)
ROM0:00D8 E0 49            ld   (ff00+49),a
ROM0:00DA 7E               ld   a,(hl)
ROM0:00DB E0 45            ld   (ff00+45),a
ROM0:00DD FA C1 DD         ld   a,(DDC1)
ROM0:00E0 EA C0 DD         ld   (DDC0),a
ROM0:00E3 FA 90 C9         ld   a,(C990)
ROM0:00E6 E0 40            ld   (ff00+40),a
ROM0:00E8 FA C7 DD         ld   a,(DDC7)
ROM0:00EB B7               or   a
ROM0:00EC C8               ret  z

0:00ED (jp 1214)

ROM0:00ED C3 14 12         jp   1214

ROM start

ROM0:0100 00               nop  
ROM0:0101 C3 50 01         jp   0150
...
ROM0:0150 FE 11            cp   a,11
ROM0:0152 3E 00            ld   a,00
ROM0:0154 20 01            jr   nz,0157
ROM0:0156 3C               inc  a
ROM0:0157 EA 1D C8         ld   (C81D),a
ROM0:015A 31 FF DF         ld   sp,DFFF
ROM0:015D CD DE 11         call 11DE
ROM0:0160 CD 88 12         call 1288
ROM0:0163 CD 80 00         call 0080
ROM0:0166 21 00 80         ld   hl,8000
ROM0:0169 01 00 1C         ld   bc,1C00
ROM0:016C AF               xor  a
ROM0:016D CD C7 12         call 12C7
ROM0:0170 21 8A C8         ld   hl,C88A
ROM0:0173 AF               xor  a
ROM0:0174 22               ldi  (hl),a
ROM0:0175 22               ldi  (hl),a
ROM0:0176 22               ldi  (hl),a
ROM0:0177 77               ld   (hl),a
ROM0:0178 3E 04            ld   a,04
ROM0:017A EA EE C8         ld   (C8EE),a
ROM0:017D 3E 00            ld   a,00
ROM0:017F EA 8A C8         ld   (C88A),a
ROM0:0182 3E 01            ld   a,01
ROM0:0184 EA 00 61         ld   (6100),a
ROM0:0187 3E 00            ld   a,00
ROM0:0189 EA 00 41         ld   (4100),a
ROM0:018C 3E 00            ld   a,00
ROM0:018E EA 00 61         ld   (6100),a
ROM0:0191 3E 00            ld   a,00
ROM0:0193 EA 00 41         ld   (4100),a
ROM0:0196 3E 0A            ld   a,0A
ROM0:0198 EA 00 01         ld   (0100),a
ROM0:019B 3E 01            ld   a,01
ROM0:019D EA 00 21         ld   (2100),a
ROM0:01A0 3E 00            ld   a,00
ROM0:01A2 EA 00 41         ld   (4100),a
ROM0:01A5 3E 01            ld   a,01
ROM0:01A7 EA 1C C8         ld   (C81C),a
ROM0:01AA 3E FF            ld   a,FF
ROM0:01AC EA B7 C8         ld   (C8B7),a
ROM0:01AF EA B8 C8         ld   (C8B8),a
ROM0:01B2 CD 31 33         call 3331
ROM0:01B5 AF               xor  a
ROM0:01B6 EA C7 C8         ld   (C8C7),a
ROM0:01B9 FA 1D C8         ld   a,(C81D)
ROM0:01BC B7               or   a
ROM0:01BD 28 07            jr   z,01C6
ROM0:01BF AF               xor  a
ROM0:01C0 E0 4F            ld   (ff00+4F),a
ROM0:01C2 E0 70            ld   (ff00+70),a
ROM0:01C4 E0 56            ld   (ff00+56),a
ROM0:01C6 CD 24 10         call 1024
ROM0:01C9 38 07            jr   c,01D2
ROM0:01CB AF               xor  a
ROM0:01CC EA 1C C8         ld   (C81C),a
ROM0:01CF C3 8B 02         jp   028B
ROM0:01D2 01 0C 00         ld   bc,000C
ROM0:01D5 CD CF 10         call 10CF
ROM0:01D8 3E 14            ld   a,14
ROM0:01DA EA 74 C7         ld   (C774),a
ROM0:01DD 21 00 08         ld   hl,0800
ROM0:01E0 D7               rst  10
ROM0:01E1 CD 13 10         call 1013
ROM0:01E4 3E 02            ld   a,02
ROM0:01E6 EA 74 C7         ld   (C774),a
ROM0:01E9 21 00 08         ld   hl,0800
ROM0:01EC D7               rst  10
ROM0:01ED CD 13 10         call 1013
ROM0:01F0 3E 03            ld   a,03
ROM0:01F2 EA 74 C7         ld   (C774),a
ROM0:01F5 21 00 08         ld   hl,0800
ROM0:01F8 D7               rst  10
ROM0:01F9 CD 13 10         call 1013
ROM0:01FC 3E 04            ld   a,04
ROM0:01FE EA 74 C7         ld   (C774),a
ROM0:0201 21 00 08         ld   hl,0800
ROM0:0204 D7               rst  10
ROM0:0205 CD 13 10         call 1013
ROM0:0208 3E 05            ld   a,05
ROM0:020A EA 74 C7         ld   (C774),a
ROM0:020D 21 00 08         ld   hl,0800
ROM0:0210 D7               rst  10
ROM0:0211 CD 13 10         call 1013
ROM0:0214 3E 06            ld   a,06
ROM0:0216 EA 74 C7         ld   (C774),a
ROM0:0219 21 00 08         ld   hl,0800
ROM0:021C D7               rst  10
ROM0:021D CD 13 10         call 1013
ROM0:0220 3E 07            ld   a,07
ROM0:0222 EA 74 C7         ld   (C774),a
ROM0:0225 21 00 08         ld   hl,0800
ROM0:0228 D7               rst  10
ROM0:0229 CD 13 10         call 1013
ROM0:022C 3E 08            ld   a,08
ROM0:022E EA 74 C7         ld   (C774),a
ROM0:0231 21 00 08         ld   hl,0800
ROM0:0234 D7               rst  10
ROM0:0235 CD 13 10         call 1013
ROM0:0238 3E 09            ld   a,09
ROM0:023A EA 74 C7         ld   (C774),a
ROM0:023D 21 00 08         ld   hl,0800
ROM0:0240 D7               rst  10
ROM0:0241 CD 13 10         call 1013
ROM0:0244 3E 0C            ld   a,0C
ROM0:0246 11 03 08         ld   de,0803
ROM0:0249 01 00 08         ld   bc,0800
ROM0:024C CD 3E 11         call 113E
ROM0:024F CD 13 10         call 1013
ROM0:0252 3E 0D            ld   a,0D
ROM0:0254 11 04 08         ld   de,0804
ROM0:0257 CD E5 10         call 10E5
ROM0:025A CD 13 10         call 1013
ROM0:025D 3E 12            ld   a,12
ROM0:025F EA 74 C7         ld   (C774),a
ROM0:0262 21 00 08         ld   hl,0800
ROM0:0265 D7               rst  10
ROM0:0266 CD 13 10         call 1013
ROM0:0269 3E 0A            ld   a,0A
ROM0:026B EA 74 C7         ld   (C774),a
ROM0:026E 21 00 08         ld   hl,0800
ROM0:0271 D7               rst  10
ROM0:0272 CD 13 10         call 1013
ROM0:0275 3E 13            ld   a,13
ROM0:0277 EA 74 C7         ld   (C774),a
ROM0:027A 21 00 08         ld   hl,0800
ROM0:027D D7               rst  10
ROM0:027E CD 13 10         call 1013
ROM0:0281 3E 01            ld   a,01
ROM0:0283 EA 1C C8         ld   (C81C),a
ROM0:0286 3E FF            ld   a,FF
ROM0:0288 EA 1B C8         ld   (C81B),a
ROM0:028B CD A5 12         call 12A5
ROM0:028E CD 17 14         call 1417
ROM0:0291 CD EF 13         call 13EF
ROM0:0294 CD 0B 14         call 140B
ROM0:0297 CD 60 16         call 1660
ROM0:029A AF               xor  a
ROM0:029B EA 6A C8         ld   (C86A),a
ROM0:029E EA 25 C8         ld   (C825),a
ROM0:02A1 EA 29 C8         ld   (C829),a
ROM0:02A4 EA 2A C8         ld   (C82A),a
ROM0:02A7 EA C8 C8         ld   (C8C8),a
ROM0:02AA EA C9 C8         ld   (C8C9),a
ROM0:02AD EA 0E DF         ld   (DF0E),a
ROM0:02B0 CD 0F 03         call 030F
ROM0:02B3 AF               xor  a
ROM0:02B4 EA 8E C8         ld   (C88E),a
ROM0:02B7 EA 8F C8         ld   (C88F),a
ROM0:02BA EA A3 C8         ld   (C8A3),a
ROM0:02BD EA 40 C7         ld   (C740),a
ROM0:02C0 EA 41 C7         ld   (C741),a
ROM0:02C3 EA A2 C8         ld   (C8A2),a
ROM0:02C6 EA A4 C8         ld   (C8A4),a
ROM0:02C9 EA A5 C8         ld   (C8A5),a
ROM0:02CC E0 D3            ld   (ff00+D3),a
ROM0:02CE EA B9 C8         ld   (C8B9),a
ROM0:02D1 EA 78 DA         ld   (DA78),a
ROM0:02D4 21 B1 C8         ld   hl,C8B1
ROM0:02D7 22               ldi  (hl),a
ROM0:02D8 22               ldi  (hl),a
ROM0:02D9 22               ldi  (hl),a
ROM0:02DA 77               ld   (hl),a
ROM0:02DB FA 6C C8         ld   a,(C86C)
ROM0:02DE B7               or   a
ROM0:02DF CC D0 12         call z,12D0
ROM0:02E2 FA 8E C8         ld   a,(C88E)
ROM0:02E5 B7               or   a
ROM0:02E6 28 F3            jr   z,02DB
ROM0:02E8 FA 50 C8         ld   a,(C850)
ROM0:02EB B7               or   a
ROM0:02EC 28 04            jr   z,02F2
ROM0:02EE CB 7F            bit  7,a
ROM0:02F0 28 E9            jr   z,02DB
ROM0:02F2 F3               di   
ROM0:02F3 FA 6C C8         ld   a,(C86C)
ROM0:02F6 B7               or   a
ROM0:02F7 C4 31 33         call nz,3331
ROM0:02FA CD DE 11         call 11DE
ROM0:02FD CD 13 10         call 1013
ROM0:0300 3E 00            ld   a,00
ROM0:0302 EA 74 C7         ld   (C774),a
ROM0:0305 21 00 08         ld   hl,0800
ROM0:0308 D7               rst  10
ROM0:0309 CD 13 10         call 1013
ROM0:030C C3 8B 02         jp   028B

Bank 41

There's a table at ROM41:4007 which points to the various string tables stored in this bank.

Personality name tables

ROM41:4997 personality name pointer table, size of 2x27, all pointing to within this bank.
   These are indexed by (idx(Charge) * 9 + idx(Mixed) * 3 + idx(Cautious)) where idx(x) is:
    * 0 if x >= 0xC0
    * 1 if 0x40 <= x < 0xC0
    * 2 if x < 0x40
   Effectively this means the indexes are best to worst, worsening Cautious first, then carrying from Mixed, etc.
ROM41:7159 personality names start here, each terminated by F0, in the order specified by the pointer table.

Personality adjustment tables

These tables are 4x8, each row containing 1 byte each of the adjustments for Charge, Mixed, Cautious, and Motivation respectively. Each table represents what happens when you select a certain Plan in battle. The row corresponds to a combination of the monster's current Motivation and level. Note that selecting Fight makes no adjustments to personality stats.

Run

ROM50:59B0
   -4, 0, 0, -10  # Motivation < 151  &&       Level <  10
   -3, 0, 0, -5   # Motivation < 151  && 10 <= Level <  20
   -2, 0, 0, -3   # Motivation < 151  && 20 <= Level <  30
   -1, 0, 0, -2   # Motivation < 151  &&       Level >= 30
   -8, 0, 0, -15  # Motivation >= 151 &&       Level <  10
   -6, 0, 0, -10  # Motivation >= 151 && 10 <= Level <  20
   -4, 0, 0, -5   # Motivation >= 151 && 20 <= Level <  30
   -2, 0, 0, -3   # Motivation >= 151 &&       Level >= 30

Charge

ROM57:70A9
   7, -1, 0, 3   # Motivation < 151  &&       Level <  10
   5, -1, 0, 2   # Motivation < 151  && 10 <= Level <  20
   3, -1, 0, 1   # Motivation < 151  && 20 <= Level <  30
   2, -1, 0, 1   # Motivation < 151  &&       Level >= 30
   10, -1, 0, 4  # Motivation >= 151 &&       Level <  10
   7, -1, 0, 3   # Motivation >= 151 && 10 <= Level <  20
   5, -1, 0, 2   # Motivation >= 151 && 20 <= Level <  30
   5, 0, 0, 1    # Motivation >= 151 &&       Level >= 30

Mixed

ROM57:70C9
   0, 7, -2, 3   # Motivation < 151  &&       Level <  10
   0, 5, -2, 2   # Motivation < 151  && 10 <= Level <  20
   0, 4, -1, 1   # Motivation < 151  && 20 <= Level <  30
   0, 3, -1, 1   # Motivation < 151  &&       Level >= 30
   0, 10, -3, 4  # Motivation >= 151 &&       Level <  10
   0, 7, -2, 3   # Motivation >= 151 && 10 <= Level <  20
   0, 5, -1, 2   # Motivation >= 151 && 20 <= Level <  30
   0, 5, 0, 1    # Motivation >= 151 &&       Level >= 30

Cautious

ROM57:70E9
   -2, 0, 7, 3   # Motivation < 151  &&       Level <  10
   -2, 0, 5, 2   # Motivation < 151  && 10 <= Level <  20
   -1, 0, 4, 1   # Motivation < 151  && 20 <= Level <  30
   -1, 0, 3, 1   # Motivation < 151  &&       Level >= 30
   -2, 0, 10, 4  # Motivation >= 151 &&       Level <  10
   -2, 0, 7, 3   # Motivation >= 151 && 10 <= Level <  20
   -1, 0, 5, 2   # Motivation >= 151 && 20 <= Level <  30
   0, 0, 5, 1    # Motivation >= 151 &&       Level >= 30

Command

ROM57:7109
   0, 0, 0, -1  # Motivation < 151  &&       Level <  10
   0, 0, 0, -2  # Motivation < 151  && 10 <= Level <  20
   0, 0, 0, -2  # Motivation < 151  && 20 <= Level <  30
   0, 0, 0, -1  # Motivation < 151  &&       Level >= 30
   0, 0, 0, -1  # Motivation >= 151 &&       Level <  10
   0, 0, 0, -2  # Motivation >= 151 && 10 <= Level <  20
   0, 0, 0, -2  # Motivation >= 151 && 20 <= Level <  30
   0, 0, 0, -1  # Motivation >= 151 &&       Level >= 30