Announcement

Collapse
No announcement yet.

Fixing SMACX Bugs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • In working on my post on BP and native life forms, I noted a problem with the description of morale on p. 159, the description of children's creche on p. 166 and the datalink entry under morale. From p. 159

    Morale

    -4 -3 Morale; + modifiers halved
    -3 -2 Morale; + modifiers halved
    -2 -1 Morale; + modifiers halved

    Under "morale" in the datalinks is the following sentence, "A unit with a "+" sign after its morale possesses a combat bonus from its location in a base with a children's creche."

    So basically a children's creche gives a combat bonus to a unit in the base containing the children's creche canceling out negative morale effects. But the negative morale effects says the bonus from the children's creche is halved for -4, -3 and -2 morale SE.

    So does that mean the children's creche only cancels out half of the negative morale effects? But doesn't this contradict the statement that "All negative morale effects are cancelled for units in base square; instead such units receive a +1 morale modifier." (p. 166)?

    Can you see how to resolve this inconsistency between the description of children's creche and the description of Morale?
    Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

    Comment


    • Originally posted by vyeh View Post
      I've discovered using the scenario editor that social engineering does not affect lifecycle.
      It turns out that there is a limited case in which social engineering affects lifecycle.

      For SE = 2 and 3, on defense, for native life units inside a base (there doesn't need to be a CC or a BP), the defending native life unit gets an extra +1 morale.

      p. 159,

      Morale
      ...
      1 +1 Morale
      2 +1 Morale (+2 on defense)
      3 +2 Morale (+3 on defense)
      4 +3 Morale

      becomes for native life units inside a base

      Morale
      ...
      1 +0 Morale
      2 +0 Morale (+1 on defense)
      3 +0 Morale (+1 on defense)
      4 +0 Morale

      This is definitely a bug!

      Outside a base, there is no defensive kicker at morale SE=2 and 3.
      Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

      Comment


      • There are problems with BP only and native life units on defense.

        For a hatchling in a base with BP and no CC on defense (for reference, if there is no BP and no CC, Hatchling (+): -12%, Strength: 2.18, because very green, hatchling, becomes green, larval mass --bug, +25% base defense and 2 psi defense):

        Morale SE:

        -4: Hatchling (++++): +25%, Strength: 3.12
        -3: Hatchling (+++): +12%, Strength: 2.81
        -2: Hatchling (++): +0%, Strength: 2.50
        -1: Hatchling (++): +0%, Strength: 2.50
        0: Hatchling (+): -12%, Strength: 2.18
        1: Hatchling (+): -12%, Strength: 2.18
        2: Hatchling (++): -12%, Strength: 2.18
        3: Hatchling (++): -12%, Strength: 2.18
        4: Hatchling (+): -12%, Strength: 2.18

        For a boil in a base with BP and no CC on defense (for reference, if there is no BP and no CC, Boil: +12%, Strength: 2.81, because +25% base defense and 2 psi defense):

        Morale SE:

        -4: Boil (+++): +50%, Strength: 3.75
        -3: Boil (+++): +50%, Strength: 3.75
        -2: Boil (++): +37%, Strength: 3.43
        -1: Boil (++): +37%, Strength: 3.43
        0: Boil (+): +25%, Strength: 3.12
        1: Boil (+): +12%, Strength: 2.81
        2: Boil (++): +12%, Strength: 2.81
        3: Boil (++): +0%, Strength: 2.50
        4: Boil (+): -12%, Strength: 2.18

        At the other end, consider a demon boil in a base with BP and no CC on defense (for reference, if there is no BP and no CC, Demon Boil: +50%, Strength: 3.75, because +25% base defense and 2 psi defense):

        Morale SE:

        -4: Demon Boil: +50%, Strength: 3.75
        -3: Demon Boil: +50%, Strength: 3.75
        -2: Demon Boil: +50%, Strength: 3.75
        -1: Demon Boil: +50%, Strength: 3.75
        0: Demon Boil: +50%, Strength: 3.75
        1: Demon Boil: +50%, Strength: 3.75
        2: Demon Boil (+): +50%, Strength: 3.75
        3: Demon Boil (+): +37%, Strength: 3.43
        4: Demon Boil: +12%, Strength: 2.81

        We see the following problems:

        (1) Since morale SE does not change the morale of native life units (see post #373), rather than canceling out a non-existent negative lifecycle effect, a brood pit gives more than a +1 morale modifier.

        A brood pit turns a hatchling into a mature boil under -4 morale SE! (In a base with no BP and no CC, a mature boil (veteran) defends at +25% and strength 3.12.) Similarly the brood pit turns a hatchling into a boil at -3 morale SE, and into a pre-boil at -2 and -1 morale SE. According to the description, it should only become a larval mass (+ 1 morale modifier).

        Note the same problem occurs for a CC and no BP.

        Similarly a boil becomes a demon boil under -4 and -3 morale SE, a great boil under -2 and -1 morale SE when it should only become a mature boil.

        (2) Because of the 4 rather than 0in the code
        [list][*]If base doesn't have CC but does have a BP and defending unit is native, do following
-> retrieve morale SE value, if < -4 set to -4. 
-> if > 4, set to 4
-> if < -1, +1

        the brood pit penalizes defending native life forms for morale SE > 0.

        A demon boil (elite) defends like a boil (hardened) at morale SE = 4 and like a great boil (commando) at morale SE = 3. A boil (hardened) defends like a larval mass (green) at SE = 4 and like a pre-boil (disciplined) at SE = 3.

        Note that this second problem does not occur for CC only.

        For a boil in a base with CC and no BP on defense (for reference, if there is no BP and no CC, Boil: +12%, Strength: 2.81, because +25% base defense and 2 psi defense):

        Morale SE:

        -4: Boil (+++): +50%, Strength: 3.75
        -3: Boil (+++): +50%, Strength: 3.75
        -2: Boil (++): +37%, Strength: 3.43
        -1: Boil (++): +37%, Strength: 3.43
        0: Boil (+): +25%, Strength: 3.12
        1: Boil (+): +25%, Strength: 3.12
        2: Boil (+): +37%, Strength: 3.43
        3: Boil (+): +37%, Strength: 3.43
        4: Boil: +25%, Strength: 3.12

        Note that the defense kicker (the additional +1 in parenthesis) does affect morale (see post #377),

        So a boil defends like a mature boil at SE = 4, 1 and 0 and like a great boil at SE = 3 and 2.
        Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

        Comment


        • Originally posted by scient View Post
          For a defender in a base, morale_fin starts out as unit's current morale so 0-6
          • if bases has CC, +1 to morale_fin
            -> retrieve morale SE value, if < -4 set to -4.
            -> if > 0, set to 0
            -> if < -1, +1
            So range is from -3 to 0, it now takes this value and calculates: morale_fin = morale_fin - moraleSE_mod. Where moraleSE_mod is the bounded morale SE value.
            After this check, if unit is native and Brood Pit is present in base: +1 to morale_fin
          • If base doesn't have CC but does have a BP and defending unit is native, do following
            -> retrieve morale SE value, if < -4 set to -4.
            -> if > 4, set to 4
            -> if < -1, +1
            So range from -3 to 4, it now takes this value and calculates: morale_fin = morale_fin - moraleSE_mod. Where moraleSE_mod is the bounded morale SE value.
          • If base doesn't have BP/CC or BP/CC checks are done, do the following.
            -> If morale SE value is 2 or 3, +1 to morale_fin
            -> If unit is Aliens (red) faction, +1 to morale_fin
          I believe there are a couple of discrepancies in what you've deduced from the code and my research with the scenario editor.

          For a defender in a base, morale_fin starts out as unit's current morale so 0-6
          • if bases has CC, +1 to morale_fin
            -> retrieve morale SE value, if < -4 set to -4.
            -> if > 0, set to 0
            -> if < -1, +1
            So range is from -3 to 0, it now takes this value and calculates: morale_fin = morale_fin - moraleSE_mod. Where moraleSE_mod is the bounded morale SE value.
            After this check, if unit is native and Brood Pit is present in base: +1 to morale_fin
          • If base doesn't have CC but does have a BP and defending unit is native, +1 to morale_fin and do following
            -> retrieve morale SE value, if < -4 set to -4.
            -> if > 4, set to 4
            -> if < -1, +1
            So range from -3 to 4, it now takes this value and calculates: morale_fin = morale_fin - moraleSE_mod. Where moraleSE_mod is the bounded morale SE value.
          • If base doesn't have BP/CC or BP/CC checks are done, do the following.
            -> If morale SE value is 2 or 3, +1 to morale_fin
            -> If unit is Aliens (red) faction, +1 to morale_fin (I couldn't get an additional morale boost when I put an alien (red) faction in a base without a CC or a BP)


          Could you check these two issues at your convenience?
          Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

          Comment


          • On defense, there appears to be boundaries to the final morale_fin. Morale_fin appears to be bounded from 1 - 6. If it was originally 0, a (+) appears. (I think we agree this is a bug.) However, there is also an upper bound of 6, so the maximum morale boost a unit gets is +50% (which makes it an elite/demon boil). On attack, there isn't an upper limit, so in the case of a demon boil attacking from a base with a brood pit or CC at morale SE=-4, I was able to get +100%!

            I think you referred to code that set the lower boundary for defense but not for attack, which is why very green defends at -12%, but attacks at -25%. Did this code also set an upper bounds of +50 for defense but not for attack.
            Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

            Comment


            • Can we agree that

              "Children's Creche. ... All negative morale effects are cancelled for units in base square; instead such units receive a +1 morale modifier." (p. 166)

              means

              (1) For units in the base square, the table on p. 159 becomes:

              MORALE
              -4 Normal Morale
              -3 Normal Morale
              -2 Normal Morale
              -1 Normal Morale
              0 Normal Morale
              1 +1 Morale
              2 +1 Morale (+2 on defense)
              3 +2 Morale (+3 on defense)
              4 +3 Morale

              AND

              (2) All units receive a +1 morale modifier?

              Can we agree that morale shouldn't affect lifecycle (that is why they use different terms and it doesn't except in the limited case of units defending inside a base under morale SE=3 and 2)?
              Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

              Comment


              • This assumes that you agree with me on #379 and #381

                For a defender in a base, morale_fin starts out as unit's current morale so 0-6
                • if base has HQ, +1 to morale_fin
                • if bases has CC, +1 to morale_fin
                  if unit is not native
                  -> retrieve morale SE value, if < -4 set to -4.
                  -> if > 0, set to 0
                  -> if < -1, +1
                  So range is from -3 to 0, it now takes this value and calculates: morale_fin = morale_fin - moraleSE_mod. Where moraleSE_mod is the bounded morale SE value.;
                  else
                  After this check, if unit is native and Brood Pit is present in base: +1 to morale_fin
                  endif
                • If base doesn't have CC but does have a BP and defending unit is native, +1 to morale_fin and delete {do following
                  -> retrieve morale SE value, if < -4 set to -4.
                  -> if > 4, set to 4
                  -> if < -1, +1
                  So range from -3 to 4, it now takes this value and calculates: morale_fin = morale_fin - moraleSE_mod. Where moraleSE_mod is the bounded morale SE value.}
                • If base doesn't have BP/CC or BP/CC checks are done, do the following.
                  ->If unit is not native and if morale SE value is 2 or 3, +1 to morale_fin
                  -> If unit is Aliens (red) faction, +1 to morale_fin (I couldn't get an additional morale boost when I put an alien (red) faction in a base without a CC or a BP)
                • set morale_fin bound to 0 instead of 1 to sort issue with very green units not getting penalty


                This fixes the following bugs:
                (1) HQ defensive bonus not implemented, p. 104 ("Units in a headquarters base automatically gain +1 Morale when defending.")
                (2) Native units getting a boost from BP and CC when there is no morale SE penalty when morale SE < 0.
                (3) Native units getting a penalty from BP when morale SE > 0.
                (4) Native units getting a defensive kicker in a base under morale SE=3 and SE=2 only (and not from any other morale SE values).
                (5) Very green defensive issue (however, this happens outside a base, so I believe the fix isn't in the part of the code that deals with bases).
                Last edited by vyeh; April 13, 2009, 18:14. Reason: We want conventional units to get the defensive kicker
                Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

                Comment


                • I haven't been following this thread closely (WAAY too technical for me), but are there any plans in the works for some kind of a release? This is some fantastic work you're doing Scient (and some nearly as fantastic bugfinding work from the rest of you!), and it'd be a shame if it was all for nothing, or only for a small, exclusive circle.
                  To those who understand,
                  I extend my hand.
                  To the doubtful I demand,
                  Take me as I am.

                  Comment


                  • There are issues involving legality and 'poly policy.

                    I understand several people are looking into solutions, and something should be available somewhere sometime when the patch is done.
                    AC2- the most active SMAC(X) community on the web.
                    JKStudio - Masks and other Art

                    No pasarán

                    Comment


                    • Originally posted by Ironwood View Post
                      I haven't been following this thread closely (WAAY too technical for me), but are there any plans in the works for some kind of a release? This is some fantastic work you're doing Scient (and some nearly as fantastic bugfinding work from the rest of you!), and it'd be a shame if it was all for nothing, or only for a small, exclusive circle.
                      Yeah, it has been very quiet since we started looking at morale ...

                      The last time scient posted, he said he was sick, so don't be surprised if you don't get a reply from him soon.

                      He (and possibly others) have been pursuing the possibility of a release through Apolyton.

                      One way or another, I'm sure there will be a release. I believe scient has gotten an offer for hosting service. However, he would prefer, if it is possible, to have it here, where he has gotten cooperation (especially for testing).

                      Because of the copies that have gone out for testing, there is little fear the work will be lost.
                      Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

                      Comment


                      • Originally posted by vyeh View Post
                        Yeah, it has been very quiet since we started looking at morale ...
                        I enjoy the opportunity to say that I appreciate you guys and your work, but I'm graphics person and have nothing to say.

                        Do hit me up again if any more graphics needs arise.
                        AC2- the most active SMAC(X) community on the web.
                        JKStudio - Masks and other Art

                        No pasarán

                        Comment


                        • Got hit by the free captured faction leader bug apparently. Saves are attached.

                          I am playing Gaia, had 2 bases in 2116 and just met Miri. Next turn my bases are gone and I have 2 colony pods, a former and a scout somewhere else

                          Anyway, looks like Zak has a probe team en route to Sparta Command in 2116, reaching it the next turn. The spartans eliminated Lal a few turns earlier.

                          Maybe these saves will help trace that bug. Just load the 2116 save and hit end turn. You may have to give it a few tries though.
                          Attached Files

                          Comment


                          • I loaded the SMAX save and got the bug 4 out of 8 times (the first 3 and the last 1).

                            I did it with the scenario editor active.

                            When the bug occured, there was a message that University had acquired Centauri Ecology from the Gaians.

                            I also tried it after switching to University.

                            (1) The probability for success was (50, 0).

                            (2) When the probe was successful, the only choice was Lal.

                            (3) When the probe was successful, the message read that Lal pledged eternal allegience and gave all his tech.

                            (4) When the probe was successful, University received Centauri Ecology and Doctrine: Loyalty.

                            (5) When the probe was successful, Lal reappeared and the Gaians were not subject to the bug.
                            Last edited by vyeh; April 16, 2009, 09:14.
                            Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

                            Comment


                            • Darsnan posted this on scient's old thread in CFC.

                              "Bug: when popping a pod which produces multiple spore launchers, the SL sometimes attack each other. I don't think this should happen.

                              Bug of artificially inflating your clean minerals limit: by building Tree Farms, Hybrid Forests, Centauri Preserves, etc., you can then disband these facilities and still retain the increased clean minerals limit.

                              Minor Bug: in the #UNITS section of the alpha(x).txt if you try to change the CP chassis to something other than Infantry, the game won't recognize these new units and cosiders all but the first faction to be eliminated.

                              D"

                              I've seen the first bug.

                              The second bug is part of the eco-damage exploit that I have brought to your attention before. I regard the fact that you can affect the clean mineral limit of all bases by building a facility in one base to be an exploit.
                              Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

                              Comment


                              • I'm not sure if the following is a bug, but at least in my game the display doubles the indicated mineral output of the base when you simply switch production from say a secret project to any space facility:





                                (That's not Progenitor language, no need for PrPsych. It's just the spanish version of the game ).
                                “They preachers dread the advance of science as witches do the approach of daylight and scowl on the fatal harbinger announcing the subversions of the duperies on which they live” - Jefferson

                                Comment

                                Working...
                                X