EventsI'll continue on with the second section of the file. This section describes how events affect the event portion of your morale. This section is mostly a list of how certain events affect morale, followed by the eventMorale decay rate EVENT_DEC_RATE (described in my first post).
KID_DIESADULT_DIESThese two are used whenever colonists die. This can be from natural death rates, starvation, or building explosions. The eventMorale is updated as follows:
Player[i].eventMorale += numDeadKids * KID_DIES + (numDeadWorkers+numDeadScientists) * ADULT_DIES
Note that KID_DIES and ADULT_DIES are meant to be negative, and so this will decrease your morale when these events happen. Setting these values positive will cause you to gain eventMorale when someone dies. (I set both to 800, and morale started sky rocketing when a child died. :blink: Maybe it was Dennis the Menace or something?)
KID_BORNThis is used when children are born AND totalPopulation (numKids + numWorkesr + numScientists) < 125. If this is the case, then eventMorale is updated as follows:
Player[i].eventMorale += numNewKids * KID_BORN
If totalPopulation >= 125 then eventMorale is updated as follows:
Player[i].eventMorale += numNewKids
TECH_SCHOOLThis is used when workers are trained AND totalPopulation < 125. If this is the case, then eventMorale is updated as follows:
Player[i].eventMorale += numNewWorkers * TECH_SCHOOL
If totalPopulation >= 125 then eventMorale is updated as follows:
Player[i].eventMorale += numNewWorkers
PHD_TRAINEDThis is used when scientists are trained AND numScientists < 40. If this is the case, then eventMorale is updated as follows:
Player[i].eventMorale += numNewScientists * PHD_TRAINED
If numScientists >= 40 then eventMorale is updated as follows:
Player[i].eventMorale += numNewScientists
NEW_TECH_BORNThis is used when research of a technology is completed. When research is completed, eventMorale is updated as follows:
Player[i].eventMorale += NEW_TECH_BORN
CC_BORNThis is used when construction of a new Command Center finishes. When construction finishes, eventMorale is updated as follows:
Player[i].eventMorale += CC_BORN
GOOD_BUILD_DIESREG_BUILD_DIESThese values are used when a building is lost. The value that is used depends on which type of building is lost. The following are "Good" buildings:
- Nursery
- Medical Center
- Residence
- Advanced Residence
- Reinforced Residence
If one of the above buildings dies, eventMorale is updated as follows:
Player[i].eventMorale += GOOD_BUILD_DIES
If the building that was lost was not one of the above buildings, then eventMorale is updated as follows:
Player[i].eventMorale += REG_BUILD_DIES
ENEMY_GOOD_DIESENEMY_BAD_DIESThese values are used when you kill an enemy building. The value that is used depends on which type of building was destroyed. The following are "Good buildings:
- Nursery
- Medical Center
- Residence
- Advanced Residence
- Reinforced Residence
If one of the above buildings is killed, eventMorale is updated as follows:
Player[i].eventMorale += ENEMY_GOOD_DIES
Note that ENEMY_GOOD_DIES is set by default to -800. So killing one of these "Good" buildings will severly hurt your morale.
If the building that is killed is an
Advanced Lab then eventMorale is updated as follows:
Player[i].eventMorale += ENEMY_BAD_DIES
By default, killing a "Bad" enemy building will help you morale. Note that the Advanced Lab is the only building in the "Bad" category. There is no morale effect for killing other building types. (Only for having one lost).
Note: The above lists for "Good" buildings are the same. However the "Regular" and the "Bad" lists differ by the Advanced Lab. If you kill a regular building, it will not affect your morale, but killing a bad building (an Advanced Lab) will, and by default, killing a bad enemy building will help your morale.
ENEMY_VEH_DIESThis value is used when you kill an enemy vehicle. If you kill your own unit, there will be no effect here. The eventMorale is updated as follows:
Player[i].eventMorale += ENEMY_VEH_DIES
Note: When a unit dies, it checks which unit killed it, and performs the above eventMorale update on the owner of that unit. At this time, it is not known how the index of the attacking unit is updated. (In particular, the affect of explosions, or chain reactions of explosions, is unknown).
DISASTER_NO_WARNDISASTER_WARNEDThese values are used when a certain disasters appear. It does not matter if the disaster hits you directly, or if it appears all the way on the other side of the map. The appearance of a disaster will affect all players equally in this respect. (If the disaster kills a building, then there are additional eventMorale implications of buildings being lost). Only 4 disaster affect eventMorale in this way.
- Quakes
- Storms
- Meteors
- Vortexes
The other disasters have no affect on eventMorale when they appear. If you have the tech to warn against the disaster, the effect on eventMorale is as follows:
Player[i].eventMorale += DISASTER_WARNED
Otherwise, the effect on eventMorale is as follows:
Player[i].eventMorale += DISASTER_NO_WARN
Note that early warning of disasters from an EDWARD satellite does
not count as an early warning in the morale calculation.
CONSUMER_GOODS_1CONSUMER_GOODS_2CONSUMER_GOODS_3These values are used when goods at a consumer goods factory are completed. If Impulse Items are completed, CONSUMER_GOODS_1 is used. If Wares are completed, CONSUMER_GOODS_2 is used. If Luxury Wares are completed, CONSUMER_GOODS_3 is used. The resulting effect on eventMorale is of the form:
Player[i].eventMorale += CONSUMER_GOODS_X
I would like to point out that the only truly "random" event which affects morale is disasters. But since the appearance of disasters affects all players equally (in terms of eventMorale), no matter where the disaster appears, the effects are essentially fair. The only unfair aspect, is if the disaster appears over your base/units and causes some real damage. In this case, you could take an eventMorale hit if a building is destroyed.