Jump to content

Dune 2 score Algorithm and several problems I encountered


BlackThorny

Recommended Posts

Well I Started playing Dune 2 : The Building of a dynasty a couple of days ago, and wanted to achieve the maximal score possible in every mission.

I found out that on map one as Ordos, I could get a score of 135 or so when I took 45 minutes to:

Mop up all spice available, build on every piece of land I can concrete (beside ones that are too small), kill all enemy units without losing any of my own, all map revealed.

I got a score of 91/2 or so when I only kill all the enemy units (with no deaths on my part) and harvest as little spice possible - No Slabs, One Harvester trip.

This was possible within 11 minutes. All my buildings were 50% obviously.

Doing the same with only 1 enemy unit killed (the only one that attacks by itself) and no additional map exploration was possible within 4 minutes and generated a score of 90.

Going back to a save I made before wining and repairing all buildings and waiting for the next harvester trip took 6 minutes and generated a score of 88.

When I waited for 3 hours doing nothing (no harvest other then to replenish the amount of decayed spice, repair, etc) the score went down to 30.

- A point deducted for every 2-3 minutes?

On the next stage I forced the AI to keep building a single heavy trooper I kept squashing with my harvester. This took a while to organize as I had to eliminate all other units and then surround the wor with my units that don't harm it (by ordering them to attack an empty space) and all this was made while sending another unit to reveal the rest of the map to destroy the rest of the AI units so they won't interfere with my harvester squashing. I let the AI harvest almost all spice before I started killing it (up to 4 times, see below).

Eventually As the map was mopped I Achieved the rank of 322/3 - Outpost Commander,

After 2h10m,around 2k (AI 23k) spice, 271/2 enemy units killed vs 4 of mine (all of them harvesters), 4 enemy buildings destroyed vs none of mine.

Further investigations were as followed:

- Each enemy unit I killed gave me an additional point.

- Each of my units dying deducted 2-3 points, 4-8 deducted per destructed building.

I still can't figure out how score is affected by spice harvesting/buildings building, it isn't a percentage calculation vs the AI, but it most definitely is a factor.

Assuming my score continues with me to the next scenario I tried to apply similar tactics, but only got a score of 275... which means the score doesn't carry out.

Also I had around 20 of my units perish during my struggle to make the AI produce only infantry (they are cheaper then quads/trikes) to max my kill score, and this obviously why my score took a blow.

I did encounter several problems on my way:

In most cases, when I have more then one Refinery and a harvester dies out/gets eaten by a worm, I DON'T get a replacement.

Only when my last harvester dies I get another one to replace it. This also stops around the time I get 5 replacements, and then I get stuck with no harvesters at all...

Building additional Refineries does nothing to remedy the problem.

The same applies to AI harvesters, they get a replacement harvester only up till their 5th harvester and then stay with no harvester at all.

At some point the AI harvester stopped going to spice locations, nor did the carryall took it there. trying to kill it only caused it to re spawn up to the limit, but then the carryall just took the re spawned harvester of the map... this happens ever so often when there is no more spice on the map, but this happening even when there is spice was disturbing.

Also my harvesters virtually never switch for the closest refinery. Even when I use the move command, as sure as they reload again they head back to their initial refinery.

I noticed this can be altered at some points, such as when that refinery is occupied it will auto head for another, or when it finishes harvesting at the top of the map and encounter a refinery on the path to another, and then 'mark' it as their own.

I have no idea what version I am using other then it doesn't have a copy protection and has a glitch instead, and my buildings and spice decay over time

(buildings don't decay on the first mission). I also have none of the changes introduced by the 1.07 patch or super dune so it definitely isn't one of those. I use Dosbox 0.74.

I read you speak of a Dune 2: Battle for Arrakis, is this another PC version or is it console only?

Any other information regarding the score mechanics or regarding the bugs will be very appreciated :)

Best Regards,

BlackThorny

Link to comment
Share on other sites

You can use my editor to see which version you got. Just put the d2editor.exe in the Dune II folder and run it, and the game version will appear in the upper right corner of the editor. Note that the editor has a text UI but is not a DOS program; it won't run in DOSBox.

Though if you got none of the 1.07 updates, there's not much choice... there's only the US 1.00 version left.

Battle for Arrakis is the EU version I think... or just 1.07 in general. Not sure.

Link to comment
Share on other sites

First off, thanks for carrying out such an extensive research and posting the results :) The score calculation algorithm in Dune 2 is indeed far from being obvious, but one thing is certain that the more spice you harvest (regardless of whether you spend it or not, or whether it had been processed in the Refinery or is just collected by a Harvester when you win a scenario) , the more score you get, and spice gives you much more points than destroying enemy units.

Going back to a save I made before wining and repairing all buildings and waiting for the next harvester trip took 6 minutes and generated a score of 88.

When I waited for 3 hours doing nothing (no harvest other then to replenish the amount of decayed spice, repair, etc) the score went down to 30.

- A point deducted for every 2-3 minutes?

Here's what I read in a Dune 2 FAQ:

~~~~

Q24. How is the score calculated ?

~~~~

A24. Original Answer: The score doesn't depend on time at all...

The only things that factor in to it are amount of spice harvested, number

of enemy units destroyed and number of enemy buildings destroyed.

Buildings that are taken over don't count as buildings destroyed. To

maximise your score, take time at the end, before destroying the last

building, to harvest all available spice. Even better, let the last

building left be a Refinery, and harvest spice while destroying the

continual supply of Harvesters the computer will get.

According to Joe Bostic, one of the creators of the game, the score is

calculated according to a complex algorithm. There *is* a bonus for

finishing a round quickly. You also get credit for the condition of, and

number of, your own buildings and vehicles. Mostly, you rack up points by

harvesting spice, destroying units, and destroying buildings. That's why

you usually get more points using the 1.07 patch, because the computer

keeps building structures and units.

A super game might be one where you rack up over 1,500 points. However,

if you leave refineries as the enemy's last building, they will continue

to push out harvesters and you can camp out and rack up points as a result.

I have left a game running for hours (six hours, to be exact) under the

patched version, and ran the score up to 3,000 points. Some call this a

"cheat" but I prefer to think of it as research.

I did encounter several problems on my way:

In most cases, when I have more then one Refinery and a harvester dies out/gets eaten by a worm, I DON'T get a replacement.

Only when my last harvester dies I get another one to replace it.

This is the usual thing with Dune 2 (both v1.0 and v1.07) that you get a free harvester only if you have run out of them and don't have the option to build or buy a replacement.

This also stops around the time I get 5 replacements, and then I get stuck with no harvesters at all...

Building additional Refineries does nothing to remedy the problem.

The same applies to AI harvesters, they get a replacement harvester only up till their 5th harvester and then stay with no harvester at all.

Now this is quite weird. The replacements should be brought in indefinitely, and, for example, you can get some extra points by leaving an AI refinery as the last structure and keep shooting the replacement Harvesters it gets. The only explanation I can think of is that the overall unit per map limit (80 ground units regardless of ownership) had been reached, in which case no additional Harvesters will be brought in unless the number of units on the map is reduced.

At some point the AI harvester stopped going to spice locations, nor did the carryall took it there. trying to kill it only caused it to re spawn up to the limit, but then the carryall just took the re spawned harvester of the map... this happens ever so often when there is no more spice on the map, but this happening even when there is spice was disturbing.

Hmm, maybe this is something from v1.0 that was later fixed in v1.07. Odd.

Also my harvesters virtually never switch for the closest refinery. Even when I use the move command, as sure as they reload again they head back to their initial refinery.

This sounds like you've got v1.0, where all Harvesters tend to try to unload in the very first Refinery the player had built.

I noticed this can be altered at some points, such as when that refinery is occupied it will auto head for another, or when it finishes harvesting at the top of the map and encounter a refinery on the path to another, and then 'mark' it as their own.
I have no idea what version I am using other then it doesn't have a copy protection and has a glitch instead, and my buildings and spice decay over time

(buildings don't decay on the first mission).

Actually it's normal: buildings do not decay in the first two missions both in v1.0 and in v1.07, this was only changed in the unofficial fix once TrueBrain found out how to make the buildings decay only if they're placed on incomplete foundations.

I read you speak of a Dune 2: Battle for Arrakis, is this another PC version or is it console only?

Dune 2 was originally released in the US with the title The Builing of a Dynasty (v1.0, which can be patched to v1.07), and re-titled The Battle for Arrakis for the European releases, which are only v1.07 and have support for the German and French languages. Other than that, and some font changes that were made so that the text in other languages would fit on the game menus and interface, the European releases are identical to the US v1.07. The Sega Mega Drive release, on the other hand, is titled Dune: The Battle for Arrakis (without the number 2).

Link to comment
Share on other sites

Thanks Nyerguds, I will check your editor and post the results :)

Thank you MrFilbble for all the info and the kind words!

I already knew what was written in the 'official' faq though, and the changes between what was written there and my version was what left me wondering.

Btw, I don't believe the phenomena I was describing had anything to do with map limits, as I had maxed my units but the AI had nothing but a harvester (+1 temporal unit atm).

Also In my mission 2 the buildings did decay, although being placed on a slab. Only in mission 1 they didn't decay on a slab (but decay without one).

I guess I'll be heading to apply the 1.07 patch, now that I know it's an official one that doesn't alter game experience...

Or is it? you say the AI keeps building now much more often, and this does change stuff a bit.

Also the unlimited harvester 'fix' ruins the whole point in maxing the score on each mission as you can always do nothing in particular and then target the harvester to infinity.

Continuous harvesters though can produce another infinite score boundary: As killing a harvester 50+% full on sand provides more spice then it contains, you basically enable unlimited supply of spice, as long as you keep shooting and killing an enemy harvester after it gains more then half its capacity.

Thanks for explaining the title differences as I did get confused.

I'm actually surprised that more the 15 years after it's release, and no one has yet took the mission to solve the score mechanics of dune 2.

Better get that spice algorithm then, and see if it in fact depends on the AIs performance on the same grounds.

This leaves to investigate the rest of the formula, if indeed the state of your units affects the score (apparently the state of your buildings do not, but maybe their number does).

As my experiments develop I will continue to update this post, and after all elements revealed I will try to check if they alter upon game conditions:

for example building other units instead, maybe check if there's some bonus on special skirmish victories ( like when in one battle a trike defeats a tank)...

And comparing differences between 1.00 and 1.07, if applicable. As the last step, I'll probably reverse engineer the whole schematic to see if I was right ;)

Link to comment
Share on other sites

Also In my mission 2 the buildings did decay, although being placed on a slab. Only in mission 1 they didn't decay on a slab (but decay without one).

Hmm, just to be sure, do you mean by "decay" that a building starts with a certain amount of damage if not placed entirely on slabs, or that it starts losing hit points slowly after some time, even if placed on slabs (which is what is usually called "decay")? Because in both Dune 2 v1.0 and v1.07 buildings do not decay in missions 1 and 2, regardless of whether they're placed on slabs or not, but they will be damaged if placed on incomplete foundation or bare rock in any mission (i.e. if you place a structure on bare rock with no slabs at all, it will start with 50% hp).

I guess I'll be heading to apply the 1.07 patch, now that I know it's an official one that doesn't alter game experience...

You should really check what version you have, because if it's not the US v1.0 (or if it's hacked to remove the copy protection), you won't be able to apply the patch at all. For starters, take a look at the bottom right corner of the main menu screen of your version, the version number should be indicated there.

Or is it? you say the AI keeps building now much more often, and this does change stuff a bit.

Also the unlimited harvester 'fix' ruins the whole point in maxing the score on each mission as you can always do nothing in particular and then target the harvester to infinity.

Look, I haven't checked Dune 2 v1.0 in a while, but I think it has the same unlimited number of free harvester replacements for both the AI and human players.

I'm actually surprised that more the 15 years after it's release, and no one has yet took the mission to solve the score mechanics of dune 2.

Better get that spice algorithm then, and see if it in fact depends on the AIs performance on the same grounds.

I remember that TrueBrain mentioned somewhere once that the harvested spice stats for the AI that are shown on the score screen are mostly bogus.

As my experiments develop I will continue to update this post, and after all elements revealed I will try to check if they alter upon game conditions:

for example building other units instead, maybe check if there's some bonus on special skirmish victories ( like when in one battle a trike defeats a tank)...

And comparing differences between 1.00 and 1.07, if applicable. As the last step, I'll probably reverse engineer the whole schematic to see if I was right ;)

Once again, I think it's a good idea to contact the OpenDUNE team through their forums, and see if they can help with the actual game code.

Link to comment
Share on other sites

This is true, otherwise the AI would be helpless once the replacement harvesters had run out, as it never actually builds any. I also think TrueBrain mentioned once that the logic that should turn off a harvester replacement for the player if they are building a new harvester is flawed in some way that makes the player always receive a new harvester regardless of the ability to produce or buy a new one.

I've also checked v1.0, the structures do not decay in both missions 1 and 2, just like in v1.07.

Link to comment
Share on other sites

  • 4 weeks later...

Here's what TrueBrain told me about score calculation (original post here):

During the game there is a 'score' variable:

You gain points by killing units and/or structures.

You lose points by losing units and/or structures.

The rate is always 1% of the buildcost, with a minimum of 1.

When the game ends, this score together with what is harvested is mangled in a function. This returns a new total score. We haven't decoded that function yet, I guess I should; what I can tell is that it walks all structures and units and does 'something' with them. No clue what yet. Will get back to you on it :)

Right, more info:

You get the score as said above.

For every structure you still have standing, you get a few points, depending on the building. It does not depend in which state the building is.

For every 100 credits you get 1 point.

For every minute you finish before the 'deadline', you get one point.

The deadline depends on in which campaign you are. For campaign 1 you get 45 minutes, and for any further campaign you get 45 minutes more. So campaign 2 90 minutes, campaign 3 135 minutes, etc etc.

And that is it! That is how your score is calculated.

Tnx to glx for decoding the function :)

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...