Alpha Centauri 2

Community => Chiron News Network => Topic started by: Yitzi on December 08, 2013, 07:22:28 PM

Title: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on December 08, 2013, 07:22:28 PM
Yitzi's unofficial SMAX patch 2.4c

http://alphacentauri2.info/index.php?action=downloads;sa=view;down=156 (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=156)

Fixed a bug.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: DreamTwister on December 09, 2013, 04:26:43 PM
Thanks for working on this. I've tried this out for the first time on this patch, no issues to report.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on December 25, 2013, 03:08:04 AM
I have found a bug. This bug occurs when you start a game on a customized random map and then start using the scenario editor. Once you start applying terrain to the map in the scenario editor, the terrain selection interface freezes and you cannot select any other terrain type or any other menu selection.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: BFG on December 25, 2013, 04:16:42 AM
Wow, you've been BUSY!  Thank you, yitzi.
(I just came back to SMAC/X after a lengthy hiatus.  I had no idea there was so much work being done on a patch.)

Could someone quickly summarize the intent of Yitzi's patch-work?  Specifically, which of the following would best describe it:
(1) Limited to correcting obvious errors, crashes, etc. that remained in the last official patch
(2) Attempts to rework/rebalance various problematic aspects of the game have been added
(3) Attempts to improve the AI in certain areas have been added
(4) Some combination of the above


I'd also be curious if anyone's made use of my new tech icons but that's a different discussion :)
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Geo on December 25, 2013, 11:53:46 AM
I have found a bug. This bug occurs when you start a game on a customized random map and then start using the scenario editor. Once you start applying terrain to the map in the scenario editor, the terrain selection interface freezes and you cannot select any other terrain type or any other menu selection.

It works for me.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on December 25, 2013, 12:55:18 PM
I have found a bug. This bug occurs when you start a game on a customized random map and then start using the scenario editor. Once you start applying terrain to the map in the scenario editor, the terrain selection interface freezes and you cannot select any other terrain type or any other menu selection.

I'll look into it, but if it works for Geo it's very possible I won't be able to replicate it and then I can't really help you unless you provide any files you've changed from standard.

Wow, you've been BUSY!  Thank you, yitzi.
(I just came back to SMAC/X after a lengthy hiatus.  I had no idea there was so much work being done on a patch.)

Could someone quickly summarize the intent of Yitzi's patch-work?  Specifically, which of the following would best describe it:
(1) Limited to correcting obvious errors, crashes, etc. that remained in the last official patch
(2) Attempts to rework/rebalance various problematic aspects of the game have been added
(3) Attempts to improve the AI in certain areas have been added
(4) Some combination of the above


I'd also be curious if anyone's made use of my new tech icons but that's a different discussion :)

It's a bit of (1), and (3) if I happen to run across it and it's really obviously a mistake, but mostly (2), but with a twist: Because many of these "problematic aspects" are unclear whether they're a problem and if so what the fix is, I don't change them, but rather create a new option in alphax.txt that lets people customize to rebalance as they want.  No clue about the new tech icons; I haven't touched them, though I don't think .exe coding is needed to use them...
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on December 25, 2013, 04:23:50 PM
Dio, I can't replicate your problem, so without files and an exact description of what you do to cause it, I can't really do anything about it.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: BFG on December 27, 2013, 01:59:16 AM
No clue about the new tech icons; I haven't touched them, though I don't think .exe coding is needed to use them...

It's no big deal.  I just created a couple of SMAC-like icons for "Inertial Damping" and "Global Energy Theory" since, while most of the assets--audio, config file, etc.--made it into the final game for those techs, the icons were lost somewhere along the way.
(The tech024.pcx and tech070.pcx files corresponding to these two technologies are duplicates of others.)
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on December 27, 2013, 09:12:11 PM
I found a bug in the code. This bug involves the faction energy bonus (abbreviated FACTENERGY) in the script file and the associated code for it in the game. For some reason it is not showing up in the faction budget screen (pop up screen that appears when you press F3).
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on December 29, 2013, 04:35:33 AM
I found a bug in the code. This bug involves the faction energy bonus (abbreviated FACTENERGY) in the script file and the associated code for it in the game. For some reason it is not showing up in the faction budget screen (pop up screen that appears when you press F3).

A few questions:
-Does this bug occur in Kyrub's patch?
-Do you still get the relevant energy interest/penalty, and it just isn't displayed, or does it not work at all?
-Can you provide the faction file of the faction you tested it with?
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on December 29, 2013, 06:34:27 PM
I found a bug in the code. This bug involves the faction energy bonus (abbreviated FACTENERGY) in the script file and the associated code for it in the game. For some reason it is not showing up in the faction budget screen (pop up screen that appears when you press F3).

A few questions:
-Does this bug occur in Kyrub's patch?
-Do you still get the relevant energy interest/penalty, and it just isn't displayed, or does it not work at all?
-Can you provide the faction file of the faction you tested it with?
This faction rule works as it should in game in both kyrub's SMAX patch and your most recent patch version. However, it does not show up in the faction budget screen in either version. I have tested it with this faction file.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on December 30, 2013, 02:34:41 AM
I found a bug in the code. This bug involves the faction energy bonus (abbreviated FACTENERGY) in the script file and the associated code for it in the game. For some reason it is not showing up in the faction budget screen (pop up screen that appears when you press F3).

A few questions:
-Does this bug occur in Kyrub's patch?
-Do you still get the relevant energy interest/penalty, and it just isn't displayed, or does it not work at all?
-Can you provide the faction file of the faction you tested it with?
This faction rule works as it should in game in both kyrub's SMAX patch and your most recent patch version. However, it does not show up in the faction budget screen in either version. I have tested it with this faction file.

Ok...I don't think it'll make the short list, but once I finish that (next up, by the way, is scaling support costs and a few support-related fixes, which I'm mostly done with), it's definitely a viable request.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 09, 2014, 08:41:21 PM
After some testing and tweaking I have learned that the rainfall indicator in the scenario editor is taken directly from the level of cloudiness chosen for the map (sparse clouds=arid, average=moist and dense=rainy). In addition, the brush size selection in the scenario has more bugs than I intially thought. First, their are additional sizes of brushes that can only be selected by going to the brush selection menu under the edit map menu. Also, I have discovered that the the help boxes for the interface brush selection are being drawn from the script or labels file. Note: I am currently working on fixing this and it appears at the moment to me that it is incorrectly drawing the information from the script file.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 10, 2014, 01:28:24 AM
If you come up with a fix, feel free to share it with me (i.e. what section you changed and how), and I can work it into my next patch.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 14, 2014, 04:36:49 AM
I figured out how to fix the brush help box display bug metioned above. First, go to address 0045B328 and change the constant 0F64 to 0ED4. Then go to address 0045B3E1 and change the constant 0F7C to 0EEC. Then save the changes to the executable file and the bug will be fixed.

The underlying issue was that the game was taking the incorrect labels from the labels.txt file and applying it to the mouse over help boxes. In addition, this particular label drew all the labels from within a certain range of constants and applied them to the interface. This caused the labeling procedure for this interface to function and appear differently from  some of the other labels that you find in the executable code.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 14, 2014, 12:48:23 PM
Ok, thanks, it should be included in the next patch.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 14, 2014, 08:04:21 PM
I have found another minor bug that I can fix. This involves the weapon attack graphics. For some reason the attack graphics for the missile launcher appear as an energy weapon and the attack graphics for the Gatling Laser appear as though they are for a projectile weapon.

This bug can be fixed by changing mov ecx, terranx_.00787118 at address 0045144E to mov ecx, terranx_.00787124. Then you change mov ecx, terranx_.00787124 at address 0045145D to mov ecx, terranx_.00787118. Lastly, you simply swap the weapon names, attack and cost values in the Alphax.txt file. To save you time, I am attaching a copy of your most recent patched alphax file with the needed change.

Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 14, 2014, 10:46:52 PM
Ok, thanks, but won't that also switch their locations in the unit workshop?  Or is that what the assembly changes you described deal with?
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 15, 2014, 02:30:46 AM
Ok, thanks, but won't that also switch their locations in the unit workshop?  Or is that what the assembly changes you described deal with?

First, you are correct that these changes will cause the weapons to swap places in the unit workshop. In addition, these changes to the assembly fix the graphics placement without having to swap the weapon caviar files in the game folder. Lastly, the swapping of the missile launcher and gatling laser should have a neglibile effect on gameplay while still fixing the attack graphic bug that I described above.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Geo on January 15, 2014, 09:15:25 AM
I have found another minor bug that I can fix. This involves the weapon attack graphics. For some reason the attack graphics for the missile launcher appear as an energy weapon and the attack graphics for the Gatling Laser appear as though they are for a projectile weapon.

You have quick eyes you can see the difference.

This bug can be fixed by changing mov ecx, terranx_.00787118 at address 0045144E to mov ecx, terranx_.00787124. Then you change mov ecx, terranx_.00787124 at address 0045145D to mov ecx, terranx_.00787118. Lastly, you simply swap the weapon names, attack and cost values in the Alphax.txt file. To save you time, I am attaching a copy of your most recent patched alphax file with the needed change.
[/quote]

Simply swapping the caviar files wouldn't solve it?
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 15, 2014, 04:51:11 PM
Ok, thanks, but won't that also switch their locations in the unit workshop?  Or is that what the assembly changes you described deal with?

First, you are correct that these changes will cause the weapons to swap places in the unit workshop. In addition, these changes to the assembly fix the graphics placement without having to swap the weapon caviar files in the game folder. Lastly, the swapping of the missile launcher and gatling laser should have a neglibile effect on gameplay while still fixing the attack graphic bug that I described above.

Swapping their positions in the unit editor will indeed have negligible effect on gameplay, but so does the attack graphics bug; you're essentially trading one display bug for another, and the position-in-workshop one seems to be a bigger bug to me.  So I don't think this change is worth doing; if, however, you can find how to just fix the actual attack graphics with no detrimental side effects, I'd include it.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 15, 2014, 06:09:50 PM
Ok, thanks, but won't that also switch their locations in the unit workshop?  Or is that what the assembly changes you described deal with?

First, you are correct that these changes will cause the weapons to swap places in the unit workshop. In addition, these changes to the assembly fix the graphics placement without having to swap the weapon caviar files in the game folder. Lastly, the swapping of the missile launcher and gatling laser should have a neglibile effect on gameplay while still fixing the attack graphic bug that I described above.


Swapping their positions in the unit editor will indeed have negligible effect on gameplay, but so does the attack graphics bug; you're essentially trading one display bug for another, and the position-in-workshop one seems to be a bigger bug to me.  So I don't think this change is worth doing; if, however, you can find how to just fix the actual attack graphics with no detrimental side effects, I'd include it.

However, if you look at the order of the weapons in the flavor.txt file that is in the game folder, you can see that the gatling laser is placed after the missile launcher in the sequence of weapons. This leads me to believe that they had intended the gatling laser to be placed after the missile launcher for the purposes of graphics and gameplay.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 15, 2014, 06:15:28 PM
However, if you look at the order of the weapons in the flavor.txt file that is in the game folder, you can see that the gatling laser is placed after the missile launcher in the sequence of weapons. This leads me to believe that they had intended the gatling laser to be placed after the missile launcher for the purposes of graphics and gameplay.

And then they changed their minds, probably because they realized that having the gatling laser be 5 attack, and the missile launcher 6, worked better than the other way around.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 15, 2014, 06:19:28 PM
However, if you look at the order of the weapons in the flavor.txt file that is in the game folder, you can see that the gatling laser is placed after the missile launcher in the sequence of weapons. This leads me to believe that they had intended the gatling laser to be placed after the missile launcher for the purposes of graphics and gameplay.

And then they changed their minds, probably because they realized that having the gatling laser be 5 attack, and the missile launcher 6, worked better than the other way around.

I will go with your final decision because this is your patch and you ultimately decide what to include or not.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 16, 2014, 05:48:42 PM
I think I have found another bug. This bug involves the map that appears when you select a unit and tell it to go to a specific destination. When the screen is first up you see a different map then the world map but if you click on Sort:Dist, Sort:Size, or Sort:Name then the alternate map is replaced by the standard world map and does not appear again unless reopen the window. A fast way to see this bug is by pressing G during the game and then follow the instructions above. If you need a before and after screenshot for the bugged screen, I will gladly supply them.   
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 16, 2014, 07:10:37 PM
I think I have found another bug. This bug involves the map that appears when you select a unit and tell it to go to a specific destination. When the screen is first up you see a different map then the world map but if you click on Sort:Dist, Sort:Size, or Sort:Name then the alternate map is replaced by the standard world map and does not appear again unless reopen the window. A fast way to see this bug is by pressing G during the game and then follow the instructions above. If you need a before and after screenshot for the bugged screen, I will gladly supply them.

That sounds likely to be a pain to fix and is too minor to make the short list, but feel free to provide screenshots (and if you want to work on a fix and let me know when you have one, go ahead).
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 17, 2014, 07:14:22 PM
I am currently trying to find out exactly what is causing the map to disappear. Also, does anyone know the general underlying reason for why the road attack combat rule is bugged?
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 17, 2014, 07:48:42 PM
Yuck. Another bug involving the exact same map. Here is a screen shot illustrating how the map does not cover the faction diplomacy landscape while you are trading bases. Note: I do believe the this map's proper development name was the political map because it shows a faction's territory.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 17, 2014, 08:25:17 PM
I have a hypothesis as to why the political map disappears and is replaced with the regular world map when you select sort dist, sort size etc. I think it has to do with the fact that the game either refreshes the screen after you press any of those buttons it freezes the map-cursor interface before you press those buttons. The reason it could be either of those options is because you are unable to move the cursor around the map before you select any of those options but afterwards you can move the cursor around the map.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 17, 2014, 08:59:46 PM
I also noticed that their is coding for labels of buttons or selections such as zoom, auto off, and cancel destination. I think these where going to be features but they decided to cut them out by having the assembly language jump over them.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 17, 2014, 09:10:14 PM
Aso, it appears as though their might be a skipped over section for a list that tells you which bases have unlinked net nodes. Also, this very large procedure controls the appearance and functioning of the following features: Psi gate usage, automatic unit goto destination, and is indirectly associated through another procedure with the trade faction bases diplomacy option.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 17, 2014, 09:17:49 PM
Interesting. The unedited code for the cancel destination option causes it to appear under the selection for bases and it will crash the game if selected.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 17, 2014, 09:33:07 PM
I am currently trying to find out exactly what is causing the map to disappear. Also, does anyone know the general underlying reason for why the road attack combat rule is bugged?

Yeah; they forgot to add in the "attacker and defender are both on road squares" condition.  Search the code for a reference to 949764 to find the relevant code.  If you want to write a change and test it, and then let me know the result so I can include it, go ahead; it shouldn't be hard, just one more thing to include that I haven't gotten to yet.

Yuck. Another bug involving the exact same map. Here is a screen shot illustrating how the map does not cover the faction diplomacy landscape while you are trading bases. Note: I do believe the this map's proper development name was the political map because it shows a faction's territory.

So what's the problem?

I have a hypothesis as to why the political map disappears and is replaced with the regular world map when you select sort dist, sort size etc. I think it has to do with the fact that the game either refreshes the screen after you press any of those buttons it freezes the map-cursor interface before you press those buttons. The reason it could be either of those options is because you are unable to move the cursor around the map before you select any of those options but afterwards you can move the cursor around the map.

I suspect the problem is that it refreshes the wrong map.

I also noticed that their is coding for labels of buttons or selections such as zoom, auto off, and cancel destination. I think these where going to be features but they decided to cut them out by having the assembly language jump over them.

Where is the relevant code?

Aso, it appears as though their might be a skipped over section for a list that tells you which bases have unlinked net nodes. Also, this very large procedure controls the appearance and functioning of the following features: Psi gate usage, automatic unit goto destination, and is indirectly associated through another procedure with the trade faction bases diplomacy option.

Where is the skipped-over section?
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 17, 2014, 10:23:34 PM
First, the code for this particular section of the procedure starts at 004d687. Second, the Destination map label is at address 004D6DD9. Third, the code for the zoom button starts at address 004D6F31 after being jumped over in the previous line.
Then the cancel destination code starts at 004D6F60 and is again I think jumped over in the previous line. Lastly, the code for the label of Unlinked Node starts at 004D7586.

Please Note: A short distance below the Destination map label is the code that controls how it appears in the bugged script screen that I described in one of my earlier posts. Also, note that all of these labels I wrote the addresses of are inside the same procedure and thus appear on the same script box only under different selections.

I think I have found another bug. This bug involves the map that appears when you select a unit and tell it to go to a specific destination. When the screen is first up you see a different map then the world map but if you click on Sort:Dist, Sort:Size, or Sort:Name then the alternate map is replaced by the standard world map and does not appear again unless reopen the window. A fast way to see this bug is by pressing G during the game and then follow the instructions above. If you need a before and after screenshot for the bugged screen, I will gladly supply them.   
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 19, 2014, 12:01:58 AM
Those jumps you found are conditional jumps, which are how control flow works.  So those sections are not being ignored, they're just dependent on a particular value.  To figure out when the jump does and does not happen, and what, if anything is working improperly there, you're going to have to analyze the code.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 19, 2014, 12:08:40 AM
I have both discovered and fixed another bug with the destination map that pops up when select the autofoward unit option for a base. Essentially the bug occured because you could move the cursor around the minimap which would cause the base dots to move from their appropriate spots.
In order to fix the bug you will need to change the jl terranx_. 004D7B27 at address 004D63A6 to jl terranx_. 004D7B37
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 19, 2014, 01:16:11 PM
I have both discovered and fixed another bug with the destination map that pops up when select the autofoward unit option for a base. Essentially the bug occured because you could move the cursor around the minimap which would cause the base dots to move from their appropriate spots.
In order to fix the bug you will need to change the jl terranx_. 004D7B27 at address 004D63A6 to jl terranx_. 004D7B37

Ok, thanks.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 21, 2014, 04:16:12 AM
Am I the only one who experiences a shrinking of the pop-up boxes after editing a faction's diplomactic status (Shift+F9) using the scenario editor? This bug occured using the most recent version of Yitizi's patch. Here are some screenshots.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 21, 2014, 03:06:20 PM
Any idea if it happens with Kyrub's patch?  If it doesn't, I can almost certainly track it down, but otherwise it's too minor and too much trouble to track down to be a substantial priority.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 21, 2014, 03:57:20 PM
Any idea if it happens with Kyrub's patch?  If it doesn't, I can almost certainly track it down, but otherwise it's too minor and too much trouble to track down to be a substantial priority.

Yes the bug does occur with Kyrub's SMAX AI patch.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 22, 2014, 08:49:27 PM
Would anyone would be interested if I made a chart that showed each label and its associated assembly language constant?
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 22, 2014, 09:08:34 PM
Would anyone would be interested if I made a chart that showed each label and its associated assembly language constant?

Probably wouldn't hurt, but I doubt I'll need them, and if I do I should be able to just track them down myself.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 25, 2014, 07:30:50 AM
After some testing, here is what I have discovered about probe teams. Second, their base morale is always discplined and they are uneffected by normal morale bonuses. Also, when you discover a techonology that increases base probe team morale, it also increases the morale of existing probe teams you control by one. Conversely, if you somehow lose a tech (I.E. using the scenario editor) that gives a probe team morale bonus then all existing probe teams morale is also decreased by one.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 25, 2014, 08:08:08 AM
Deleted
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 26, 2014, 04:15:40 AM
After some testing, here is what I have discovered about probe teams. Second, their base morale is always discplined and they are uneffected by normal morale bonuses.

This was known.

Quote
Also, when you discover a techonology that increases base probe team morale, it also increases the morale of existing probe teams you control by one. Conversely, if you somehow lose a tech (I.E. using the scenario editor) that gives a probe team morale bonus then all existing probe teams morale is also decreased by one.

So it's 1 per tech...so after you have 4 such techs (there are 5 total in the game) they're automatically elite?  Interesting...
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 26, 2014, 05:52:11 AM
Do you know where these labels for a "battle map" at addresses 0046F9A3, 0046FB3B, and 00470E49 would appear in-game? Also, nearby is a label for "Surveillance Map" at addresses 0046F9B1, 0046FB49, and 00470E57. Lastly, in the procedure that starts at address 00470A90 their are labels for "Data Readout" at address 00470C0F, "Battle Plan" at address 00470C36 and "Planetary Scan" at address 00470C49.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 26, 2014, 06:02:09 AM
Do you know where these labels for a "battle map" at addresses 0046F9A3, 0046FB3B, and 00470E49 would appear in-game? Also, nearby is a label for "Surveillance Map" at addresses 0046F9B1, 0046FB49, and 00470E57. Lastly, in the procedure that starts at address 00470A90 their are labels for "Data Readout" at address 00470C0F, "Battle Plan" at address 00470C36 and "Planetary Scan" at address 00470C49.

No I do not...perhaps a more experienced player could tell you where those labels appear, and then you could test to see which addresses are for which purposes.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 26, 2014, 06:14:42 AM
Another interface bug and again it is related to the base trade menu. This time I have some screen shots and make sure to pay attention to the map interface in the bottom right hand side of the screen. That is where the bug is occuring.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 26, 2014, 06:41:32 AM
After changing push 3 to push 2 at address 0048BC86 this window poped up and fixed the interface bug that was occuring.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 26, 2014, 07:04:13 AM
Also, I figured out what was wrong with the destination map that appeared when you used the unit go to option. Do you want to have the pop up window in their as well? In order to get this window to appear in the go to menu you need to change the push 0 at address 004D61EC to push 2 after you changed the push 3 at address 0048BC86 to push 2.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 26, 2014, 07:11:33 AM
This discovery makes me very excited because the behavior of the window fits how the old pre-revised interface worked with expandable/contractable windows that could be moved around  :D.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 26, 2014, 01:05:40 PM
If you can get the pop-up window to show up, and then disappear when it's no longer needed, and you can test it and verify that there are no unwanted side effects, then let me know what changes to make and I can include them.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 26, 2014, 03:51:11 PM
Some variation of this map also appears when you when want to make battle plans. In addition, inside the procedure at 00470A90 their many labels that I am uncertain how they exactly work. Here is a screenshot of the window within the diplomacy selection. Lastly, as far as my tests have shown, the window works properly and disappears when you leave a window. If you drag it off the interface the map disappears but the window box remains and the map will reappear if you move back onto the interface.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 26, 2014, 04:01:00 PM
In addition, the same procedure calls into another procedure that is also called by the procedure that controls the replay screen.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 26, 2014, 07:17:35 PM
Also, you can close the map window by double left clicking on the window box. Here is a second iteration for the labels on this window
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 26, 2014, 07:58:36 PM
All very interesting; make a poll on whether it's a good change, and if the consensus is that it is, and you find how to do it, let me know.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 28, 2014, 07:48:49 PM
Their are a few more locations that this procedure is called to that I do not know what they do so I am going to investigate them and also attempt to get the three different labeling procedures working. The default label for this window is "Planetary Scan".
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 29, 2014, 08:05:38 PM
If you want the label on the map window to change from "Planetary Scan" to either Battle Map or Surveillance map you will need to change jnz terranx_.00470EB9 at address 00470DD3 to je terranx_.00470EB9. Then you will need to change call terranx_.0046FB80 at address 00470DDB to call terranx_.0046FB20. Lastly, please note that this change will effect all the windows that this map appears in and the labels change when you adjust the window size. Also, this procedure is called from the procedure that controls the unit support display inside the base windows.



Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on January 29, 2014, 08:07:25 PM
If you want the label on the map window to change from "Planetary Scan" to either Battle Map or Surveillance map you will need to change jnz terranx_.00470EB9 at address 00470DD3 to je terranx_.00470EB9. Then you will need to change call terranx_.0046FB80 at address 00470DDB to call terranx_.0046FB20. Lastly, please note that this change will effect all the windows that this map appears in and the labels change when you adjust the window size. Also, this procedure is called from the procedure that controls the unit support display inside the base windows.

In that case, it might be better just to not change it; anyone who really wants the change can probably edit whatever text file "Planetary Scan" is found in.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on January 29, 2014, 08:36:48 PM
"Planetary Scan" is found in the labels.txt file inside the game folder alongside "Battle map", "Surveillance map", "Battle Plan", "Mission Map" and "Destination Map". What has bothered me is that these labels are actually coded for inside the game but appear to be unused except for the "Planetary Scan". Further, the labels Battle Map and Surveillance map appear inside two other procedures that are currently either not called from another procedure or are jumped into using a switch.

If you do not already know, all the text strings from the labels.txt file are indicated in the code by the memory address 009B90F8 and involve moving a memory address like Eax into it. They usually look something like this for individual label moving.

00470E51  |> \8B15 F8909B00  mov edx, dword ptr ds:[9B90F8]
00470E57  |.  8B82 04040000  mov eax, dword ptr ds:[edx+404]                   ;  Surveillance Map
00470E5D  |>  50             push eax
00470E5E  |.  B9 D8909B00    mov ecx, terranx_.009B90D8
00470E63  |.  E8 385B1A00    call terranx_.006169A0
00470E68  |.  50             push eax
00470E69  |.  68 A0869B00    push terranx_.009B86A0
00470E6E  |.  E8 FD451D00    call terranx_.00645470

This means the label Surveillance Map appears as (Memory register [Eax, Ebx, Ecx, or Edx] + 404). Thus each label is offset by four hexadecimical from each other going in the order 0, 4, 8, C, 0. Thus the Battle Map text appears as memory register + 400 and is directly above the Surveillance Map label in the Labels.txt file. You can change labels in the code by adjusting the constant by increments of four up or down. If want to change the constant by a signficant amount you you will need to do a binary edit and change the value manually.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on February 01, 2014, 02:58:43 AM
Does anyone have any idea where the labels Battle Report, Mission Status, Viewing, and Moving might appear in the game? They are in the same procedure as the labels for Surface-to-Air Duel, Air-to-Air Duel, Bombardment and Artillery Duel. This procedure starts at address 004B4A20.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Geo on February 01, 2014, 08:34:03 AM
Does anyone have any idea where the labels Battle Report, Mission Status, Viewing, and Moving might appear in the game? They are in the same procedure as the labels for Surface-to-Air Duel, Air-to-Air Duel, Bombardment and Artillery Duel. This procedure starts at address 004B4A20.

Battle Report likely pops up after a battle happened ingame, and the popup option is enabled of course.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on February 16, 2014, 05:32:22 AM
Does anyone have any idea where the labels Battle Report, Mission Status, Viewing, and Moving might appear in the game? They are in the same procedure as the labels for Surface-to-Air Duel, Air-to-Air Duel, Bombardment and Artillery Duel. This procedure starts at address 004B4A20.

Battle Report likely pops up after a battle happened ingame, and the popup option is enabled of course.
First that does not happen and I have been unable to figure out where it might have appeared. Also, do you think this is a bug? It says bomb $basename but then is followed by the no orders label. This can be triggered by selecting bombing run to while having no movement points left. Here is a screenshot.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on February 16, 2014, 02:45:52 PM
Yeah, I'd guess it's a bug.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on February 17, 2014, 05:00:05 PM
Regarding the edit faction diplomacy screen, I have figured out that all of the non faction checkboxes are actually labels. I am currently uncertain how that would interact with the script boxes.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Fishman on February 26, 2014, 09:53:33 PM
So I'm fairly new to Alpha Centauri. I was wondering what these patches change and how to go about installing them? Would you recommend it for a new player?
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on February 27, 2014, 12:34:01 AM
So I'm fairly new to Alpha Centauri. I was wondering what these patches change and how to go about installing them? Would you recommend it for a new player?


The changelist can be found at http://alphacentauri2.info/wiki/Yitzi%27s_patch, (http://alphacentauri2.info/wiki/Yitzi%27s_patch,) but the real addition of my patch is the new modding options, found at http://alphacentauri2.info/wiki/New_alphax_variables_in_Yitzi%27s_patch. (http://alphacentauri2.info/wiki/New_alphax_variables_in_Yitzi%27s_patch.)  My patch builds on Kyrub's AI patch and Scient's patch (which did a lot of bugfixes).  To install, simply download the files and overwrite the corresponding files in your  Alpha Centauri folder.  I would recommend it for a new player, as other than bugfixes and some badly needed AI boosts from Kyrub, all the changes are optional (accessed via alphax.txt).
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Buster's Uncle on March 01, 2014, 12:51:08 AM
A new downloads comment I just spotted:

It took me a while to figure it out, but if you use this alone on the last official patch then it will have a parsing error. Other users should keep in mind that you need the other files from the 2.4 zip file. Today at 01:18:10 AM FSaved
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on March 02, 2014, 12:43:32 AM
Yeah, I should have noted that.  I'll put it in the wiki for the patch, in case I forget in a future one.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on March 05, 2014, 04:04:56 PM
Do you think this is a minor bug? Should the labels for enemy bases as outposts go from size 1-3 rather than only size 1? Also, should the enemy base label "Base" go from 4-7 rather than from 2-7? Attached below are screenshots with the effected labels circled in yellow. If you do, then I can post the coding that will fix it.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on March 05, 2014, 05:51:40 PM
I could see it being plausible either way; as long as it's consistent, I don't think there's reason to think it's a bug.

If it were a bug, whether it were a minor bug would be irrelevant if you already have a fix, but seeing as I've never seen either label appear, it would be a minor one in any case.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on March 06, 2014, 03:13:23 AM
Anyways, to make this consistent, you need to change cmp al, 1 at address 004B60D4 to cmp al, 3. Note: Bolded text shows what would change. This changes the base population size above which the procedure jumps.

Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on March 06, 2014, 02:47:08 PM
Ok thanks, but if it always changes at 2 I don't think it's a bug.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Quota on March 07, 2014, 06:38:44 PM
Hey Yitzi, thanks for your great work and please keep it up.

I seem to have encountered a bug. Using your patch (at least versions 2.4c and 2.4), my planet busters are bugged. They do the usual (fx, crater/terrain modification) but they don't actually destroy anything! Bases and units are left behind unharmed (except units that are caused to drown, those die as appropriate, but nothing happens to those in the base), which is quite frustrating.
Tested a bit and it happens regardless of reactor, whether a unit or a base is targetted, or whether I or an AI uses the PB.

Oddly, if I hit a base without a Pressure Dome, causing it to submerge, the defenders and base will survive and will miraculously have a Pressure Dome added...! I've read about this happening to save bases in other situations as well, what's up with that?

Since it's essentially a broken feature, odd that it hasn't been noticed before (?), though I guess the people that use the patch happen not to use PBs. Took me a while to encounter it (and boy what a surprise). Or perhaps it only occurs on my end? Can anyone verify? My PBs work with vanilla alphax.txt and terranx.exe.
It'd be nice if you could release a hotfix, so I could vaporize my enemies into oblivion!

Also another thing I encountered, which is probably a vanilla thing: you can't target an empty (no defenders) base with a PB, the game responds takes that as if you're trying to capture the base with a missile, not blow it up to hell. Maybe it's worth fixing while you're at it.

I have GOG SMAX and Windows 7.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on March 07, 2014, 07:39:13 PM
Hey Yitzi, thanks for your great work and please keep it up.

I seem to have encountered a bug. Using your patch (at least versions 2.4c and 2.4), my planet busters are bugged. They do the usual (fx, crater/terrain modification) but they don't actually destroy anything! Bases and units are left behind unharmed (except units that are caused to drown, those die as appropriate, but nothing happens to those in the base), which is quite frustrating.
Tested a bit and it happens regardless of reactor, whether a unit or a base is targetted, or whether I or an AI uses the PB.

Oddly, if I hit a base without a Pressure Dome, causing it to submerge, the defenders and base will survive and will miraculously have a Pressure Dome added...! I've read about this happening to save bases in other situations as well, what's up with that?

Since it's essentially a broken feature, odd that it hasn't been noticed before (?), though I guess the people that use the patch happen not to use PBs. Took me a while to encounter it (and boy what a surprise). Or perhaps it only occurs on my end? Can anyone verify? My PBs work with vanilla alphax.txt and terranx.exe.
It'd be nice if you could release a hotfix, so I could vaporize my enemies into oblivion!

Also another thing I encountered, which is probably a vanilla thing: you can't target an empty (no defenders) base with a PB, the game responds takes that as if you're trying to capture the base with a missile, not blow it up to hell. Maybe it's worth fixing while you're at it.

I have GOG SMAX and Windows 7.

I can look into it.  Most likely the "PBs don't work" bug will be fixed in version 2.5 (which should be coming soon), and the "can't target empty base" one in 2.5b (if there is one) or 2.6.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on March 07, 2014, 09:30:28 PM
I am pleased to announce that I have tracked and fixed the "PB not working" bug.  I would normally release a hotfix with it, but I'm very close to releasing 2.5 anyway, so I think I'll hold off until that.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on March 08, 2014, 01:19:40 AM
Will this patch release have the minor bugfixes I found?
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Quota on March 08, 2014, 11:56:45 AM
That was... magtube-quick. Great job, man, and thanks.

On another note... do you guys think the Total Thought Control probe team action ought to result in Captured Base Drones? It does, and that seems quite... unintuitive, but might make sense mechanically/balance-wise. Captured bases could be less (or no) of a chore if TTC added no drones.
At first, I assumed that no extra drones would be the difference, but as far as I can see, the difference between TTC and Mind Control is that capturing a base from a non-hostile faction will instantly result in Vendetta in the case of MC, but on the contrary, TTC will cause the rival faction leader to... not notice. The base citizens do notice, though. ;lol

The manual DOES say the difference between the two is that TTC doesn't incur diplomatic issues, so that difference should be intended, I'm just piqued by the lack of drone difference.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Geo on March 08, 2014, 01:38:10 PM
The manual DOES say the difference between the two is that TTC doesn't incur diplomatic issues, so that difference should be intended, I'm just piqued by the lack of drone difference.

The conditions those drones live in haven't changed, just the person they're unhappy with? ;)
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on March 09, 2014, 01:06:32 AM
Will this patch release have the minor bugfixes I found?

It will have the one with the editor display you told me about, the go-to-base-related one, and new window.  Is that all of them?

On another note... do you guys think the Total Thought Control probe team action ought to result in Captured Base Drones? It does, and that seems quite... unintuitive, but might make sense mechanically/balance-wise. Captured bases could be less (or no) of a chore if TTC added no drones.

I could see how it might make sense for it to not, but seeing as it's clearly meant to parallel subverting a unit without it being detected, the proper fix might be just to rename it to something that fits the mechanics better.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on March 09, 2014, 07:53:42 PM
Yes, that is all the bugs we both agreed on to fix. Also, is it possible to enable probe teams to select a specific technology to steal from a faction? This would be very similiar to how you can select specific facilities to sabotage.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on March 09, 2014, 07:58:44 PM
Yes, that is all the bugs we both agreed on to fix. Also, is it possible to enable probe teams to select a specific technology to steal from a faction? This would be very similiar to how you can select specific facilities to sabotage.

It would take a fairly significant amount of work but would be doable.  It's not making the short list, though.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Dio on March 09, 2014, 09:27:52 PM
Is this a bug? It just seems odd that aircraft would get an open ground bonus to defense against artillery.
Title: Re: Yitzi's unofficial SMAX patch 2.4c
Post by: Yitzi on March 09, 2014, 09:54:48 PM
It's not quite a bug (something that wasn't supposed to happen), but may be an oversight on the part of the game designers.

Or maybe not.  Even landed aircraft can probably be wheeled around.
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 15.

[Show Queries]