Windwalker Posted March 2, 2009 Share Posted March 2, 2009 It may give clue on what is wrong? Besides, being unable to expand could be their initial drawback? Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted March 3, 2009 Share Posted March 3, 2009 no, the initial drawback is that the player is forced to build buildings without concrete foundation, which means they're damaged when you place them down, and they decay faster. Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted March 6, 2009 Author Share Posted March 6, 2009 Even if you put concrete around the Const. Yard, you still won't be able to leave spaces between the buildings you place. Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted March 6, 2009 Share Posted March 6, 2009 True... concrete placed on maps is neutral overlay.It might be possible to place slabs and 4slabs as structures in missions though. I think it's possible in C&C anyway, to make player-owned walls. Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted March 7, 2009 Author Share Posted March 7, 2009 Not sure about concrete, but walls are side-specific by default in Dune II (they even have side colors on the minimap). The other thing is, that normally concrete has to be linked to any of the player's structures to place a building - if you have a patch of player-owned concrete isolated from any buildings, you can't place anything there. But for the Mercenaries and the sardaukar, one of this works at all: you can only place things next you your existing structures, no matter if there's concrete or not, so no gaps/spaces between them are allowed. Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted March 14, 2009 Author Share Posted March 14, 2009 Nyerguds, remember you mentioned the menu text in the European version of Dune II is not centered? Do you have any idea how this could be remedied? I'm asking because that particular version appears to be the latest official build of Dune II, and probably is (or is supposed to be) the best one (I'm talking about the EXE here - I don't like the narrowed fonts the devs had to use to accommodate text in other languages). Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted March 15, 2009 Share Posted March 15, 2009 It can only be remedied by adding spaces in the strings file, but that gives some odd behaviour when the same strings are used for stuff like the title of the game settings screen, and it probably also means that the menu keyboard shortcuts won't work because each option has the space a sfirst character. (mind you, if it works like the command shortcuts it might use the first usable char after the spaces for the options after the first one)If the string ID numbers used on the menu are large enough I could probably look them up in the exe... it worked in C&C. But that's still no guarantee I'll find out how the game centers them in the English version. Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted March 15, 2009 Author Share Posted March 15, 2009 Yes, adding spaces is not worth considering, as it will disable keyboards shortcuts.I have also tried finding the related part of the EXE by string references - it worked very well with the main menu items (I removed the "Replay Introduction" option from both Super Dune II: Classic Edition and Dune 2 eXtended). However, it didn't work so far with the in-game menu. With the main menu, it was quite easy: you get code like[pre]1B 00 1C 00 5C 00 1D 00[/pre]which stands for "Play a Game", "Replay Introduction", "Load a game", "Exit Game". Mind that in the European version we're talking about, there's another string for "Load Game" used in the main menu, so it's not 5C, but a much larger number - 340-something in decimal.I found a similar set of string references for the in-game menu:[pre]5B 00 5C 00 5D 00[/pre] etc. etc., but changing it didn't have any effect on the menu itself. However, this section is followed by two sets of values where these 5C, 5D and so on have not 00's but some other values between them. Changing those didn't have any effect either, but I did not have the time to thoroughly test this at all.Besides, comparing the aforementioned sections in the European version and other versions of Dune II also gave nothing yet, as they seem to be completely identical. Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted March 15, 2009 Share Posted March 15, 2009 Ah, that's annoying... I was expecting these string IDs to be in the actual game code. I can't find any code related to the game menu if the strings aren't inside it. Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted March 22, 2009 Author Share Posted March 22, 2009 Okay, here's a bit about the "Select your House" screen:[pre]00 00 10 00 38 00 1F 00 70 00 38 00 19 00 D0 00 38 00 24 [/pre]It gets segmented as follows:[pre]00 10 00 38 00 1F - A00 70 00 38 00 19 - O00 D0 00 38 00 24 - H[/pre]The first two double-bytes, as far as I can tell, are the (x,y) coordinates, probably of a predefined rectangular shape that marks the "clickable" area corresponding to each House herald. The last double-byte is a code of the key you press to select each House (I don't know how this is properly called, but 1F=A, 19=O and 24=H, which corresponds to their position on the keyboard if you count from left to right). But changing the keys doesn't affect the real House that is selected, while I hoped to find a way to make the new sides directly selectable, instead of having extra 1st missions that switch the original sides to the new ones. Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted March 22, 2009 Share Posted March 22, 2009 I doubt keyboard layout has anything to do with these values... programs don't even know that, they just get the ASCII codes. Besides, the distance between A snd H is only 5, while these values would make it 10. You're forgetting that that 19 and 24 are hexadecimal. After 19 comes 1A, not 20. Quote Link to comment Share on other sites More sharing options...
segra Posted March 25, 2009 Share Posted March 25, 2009 Hey guys,Check my other 2 threads for the concrete and the vanishing houses fixes, butIn relation to the Atreides ending playing for all of the SD2 houses... This is why(all references below are from battle for arrakis 1.07, but other versions are similar.. if not exactly the same"gameEndingPlay" functionovr185:0000 55              push  bp......ovr185:0019 A1 2C 3A           mov  ax, gameHumanTeamIDovr185:001C 0B C0             or   ax, axovr185:001E 74 0C             jz   short endHarkovr185:0020 3D 01 00           cmp  ax, 1ovr185:0023 74 67             jz   short endAtreovr185:0025 3D 02 00           cmp  ax, 2ovr185:0028 74 3D             jz   short endOrdosovr185:002A EB 60             jmp  short endAtre     <<<< If the teamID doesnt match 0,1,2... use AtreidesStarting atFile hex addr: 0x39BDC is the table of movies? to play at the endpointers to these strings begins atHarkonnen: dseg:1A31 DC 1B 42 43  endingHark   dd aHfinalaOrdos:  dseg:1AFB F4 1B 42 43  endingOrdos  dd aOfinalaAtreides: dseg:19A8 BC 1B 42 43  endingAtre   dd aAfinala Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted March 25, 2009 Share Posted March 25, 2009 ah yes... I've seen similar code in C&C1 when using multiplayer teams as human player in a mission, for the score screen code. Since C&C only has a specific score screen for GDI and Nod, and that score screen checks the player's side ID, it all went wrong. (I changed it to just skip the score screen entirely if the side is "illegal". See this neat lil' project) Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted March 27, 2009 Author Share Posted March 27, 2009 segra, mind if I ask you another question? Currently, in Super Dune II and Dune 2 eXtended, the "new" sides are not actually selected on the "Select your House" screen, but the following trick is used:1) one of the original Houses is selected,2) the game plays the original House intro from TEXTA.ENG/TEXTH.ENG/TEXTO.ENG,3) the game loads the first mission for this House: SCENA001.INI, SCENH001.INI or SCENO001.INI,4) in each of those missions, the Human player set to one of the "new" sides,5) the game switches to the appropriate "new" side, using the corresponding Mentat image and database, briefing text etc.6) after the completion/restarting of the first mission, all consecutive missions are loaded for the "new" side (e.g. SCENM002, SCENM003 etc. etc.).The question is, could the game be modified to directly select the "new" sides right from the beginning?I doubt keyboard layout has anything to do with these values... programs don't even know that, they just get the ASCII codes. Besides, the distance between A snd H is only 5, while these values would make it 10. You're forgetting that that 19 and 24 are hexadecimal. After 19 comes 1A, not 20.19 is O, not A. A is 1F and H is 24 - no problem here. I have counted the keys on the keyboard and have been able to correctly identify M (34), F (22) and S (20) that way. Quote Link to comment Share on other sites More sharing options...
segra Posted March 27, 2009 Share Posted March 27, 2009 alright from what i can see here, this is becausethe "mission ini loading" function, loops through each house listed in the internal house data, and attempts to load from the scenario files the [ATREIDES] [MERCENARY], etc sections.Each time it loads the Brain= variable, it does this checkovr188:0317 C4 5E F0          les  bx, dword ptr [bp+teamHumanCpu]ovr188:031A 26 80 3F 48        cmp  byte ptr es:[bx], 48hovr188:031E 75 23           jnz  short notHumanIf the value it reads starts with H (Human),ovr188:0320 C4 5E F8          les  bx, [bp+unitGamePtr]ovr188:0323 26 83 4F 04+        or   word ptr es:[bx+_unitGame.emcData], 2ovr188:0328 89 36 2C 3A        mov  houseHumanTeamID, si         << main internal houseid variable is setThe "SelectTeam" function on the otherhand, has this segment of codeovr206:1156 3D 01 80          cmp  ax, 8001hovr206:1159 74 0C           jz   short Atreidesovr206:115B 3D 02 80          cmp  ax, 8002hovr206:115E 74 0C           jz   short Ordosovr206:1160 3D 03 80          cmp  ax, 8003hovr206:1163 74 0C           jz   short Harkonnenovr206:1165 EB 0E           jmp  short Noneovr206:1167      ; ---------------------------------------------------------------------------ovr206:1167ovr206:1167      Atreides:               ; CODE XREF: selectTeam+1A9jovr206:1167 BE 01 00          mov  si, 1ovr206:116A EB 0B           jmp  short loc_60B37ovr206:116C      ; ---------------------------------------------------------------------------ovr206:116Covr206:116C      Ordos:                 ; CODE XREF: selectTeam+1AEjovr206:116C BE 02 00          mov  si, 2ovr206:116F EB 06           jmp  short loc_60B37ovr206:1171      ; ---------------------------------------------------------------------------ovr206:1171ovr206:1171      Harkonnen:               ; CODE XREF: selectTeam+1B3jovr206:1171 33 F6           xor  si, siovr206:1173 EB 02           jmp  short loc_60B37From there it goes to ask "are you sure" and then display the mentat, eventually setting AX to the value from SI and returning.the value from SI is used for the rest of the "selecthouse" function, so it should select the correct TEXT%c file if you where to hack those values to 3,4,5Search: BE 01 00 EB 0B BE 02 00 EB 06 33 F6The only trouble is the harkonnen replacement, but luckily there is a useless jump there giving you two bytes ;)replace the 33F6EB02 with BE040090 (04 for sardaukar) Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted March 27, 2009 Author Share Posted March 27, 2009 Cool, thanks a lot once again! ;DI'll ask you about two more things, then ;)First concerns the House heralds in the build screen and conquest map. For the build screen, the "new" sides have rubbish instead of heralds:For comparison, here's House Atreides' menu:Notice that the selection box on the unit list is blue for the Atreides, and it is flashing, whereas it stays white for the unused sides.On the conquest map, the "new" sides always have the Atreides herald.Would be very nice if you found out how to fix that - I've been unable to identify the code responsible for herald placement.Another thing I'd also like to know is the choice of the Mentat used for House introduction. The Mercenary Mentat is used in the final version, however, it looks like in the earlier builds, each House was introduced by its own Mentat (see attached preview screenshot). This is a more theoretical question though, but it would be interesting to know that too :) Quote Link to comment Share on other sites More sharing options...
segra Posted March 28, 2009 Share Posted March 28, 2009 Ill have to take a harder look at the build screen stuff first, only just started taking a peek at that earlierbut, do you know whats in the files FHARK.WSA, FORDOS.WSA, FARTR.WSA, FREMEN.WSA ?XCC just gives me black Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted March 28, 2009 Author Share Posted March 28, 2009 Ill have to take a harder look at the build screen stuff first, only just started taking a peek at that earlierThanks a lot! :)but, do you know whats in the files FHARK.WSA, FORDOS.WSA, FARTR.WSA, FREMEN.WSA ?XCC just gives me blackIt's the animated planet images for each House (FREMEN.WSA is just a picture of the Fremen). You need to select the appropriate palette in XCC Mixer (which is IBM.PAL for Dune 2) for them to display correctly (put the path of your Dune 2 directory in XCC Mixer's directories setup first, and it will automatically load all palettes it finds in the game PAK files).Talking about different House endings, is it possible to play no ending at all (like the mid-game cutscenes with the Emperor are not played for the unused sides)?There are other topics of interest about Dune 2 which you probably might shed some light onto (they are scattered throughout various threads here in the Dune Editing section):1. The colors on the IX structure are wrong for all Houses except House Harkonnen. This happens because the game swaps certain colors (i.e. considers them remapable areas) that are actually not part of the remap scheme. More info here.Apparently, to solve this problem, the range of palette colors that the game considers remapable should be reduced to exclude these shades of blue that are on the IX structure ::)2. There are three sound files within VOC.PAK that are never used in the game itself - BUTTON.VOC, POPPA.VOC and SANDBUG.VOC. Would be very interesting to know if their original purpose could be found out, and if they could be re-enabled for use once again. Here are more details about unused sounds in Dune 2.3. Another thing concerning sound is the player-controlled sandworm's "yes sir!" etc. etc. quotes, which would be good to disable (for Super Dune 2). We have already determined that the set of unit quotes (which is different for vehicles and infantry) is defined by the unit movement type (Foot/Wheeled/Tracked/Slither etc.), and I even tried to locate this data using string references, but to no avail. On the other hand, unit speech might be defined within UNIT.EMC.4. There has been much talk about unused Fremen and Sardaukar unit sidebar icons that are present in the game files. Apparently, the Fremen troopers summoned by the Atreides palace superweapon were supposed to have different icons (and maybe also different stats) than the regular troopers (probably the same for the Sardaukar troopers), but this feature was not enabled (the icon that depicts two Fremen units is used for the palace button though). Would be nice to know if this feature is still present and might be re-enabled.5. The tech tree differences between the Houses are not all defined in the sections modifiable via Nyerguds' editor. In fact, there are certain deviations like the Harkonnen WOR accessible at level 2 (instead of 5) and not requiring the Barracks to be built first and the like, which are not reflected in the general unit/building data section at all (read the full list here). So far, we have been unable to locate related code parts in the EXE.It would be very nice if you looked into any of this when you've got time, as solving some of these issues could enhance Dune 2 gameplay :) I also thought bringing these questions up at once in this thread would be interesting to other people as well. Quote Link to comment Share on other sites More sharing options...
jordos Posted March 29, 2009 Share Posted March 29, 2009 Don't forget the Deviator only deviating units to the Ordos side instead of the side who owns the Deviator. :) Quote Link to comment Share on other sites More sharing options...
segra Posted March 29, 2009 Share Posted March 29, 2009 ok i found the location the team mentat screen is chosen, but i cant seem to find a version which uses those for the house introduction... which exe do you have?Anyway,The function this code is located in is called from the house selection, as well as the game briefingovr206:0E50 FF 36 2C 3A        push  houseHumanID  <<ovr206:0E54 FF 76 0C          push  [bp+arg_6]ovr206:0E57 FF 76 0A          push  [bp+arg_4]ovr206:0E5A 9A 20 00 DD+        call  sub_42DF0From the intro itself, the call is made atovr206:1363 E8 DE FA          call  near ptr sub_60804just prior to this,ovr206:132C C7 06 2C 3A+        mov  houseHumanID, 5 <<that line chooses which mentat screen should be shown, but changing it doesnt really help as the facial movements get all screwed up as soon as he talksill need to see that exe :) Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted March 29, 2009 Author Share Posted March 29, 2009 Hm, looks like you've found the choice of the CPS image (e.g. MENTATA.CPS for the Atreides Mentat), but the facial animations SHP file (here still MENSHPM.SHP for the Mercenary Mentat) is defined separately somewhere else. Interesting.Don't forget the Deviator only deviating units to the Ordos side instead of the side who owns the Deviator. :)Right, I forgot about that. We also wanted to know whether it was possible to make the Deviator change the affected units' ownership to the player's and not always to Ordos.BTW, the House selection changing solution you described did not work: when I change any of the House IDs the screeen just goes black when this House is selected :(Oh, and yet another issue concerning Super Dune II: Classic Edition/Dune 2 eXtended: on the score screen, the score bars for the "new" sides always have the blue Atreides color, yet normal Houses have the bar colored in the appropriate House color - any way to fix that, too? Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted April 2, 2009 Author Share Posted April 2, 2009 ok i found the location the team mentat screen is chosen, but i cant seem to find a version which uses those for the house introduction... which exe do you have?<...>ill need to see that exe :)That's a screenshot from the pre-release version. I took it from Westwood Studios FTP. But maybe the Dune 2 Demo EXE is worth looking into? There are definitely some things missing from the official releases (like LemonFactor, Voice, Special and other variables not being hard-coded)In the meantime I've solved the problem with the facial animations: you've got to look for the C7 06 2C 3A a couple more times in the EXE (BTW, it's C7 06 9C 34 for the US release). For some reason, the facial animation SHP is defined twice: one time for the initial House selection when you start a game from the main menu, another for the House selection when you choose to "Pick another house" during a mission. Weird... Anyhoo, here's the result: the Bene Gesserit lady is back. She does not replace the actual Mercenary Mentat, but only appears on the introduction screen (I made her into the Atreides Mentat for this purpose).However, I've noticed that no matter which side's Mentat introduces the Houses, the sound played when a House is selected (e.g. "House Atreides") still belongs to the Mercenaries - and it's not that the game always plays MATRE.VOC, MHARK.VOC, MORDOS.VOC etc. - it will play the files from the set which is currently assigned to the Mercenaries via the Voice parameter (in case of Super Dune II: Classic Edition, it's the Ordos voice set). Would be nice to have the ability to modify this too :) Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted April 4, 2009 Author Share Posted April 4, 2009 I've got one more question: is it possible to make the game always skip the intro sequence? There should be some "conditional jump" routine waiting for a key to be pressed to skip the intro... Quote Link to comment Share on other sites More sharing options...
segra Posted April 4, 2009 Share Posted April 4, 2009 Yeah I know that variable,Arrakis:dseg:37A8 00 00   IntroSkip   dw 0 Dynasty:dseg:3218 00 00   IntroSkip   dw 0But it doesnt get first checked until after the Westwood logo, its set to 1 if onetime.dat exists, or a savegame/highscore fileI also found this interesting variable...Arrakis:dseg:3794 00 00   gamePause? dw 0 Dyn:dseg:3204 00 00   gamePause? dw 0 Its not really a pause mode, in fact im not sure what to call it... but nothing in the game moves when its setIt also makes it so when u select a team on the house select screen, it skips the "are you sure" and the mission briefingIn game though, theres no fog, no units can move (but u can give them orders), and buildings dont build.also notice, individual tiles can be selected on the ground and the building animations (flag flapping) still occursAnd one more,Arrakisdseg:3792 00 00   gameWin?    dw 0Dyndseg:3202 00 00   gameWin?    dw 0When set to 1, the mission will successfully complete immediately.. and all the following missions until u change it back to 0 Quote Link to comment Share on other sites More sharing options...
segra Posted April 4, 2009 Share Posted April 4, 2009 If u want to skip it completely though,just 0x90 5 bytes from these addressesArrakis: File Address: 0x49D54Dynasty: File Address: 0x48EF4ovr189:1C54 9A 20 00 6F 42          call  j_gameIntroPlayif you do this, it wont play the intro from the menu either tho :( Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.