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

0 Members and 1 Guest are viewing this topic.

Offline TarMinyatur

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #15 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


Offline Yitzi

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

Offline Nexii

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

Offline Buster's Uncle

  • Through art, I
  • Transcend
  • *
  • Posts: 45770
  • €192
  • View Inventory
  • Send /Gift
  • Someone thinks a Winrar is You!  Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder Downloads Contributor AC2 Wiki contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Yitzi's unofficial SMAX patch 2.5
« Reply #18 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?

Offline Nexii

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #19 on: March 20, 2014, 12:11:27 AM »

Offline Buster's Uncle

  • Through art, I
  • Transcend
  • *
  • Posts: 45770
  • €192
  • View Inventory
  • Send /Gift
  • Someone thinks a Winrar is You!  Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder Downloads Contributor AC2 Wiki contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Yitzi's unofficial SMAX patch 2.5
« Reply #20 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?

Offline Yitzi

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

Offline Buster's Uncle

  • Through art, I
  • Transcend
  • *
  • Posts: 45770
  • €192
  • View Inventory
  • Send /Gift
  • Someone thinks a Winrar is You!  Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder Downloads Contributor AC2 Wiki contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Yitzi's unofficial SMAX patch 2.5
« Reply #22 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?

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #23 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."), and that contains a link to the new alphax variables.

Offline Buster's Uncle

  • Through art, I
  • Transcend
  • *
  • Posts: 45770
  • €192
  • View Inventory
  • Send /Gift
  • Someone thinks a Winrar is You!  Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder Downloads Contributor AC2 Wiki contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Yitzi's unofficial SMAX patch 2.5
« Reply #24 on: March 20, 2014, 02:53:09 AM »
Okydoke.  That ought to do it.

Offline Nexii

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #25 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

Offline Yitzi

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #26 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.)

Offline Nexii

Re: Yitzi's unofficial SMAX patch 2.5
« Reply #27 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

Offline Yitzi

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

Offline TarMinyatur

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

 

* 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)
-=-
18 (6%)
XP Compatibility patch
-=-
9 (3%)
Gog version for Windows
-=-
77 (29%)
Scient (unofficial) patch
-=-
28 (10%)
Kyrub's latest patch
-=-
14 (5%)
Yitzi's latest patch
-=-
85 (32%)
AC for Mac
-=-
2 (0%)
AC for Linux
-=-
5 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
12 (4%)
Total Members Voted: 260
AC2 Wiki Logo

* Random quote

Each individual pipe contains a hot slurry of minerals drawn from Planet's crust and makes a sound like rain falling on a tin roof. When they converge on the trunkline the sound is a terrifying thunder, a thunder of untold wealth, and power.
~Captain Ulrik Svensgaard 'Tending the Sea'

* Select your theme

*