Announcement

Collapse
No announcement yet.

Fixing SMACX Bugs

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

  • Bug: in an artillery dual ships in shallow water can get an altitude bonus over ships in deep water.

    Cosmetic bug: if a unit equipped with nerve gas pods attacks a city but the defender wins, the pop-up blurb states that there are massive casualties in the city. However because the defender won the battle there are no "massive casualties".

    Minor bug: if a magtube is placed on a tile via the scenario editor and then that magtube is destroyed in-game, the graphics update to show only a road. However the effects of the magtube (i.e. infinte movement ability) are still in effect.

    D

    Comment


    • Darsnan's bug also occurs when an amphibious unit on a transport in a ship in deep water attacks a base in shallow water (in this case the defender gets a bonus) in SMAniaC where land units get bonuses if there is an attitude difference.
      Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

      Comment


      • From some quick testing it looks like Children's Creche and Nerve Stapling only affect mind control cost and not survival/success rate. So if there is a problem with costs, it has to do with nWorth generation rather then problem with probe code. Here is first part of probability function.

        probability success (pretty much in this order):
        • Obtain SE morale value, store in nVal1
        • Obtain probe units morale, store in probe_unit_morale. If value is < 1, set to 1. This basically treats very green (0) as green (1).
        • If target is a city and city has Covert Ops, nVal1 += 2
        • If nVal1 is < -2, set to -2. Otherwise if nVal1 > 0, set to 0.
        • fail = (difficulty_modifier / ((probe_unit_morale / 2) + 1 - nVal1)) * 100
        • If probe is enhanced and target faction doesn't have HSA -> fail = fail / 2
        • success = 100 - fail
        • If HSA is active -> success = success / 2 -> normal probes never get this far with HSA active, so not an issue


        note: difficulty_modifier from what I can tell depends on position of dialog. Say for get away clean it would be 1 and to frame another faction it would be 2. So the lower menu options have a higher failure rate. If probe action should never fail (100% success rate), it's set to 0 (0 / whatever = 0). If it's set to -1, then it skips all the above code and returns 100% success rate. This seems to be used in select cases like when you're given the option to abort a mission.

        Of hand I don't see anything that should be changed. Maybe someone can spot issue?
        Last edited by scient; March 25, 2009, 15:52.

        Comment


        • If you're not framing another faction, stealing tech and energy credits has a 100% chance of success (with survival rate depending on the morale of the probing unit).

          Infiltrating datalinks also has a 100% chance of success.
          Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

          Comment


          • probability survival (pretty much in this order):
            • Obtain SE morale value, store in nVal1
            • Obtain probe units morale, store in probe_unit_morale. If value is < 1, set to 1. This basically treats very green (0) as green (1).
            • If target is a city and city has Covert Ops, nVal1 += 2
            • If nVal1 is < -2, set to -2. Otherwise if nVal1 > 0, set to 0.
            • fail = (((5 * difficulty_mod) + 5) * 20) / (probe_unit_morale - nVal1)
            • If probe is enhanced and target faction doesn't have HSA -> fail = fail / 2
            • survival = 100 - fail
            • If HSA is active -> success = success / 2 -> it's using the final value generated in my last post
            • If success is equal to survival, skip display


            So fairly similar to success however I'm not sure about last two points. Why is it modifying success rate after the fact? It's not used anyplace other than that last check. Survival value gets enhanced probes bonus if HSA isn't active so shouldn't they also get the penalty when it is?

            That last check only affects UI. If both success and survival values are the same it displays only one. Until looking at the code, I always thought it meant that one of them was 0 and didn't exist. Did anyone else realize it meant that probability was the same for both? I'd personally remove it and let it display (50%, 50%) rather than (50%) but it would be hard to justify this as bug fix.
            Last edited by scient; March 25, 2009, 16:39.

            Comment


            • Originally posted by vyeh View Post
              Darsnan's bug also occurs when an amphibious unit on a transport in a ship in deep water attacks a base in shallow water (in this case the defender gets a bonus) in SMAniaC where land units get bonuses if there is an attitude difference.
              "Attitude" matters in SMAniaC?

              Seriously though, good catch on this as well.

              Originally posted by scient View Post
              Survival value gets enhanced probes bonus if HSA isn't active so shouldn't they also get the penalty when it is? .
              This may be a left-over from SMAC where the HSA killed ALL probes, so the penalty was moot (cuz you can only kill a probe team once, right?).

              D

              Comment


              • Yarg, site hates me keeps timing out.

                Anyway, I think they just copied and pasted that section of code and forgot to change the variables. Maybe this is why survival rate is incorrect sometimes? HSA code kills probe before they even generate probe action menu so that can't be it.

                Am I correct in assuming this is a bug?

                And can someone verify algo for calculating percentages is correct?
                Last edited by scient; March 25, 2009, 17:12.

                Comment


                • Originally posted by scient View Post
                  Yarg, site hates me keeps timing out.
                  Yeah, my last post took like 3 minutes, I copied the response while I was waiting, in case the site crashed.

                  Originally posted by scient View Post
                  Am I correct in assuming this is a bug?
                  I think so.

                  Comment


                  • Probing a human player prompts the active player, rather than the victim, for a response (CGN 26). The active player is expected to declare vendetta unless the victim has asked otherwise.
                    Is this possible to reproduce this in PBEM game? Or does it have to be direct connect? I believe this code in same function so mines well fix it as well.


                    Also, while playing about I was able to force this dialog. Anyone ever see this happen playing against AI?

                    Comment


                    • Originally posted by scient View Post
                      Is this possible to reproduce this in PBEM game?
                      Yes. On several occasions in past PBEM's I have had this happen.

                      Originally posted by scient View Post
                      I believe this code in same function so mines well fix it as well.
                      That is probably huge for the PBEM community!


                      Originally posted by scient View Post
                      Also, while playing about I was able to force this dialog. Anyone ever see this happen playing against AI?

                      Yes.

                      D

                      Comment


                      • Does anyone know if there is info regarding the structure of .mp files (map files)? It doesn't have to be for AC/ACX specifically like it could be for Civ 2 or some other Civ. Stored inside .sav is an "UNTITLED.MP" which gets mapped into memory and the root cause of intercept crash. For some reason variables get set making the scramble code try to access values outside the range of this .mp causing it to crash. However, to figure out what's wrong I really need to know what it's meant to do. It looks like large maps are more prone to crash than smaller ones however even smaller ones don't crash I think they're accessing incorrect data.

                        Also, I'm looking for a PBEM game where I can replicate probe vendetta issue.

                        Originally posted by Maniac View Post
                        Oh, for a moment there I was hoping you could see in the exe how the ambient soundtrack was created. Would have been awesome for Planetfall.
                        It's actually not the exe rather functions inside soundx.dll. I have worked on similar projects determining unknown file structures but without help I'm not even going to go there. I already have enough trying to sort bugs.

                        Comment


                        • Originally posted by scient View Post
                          Also, I'm looking for a PBEM game where I can replicate probe vendetta issue.
                          This evening I'll see about setting up a scenario to replicate this situation.

                          D

                          Comment


                          • Originally posted by scient View Post
                            Does anyone know if there is info regarding the structure of .mp files (map files)?
                            The link in this post might help.

                            Petek
                            "The avalanche has already started. It is too late for the pebbles to vote."
                            -- Kosh

                            Comment


                            • Originally posted by Petek View Post
                              The link in this post might help.

                              Petek
                              Ya, MapData Struct is exactly what I was looking for. Maybe I can fill in some of bits Andux didn't figure out. Cheers!

                              Comment


                              • scient - it looks like we have a save of a crash in this thread :



                                It's nothing serious, so just place it at the bottom of you list.
                                With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

                                Steven Weinberg

                                Comment

                                Working...
                                X