Poll

What is the bug?

A unit attacking from a base with a creche should get no bonus for -MORALE, but no penalty either
1 (33.3%)
The unit should get the penalty as well; the creche effect should be for defenders only.
2 (66.7%)
Even a unit "defending with its weapon" (i.e. interceptor or artillery duel) should not benefit from the creche.
0 (0%)

Total Members Voted: 3

Author Topic: Children's Creche and Brood Pit Bug(s) Thread  (Read 3052 times)

0 Members and 1 Guest are viewing this topic.

Offline Dio

Children's Creche and Brood Pit Bug(s) Thread
« on: June 29, 2015, 09:15:35 PM »
As of Yitzi's unofficial patch version 3.4, the Children's creche morale bonus for units attacking in the base square equals 1 - (negative morale Modifier). For example, with -4 MORALE, all units in the base square get +4 Morale while attacking. In addition, this bug allows units to exceed the usual limit of +50% on attacks. As an example, a elite unit owned by a faction that has -4 MORALE, and is in a base with a Children's Creche, gets +100% while attacking. This particular bug applies to both the Brood Pit and Children's Creche Facilities. Presently, I know the operation at address 005016AA controls the application of the attack bonus for the Children's Creche Facility.
« Last Edit: June 29, 2015, 09:30:58 PM by Dio »

Offline Dio

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #1 on: June 29, 2015, 09:27:59 PM »
The method I used to make the Children's Creche Facility morale bonus function as described in the help.txt file was to replace all commands from 0050167A to 005016AB with nop's. However, this still leaves the (+) morale display to fix.
« Last Edit: June 29, 2015, 10:09:49 PM by Dio »

Offline Dio

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #2 on: June 29, 2015, 10:08:12 PM »
The method I used to make the Brood Pit Facility Morale Bonus function as described in the help.txt file was to replace all commands from 00501789 to 00517BA with nop's. In addition, I also needed to replace the operation at address 005171C with an nop because sporelaunchers and other psi units were getting an additional +1 Morale on top of the bonus recieved by the bugged children's creche. This again still leaves the (+) display aspect to fix.

Offline Dio

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #3 on: June 29, 2015, 10:54:32 PM »
It appears as though my changes will not fix this particular problem because they cause negative morale modifier for Social, MORALE to not operate. Regardless, this problem gave me knowledge about the location of the procedure that controls the morale bonus and penalities.

Offline Dio

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #4 on: June 30, 2015, 05:06:01 PM »
After some reconfiguring, I have figured out a method that will for the most part work based upon the code from the original SMAX game. The way that the Children's Creche effects morale currently is that it negates all negative morale modifiers for units that are produced at the base. However, it does negate the halved + modifiers from -2 MORALE or lower. As an example, first take a base controlled by a faction with -4 MORALE. If a base owned by the above faction has a command center, children's creche and bioenchancement center; when the faction builds a land unit at that base, the unit will start out at Disciplined. In addition, with the changes I plan to implement, units in any base with a children's creche would then receive +1 Morale. This means a Disciplined unit would receive a +12% morale bonus while attacking from within the base.
   This leads to my question. This particular change would still allow any elite units to exceed the +50% bonus. However, it is far better than it was before I fixed the bug because elite units controlled by a faction with -2 MORALE or less would only get at most +62%. Is this feature a bug? What is your opinion on the matter?

Offline Dio

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #5 on: July 02, 2015, 06:45:53 PM »
I found where the Graphics for Morale + and - signs are controlled :). This means I should have all the information required to correct the bug. The procedure starts at 004B3FD0.
« Last Edit: July 03, 2015, 02:26:45 AM by Dio »

Offline Dio

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #6 on: July 03, 2015, 04:39:49 PM »
I also noticed that in scient's last unofficial patch that combining a children's creche with +2 or +3 MORALE bonuses causes the bonus to become negated. I find these bugs annoying to manage because fixing one causes another to appear ;clenchedteeth.

Offline Buster's Uncle

  • With community service, I
  • Ascend
  • *
  • Posts: 49392
  • €55
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #7 on: July 03, 2015, 04:45:06 PM »
Ain't that always the way with this, though?

Offline Nevill

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #8 on: July 04, 2015, 06:10:33 AM »
Quote
This leads to my question. This particular change would still allow any elite units to exceed the +50% bonus. However, it is far better than it was before I fixed the bug because elite units controlled by a faction with -2 MORALE or less would only get at most +62%. Is this feature a bug? What is your opinion on the matter?
It is, since it leads to the faction that has negative morale to be more efficient in combat than a faction with a positive one.

But if that is the only way to fix a bigger bug, maybe it is still worth it?

Is there a way not to apply any of the "+" bonuses to Elite units and cap them at 50%?

Offline Dio

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #9 on: July 17, 2015, 02:47:12 AM »
In the present version (3.4) of Yitzi's Unofficial Patch, Children's Creches also give Mind Worms attack bonuses in bases  ;deidre;.

Offline Dio

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #10 on: July 17, 2015, 02:53:39 AM »
Quote
This leads to my question. This particular change would still allow any elite units to exceed the +50% bonus. However, it is far better than it was before I fixed the bug because elite units controlled by a faction with -2 MORALE or less would only get at most +62%. Is this feature a bug? What is your opinion on the matter?
It is, since it leads to the faction that has negative morale to be more efficient in combat than a faction with a positive one.

But if that is the only way to fix a bigger bug, maybe it is still worth it?

Is there a way not to apply any of the "+" bonuses to Elite units and cap them at 50%?
The way I understand this particular section of the code works in its original form is that the procedure first negates any negative morale modifiers for any units produced at the base. Then, it simply inclements the morale bonus value. However, the bug involves the addition of moral bonuses equal to the negated value.

Offline Dio

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #11 on: July 18, 2015, 12:33:07 AM »
How do you want Children's Creche's and Brood Pits to operate? The way it works currently technically meets the description in the Datalinks which states "All negative $LINK<MORALE=130004> effects are cancelled for units in base square; instead such units receive a +1 MORALE modifier." The negation of negative morale effects appears as the along with an additional +1 sign. However, as stated above, this makes children's creches and Brood Pits hideously broken when combined with negative Morale Modifiers.

Offline Nevill

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #12 on: July 18, 2015, 12:45:39 AM »
For a unit in base tile, if the unit's Morale < Hardened => Set the bonuses so that it fight as is it was Hardened (at a +12% bonus).
Meaning Very Green units get +++, Green units get ++, and Disciplined get + modifiers to Morale.

Should not affect Native units.

Brood Pits should act in a similar way for Native units.

The building bonuses should not be affected in any way by the faction's MORALE setting. The description does not mention anything about the units produced in the base, only about the ones that are stationed there. Factions with very low MORALE score would still get their Very Green units, it's just they are going to fight better while inside the bases with Creches.

Offline Yitzi

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #13 on: August 28, 2015, 11:42:39 PM »
So: Clearly -MORALE should not give a bonus to units attacking from a base with a creche, but should they have the MORALE penalty negated, or should that be for defenders only?  (I'll add a poll on the topic.)

Offline Nevill

Re: Children's Creche and Brood Pit Bug(s) Thread
« Reply #14 on: September 03, 2015, 01:22:49 PM »
I have delved a bit deeper in the morale business, and created my own poll about (+/-) signs.

As it seems to be connected with the issue in question, I'd like to re-evaluate my stance on this poll and vote for the second option, if only to have some measure of consistency across the game:
"The unit should get the penalty as well; the creche effect should be for defenders only."

The Cheche description specifically talks about defense:
Quote
Proper care and education for our children remains a cornerstone of our entire colonization effort. Children not only shape our future; they determine in many ways our present. Men and women work harder knowing their children are safe and close at hand. And never forget that, with children present, parents will defend their home to the death.

 

* 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

Although Planet's native life is based, like Earth's, on right-handed DNA, and codes for all the same amino acids, the inevitable chemical and structural differences from a billion years of evolution in an alien environment render the native plant life highly poisonous to humans. Juicy, ripe grenade fruits may look appealing, but a mouthful of organonitrates will certainly change your mind in a hurry.
~ Lady Deirdre Skye ‘A Comparative Biology of Planet’

* 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: 47 - 1280KB. (show)
Queries used: 48.

[Show Queries]