Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

I found where the reversal happens.

GameRules.ms, Lines 17, 18, 26, and 27 read:

winner = (rnd < p)

spaceForces[1 - winner] -= 1

...

winner = (rnd < p)

landForces[1 - winner] -= 1

...

The way "winner" is treated in Lines 18 and 27, "winner" is SUPPOSED to represent "which side (0 or 1) won a specific round of combat".  (dialogs.ms always treats the Empire as side 0 and the Independent planet as side 1.)  HOWEVER, "p" is SUPPOSED to be the probability that side 0 wins a round of combat.

If side 0 has a large tech advantage over side 1, then "p" is large, "rnd" is more likely to return a number less than "p", "rnd < p" is more likely to return 1, which makes "winner" equal to 1, then spaceForces[1-1] (in other words, spaceForces[0]) is decremented, and the victorious Empire loses a ship.  :P

...

This is an easy fix.  Lines 17 and 26 must both be changed to

winner = (rnd > p)

to fix this problem.  This should work properly even if this code is later used for fights not involving the Empire.

Wow, great work!  I will go over all of this this weekend, but I am sure you are right.  I'll update the build on itch.io.  Thank you for your contribution — this is what open-source is all about!  ❤️

Change confirmed and integrated!  Thanks again for catching this.  You've made the game better for everyone!

(+1)

Yeah, you basically had the game on "Idiocracy" (2006) rules: the more advanced the civilization, the worse they are at fighting.  :P  [snickers]

Glad to be of help!  :D