Alpha Centauri 2

Community => Chiron News Network => Topic started by: Yitzi on March 14, 2014, 06:13:17 PM

Title: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 14, 2014, 06:13:17 PM
Yitzi's unofficial SMAX patch 2.5

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

Here it is.  A number of bugfixes, plus the ability to have support (roughly) proportional to cost, plus enhanced information.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio on March 15, 2014, 02:06:56 AM
 :D ;woohoo
Thank you, Yitzi! This patch version formally marks my first ever released coding contribution to a game.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Quota on March 15, 2014, 06:23:39 PM
Awesome. ;b;

I forgot to mention this before, but:
Quote from: wiki on Yitzi's patch
If a satellite (Sky hydroponics, Nessus mining, Orbital power, or Orbital defense pod) is finished with nothing left in the queue, the base will not switch to Stockpile Energy, but rather begin making another of the same satellite.
This is a good idea, but doesn't seem to function, unless it relies on changing some unmentioned alphax setting. Tried with Governor on and off. I'm not using base multibuild ATM.
Also, same wiki page still says The latest version of the patch is v2.4c. at the top, FYI.

I like the 'enhanced information' feature (also that the patch version is now in game's About dialog), very neat. The game misses more information dumps... as people already suggested to you, stuff like listing the last council meeting, who's the current Planetary governor, U.N. Charter status, number of fungal pops that occurred for your faction, and more (game rules, perhaps?) stuff you can't view/validate readily. I presume creating some new window to dump those is a pain, though.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 16, 2014, 02:19:08 AM
Awesome. ;b;

I forgot to mention this before, but:
Quote from: wiki on Yitzi's patch
If a satellite (Sky hydroponics, Nessus mining, Orbital power, or Orbital defense pod) is finished with nothing left in the queue, the base will not switch to Stockpile Energy, but rather begin making another of the same satellite.
This is a good idea, but doesn't seem to function, unless it relies on changing some unmentioned alphax setting. Tried with Governor on and off. I'm not using base multibuild ATM.

I'll have to check it out...

Quote
I like the 'enhanced information' feature (also that the patch version is now in game's About dialog), very neat. The game misses more information dumps... as people already suggested to you, stuff like listing the last council meeting, who's the current Planetary governor, U.N. Charter status, number of fungal pops that occurred for your faction, and more (game rules, perhaps?) stuff you can't view/validate readily. I presume creating some new window to dump those is a pain, though.

Yeah...it could probably be added to the list of things that cycle through the panels at the bottom...but that (which is fairly easily-updated record-keeping and therefore not such a high priority) would be a significant amount of work.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 16, 2014, 02:55:47 AM
Okay, I checked out the fact that it wasn't rebuilding the same satellite like it should, found the bug, and fixed it.  Because it's not any worse than without my patch, I'm not putting out a separate sub-version just for this, but there are a couple of other fixes I've been meaning to do for 2.5b so this will be included in that.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio on March 16, 2014, 03:50:11 AM
I discovered how I could make the window appear that is described at the end of the topic "A new window" under the modding board. To make it appear, simply change call terranx_.00470ED0 at address 004710D6 to call terranx_.00470FA0. This makes the map appear at the start of any new, loaded or scenario game. Another feature of this window is that it can be moved anywhere, zoomed in and out by clicking on the upper right hand corner of the label box ("Mission Map#3"), and allows you to see anything that could be seen on your main map.
 
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 16, 2014, 04:07:49 AM
And do you know what is done by the function at 470ED0?  Because then that wouldn't be called.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio on March 16, 2014, 04:19:45 AM
oops........It would disable your ability to change research goals :-[.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 16, 2014, 10:59:33 AM
And that is why you never change anything without making sure you've fully analyzed it first.

Now, it might be possible to just add the new call...but you'd better analyze to make sure that has no undesired ramifications.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio on March 16, 2014, 07:55:09 PM
Is it a bug that the troop transport module decreases the movement rate of the chassis it is on by one?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: gwillybj on March 16, 2014, 08:01:17 PM
Is it a bug that the troop transport module decreases the movement rate of the chassis it is on by one?
I don't think so. It is simply making it a "slow" unit.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio on March 16, 2014, 08:06:14 PM
Is it a bug that the troop transport module decreases the movement rate of the chassis it is on by one?
I don't think so. It is simply making it a "slow" unit.
Okay. Regarding that map window, I might have found something interesting. First, their is a bug with the menu for the world map. The selection "Recenter this window here" does not function at all. Located two spaces beneath it in the labels.txt file is a label for "Open new map window". Could they be connected?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 16, 2014, 08:09:27 PM
Could be, might not be.  To find out, you'd have to analyze and see why the one that's there doesn't work and see if that's also causing the map window to not appear.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio on March 16, 2014, 08:50:15 PM
The good news is that I have isolated how the mouse controls work for the world map menu. The bad news is that I still do not know why the button is not working.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: nadia911 on March 18, 2014, 01:53:12 AM
Thanks Yitzy & Dio  :danc:
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: TarMinyatur on March 19, 2014, 04:36:34 PM
Thanks for your collective efforts.

I am encountering a crash with version 2.5.

If the Unit Cost Formula in alphax.txt is set to 2 or 4 (and their derivatives -- 10, 12, 18, 20, 26, or 28), the game crashes as soon as the first base is named.

Exception: Unhandled - C0000095.INT_OVERFLOW

Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 19, 2014, 07:21:23 PM
I found the problem.  The formula, if you remember, is (weapon cost+armor cost)*chassis cost/4.  This is rounded down, so for a scout patrol there is a cost of 0.  To fix it, simply set chassis costs high enough that every unit has cost at least 1 (or make those that don't into predesigned units and set their cost manually.)  For the original idea of "1 for infantry, 2 for other land and sea units, and 3 for air" you'd want to set chassis costs to 4, 8, and 12 respectively.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Nexii on March 20, 2014, 12:02:17 AM
Yay great work as always!  And yay for someone else trying mode 2/4 (actually I've been playing on a mix of modes).  I believe previously mode 2/4 didn't have the divide by 4 applied?  This actually better though since now you can set cost multipliers such as 1.25x, 1.50x, 1.75x, etc.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Buster's Uncle on March 20, 2014, 12:05:17 AM
Would it be a good idea to edit something about this into the description with the download?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Nexii on March 20, 2014, 12:11:27 AM
It's all in the twiki here

http://alphacentauri2.info/wiki/New_alphax_variables_in_Yitzi%27s_patch (http://alphacentauri2.info/wiki/New_alphax_variables_in_Yitzi%27s_patch)
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Buster's Uncle on March 20, 2014, 12:20:13 AM
That's nice.

Wouldn't it be a good idea to idiot-proof?  Maybe a master list of boilerplate instructions with each update?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 20, 2014, 01:20:22 AM
Yay great work as always!  And yay for someone else trying mode 2/4 (actually I've been playing on a mix of modes).  I believe previously mode 2/4 didn't have the divide by 4 applied?  This actually better though since now you can set cost multipliers such as 1.25x, 1.50x, 1.75x, etc.

Indeed.  Previously it was a flat 1X for infantry, 3X for air, 2X for everything else.  But I changed it because it allows better multipliers.

That's nice.

Wouldn't it be a good idea to idiot-proof?  Maybe a master list of boilerplate instructions with each update?

There is no such thing as idiot-proof, especially for something like this.  The instructions for each variable are in the wiki, and I generally add new instructions with each update, and I try to make sure that the version included by default in the patch will produce the pre-patch version of the game (except for bugfixes), so that non-idiots can mod safely, but I can't ensure that idiot modding won't break the game.  Although even without my patch, idiot modders wouldn't last long; it's fairly easy to do something like use an invalid key.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Buster's Uncle on March 20, 2014, 01:39:44 AM
Well of course.  As the engineers' joke goes, if you make something idiot-proof, the world will build a better idiot.

Include a link to the wiki stuff in your descriptions, though?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 20, 2014, 02:50:01 AM
The wiki entry on the patch has its address in the patch readme ("Full information regarding my patch can be found at http://alphacentauri2.info/wiki/Yitzi%27s_patch. (http://alphacentauri2.info/wiki/Yitzi%27s_patch.)"), and that contains a link to the new alphax variables.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Buster's Uncle on March 20, 2014, 02:53:09 AM
Okydoke.  That ought to do it.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Nexii on March 20, 2014, 03:33:25 AM
Since related to TarMinyatur's post above.  I noted that when using cost mode:2, adding a special ability to a unit with a weapon+armor cost of 1 crashes the game.  This is even if you set chassis factor to 4 or 8.  Probably order of operations resulting in divide by 0 as you explained already Yitzi
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 20, 2014, 04:07:18 AM
Since related to TarMinyatur's post above.  I noted that when using cost mode:2, adding a special ability to a unit with a weapon+armor cost of 1 crashes the game.  This is even if you set chassis factor to 4 or 8.  Probably order of operations resulting in divide by 0 as you explained already Yitzi

Firstly, it's not a divide by 0; it's a unit cost of 0 which actually causes an overflow-based error in the AI calculations.  But what you describe shouldn't happen, and when I tested it (with trained 1/1/1, setting infantry to a chassis cost of 4 and hand weapons to a weapon cost of 0) it did not crash the game.  Maybe you'd better describe exactly what you did that made it crash (i.e. the exact numbers and ability in question.)
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Nexii on March 20, 2014, 04:23:29 AM
Ok you're right that weapon cost: 0, armor cost: 1 doesn't crash the game.  What I was using was the opposite - weapon cost: 1, armor cost: 0 which crashed the game for me.  At least since the former doesn't crash, I can rework the costs
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 20, 2014, 11:23:52 AM
Ok you're right that weapon cost: 0, armor cost: 1 doesn't crash the game.  What I was using was the opposite - weapon cost: 1, armor cost: 0 which crashed the game for me.

Well, that has nothing to do with mode 2; most likely it was trying to calculate the cost of something like Hypnotic Trance, which has cost weapon/armor.  Avoid any special abilities with cost -1 (weapon/armor), and that should work ok too.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: TarMinyatur on March 20, 2014, 10:24:58 PM
I found the problem.  The formula, if you remember, is (weapon cost+armor cost)*chassis cost/4.  This is rounded down, so for a scout patrol there is a cost of 0.  To fix it, simply set chassis costs high enough that every unit has cost at least 1 (or make those that don't into predesigned units and set their cost manually.)  For the original idea of "1 for infantry, 2 for other land and sea units, and 3 for air" you'd want to set chassis costs to 4, 8, and 12 respectively.

Ah! Thanks again. I'll remember to set chassis costs >= 4 when using Unit Cost Formula #4.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: TarMinyatur on March 24, 2014, 08:03:40 PM
Artillery costs are unusually high when I use Unit Cost Formula #4.

The infantry chassis cost is set to 4. The costs of special abilities are unmodified.
My (4)-1-1 Impact Battery costs 7 rows, instead of 4!
(In comparison, a regular 4-1-1 Impact Squad costs 4, as expected.)

The calculation for artillery appears to be:

cost = (The greater of Weapon or Armor)  *  ( 4 + Special_Abilities + 3) / 4   *  Chassis/4
The number in bold represents the inflated cost of artillery.

Let's do the calculation...

Start with Artillery Special Ability cost = Armor + Speed - 2

(4)-1-1 Battery's Special Ability cost = 1 + 1 - 2 = 0   (Artillery doesn't add to the cost of unarmored speed-1 units.)
cost = 4 * ( 4 + 0 + 3 ) / 4 * 4/4
cost = 4 * 7/4 * 1
cost = 7 rows

--------------------

My (4)-5-1 Photon Battery costs 13, instead of 10.

Special = Armor + Speed - 2
Special = 5 + 1 - 2
Special = 4

cost = 5 * ( 4 + 4 + 3 ) /4 * 4/4
cost = 5 *  11/4  * 1
cost = 55/4
cost = 13.75 = 13 rows
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 24, 2014, 08:30:46 PM
Artillery costs are unusually high when I use Unit Cost Formula #4.

The infantry chassis cost is set to 4. The costs of special abilities are unmodified.
My (4)-1-1 Impact Battery costs 7 rows, instead of 4!
(In comparison, a regular 4-1-1 Impact Squad costs 4, as expected.)

The calculation for artillery appears to be:

cost = (The greater of Weapon or Armor)  *  ( 4 + Special_Abilities + 3) / 4   *  Chassis/4
The number in bold represents the inflated cost of artillery.

Let's do the calculation...

Start with Artillery Special Ability cost = Armor + Speed - 2

(4)-1-1 Battery's Special Ability cost = 1 + 1 - 2 = 0   (Artillery doesn't add to the cost of unarmored speed-1 units.)
cost = 4 * ( 4 + 0 + 3 ) / 4 * 4/4
cost = 4 * 7/4 * 1
cost = 7 rows

--------------------

My (4)-5-1 Photon Battery costs 13, instead of 10.

Special = Armor + Speed - 2
Special = 5 + 1 - 2
Special = 4

cost = 5 * ( 4 + 4 + 3 ) /4 * 4/4
cost = 5 *  11/4  * 1
cost = 55/4
cost = 13.75 = 13 rows

Hmm...you could change the cost of artillery from -7 to -3, though that will reduce the cost for artillery speeders...

If that's still a problem, let me know and I can change it so that methods 2 and 4 use chassis speed rather than chassis cost for ability cost calculations, though that wouldn't be included until 2.6.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: TarMinyatur on March 30, 2014, 08:37:45 PM
If the special ability cost indicates "0" during workshop then there should be no increase. It's confusing otherwise.

As to whether the special ability cost for artillery should be...

Armor + Chassis - 2   // a minimum increase of 75%, since Chassis must be >=4

...instead of...

Armor + Speed - 2   // a minimum increase of 0%

...that's a separate issue (and would require a change in the reported cost).

I prefer the latter calculation so you can deploy effective low-cost anti-Mindworm/Sealurk/IoD forces, pre-Empath Song. Such as (4)-2-1 units for 50 minerals.

Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 30, 2014, 08:46:47 PM
If the special ability cost indicates "0" during workshop then there should be no increase. It's confusing otherwise.

I believe you have found a bug: When describing the cost for abilities with cost based on chassis, it uses the chassis value (unit speed before certain modifiers), but when it actually calculates it it uses the chassis cost.  I'll put up a poll to determine which one it should actually be, and hopefully fix it in version 2.6.

Quote
As to whether the special ability cost for artillery should be...

Armor + Chassis - 2   // a minimum increase of 75%, since Chassis must be >=4

...instead of...

Armor + Speed - 2   // a minimum increase of 0%

...that's a separate issue (and would require a change in the reported cost).

I prefer the latter calculation so you can deploy effective low-cost anti-Mindworm/Sealurk/IoD forces, pre-Empath Song. Such as (4)-2-1 units for 50 minerals.

Actually, you could make artillery cost not depend on speed, and then it'd be just as cheap for infantry and even cheaper for fast units...
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Skyagusta on March 31, 2014, 11:35:32 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.

3) The 6th or 7th base I found (always around the b-limit) seems to operate by a different support value than my other bases. For example, if my support value in SE is zero, most of my bases will have the regular 2 units free, but one or two will commonly have only one unit free while all other require mineral support.

Thanks again for the fantastic patch. If I notice any other anomalies I will be sure to post them.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on March 31, 2014, 11:40:21 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.

3) The 6th or 7th base I found (always around the b-limit) seems to operate by a different support value than my other bases. For example, if my support value in SE is zero, most of my bases will have the regular 2 units free, but one or two will commonly have only one unit free while all other require mineral support.

Thanks again for the fantastic patch. If I notice any other anomalies I will be sure to post them.

You're welcome; please post a save showing the third one, and if the first two always occur for a particular action (i.e. always when you scroll over a particular unit), please post a save for that too as well as a description of the action, so I can figure out what's happening.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Skyagusta on March 31, 2014, 11:56:57 PM
Here's a save for 3 (along with alphax), notice Lindley's Rest has me spending one mineral to support the scout patrol whereas other bases get the first unit free.

As for the others, #1 happens every single game but there is no rhyme or reason as to when it happens, and I spent a considerable amount of time trying to pin one down. Sometimes it is at the beginning of a turn, sometimes the end, sometimes after I move a unit, sometimes when I come into contact with another faction, sometimes when I discover a tech. I will continue experimenting though and report back.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on April 01, 2014, 01:03:44 AM
Here's a save for 3 (along with alphax), notice Lindley's Rest has me spending one mineral to support the scout patrol whereas other bases get the first unit free.

As for the others, #1 happens every single game but there is no rhyme or reason as to when it happens, and I spent a considerable amount of time trying to pin one down. Sometimes it is at the beginning of a turn, sometimes the end, sometimes after I move a unit, sometimes when I come into contact with another faction, sometimes when I discover a tech. I will continue experimenting though and report back.

Even if you have no idea what is in common, but can reproduce it reliably, that should be enough.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Skyagusta on April 01, 2014, 01:16:41 AM
Ok, here it is. The game crashes as soon as the colony pod moves out of the fungus.

Edit: To be clear, if I change the "enhanced information" variable to 0, the game plays out as normal.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on April 01, 2014, 04:26:42 AM
I am not getting the crash for the latter save; in which direction are you moving the colony pod (though I can't think why that would make a difference)?

I am getting the bug for the former save, so I should be able to fix it.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Skyagusta on April 01, 2014, 04:43:41 AM
It doesn't matter what I do with the colony pod for the second save- I get the crash regardless of if I move it or simply end the turn. I suppose it has something to do with the merging of your patch with the Smaniac Mod?

Thanks for looking in to the other bug. These things don't bother me, I'm just doing my part to report possible bugs that I experience.

One more I forgot to mention earlier, and you may have covered it in another place, but after I build satellites the production reverts back to Stockpile Energy. Should I post a save?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Buster's Uncle on April 01, 2014, 04:45:53 AM
Correcting the satellite thing was the main point of v.2.5b,  http://alphacentauri2.info/index.php?action=downloads;sa=view;down=160 (http://alphacentauri2.info/index.php?action=downloads;sa=view;down=160)  I believe.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Skyagusta on April 01, 2014, 04:47:48 AM
Right, which I'm 99% positive I have. I'll download again just to be sure.

Edit- Yeah, that fixed it. Thanks.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on April 01, 2014, 04:52:02 AM
It doesn't matter what I do with the colony pod for the second save- I get the crash regardless of if I move it or simply end the turn. I suppose it has something to do with the merging of your patch with the Smaniac Mod?

Could be.

Quote
Thanks for looking in to the other bug. These things don't bother me, I'm just doing my part to report possible bugs that I experience.

Thanks.  And it's a trickier bug than I expected...Lindley's Rest is in fact getting two free supported units, but they're Consciousness units that must have been supported by the base before it was captured; I fixed the bug that causes units to not require support if homed to a base you don't own, and apparently this was hiding behind it.  I'll have to take a poll regarding what should happen in that case.

Quote
One more I forgot to mention earlier, and you may have covered it in another place, but after I build satellites the production reverts back to Stockpile Energy. Should I post a save?

If you confirm that you have 2.5b (not just 2.5) and it still happens, then post a save.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Skyagusta on April 02, 2014, 06:36:05 AM
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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi 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?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio 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?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi 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).
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Skyagusta 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio 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?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Dio 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Buster's Uncle on April 04, 2014, 11:04:03 PM
Any idea what caused Sparta Command's shadow to bork up?
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Skyagusta 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Quota 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi 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.
Title: Re: Yitzi's unofficial SMAX patch 2.5
Post by: Yitzi on April 24, 2014, 01:33:17 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.

Sorry it took too long to get to this, but in fact that's not going to work, as the bug actually appeared beforehand; it's just that until that scout patrol is built Otkrietia-Discovery has 2 free support and only 1 supported unit, so it supports the bugged unit for free anyway.

I'm afraid that to find the actual turn where it starts you'd have to either play with every base supporting the maximum number of units that it can for free (so that an interloper will be detected), or else play with enhanced information (where it shows how much free support you have left, so you can compare to how much you should have and find where the bug begins that way.)
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: 14.

[Show Queries]