Author Topic: Brood Pit's attacking-from-base morale bonus stacks with Children's Creche  (Read 4433 times)

0 Members and 1 Guest are viewing this topic.

Offline EmpathCrawler

Re: Brood Pit's attacking-from-base morale bonus stacks with Children's Creche
« Reply #30 on: September 30, 2020, 09:25:58 PM »
I'm attaching my morale calculating spreadsheet. Ignore the last sheet because that was my first draft. I had the boolean options rendered quite nicely as checkboxes in Google Sheets but that didn't survive the export, oh well.

The first sheet is the algorithm as-is but including the riot fix.

The second sheet is the same algorithm with a few changed or tweaked parts addressing the most obvious bugs or mistakes in the math. I haven't iterated through all the combinations here. It might still spit out odd values.

The third sheet was just an example idea that tries to interpret the various sources of information into a coherent calculation.

Offline scient

Re: Brood Pit's attacking-from-base morale bonus stacks with Children's Creche
« Reply #31 on: October 01, 2020, 05:07:09 AM »
Nice break down! I'm just wrapping up testing some of other functions. Will see about proposing some code fixes this weekend.

Offline scient

Re: Brood Pit's attacking-from-base morale bonus stacks with Children's Creche
« Reply #32 on: October 05, 2020, 02:45:36 AM »
So I've been looking over everything, still haven't figured the best way to handle the SE morale. However, two simple fixes would be BP/CC double bonus and defending HQ.

Removing the double Brood Pit bonus when Children’s Creche is present is simple. I think it's pretty clear from manual and in game text files it should be an either/or situation. This is done by removing the following code segments:
From here to here and from here to here.

For +1 in defending HQ, you could insert above here the following code:
Code: [Select]
if (has_fac_built(FAC_HEADQUARTERS, baseIDDef)) { // bug fix: per manual
morale++; // "Units in a headquarters base automatically gain +1 Morale when defending."
}

Offline EmpathCrawler

Re: Brood Pit's attacking-from-base morale bonus stacks with Children's Creche
« Reply #33 on: October 05, 2020, 10:41:17 PM »
So I've been looking over everything, still haven't figured the best way to handle the SE morale. However, two simple fixes would be BP/CC double bonus and defending HQ.

Removing the double Brood Pit bonus when Children’s Creche is present is simple. I think it's pretty clear from manual and in game text files it should be an either/or situation. This is done by removing the following code segments:
From here to here and from here to here.

For +1 in defending HQ, you could insert above here the following code:
Code: [Select]
if (has_fac_built(FAC_HEADQUARTERS, baseIDDef)) { // bug fix: per manual
morale++; // "Units in a headquarters base automatically gain +1 Morale when defending."
}

Nice, that is all the lowest hanging fruit. The HQ bonus would have been really helpful for an AI Morgan I just wormed to death in my latest game.

As for the rest, I see these as the major contradictions that could make the math a lot easier if addressed:

1) The Creche MORALE-based adjustment, but not the Pit one, is doubly applied to conventional units if that unit is both homed in a Creched base and defending/sortieing from a Creched base. First in morale_veh, then in get_basic_offense/get_basic_defense. Why? Everything says that the Children's Creche effect is on units in the base square with no mention of the home base.

1b) Why does the Creche and Pit affect worms based on MORALE, anyway? You quoted helpx earlier saying the Brood Pit canceled lifecycle penalties, but there aren't any nor does MORALE affect lifecycle. Maybe whoever added the Brood Pit code didn't know that?

2) The Creche math is really wacky. What were they trying to do? I tried to make it simpler with no surprises in my sheet. Maybe it would make more sense without the duplication of effects, but I didn't model that yet.

3) The manual says that the Creche cancels all negative morale modifiers, but that is not true. It doesn't affect the (undocumented) home drone riot penalty or Soporific Gas Pods. Should it?

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Our scientists now use fractal theory to 'teach' the molecules to assume, or resume, a particular form. Substances of amazing strength become simple once the formulae are properly computed.
~Col. Corazon Santiago 'The Council of War'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 37.

[Show Queries]