Author Topic: Yitzi's unofficial SMAX patch 2.5  (Read 9194 times)

0 Members and 1 Guest are viewing this topic.

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #45 on: April 02, 2014, 03:32:21 PM »
Ok, I've run across another example of the support bug, in this case with a base that I founded (ie it wasn't captured). If you play out the turn in the below save, the game will notify you that Tinker's Junction cannot support the AI Formers Unit and it will be disbanded. The thing is, I never build AI Formers (Smaniac's Mod uses them to improve AI performance) and there isn't one listed in the supported units pane. So apparently the base is somehow supporting another faction's AI Formers. Weird.

The other time was also AI formers...so it's probably not due to the captured base after all.  The fact that it's not in the supported units pane is because I haven't done much there, so I haven't changed it to show units you don't own.

Fortunately, it's often fairly easy to tell when the bug starts happening; if the support used by the base is more than the support from the supported units pane, then that means the bug has happened.  If you can provide me with a save from the turn before it starts happening, and loading that save will result in it happening, that might help get at the bottom of things.

By the way, what's the alphax line for AI formers?

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #46 on: April 02, 2014, 04:19:26 PM »
Are you aware that the rule in Alphax "Defend vs. mobile in rough" controls both the bonus for defending against mobile units in rough terrain and the bonus defenders get against mobile units while in a base?

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #47 on: April 02, 2014, 05:00:10 PM »
Are you aware that the rule in Alphax "Defend vs. mobile in rough" controls both the bonus for defending against mobile units in rough terrain and the bonus defenders get against mobile units while in a base?

I was not aware, thank you.  It doesn't seem to be a bug per se, though it may be worth splitting at some point (though not before I start taking general requests).

Offline Skyagusta

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #48 on: April 03, 2014, 02:05:02 AM »
By the way, what's the alphax line for AI formers?

AI Formers,             Infantry, Formers,      Scout,      9, 1, 0, None,    -1, 00000000000010000000000001

No time now but hopefully will be able to post a save of the turn before the bug appears at some point tomorrow.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #49 on: April 03, 2014, 05:02:55 AM »
I  finished compiling the list of labels and their consponding addresses in the assembly code. What file format would you like it in?

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #50 on: April 03, 2014, 05:10:58 AM »
Here it is in .txt format. This means it can be viewed with Notepad. It can be used as a reference source and is useful while mapping out menus.

Note: I can not guarantee that I got every single label correct or found. However, I am certain that I found the vast majority of them. If you find any missing labels, simply post their address and I will add them to the list after cross referencing them against it.

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #51 on: April 03, 2014, 12:10:05 PM »
Thanks, but I found a simpler way: The labels are stored in an array in dynamic memory, 4 bytes per label, in the same order as they are in labels.txt; the beginning of the array is pointed to by 9B90F8.  So just by finding what number it is in labels.txt (counting the first entry after the number of labels as 0) and multiplying by 4, you'll get the relevant offset.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #52 on: April 03, 2014, 05:17:16 PM »
I think I figured out what prevents the "Recenter this window here" option under the world map right mouse click menu from working. The other two options have the memory address (7D3C3C). This memory address is used in many other locations to tell the game that this option is going to interact in some manner with the main map window.  In addition, the world map window is  fixed in size and how it moves. This means their is no "center" to the map. In other words, it is similiar to how the main map can be flat and simply repeats it self if you move around it. Lastly, the section of code would probably need to be rewritten.

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #53 on: April 03, 2014, 05:53:36 PM »
When you've analyzed it enough to write a change to the code, you can let me know.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #54 on: April 04, 2014, 10:01:17 PM »
I fixed this bug. The bug occured while in Scenario Editor and you have the toolbar open. Then, if you open the right click menu while the cursor is over the world map and select the "Show info on this square option"; the rectangle showing the Scenario information like rainfall and mapsize disappears until you select another tool option in the window or open another window. A screenshot showing the bug is attached below.

To the fix the bug, I changed the call command at address 0046D13A from 00458F10 to 00458D60. My testing so far has shown that the change causes no adverse effects to functionality.

Offline Buster's Uncle

  • With community service, I
  • Ascend
  • *
  • Posts: 49361
  • €944
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Yitzi's unofficial SMAX patch 2.5
« Reply #55 on: April 04, 2014, 11:04:03 PM »
Any idea what caused Sparta Command's shadow to bork up?

Offline Skyagusta

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #56 on: April 05, 2014, 09:07:12 AM »
Yitzi, as requested here is a save of the turn before the support bug appears. The bug occurs as soon as Otkrietia-Discovery finishes the scout patrol.

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #57 on: April 06, 2014, 04:49:58 AM »
I fixed this bug. The bug occured while in Scenario Editor and you have the toolbar open. Then, if you open the right click menu while the cursor is over the world map and select the "Show info on this square option"; the rectangle showing the Scenario information like rainfall and mapsize disappears until you select another tool option in the window or open another window. A screenshot showing the bug is attached below.

To the fix the bug, I changed the call command at address 0046D13A from 00458F10 to 00458D60. My testing so far has shown that the change causes no adverse effects to functionality.

That could just mean that you haven't found what it does yet.  To mess with calls, testing isn't enough to determine that it won't have an adverse effect, you need actual analysis.  (Even analysis isn't guaranteed to make it safe, but makes it at least fairly likely that there will be no adverse effects.)  If you can analyze it and PM me what each function does (step by step, plus the effects of all called functions), then we can determine whether there will be adverse effects.

Yitzi, as requested here is a save of the turn before the support bug appears. The bug occurs as soon as Otkrietia-Discovery finishes the scout patrol.

Ok, thanks.

Offline Quota

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #58 on: April 12, 2014, 06:15:58 PM »
Thanks for all the work on this patch, I've combined it with the Smaniac mod and been enjoying it for about a week now. A couple possible bugs I've noticed:

1) When I utilize the "enhanced information" variable, the game crashes at seemingly random points within the first 10-20 turns. No rhyme or reason that I can figure out.

2) Game also seems to crash regularly when I scroll over enemy units on the very bottom row (where it shows each unit of the stack) to look at their abilities and whatnot.

I'm also experiencing these. Get random crashes, sometimes it happens after a few turns and sometimes I can't finish a turn without it crashing. Seems like it might be that the longer a game goes on, the more frequent the crashes get. In the beginning I thought it was crashing because I just switched to playing with DirectDraw=0, but looks like that's not it.
I haven't confirmed if turning off enhanced information stops the crashes yet.

I managed to get a reproducible (for me) crash for Yitzi to look at. I have the Advanced Hydromechanics mod installed, so that might impact your ability to use the save. Attached my alphax.txt as well.

Steps:
1. Load the attached save.
2. Place cursor over University (your) base "Vaporware Rising". For example by shift-right-clicking the base square.
3. Hover mouse on all the units in the base at the bottom display. Once I hover over the 'copter unit (Locust Destroyer), the game crashes, consistently.

I get crashes in other situations as well. Also, it should be possible to select that unit/play on just fine if you do other things first, or use another method to select it.

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #59 on: April 13, 2014, 03:50:02 AM »
Ok, I found the problem, and 2.5d should be available for download as soon as it's approved.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

The wicked have told me of things that delight them, but not such things as your law has to tell.
~Saint Augustine 'Confessions'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 39.

[Show Queries]