Jump to content

Dune 2 eXtended Project


MrFlibble

Recommended Posts

Ugh.... That pretty much sucks. It's a shame that the Area Guard stuff doesn't actually store the initial position when the unit actually enters into Area Guard and chooses that position based on the map specifications. :)

Some assembly magic from Segra might be a solution though I seriously doubt it

-Daelin

Link to comment
Share on other sites

  • 3 months later...

The new version has quite a few changes. First, the light infantry was scrapped, and the Heavy Troopers are back. The Light Infantry was converted into the new Fremen Warriors, who are like the regular Troopers but have twice as much hit points, lack the missile attack, and cost more.

The Mercenaries got the Heavy Factory and the High-Tech Factory back, and no longer receive faster Starport deliveries. They still have a bonus with the Starport in that they get it on mission 4, one mission earlier than everyone else. More units are in stock for the Mercenaries too. That Sardaukar also can buy stuff from the Starport, and require it to build a Palace.

I also added the building decay fix (thanks TrueBrain!) and looped reinforcements (thanks Segra!) hat will now occur on most missions.

Download Dune 2 eXtended Demo v1.26

Here's a detailed list of changes:

  • Structures will now decay only if placed on bare rock or incomplete foundations. Structures that were placed on normal concrete foundations will only take damage from power shortage (thanks TrueBrain!)
  • Looped reinforcements have been added (thanks Segra!)
  • Fremen Warrior and Warrior group units no longer have the secondary missile attack.
  • Heavy Troopers now replace Combat Infantry. Heavy Troopers retain their original stats from Dune II.
  • Fremen Warrior cost increased from 100 to 150.
  • Fremen Warrior sight range decreased from 2 to 1.
  • Fremen Warrior hit points increased from 50 to 90.
  • Fremen Warrior group cost increased from 200 to 250.
  • Fremen Warrior group sight range decreased from 2 to 1.
  • Fremen Warrior group hit points increased from 115 to 220.
  • Sardaukar Trooper hit points reduced from 120 to 110.
  • Sardaukar Trooper weapon damage (per missile) reduced from 10 to 8.
  • Sardaukar Trooper weapon reload time reduced from 75 to 55.
  • Sardaukar Trooper cost reduced from 250 to 200.
  • Saboteur hit points increased from 20 to 40.
  • There can be no more than two Saboteurs on the map at any given time.
  • Trike movement speed increased from 45 to 60.
  • Quad movement speed increased from 40 to 50.
  • Fremen can now produce Combat Tanks.
  • Fremen can produce Rocket Launchers starting with mission 5.
  • Sonic Tank no longer requires 3 Heavy Factory upgrades for production. It only requires the House of Ix.
  • Large concrete slabs are now available for production starting with level 2.
  • Wall segment hit points decreased from 100 to 70.
  • Radar Outpost tech level changed from 2 to 1.
  • Radar Outpost is now required to build Barracks, WOR facility or Starport.
  • The construction of a Light Factory is now required to build a Heavy Factory except for the Sardaukar. The Sardaukar need to build a Windtrap and an Outpost in order to access the Heavy Factory.
  • Heavy Factory hit points increased from 200 to 400.
  • Heavy Factory tech level changed from 3 to 4 for Fremen and Mercenaries.
  • High-Tech Factory hit points increased from 400 to 500.
  • Repair Facility hit points increased from 200 to 450.
  • Repair Facility tech level changed from 4 to 5.
  • The construction of a Starport in now required to build a Palace.
  • Palace no longer requires a WOR facility to be constructed first.
  • Sardaukar now have access to the Starport.
  • Mercenaries can build Heavy Factories and High-Tech Factories.
  • Mercenaries no longer have faster Starport deliveries.
  • Mercenaries get access to the Starport on mission 4.

Link to comment
Share on other sites

Where's the "thanks Nyerguds!" behind all data changes? ;D

Here's a couple of quotes from Dune II quite fitting to the occasion ;)

Congratulations would be in order, but we expect these results when you are in charge.
Although praise may be due, you will not have that luxury. Serving House Harkonnen is reward enough!

Nice quotations can be found not only in Dune books, but also in other Dune media as well ;D

Link to comment
Share on other sites

A quick update mostly devoted to fixing things. First and foremost, I finally got to edit some of the game sound effect files that had an audible clicking noise at the end (e.g. rifle and machinegun firing sounds, some explosions etc.). Using Audacity, I was able to fix them, so the clicking noises are now removed. Other than that, I fixed an issue with Sardaukar weapon sound that also caused weird clicking sounds when lots of Sardaukar Troopers were firing at a target, and slightly tweaked the Sardaukar Troopers' stats for better balancing.

Link to comment
Share on other sites

Another small update with cosmetic changes mostly. First, I figured out how to change the faction heralds on the conquest map in accord with the faction that is currently played:

selectmerc.png

selectfrem.png

selectsard.png

Secondly, the score screen bars are now coloured depending on the player's side:

scoremerc.png

scorefrem.png

Also, the Fremen get back their missile attack, as they were pretty much useless without it. They now deal a tad less damage for balancing issues, but so do the regular Troopers' missiles too.

Link to comment
Share on other sites

  • 4 months later...

I've not been able to get this to work in a patched 1.07 dune 2.

Your two other mods install and run correctly, this does not. It hangs indefinitely on dosbox after initializing the sound hardware i guess (it displayed the mt32 message). I did use the extended setup with the same options as the normal game (that works).

I've tried both the normal 1.07 game, and the updated 1.07 path before installing this. Same result.

Link to comment
Share on other sites

Wow, it turns out the Demo was incompatible with DUNE.PAK from both US and HS versions :O This happened because for some reason I forgot to remove the "load into EMS/XMS" flag from DUNE.PAK's properties. I've fixed this issue and re-uploaded the Demo. Everything should be working fine now. SCO, great thanks for reporting this bug! :) That was very helpful.

Download DuneX Demo v1.26cf

Link to comment
Share on other sites

Actually, that's a good question ;D

Anyway, here's another small update which will upgrade the visuals a little bit:

  • The game will no longer generate or use the file ONETIME.DAT.
  • Fixed the remapable coloured text on production and map selection screens. The Mercenary colours will no longer blend in with the text outline.
  • The item selection box in the production menu is now animated.
  • Faction heralds are now displayed in the production menu.
  • Mission 1 score screen now shows stats for buildings.
  • Enemy score bar colour changed from purple to red.

This update wouldn't have been possible without Segra's Dune II database.

newmapselect.th.png newprodscreen.th.png newscorescreen.th.png

Link to comment
Share on other sites

You fixed the heralds? Wow. You're actually getting into this hacking?

I finally downloaded IDA Pro 4.9 and looked into Segra's database - it's extremely helpful. He did a great job figuring out literally lots of stuff, so most of the credits for the recent progress should really go to him :) Thanks Segra! (Hope he drops by sometime soon ;D)

As for the herald thing, here's the code:

ovr180:125B                   choamDraw       proc far                                    ; CODE XREF: j_choamDrawJ
ovr180:125B                                                                              ; buildingSelectBuildItem:loc_4F0ABp
ovr180:125B
ovr180:125B                  var_12          = dword ptr -12h
ovr180:125B                  var_E          = word ptr -0Eh
ovr180:125B                  var_C          = word ptr -0Ch
ovr180:125B                  var_A          = word ptr -0Ah
ovr180:125B                  var_8          = word ptr -8
ovr180:125B                  var_6          = word ptr -6
ovr180:125B                  WSAData        = dword ptr -4
ovr180:125B
ovr180:125B 55                                push    bp
ovr180:125C 8B EC                            mov    bp, sp
ovr180:125E
ovr180:125E                  loc_502BE:                                                  ; Integer Subtraction
ovr180:125E 83 EC 12                          sub    sp, 12h
ovr180:1261 56                                push    si                                  ; palette
ovr180:1262 57                                push    di
ovr180:1263
ovr180:1263                  loc_502C3:
ovr180:1263 B8 02 00                          mov    ax, 2
ovr180:1266 50                                push    ax
ovr180:1267
ovr180:1267                  loc_502C7:                                                  ; Call Procedure
ovr180:1267 9A 0A 00 9C 33                    call    sub_339CA
ovr180:126C 59                                pop    cx
ovr180:126D 89 46 FA                          mov    [bp+var_6], ax
ovr180:1270
ovr180:1270                  loc_502D0:
ovr180:1270 B8 01 00                          mov    ax, 1
ovr180:1273
ovr180:1273                  loc_502D3:                                                  ; int
ovr180:1273 50                                push    ax
ovr180:1274 33 C0                            xor    ax, ax                              ; Logical Exclusive OR
ovr180:1276 33 D2                            xor    dx, dx                              ; Logical Exclusive OR
ovr180:1278
ovr180:1278                  loc_502D8:                                                  ; int
ovr180:1278 50                                push    ax
ovr180:1279 52                                push    dx                                  ; int
ovr180:127A
ovr180:127A                  loc_502DA:
ovr180:127A B8 03 00                          mov    ax, 3
ovr180:127D 50                                push    ax                                  ; int
ovr180:127E
ovr180:127E                  loc_502DE:
ovr180:127E B8 03 00                          mov    ax, 3
ovr180:1281 50                                push    ax                                  ; int
ovr180:1282
ovr180:1282                  loc_502E2:
ovr180:1282 1E                                push    ds
ovr180:1283
ovr180:1283                  loc_502E3:                                                  ; "CHOAM.CPS"
ovr180:1283 B8 8E 18                          mov    ax, offset aChoam_cps_0
ovr180:1286
ovr180:1286                  loc_502E6:                                                  ; s2
ovr180:1286 50                                push    ax
ovr180:1287
ovr180:1287                  loc_502E7:                                                  ; Call Procedure
ovr180:1287 9A 20 00 CD 42                    call    j_fileLoad_CPS
ovr180:128C
ovr180:128C                  loc_502EC:                                                  ; Add
ovr180:128C 83 C4 0E                          add    sp, 0Eh
ovr180:128F
ovr180:128F                  loc_502EF:
ovr180:128F FF 36 38 3C                      push    word ptr dword_47056+2
ovr180:1293
ovr180:1293                  loc_502F3:
ovr180:1293 FF 36 36 3C                      push    word ptr dword_47056
ovr180:1297
ovr180:1297                  loc_502F7:
ovr180:1297 B8 02 00                          mov    ax, 2
ovr180:129A
ovr180:129A                  loc_502FA:
ovr180:129A 50                                push    ax
ovr180:129B B8 C8 00                          mov    ax, 0C8h ; 200, screen height
ovr180:129E 50                                push    ax
ovr180:129F B8 40 01                          mov    ax, 140h ; 320, screen width
ovr180:12A2
ovr180:12A2                  loc_50302:
ovr180:12A2 50                                push    ax
ovr180:12A3
ovr180:12A3                  loc_50303:                                                  ; Logical Exclusive OR
ovr180:12A3 33 C0                            xor    ax, ax
ovr180:12A5 50                                push    ax
ovr180:12A6 33 C0                            xor    ax, ax                              ; Logical Exclusive OR
ovr180:12A8 50                                push    ax
ovr180:12A9 9A 49 00 BB 39                    call    sub_39BF9                          ; Call Procedure
ovr180:12AE
ovr180:12AE                  loc_5030E:                                                  ; Add
ovr180:12AE 83 C4 0E                          add    sp, 0Eh
ovr180:12B1
ovr180:12B1                  loc_50311:                                                  ; Logical Exclusive OR
ovr180:12B1 33 C0                            xor    ax, ax
ovr180:12B3 50                                push    ax                                  ; drawFlags
ovr180:12B4
ovr180:12B4                  loc_50314:                                                  ; Logical Exclusive OR
ovr180:12B4 33 C0                            xor    ax, ax
ovr180:12B6 50                                push    ax                                  ; int
ovr180:12B7
ovr180:12B7                  loc_50317:                                                  ; Logical Exclusive OR
ovr180:12B7 33 C0                            xor    ax, ax
ovr180:12B9 50                                push    ax                                  ; targetY
ovr180:12BA
ovr180:12BA                  loc_5031A:
ovr180:12BA B8 C0 00                          mov    ax, 0C0h ; 192, bottom coord for Atreides/bottom herald
ovr180:12BD 50                                push    ax                                  ; targetX
ovr180:12BE B8 D2 3B                          mov    ax, seg seg152
ovr180:12C1
ovr180:12C1                  loc_50321:
ovr180:12C1 8E C0                            mov    es, ax
ovr180:12C3                                  assume es:seg152
ovr180:12C3
ovr180:12C3                  loc_50323:
ovr180:12C3 26 FF 36 6E 04                    push    es:word_3C18E
ovr180:12C8 26 FF 36 6C 04                    push    es:word_3C18C                      ; __int32
ovr180:12CD B8 02 00                          mov    ax, 2
ovr180:12D0 50                                push    ax                                  ; int
ovr180:12D1 9A 52 01 08 37                    call    screenDraw                          ; Call Procedure
ovr180:12D6 83 C4 0E                          add    sp, 0Eh                            ; Add
ovr180:12D9 8B 1E 2C 3A                      mov    bx, houseHumanID
ovr180:12DD D1 E3                            shl    bx, 1                              ; Shift Logical Left
ovr180:12DF
ovr180:12DF                  loc_5033F:
ovr180:12DF B8 38 3A                          mov    ax, seg seg095
ovr180:12E2
ovr180:12E2                  loc_50342:
ovr180:12E2 8E C0                            mov    es, ax
ovr180:12E4                                  assume es:seg095
ovr180:12E4 26 8A 87 B6 00                    mov    al, es:[bx+0B6h]
ovr180:12E9
ovr180:12E9                  loc_50349:
ovr180:12E9 B4 00                            mov    ah, 0
ovr180:12EB 89 46 F6                          mov    [bp+var_A], ax
ovr180:12EE 8B 1E 2C 3A                      mov    bx, houseHumanID
ovr180:12F2 D1 E3                            shl    bx, 1                              ; Shift Logical Left
ovr180:12F4 B8 38 3A                          mov    ax, seg seg095
ovr180:12F7 8E C0                            mov    es, ax
ovr180:12F9 26 8A 87 B7 00                    mov    al, es:[bx+0B7h]
ovr180:12FE
ovr180:12FE                  loc_5035E:
ovr180:12FE B4 00                            mov    ah, 0
ovr180:1300 8B F8                            mov    di, ax
ovr180:1302
ovr180:1302                  loc_50362:
ovr180:1302 B8 02 00                          mov    ax, 2
ovr180:1305 50                                push    ax
ovr180:1306 B8 02 00                          mov    ax, 2
ovr180:1309 50                                push    ax
ovr180:130A B8 28 00                          mov    ax, 28h ; 40, herald height
ovr180:130D 50                                push    ax
ovr180:130E
ovr180:130E                  loc_5036E:
ovr180:130E B8 07 00                          mov    ax, 7
ovr180:1311 50                                push    ax
ovr180:1312 B8 08 00                          mov    ax, 8 ; vertical gap between the screen borders and the herald
ovr180:1315 50                                push    ax
ovr180:1316
ovr180:1316                  loc_50376:                                                  ; Logical Exclusive OR
ovr180:1316 33 C0                            xor    ax, ax
ovr180:1318 50                                push    ax
ovr180:1319 57                                push    di
ovr180:131A FF 76 F6                          push    [bp+var_A]
ovr180:131D 9A 07 00 D5 32                    call    inGameMenuDraw_0                    ; Call Procedure
ovr180:1322
ovr180:1322                  loc_50382:                                                  ; Add
ovr180:1322 83 C4 10                          add    sp, 10h ; 16
ovr180:1325 B8 02 00                          mov    ax, 2
ovr180:1328
ovr180:1328                  loc_50388:
ovr180:1328 50                                push    ax
ovr180:1329 B8 02 00                          mov    ax, 2
ovr180:132C 50                                push    ax
ovr180:132D B8 28 00                          mov    ax, 28h ; 40, herald height
ovr180:1330 50                                push    ax
ovr180:1331 B8 07 00                          mov    ax, 7
ovr180:1334 50                                push    ax
ovr180:1335 B8 98 00                          mov    ax, 98h ; 152, Y top coord for Atreides Herald
ovr180:1338
ovr180:1338                  loc_50398:
ovr180:1338 50                                push    ax
ovr180:1339 33 C0                            xor    ax, ax                              ; Logical Exclusive OR
ovr180:133B 50                                push    ax
ovr180:133C 57                                push    di
ovr180:133D FF 76 F6                          push    [bp+var_A]
ovr180:1340
ovr180:1340                  loc_503A0:                                                  ; Call Procedure
ovr180:1340 9A 07 00 D5 32                    call    inGameMenuDraw_0
ovr180:1345 83 C4 10                          add    sp, 10h                            ; Add
ovr180:1348
ovr180:1348                  loc_503A8:
ovr180:1348 A1 75 6D                          mov    ax, word_4A195
ovr180:134B 8B 16 73 6D                      mov    dx, word_4A193
ovr180:134F A3 34 80                          mov    word_4B454, ax
ovr180:1352
ovr180:1352                  loc_503B2:
ovr180:1352 89 16 32 80                      mov    word_4B452, dx
ovr180:1356
ovr180:1356                  loc_503B6:
ovr180:1356 B8 05 00                          mov    ax, 5
ovr180:1359 50                                push    ax                                  ; index
ovr180:135A
ovr180:135A                  loc_503BA:                                                  ; Call Procedure
ovr180:135A 9A 0B 00 32 33                    call    getOverlayAddress?
ovr180:135F 59                                pop    cx
ovr180:1360
ovr180:1360                  loc_503C0:
ovr180:1360 89 16 40 80                      mov    word_4B460, dx
ovr180:1364
ovr180:1364                  loc_503C4:
ovr180:1364 A3 3E 80                          mov    word_4B45E, ax
ovr180:1367 90                                nop                                        ; No Operation
ovr180:1368 0E                                push    cs
ovr180:1369
ovr180:1369                  loc_503C9:                                                  ; Call Procedure
ovr180:1369 E8 31 02                          call    near ptr sub_505FD
ovr180:136C
ovr180:136C                  loc_503CC:
ovr180:136C C7 46 F4 00 00                    mov    [bp+var_C], 0
ovr180:1371 89 46 F2                          mov    [bp+var_E], ax
ovr180:1374
ovr180:1374                  loc_503D4:
ovr180:1374 8B 46 F4                          mov    ax, [bp+var_C]
ovr180:1377
ovr180:1377                  loc_503D7:
ovr180:1377 8B 56 F2                          mov    dx, [bp+var_E]
ovr180:137A 29 16 32 80                      sub    word_4B452, dx                      ; Integer Subtraction
ovr180:137E 19 06 34 80                      sbb    word_4B454, ax                      ; Integer Subtraction with Borrow
ovr180:1382 A1 40 80                          mov    ax, word_4B460
ovr180:1385 8B 16 3E 80                      mov    dx, word_4B45E
ovr180:1389 03 56 F2                          add    dx, [bp+var_E]                      ; Add
ovr180:138C
ovr180:138C                  loc_503EC:
ovr180:138C A3 38 80                          mov    word_4B458, ax
ovr180:138F 89 16 36 80                      mov    word_4B456, dx
ovr180:1393 90                                nop                                        ; No Operation
ovr180:1394 0E                                push    cs
ovr180:1395
ovr180:1395                  loc_503F5:                                                  ; Call Procedure
ovr180:1395 E8 91 06                          call    near ptr sub_50A89
ovr180:1398 89 56 F4                          mov    [bp+var_C], dx
ovr180:139B 89 46 F2                          mov    [bp+var_E], ax
ovr180:139E A1 38 80                          mov    ax, word_4B458
ovr180:13A1 8B 16 36 80                      mov    dx, word_4B456
ovr180:13A5 03 56 F2                          add    dx, [bp+var_E]                      ; Add
ovr180:13A8 A3 3C 80                          mov    word_4B45C, ax
ovr180:13AB 89 16 3A 80                      mov    word_4B45A, dx
ovr180:13AF
ovr180:13AF                  loc_5040F:
ovr180:13AF 8B 46 F4                          mov    ax, [bp+var_C]
ovr180:13B2
ovr180:13B2                  loc_50412:
ovr180:13B2 8B 56 F2                          mov    dx, [bp+var_E]
ovr180:13B5 29 16 32 80                      sub    word_4B452, dx                      ; Integer Subtraction
ovr180:13B9 19 06 34 80                      sbb    word_4B454, ax                      ; Integer Subtraction with Borrow
ovr180:13BD 90                                nop                                        ; No Operation
ovr180:13BE 0E                                push    cs
ovr180:13BF E8 24 04                          call    near ptr buildQueueBuild            ; Call Procedure
ovr180:13C2 8B 36 46 80                      mov    si, nelem
ovr180:13C6 EB 20                            jmp    short loc_50448                    ; Jump

Once again there's some algorithm of picking up the heralds that I couldn't be bothered to try and figure out, so I simply NOPed both instances of this:

ovr180:12EE 8B 1E 2C 3A                       mov     bx, houseHumanID
ovr180:12F2 D1 E3                            shl    bx, 1

and, miraculously, it worked (although I had serious doubts that it would), entirely disabling the whole herald redraw thing :) Still looks nicer than that placeholder partial solution with the blank areas.

Hmm, the first Sardaukar briefing says you have to harvest 2000, but the actual quota is 5000. can you please fix that?

Thanks for reporting this - I haven't looked into the game's briefings for quite some time.

Link to comment
Share on other sites

Seeing as I was trying to test the score screen, that really annoyed me, lol. I reached 2000, saved the game, waited until it would end, and the end just wouldn't come :P

I eventually realized it would be the same as with the others though, and made a nice testing savegame from it when I finally really reached it.

For Mercenary and Fremen I eventually decided to use the mission skip trick by changing the "mission accomplished" variable in the exe to 1 ;)

Since that's REALLY the flag the game sets when you reach the required objectives, this works just as well when loading a savegame, btw. This is also the reason it's (obviously) set back to 0 after finishing a mission ;)

Link to comment
Share on other sites

I eventually realized it would be the same as with the others though, and made a nice testing savegame from it when I finally really reached it.

Yeah, I also keep a couple of testing savegames made immediately prior to mission completion. However, the instant win byte is much more useful, because even if you make a mission that's an instant win (e.g. your siege tanks blast the only AI-owned silo into oblivion just as the mission starts) you'll have to wait for a while (I think for a minute or so, maybe more) before it's "Mission accomplished".

Since that's REALLY the flag the game sets when you reach the required objectives, this works just as well when loading a savegame, btw. This is also the reason it's (obviously) set back to 0 after finishing a mission ;)

Ah-hah, that's how it is. I knew it works with saved games, but I didn't realize why it gets reset to 0 after the first time.

Link to comment
Share on other sites

Most of that kind of variables in C&C are put in virtual memory, so you can't influence it by hacking the byte, since the memory space of the variable simply doesn't exist until the program is started.

And for those that are in the editable exe range, the game usually has enough common sense to reset them all to a default value on startup. I'm kinda surprised Dune II didn't do that with this Win flag.

As for testing savegames, I originally messed with too much code and it seemed to have changed the colour of the player side bars below. In that aspect, the immediate win was not handy, since there were no filled bars to see yet. To get around this, I hacked the Win byte and then loaded a savegame of the side I wanted to test where I had already harvested a little.

Link to comment
Share on other sites

  • 2 weeks later...

Nyerguds helped me to fix the code so that proper faction heralds are displayed on the score screen for each side (previously, it would display a Sardaukar and a Fremen herald regardless of what faction was currently played). Other changes include:

  • The House of Ix structure now has correct colours (similar to this fix).
  • Structures that are placed on incomplete foundations or bare rock will decay in missions 1 and 2 (previously, decay was disabled in the first two missions).
  • Destruction of enemy units is now announced as "Enemy unit destroyed" in all missions, not just missions 1 and 2.
  • Destruction of enemy structures is now announced as "Enemy structure destroyed" instead of just "Structure destroyed".
  • Fremen Warriors now have both missiles and machine guns, just like regular Troopers.
  • Fixed incorrect info in the first Sardaukar mission briefing (thanks to Nyerguds for reporting that one)

I've also added a more detailed version history of the project, documenting all changes since the very first public release of the modification.

Download Dune 2 eXtended Project v1.26e

dunex047.th.png dunex048.th.png dunex049.th.png dunex050.th.png

Link to comment
Share on other sites

  • 8 months later...

Well, it's a side-effect of the limitations imposed by the fact that only the original three sides were supposed to be playable. Basically, there are only three options for the player score bars in Dune 2, one for each playable side, and by default, anyone else gets the Atreides blue score bar (interestingly enough, in v1.0 it was the green Ordos score bar). I was able to change the colours of the bars (although I could not keep the "glowing" effect, as it does some colour calculation algorithm I didn't figure out, and it produced weird colours if the baseline colour of a glowing bar was changed) and re-assign them to the "new" sides, but increasing the number of available colours is apparently not possible.

I've posted the code responsible for score screen progress bars colours in the DUNE2.EXE editing thread:

I've found some more interesting functions in Dune II (EU version):

Here's the one that decides what color the score screen progress bars should be:

A1 38 3A        ; get House ID
0B C0 ; if Harkonnen
74 0C ; red score bar
3D 01 00 ; if Atreides
74 13 ; blue score bar
3D 02 00 ; OR
74 1A ; green score bar
EB 0C ; else, use the Atreides blue bar
; Harkonnen red score bar
C7 46 FC 95 00 ; palette index for the darkest coulour in the remap scheme
C7 46 FA 00 00 ; some reference to a function that creates the "glowing" effect
EB 18
; Atreides blue score bar
C7 46 FC A5 00
C7 46 FA 02 00
EB 0C
; Ordos green score bar
C7 46 FC B5 00
C7 46 FA 01 00
EB 00

I could not identify the function that creates the glowing effect, but if the "base colour" referred to by the palette index (prior to calling that function) is changed, the colour of the score bar changes as a result of mixing the colours (e.g. I got a dark green colour by mixing the Sardaukar purple with something else). If the glowing effect index is changed to something else (e.g. C7 46 FA 03 00), the score bar no longer "glows", but retains the colour specified by the palette index above.

The colour of the "enemy" score bar (which is always purple) is handled somewhere else, and I have been unable to find it yet.

And here's the chunk that chooses House heralds for the map selection screen:

A1 38 3A        ; get House ID 
0B C0 ; if Harkonnen
74 0C ; use Harkonnen herald
3D 01 00 ; if Atreides
74 10 ; use Atreides herald
3D 02 00 ; if Ordos
74 10 ; use Ordos herald
EB 09 ; else, use the Atreides herald

I've been unable to find the code that picks the heralds for the production screen as yet. It is probably more tricky, since the unplayable sides do not use any herald at all, but instead the space where the heralds should be is filled with a "copy-pasted" upper part of the top herald image.

I also identified the code for the glowing selection boxes for the production screen:

A1 38 3A        ; get House ID  
0B C0 ; if Harkonnen
74 0C ; red selection box
3D 01 00 ; if Atreides
74 2F ; blue selection box
3D 02 00 ; if Ordos
74 1C ; green selection box
EB 2A ; else, white selection box

The function itself that draws the selection boxes is pretty complicated, and I've been unable to figure out how to change the colours.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.