Announcement

Collapse
No announcement yet.

Fixing SMACX Bugs

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

  • Originally posted by BlackCat View Post
    Well, I don't exactly want to build them - was just puzzeled why autounits can while I can't.

    Oh, and please take a nap once in a while - we certainly want you to be around for many years yet
    Okay, now I understand. Other examples of actions that can be taken by automated formers, but not by manually controlled one, are:

    * Automated sea formers don't have to pay any ECs to raise the seabed (perhaps also for land formers?).
    * Automated land formers can build roads through fungus without clearing the fungus.

    I'm not sure that these are bugs. Perhaps human-controlled automated formers use the same code as AI formers, and the AI has purposely been given certain "advantages."

    Petek (who slept well last night )
    "The avalanche has already started. It is too late for the pebbles to vote."
    -- Kosh

    Comment


    • I am still testing for 98, should have finished making my testbeds for the last few bugs tomorrow. Please wait.


      Edit:

      * Automated formers can also improve volcano squares in a way that is expressly forbidden - definately a bug!
      Last edited by GooglyBoogly; March 13, 2009, 06:26.
      Into Alien Crossfire? It has been almost 10 years. Time to update your datalinks.
      Try out my Comprehensive Datalinks Update. Now v1.3!

      Comment


      • I think I just found a new bug, but correct me if I'm wrong:
        an Infantry unit of the AI of elite morale (2 moves) moved into a fungus square and in the same turn attacked a Former of mine (and I have the Xenoempathy Dome, so that's not the reason). Apparantly the fungus did not take 2 moves of the unit, as I thought it should, or just end that units turn.

        I also have a feature request: in the Base Control screen (F4) the mouse scroll wheel does not work and I would like to be able to use it. This is very low priority, of course.

        Comment


        • Originally posted by GooglyBoogly View Post
          * Automated formers can also improve volcano squares in a way that is expressly forbidden - definitely a bug!
          Around Mount Planet summit there are tiles which are labeled "Rolling & Moist - Volcano". These can be terraformed manually for certain things like road or mines. Trying to terraform a farm give "operation cannot be performed in volcanic area". Oki. But if you use "Farm+Solar+Road" or "Farm+Mine+Road" it builds road+mine. Note, this is manually using hotkeys/menu not auto. The same thing can be done at summit, lava mine anyone? Also at summit "construct road to" (and prob tube) is/are bugged in same method. If you try to build a road using "r", it will give "operation cannot be performed at center of volcano" but with "road to" it creates one.

          Can anyone thing of any other issues such as these? I'll have to document bitfield for a land tile so I can add in checks for certain terrain. Fixing auto should be same idea but not exactly sure where code is.

          On the topic of terraformers:
          This bug is not allowed: On the turn a terraformer completes its terraforming task, its "flag" will be grayed out indicating that it has moved. Clicking on and activating the terraformer will allow a new terraforming command to be issued to the terraformer with the correct number of turns to completion displayed. Clicking on and activating the terraformer again, cancelling its new orders; at this point, the terraformer will have regained one movement point. Using the more advanced technique of this bug is also disallowed.
          Can I get a step by step how to repeat this? I could never get the terraformer to give me back one turn. Plus, more advanced technique? Maybe that's the bypassing tile restrictions I mentioned above?

          Final thing. I noticed in "Edit Map > Place Natural Landmark > Freshwater Sea" doesn't seem to work. Are there some special map conditions I need to add it in? I tried in land locked area like in planet map but still no go.

          Lastly, psych isn't so simple as display bug. This will take some time to document function and document psych city struct (like I did with go to).

          Originally posted by Doux View Post
          I also have a feature request: in the Base Control screen (F4) the mouse scroll wheel does not work and I would like to be able to use it. This is very low priority, of course.
          Not sure about the first one, will have to wait and see if anyone knows more. The second one is on my list to do. I've gotten it to work "sometimes" in F1 but not consistent. If anyone knows steps to get it to work so I can locate code that would be sweet. The product queue is different and won't work as far as I can tell. So before coding function from scratch I'd like to see if I can track down the enigmatic F1 code.

          Comment


          • Originally posted by scient View Post

            On the topic of terraformers:
            Quote:
            This bug is not allowed: On the turn a terraformer completes its terraforming task, its "flag" will be grayed out indicating that it has moved. Clicking on and activating the terraformer will allow a new terraforming command to be issued to the terraformer with the correct number of turns to completion displayed. Clicking on and activating the terraformer again, cancelling its new orders; at this point, the terraformer will have regained one movement point. Using the more advanced technique of this bug is also disallowed.
            Can I get a step by step how to repeat this? I could never get the terraformer to give me back one turn. Plus, more advanced technique? Maybe that's the bypassing tile restrictions I mentioned above?
            I never used this exploit, and found it difficult to reproduce. Have a look at the attached zip of a save file. When you open the .SAV file, the focus is on a former one tile North of Budushii Dvor and it has one MP remaining. Move it, say, one tile West (4 on the numeric keypad) and its MPs are exhausted. Select it and press "r" (build road). Select it again and cancel the order. It still has no MPs remaining. Now activate the two formers one tile South of Budushii Dvor. They already have no remaining MPs. Order each to build a road. Select each former again and cancel its orders. Each now regains a MP. Perhaps with this save you can now figure out what's going on.

            The "advanced technique" is, I suspect, one of those bugs that is known only to a few (and I'm not one of them). Darsnan probably knows about this. Perhaps he's be willing to PM you with more information.

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

            Comment


            • @scient - moving the gun foil in any direction makes the game crash.

              Edit : just if someone (sleepless) get curious, I had a pole crash moving one of my own units.
              Attached Files
              Last edited by BlackCat; March 14, 2009, 16:56.
              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


              • Yep, same exact bug with y coordinate overflowing in vanilla game. So it looks like this one is working fine in my patched version.

                @Petek: Thanks for saved game and I located the issue. It's problem with unit movement/state bitfield not being set properly. I haven't come up with a patch yet tho.
                Last edited by scient; March 14, 2009, 17:39.

                Comment


                • I'm still getting a crash when trying to move a unit that's at the pole. See attached zip of a .SAV file. When moving the rover to any other tile, the game crashes.

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

                  Comment


                  • Ah ha, good catch you are correct. The value should be zero offsetted, my bad. I guess I had been testing in north pole and some how missed this in my testing of south. All I had to do was add one byte to decrement y value. I'll send out fixed version to everyone shortly.

                    edit: Sent out fixed exe.
                    Last edited by scient; March 14, 2009, 18:37.

                    Comment


                    • I just finished a "10th anniversary" game of SMAC, checked my SMAC-related bookmarks, and stumbled across this amazing project. Wow! Fixing some of the bugs that have been mentioned is a long-cherished dream come true.

                      If possible, I'd like to help a bit with testing and analysis. I've been a beta tester before, and last autumn I did the main testing for an unofficial patch to "TES3: Morrowind" (the code wizard who wrote it managed to rewrite the way how the game managed and addressed its objects, so it needed thorough testing, otherwise the patch would have messed up people's saves). So I do have some experience with how a bug report should look like, or how to analyze specific program behavior by creating testbeds, etc.

                      Scient, you said that you'd send your patch to long-standing members of this site. I'm here since 2001 (see profile), but with 15 posts I'm not sure whether I qualify. I've been a lot more active at CivFanatics (see my profile there).

                      I can't promise I'll be of much help since my knowledge of SMAC is a bit rusty, I usually play about 1 or 2 games per year and it's been a while. But I'd like to give it a try - at the very least I can run my next game with it and see whether I see any side-effects, whether the fixes are working properly, etc.

                      Oh, and I'd recommend to make a new thread for this project. I only found it by accident, and the prospect of having these bugs fixed is much, much to intriguing to hide the project in a topic that only barely hints at its scope.

                      Comment


                      • Psyringe, welcome!

                        We already asked the moderator to split the thread; the moderator didn't feel it was necessary.

                        Unfortunately, I have a Mac, do I haven't been able to help with the testing.

                        I think it would be helpful if there could be a running list of all the bugs that have been confirmed fixed in the latest patch. It would only need to identify the bug, e.g. "probe rollover;" a description isn't necessary.
                        Last edited by vyeh; March 20, 2009, 11:29.
                        Unofficial SMAC/X Patches Version 1.0 @ Civilization Gaming Network

                        Comment


                        • @Psyringe: Sure thing, I'll send latest copy over shortly. I wish I could get a subforum made like here (my other bug fixing project). I've been talking to Illuminatus in PM about being able to post exe sans safedisc. Last I heard I guess a couple of admins are cool with it but one is completely against. So if vote or consensus is against posting it I may have to pick up shop. I'd like to stay here since it seems to have most active AC community but doing all the testing via PM kinda sucks.

                          @vyeh: Here is a list of my current changelog. I've been working on analysis of root probe function which encompasses all probe related code. It's a bit more manageable than psych or morale stuff since it's all in once place. There is a flag set at top of function whether probe is enhanced or not. So far it's only used really in generation of success/survival percentages. Once I've got it all figured out then I'll post some more details.

                          1. City "Mind Control" probe fix
                          In vanilla game if cumulative PROBE value is over 3 (society, covert ops center) it was possible to use a probe to "mind control" a city when it should have been immune. Also, if the University faction uses Knowledge getting PROBE value down to -4 it would act as if it were 0 (erroneously increasing "mind control" costs). After patch, PROBE values > 3 will always be immune and < -2 will act as if they were -2.

                          2. Air interceptor when scrambling could potentially cause a crash
                          There are a set of variables regarding the current unit id, in this case the interceptor, that do not get reset from previous unit (or from an inactive state?). This made it possible in some cases for the game to try and access a pointer to invalid memory causing a crash to desktop. Bug fix adds in a call to function used by units during movement/combat to reset these variables to current unit id upon air scrambling (of interceptor).

                          3. cvr fix (credit to WBird784 for patch data) -> memory allocation slightly increased by scient, it's 2009...
                          Patch to increase the memory allocation (stack and virtual memory) used to manipulate the caviar animation files. This corrects the bug with the CareTakers colony pod (ACOLPOD.cvr) and maybe others. In the vanilla game if you open up Design Workshop as Caretakers and switching back and forth between colony pod and other "equipment" you can cause text in "special ability" to become overwritten (memory overflow) and crash once you exit Design Workshop.

                          4. Airdrop via right click bypassing drop restrictions (city/airbase, already moved, one drop per turn) fix
                          In vanilla game, right click airdrop directly calls the "move to" code. However when you use the hotkey "i" it does a number of checks and only then call "move to" code if they pass. The fix redirects right click menu to used the same check code as hotkey. If it passes all the checks, I added in a check to see if code was accessed from either right click or hotkey. If it was right click, directly call the "move to" code. Otherwise, display the parachute icon (hotkey). In vanilla game there was only the parachute icon.

                          5. "Instant elite morale" and three waypoint patrol fix
                          Added in a check to patrol structure generation (waypoints and so on) to zero offset the number of waypoints (subtract 1) if it is greater than zero. Problem in vanilla was that it calculated the number of times spacebar was hit as 1,2,3 when it should have been 0,1,2. These incorrect values caused patrol struct to get messed up shifting all waypoints up one. If there were three waypoints, it caused morale to be set as one of coordinates and waypoint to be set to some far off random location (usually 0,0).

                          6. Repair Bay fix
                          Repair bay special ability was failing due to what is believed to be an incorrect check that would have only given ground transports the bonus. Now, it will give bonus to all ground units except ground transports.

                          7. choppers/missiles/grav ships lose rest of turn when moved through a city with no enemy units adjacent.
                          Fixed a check that was ending the turn for certain air units when entering a city. There is still a check which ends turn when an air unit enters a city with one turn or less left unless an enemy is adjacent to base.

                          8. Needlejet "DATA" edit window via scenario editor doesn't render properly making stats uneditable.
                          This is fixed simply by adding "#itemlist" to "#EDITVEH2A" inside scripts.txt and xscripts.txt. This really only affects scenario editor so not that important.

                          9. City production exploit where it was possible to open hurry command window then switch between cities to complete projects for less then actual value.
                          Fixed a clean up issue with queue panel which was causing this.
                          Update: Noticed an issue with original fix and Base Ops (right click a garrisoned unit then try to switch factions) where it was possible to lock up UI. Revised fix to ONLY affect production queue as I intended.

                          10. When you click on an unexplored tile, the map recenters on that square. However, if the tile contains a base, the map doesn't recenter. This allows you to ascertain the location of enemy bases.
                          Fixed so when an unexplored tile with city on it is clicked, the game will now center map like rest of tiles.

                          11. Fixed crash for units moving near or at poles (large maps?) where it was possible for y coord to exceed map bounds. Added handling that prevents y coord from going over min/max.
                          Update: Forgot to zero offset the high bound for y coord. Just a matter of subtracting one, doh! Thanks to Petek for catching this.

                          12. If you have another player infiltrated, it was possible to change his workers via Base Ops (F4). Exploit fixed so clicking citizens of other factions has no effect like garrisoned units.

                          13. In vanilla game, "Go to home base" (shift-g) sends unit to closest base rather than actual home. Fix retrieves unit's home base and sets waypoint there similar to how game recalls units within city UI. If a home base cannot be found (independent), default to original code and go to nearest base.


                          Misc:

                          1. Disabled cpu check (epic fail code) which served no purpose other than preventing the game from starting on newer cpu's. Patch enables ForceOldVoxelAlgorithm=1 in code by default and suppresses annoying warning.

                          2. Enabled debug output of internal cmds, see logfile.txt in root ACX folder after running game. Note, this log resets each time you start the exe. It's useful when running the game to look at what actions triggered certain functions.

                          Comment


                          • An annoying bug that I ran into the other day (already posted by Mart). From SMAC Academy:
                            # If a base completes construction of a facility or secret project and its build queue is empty, then for that turn the base will accumulate energy as if production had been set to stockpile energy in addition to accumulating the usual amount of minerals.
                            # If a base completes construction of a unit and its build queue contains stockpile energy as the next item to build, then for that turn the base will accumulate energy as if production had been set to stockpile energy in addition to accumulating the usual amount of minerals.

                            The first is the really unbalancing one, for sometimes you don't want to use the build queue.

                            Comment


                            • I've got two bug/exploits for you...

                              A bug I've never, ever, seen mentioned, even in very comprehensive lists, is a build queue exploit.

                              Say you're an awful cheater against the AI- if you finish a game and start a new one without exiting AC, the first item in each slot in the build queue from the previous game is available, no matter the prerequisites. I've used this and pod popping to build satellites or Super Fusion Hovertank Formers in year one before. Loading a savegame and [control-shift Q] to start a new game works for this, too.

                              [It occurs to me that this might be very useful in scenario building if it's possible to apply there...]

                              Units produced this way are very susceptible to the transformation bug, to the extent the (hypothetical) cheater has to be VERY careful about upgrading anything or even designing anything new. I've seen as many as fifty formers transform, free of charge and all at once, to a completely different chassis, or even infantry w/ weapons. I've even seen it happen automatically when Fusion Power is discovered and the game adds the fusion powered upgrades to the design workshop.

                              Do with that what you will.
                              AC2- the most active SMAC(X) community on the web.
                              JKStudio - Masks and other Art

                              No pasarán

                              Comment


                              • @Doux: Ya, I've got to look into those some more.

                                --

                                When you initiate probe attempt on an unit it checks SE morale and generates mind control "cost" based on units worth. I'm not exactly sure how worth is calculated but I think it's based on a number of factors such as unit morale, armor and special abilities. I'm just going to refer to it as nWorth below. The following are listed in order they are executed and nWorth gets updated after each step depending on modifier.
                                • If the owner of probe has Nethack Terminus it subtracts -25% from nWorth. Since this is before any modifiers it can end knocking off a pretty large amount of final value.
                                • Now, based on opponents SE morale value it breaks down like this:

                                  <=-2 : nWorth / 2
                                  -1 : nWorth - (nWorth / 4)
                                  0 : nWorth
                                  1 : nWorth + (nWorth / 2)
                                  2 : nWorth * 2
                                  >= 3 : immune message
                                • if unit has "polymorphic encryption" multiply nWorth by 2
                                • unless unit is former or colony pod, divide nWorth by 2


                                This value is then the final bribe/mind control cost.


                                Beyond adding in something to let enhanced probes circumvent SE immunity most of this code looks ok based on manual. I haven't seen the former/pod bonus listed and I didn't realize Nethack Terminus was so powerful.

                                I was thinking if probe is enhanced, to move SE morale one step down in that ladder. That's what I take to be implied from manual passage:

                                In addition, Enhanced Probe Teams can penetrate the interlocks of a unit or base protected by Social Engineering or the Hunter-Seeker Algorithm! The chance of success is half what the chance would have been if the target did not possess the H-S Algorithm, or if their Probe rating was +3 rather than +4.
                                So, if SE morale was >= 3 act as if it were 2. If it is 1 act as if it were 0. Does this sound ok? I'd apply the same idea to cities as well.

                                Comment

                                Working...
                                X