Giza does not spawn its Bonus Herd

  • Game Version: V.100.18.21333.0

  • Build Number: 545621R

  • Platform: Steam

  • Operating System: Windows 11

Issue: Giza’s bonus herd is not programmed to spawn

Giza’s code is currently formatted as follows:

   int bonusHerdID = rmObjectDefCreate("bonus herd");
   rmObjectDefAddItem(bonusHerdID, cUnitTypeGoat, xsRandInt(2, 3));
   rmObjectDefAddConstraint(closeHerdID, vDefaultAvoidEdge);
   rmObjectDefAddConstraint(closeHerdID, vDefaultHerdAvoidAll);
   rmObjectDefAddConstraint(closeHerdID, vDefaultHerdAvoidImpassableLand);
   rmObjectDefAddConstraint(closeHerdID, vDefaultAvoidTowerLOS);
   rmObjectDefAddConstraint(closeHerdID, stayInOasis);
   addObjectLocsPerPlayer(closeHerdID, false, xsRandInt(1, 2) * getMapSizeBonusFactor(), 70.0, -1.0, avoidHerdMeters);

As you can see in Giza’s code, it declares a bonus herd variable, but then adds constraints to close herd and places close herd again within the same line of code and the bonus herd variable goes unused.

Here is what I assume it should be:

   int bonusHerdID = rmObjectDefCreate("bonus herd");
   rmObjectDefAddItem(bonusHerdID, cUnitTypeGoat, xsRandInt(2, 3));
   rmObjectDefAddConstraint(bonusHerdID, vDefaultAvoidEdge);
   rmObjectDefAddConstraint(bonusHerdID, vDefaultHerdAvoidAll);
   rmObjectDefAddConstraint(bonusHerdID, vDefaultHerdAvoidImpassableLand);
   rmObjectDefAddConstraint(bonusHerdID, vDefaultAvoidTowerLOS);
   rmObjectDefAddConstraint(bonusHerdID, stayInOasis);
   addObjectLocsPerPlayer(bonusHerdID, false, xsRandInt(1, 2) * getMapSizeBonusFactor(), 70.0, -1.0, avoidHerdMeters);

Lol I just looked at an older version of the script I have saved:

   int bonusHerdID = rmObjectDefCreate("bonus herd");
   rmObjectDefAddItem(bonusHerdID, cUnitTypeGoat, xsRandInt(2, 3));
   rmObjectDefAddConstraint(closeHerdID, vDefaultAvoidEdge);
   rmObjectDefAddConstraint(closeHerdID, vDefaultHerdAvoidAll);
   rmObjectDefAddConstraint(closeHerdID, vDefaultHerdAvoidImpassableLand);
   rmObjectDefAddConstraint(closeHerdID, vDefaultAvoidTowerLOS);
   rmObjectDefAddConstraint(bonusHerdID, stayInOasis);
   addObjectLocsPerPlayer(bonusHerdID, false, xsRandInt(1, 2) * getMapSizeBonusFactor(), 70.0, -1.0, avoidHerdMeters);

Clearly someone saw something wasn’t right and tried to fix it, they just edited the wrong parts. Instead of changing the constraints to match bonus herd, now the bonus herd just doesn’t spawn at all.

I guess technically it’s functionally the same when you’re actually playing the map since the close herd spawns again with the new stats, it’s just funny the bonus herd is declared and then unused.

1 Like

That’s awesome you picked that up or even have older versions documented, thanks for noticing Guffuhire.

P.S. I am a big fan of your checkboard map and Hearts of the Empire map pack. I find your unique map generations awesome, I am too scared to do something similar for stability (and inexperience) reasons so I have only do the basic most stuff.

1 Like