Author Topic: Yitzi's unofficial SMAX patch 2.4c  (Read 10845 times)

0 Members and 4 Guests are viewing this topic.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #45 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.

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #46 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.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #47 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.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #48 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.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #49 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.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #50 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.

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #51 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.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #52 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.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #53 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.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #54 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

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #55 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.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #56 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".

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #57 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.




Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #58 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.

Offline Dio

Re: Yitzi's unofficial SMAX patch 2.4c
« Reply #59 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.

 

* 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

I saw the alien phalanx coming toward us, and I calmed my mind as Kri'lan had taught me. And what I saw next to the phalanx was a shadow regiment, half-formed from the resonance around them. I cursed the aliens... with power like that, each one could fight as many, and I thanked Planet for sending us the betrayer.
~Prophet Cha Dawn 'The Betrayer and I'

* 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: 36.

[Show Queries]