Jump to content

HyperPatch for Dune2k - Development Topic


Recommended Posts

Posted

Hello!

This topic shall be used for all questions and bug reporting regarding the Dune2k patch i am working on, aswell as Dune2k bugs, and glitches.

I will never say for sure when i will have something done, but you can be sure that im always working on this patch, as the many others i do.

HyperPatch for Dune2k

Status: Active

Current Version: Internal Build

Wish List

Accepted

# High Resolution (at least 1024x768 variable)

# Add keyboard command keys {B}uild and {P}lace like Dune II

Researching

# Running the game in a desktop window

Rejected/Impossible

Updates

Update - 22nd October 2009

Resolution:

The screen resolution allocation code in Dune2k is much like that of Red Alert 95, a pain in the arse. So where i spent months working out Red Alert 95 non stop, i will have to do so with Dune2k, but i will sure the post updates!.

Debug Logging:

When games programmers are coding a game, most of the time they like to squeeze in little debug strings, so they can see what function the game is currently executing, or even down the byte operand values. Depending on the user, this can some times be of use.

Here is a link to what could be, the first version of HyperPatch for Dune2k, but is not, its just something i would like people to report back on for me;

<a href="http://www.ts-recoil.ppmsite.com/patch/d2k/builds/hpd2k_0_10.rar">Download Here</a>

I would ask a few of the experienced users to perhaps play skirmish for a while and then quit the game, then go to your Dune2k installation folder and find the file called "DUNE2000.LOG", and please attach it to your post so i can see that everyone is able to use this feature without any problems. :)

Update - 23rd October 2009

Well, let me explain this image below...

#1 The game is running in a desktop window, the code needs fixing but its possible if your screen depth is 16bit.

#2 Screen resolution can be changed quite easy, the code i used a while back though was bugged and hindered my research.

#3 I can move the menu vertically with ease.

dune2k_1024_768_test03.png

Progress is progress...

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

Please feel free to post suggestions, questions or bugs

-CCHyper

Posted

Great of you to work on a patch. The resolution looks to me to be very hard to change. Correct me if I'm wrong, but in all the .uil files at the top it says 640x480 as resolution and the 'parts' in the .uil are also fixed in that space... Perhaps you could make a script that changes all those value's automatically, but I'm afraid that it won't be that simple of a fix... not sure thought.

Mvi knows a lot more about the game code then me, perhaps he can help you. :)

edit: What did you change in dune2000.exe?

Posted

I know he expanded the exe file so it has tons of empty space to write new code in, but for the rest, well, from his description and request I'd assume he enabled the debug logging function to see what kind of output it gives in a skirmish or campaign  game.

btw, Hyper, this Build/Place logic does mean you need to remember the last building that was built, and keep in mind that the construction options might be changed in between (e.g. losing a factory)

On that note, in D2K, are prerequisites enforced after losing a structure? I know in C&C1, if you lose or sell a prerequisite structure, you still keep the construction options unless you lose and rebuild the factory the construction option was for.

Posted

Wow. That shows a lot of stuff in the log. Cool thing.

Here some stuff it shows (the game does get slower because of it):

The log was 3 MB for just 10 sec play... too big too upload.

Wignet:  Initialise

Wignet:  Initialise Done

Wignet:  Set Mode

Wignet:  Set Mode DONE

GetNetworkTypes

Failed Initial IPX query

GetNetworkTypes DONE

CloseSession

CloseSession DONE

Wignet:  Destructor

CloseSession

CloseSession DONE

Wignet:  Destructor DONE

Resetting....

Posted

On that note, in D2K, are prerequisites enforced after losing a structure?

As soon as you lose a structure all dependent tech tree options are disabled again.

I can't test this patch at the moment as I'm at work, are there any other features of this patch besides logging debug strings to a file. (Strange that the game was released with debug data still present.)

Posted

At the moment that seems to be the only thing. He needs to collect data to help him identify the stuff in the exe. The general way in which all things are loaded is pretty handy to know.

And no, it's not so strange... tons of games keep debug strings in them. Once the actual logging function is removed, it doesn't do anything anyway. C&C1's full of them too. Just stuff like "loading extra SC*.MIX archives", "entering function Load_Scenario"... stuff like that.

As for the prerequisites updating, that's pretty important info. It means that whenever a structure is removed, the "B" function needs to check whether the structure construction it'll try to start is still there in the first place.

Posted

Great of you to work on a patch. The resolution looks to me to be very hard to change. Correct me if I'm wrong, but in all the .uil files at the top it says 640x480 as resolution and the 'parts' in the .uil are also fixed in that space... Perhaps you could make a script that changes all those value's automatically, but I'm afraid that it won't be that simple of a fix... not sure thought.

Mvi knows a lot more about the game code then me, perhaps he can help you. :)

edit: What did you change in dune2000.exe?

Its possible the .UIL files have something to do with the resolution allocation, but i dunno yet...

It would be cool to chat with MVI some more, perhaps he can help me with enumerations :)

The log file got pretty huge? What with? AI Commands?

Hyper, this Build/Place logic does mean you need to remember the last building that was built, and keep in mind that the construction options might be changed in between (e.g. losing a factory)

Righto, ill keep note of that.

Hmm, some of the strings at the end seem to be missing n behind em...

Yep, i had to add a 0x0A at the end of some strings, but some strings will require them to be moved.

Heres a example of Tiberian Suns leftover debug strings...

----- Starting scnenario: G_CANYON.MAP -----
Player Count: 1
Reading scenario: G_CANYON.MAP
Scen->IsRandom = false
Read_Scenario_INI - Filename is G_CANYON.MAP
Clearing old scenario
Map.Init_Clear()
MapClass::Init_Clear entry
MapClass::Init_Clear done
RadarClass::Init_Clear
RadarClass::Init_Clear done
Logic.Init()
CurrentObjects.Clear()
Scen->Clear_All_Waypoints()
Init_Campaigns()
Creating new tactical map
Initializing Theater
Init theater TEMPERATE
Calling Prep_For_Side()
Preparing Mixfiles for Side 00.
    Initializing SIDEC01.MIX
    Initilizing SIDENC01.MIX
RadarClass::Init_For_House()
Initializeing Rules
Processing sides.
Side 0: GDI
  GDI
Side 1: Nod
  Nod
Side 2: Civilian
  Neutral
Side 3: Mutant
  Special
Calling Prep_Speech_For_Side()
    Initilizing SPEECH01.MIX
Calling Scen->Read_Global_INI(*RuleINI);
Calling Rule->Addition() with scenario overrides
Processing sides.
Finished Rule->Addition() with scenario overrides
MapClass::Init_Clear entry
MapClass::Init_Clear done
RadarClass::Init_Clear
RadarClass::Init_Clear done
Loaded 356 isometric tiles consuming 1717 Kb
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for Low Bridge
Demand loading image for WD04X
Demand loading image for WD03X
Demand loading image for WD01X
Creating 9 units - Random seed is 0000002f
UniqueID is 0010070f
Multiplayer start waypoint found at cell 35,149
Multiplayer start waypoint found at cell 70,176
Multiplayer start waypoint found at cell 138,241
Multiplayer start waypoint found at cell 203,166
Multiplayer start waypoint found at cell 231,125
Multiplayer start waypoint found at cell 81,90
Multiplayer start waypoint found at cell 143,37
Multiplayer start waypoint found at cell 192,87
Generating units for house 0 (GDI)
House GDI deployed object MMCH
House GDI deployed object MMCH
House GDI deployed object SMECH
House GDI deployed object SMECH
House GDI deployed object SMECH
House GDI deployed object E2
House GDI deployed object E1
House GDI deployed object E2
House GDI deployed object E1
House GDI deployed object E1
House GDI deployed object E1
House GDI deployed object E2
House GDI deployed object E1
House GDI deployed object E1
Generating units for house 1 (GDI)
House GDI deployed object SMECH
House GDI deployed object HVR
House GDI deployed object HVR
House GDI deployed object SMECH
House GDI deployed object SMECH
House GDI deployed object E2
House GDI deployed object E1
House GDI deployed object E1
House GDI deployed object E2
House GDI deployed object E2
House GDI deployed object E1
House GDI deployed object E2
Finished unit generation. Random number is 33112
MessageListClass::Init(Width: 848)
Theme::QueueSong(-2)
SoundVolume = 0.500000
VoiceVolume = 0.500000
ScoreVolume = 0.500000
ScoreRepeat is OFF
ScoreShuffle is OFF
IsTGrowth = 0
IsTSpread = 1
Theme::AI(Next song = 1)
Theme::PlaySong(1) - Playing
Tooltips are on.
Display: Abort_Drag_Select()
Display: Abort_Drag_Select()
Focus_Loss()
Theme::Suspend(1)
Focus_Loss(): _MouseCaptured = true
Release_Mouse()
Focus lost
Focus_Restore()
Focus_Restore(): _MouseCaptured = true
Capture_Mouse()
Theme::PlaySong(1) - Playing
Focus gained
Adding event OPTIONS
Paused ElapsedTimer = 2596808
Tooltips are off.
Display: Abort_Drag_Select()
Scroll: Abort_Drag_Select()
Release_Mouse()
Focus_Loss()
Theme::Suspend(1)
Focus_Loss(): _MouseCaptured = false
Focus lost
Focus_Restore()
Focus_Restore(): _MouseCaptured = false
Theme::PlaySong(1) - Playing
Focus gained
Focus_Loss()
Theme::Suspend(1)
Focus_Loss(): _MouseCaptured = false
Focus lost
Focus_Restore()
Focus_Restore(): _MouseCaptured = false
Theme::PlaySong(1) - Playing
Focus gained
Capture_Mouse()
Resume ElapsedTimer = 2605486
Tooltips are on.
Display: Abort_Drag_Select()

Posted

I've just tried out this modified .exe for about ten minutes. The game ran very slowly.

I've attached a .zip file containing a large .txt file and a .gif file so you can see what I had when I quit. By the way, I quit and restarted skirmish once because I didn't like the position I was in when the game started.

Dune2klog.zip

Posted

As soon as you lose a structure all dependent tech tree options are disabled again.

This is true for units but not the case for structures. The game will only realize that prerequisites for structures are missing if you lose your Construction Yard and then rebuild it.

Example:

Your build an Ix Research Center which enables further construction options like the Palace, the Missile Tank, Sonic Tank, Devastator, and Deviator. The Ix Research Center is destroyed/sold. You will still be able to build the Palace even though you can no longer build Missile Tanks/Sonic Tanks/Devastators/Deviators from the Heavy Factory.

In order for the game to realize that the Palace can no longer be built, the Construction Yard must be destroyed/sold and then rebuilt. The vehicles that required the Ix Research Center will however, disappear from the unit build list.

Posted

Mkay, its pretty obvious that its the AI who causes the files to really build up, so i will disable the AI and most useless debug strings.

If anyone wants me to add strings regarding loading or so of specific objects or so, please let me know :)

Posted

Check the orignal post for an update!

Cool. Thanks for working on this.  :)

Keep us updated!

Do you perhaps also know why the mouse is moving so fast in dune 2000 on virtual pc. It also spins very fast. I can't really play normal.

I attachted the LOG. In a zip it is very small, but as .txt very big.  :)

game is asking me to put cd ! 

Try to load the ISO, perhaps that helps.

edit: on vista 64bit I also don't get it to work... only on virtual pc, I forgot how I installed it there...

DUNE2000.zip

Posted

Well this is the pure 1.06 executable, so if you have a NoCD patched orignal 1.02/1.06, then this will overwrite it, should be simple to understand...

As for the mouse, i do not know, but ill keep a note of it.

Thanks for attaching the log file, it seems that the code for writing it works, so thanks for testing people!

Also, if anyone wants to know, i worked out the file struct of DUNE2000.CFG,

;Start Up
0x00 = byte bool FirstTimePlay

;Network/Skirmish
0x01 = byte int NetUnitCount
0x02 = byte int NetTechLevel
0x03 = byte int NetStartingCredits
0x05 = byte int NetAIPlayers
0x06 = byte bool NetCrates
0x07 = byte int NetWorms
0x08 = 64h char NetPlayerName
0x6C = byte int NetPlayerSide
0x6D = byte int NetPlayerColour

64h char NetIPAddress
64h char NetModemPhone

0x136 = byte int NetSerialComPort

;Game
0x137 = dword int ScrollSize
0x13B = word int LimitedModelPct
0x13D = dword int GameBitsPerPixel
0x141 = dword int SFXVolume
0x145 = dword int CDVolume

;WOL
0x149 = byte bool AllowFindUser
0x14A = byte bool AllowPageUser
0x14B = byte bool LanguageFilter

0x14C = byte bool ShowAllGames
0x14D = byte bool Microphone

Posted

Meh, triple post, but its all in good faith :P

If for now, i could only lock the game to one higher resolution, what would be best? Is 1024x768 good enough?

Posted

Meh, triple post, but its all in good faith :P

If for now, i could only lock the game to one higher resolution, what would be best? Is 1024x768 good enough?

I have a 22" that is 1680x1050, but not everybody has that so I think going from  640x480 to 1024x768 would be a huge improvement already. :D

edit: you sure know a lot about editing/hacking the game. keep up the great work.

Posted

can you do that on cracked  exe ?

perhaps TSHyper can make a patch, that changes/updates the .exe to other resolution, but does not change the .exe more, so the no-cd still works. this way TSHyper does not need to distribute illegal .exe. :)(if no-cd exe is illegal I'm not sure...)

edit: TSHyper, one thing that is on my wishlist it to quote more units. Like build 5 infantry with one click. that would be nice. :)

Posted
One thing that is on my wishlist it to quote more units. Like build 5 infantry with one click. that would be nice. :)

Unit queuing, ill see what i can do...

1024x768 would be surely enough...

but even 800x600 would be a nice step forward :P

Heh, well i think 1024x768 is a nice inbetween, perhaps i should include a ratio for windscreen too, like 1024X576...

crack works only for dune2000.dat  i have cracked it and got message - crack already applied..

The patched executable i have up for download is the Dune2000.dat renamed to .exe, and its more than likley that if you try and crack my exe, you will get a crc size mismatch.

I have plans to include a type of "NoCD" that you can enable/disable.

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.