Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: Anon Zytose on April 10, 2014, 03:41:15 AM

Title: Make sure Stockpile Energy has a price.
Post by: Anon Zytose on April 10, 2014, 03:41:15 AM
Salutations, everyone! Thank you for creating this site! Also, I'm hoping some of you could help me out here...

I've recently regained interest in putting efforts toward modding the game. First run: A few visible errors caused by invisible line breaks. Still not sure how that happened. More importantly, the second run has a situation where attempting to change production would cause the game to crash inexplicably.

After a great deal of trial and error, I found the source of the game-crashing effect: I had set the price of Stockpile Energy to zero. That cost has since been switched to a single mineral row, but I feel as if I should mention that I learned something: A production cost of zero for an item will crash the game.

That is all for now. First post of mine on this site complete! Thank you!
Title: Re: Make sure Stockpile Energy has a price.
Post by: Buster's Uncle on April 10, 2014, 03:44:26 AM
Thank YOU!

That divide by zero error'll get you every time.
Title: Re: Make sure Stockpile Energy has a price.
Post by: Dio on April 10, 2014, 03:52:04 AM
Adding a price to Stockpile Energy has also caused opening unity pods that finish a production at the your nearest base to "complete" stockpile energy.
Title: Re: Make sure Stockpile Energy has a price.
Post by: Buster's Uncle on April 10, 2014, 03:55:21 AM
Does that temporarily cause a spike in EC creation by half the value of a row?
Title: Re: Make sure Stockpile Energy has a price.
Post by: Yitzi on April 10, 2014, 04:17:13 AM
Salutations, everyone! Thank you for creating this site! Also, I'm hoping some of you could help me out here...

I've recently regained interest in putting efforts toward modding the game. First run: A few visible errors caused by invisible line breaks. Still not sure how that happened. More importantly, the second run has a situation where attempting to change production would cause the game to crash inexplicably.

After a great deal of trial and error, I found the source of the game-crashing effect: I had set the price of Stockpile Energy to zero. That cost has since been switched to a single mineral row

It's not a single mineral row; if you're using my patch (which you must be, as without my patch the game ignores the "cost" for Stockpile Energy), the "cost" for Stockpile Energy is in minerals rather than rows, and is the number of minerals it takes to produce 1 energy.  So if you set it to 1, stockpile energy will be twice as effective as in the unpatched game; if you don't want to change things, it should be set to 2 (as it is in the version of alphax attached to my patch.)

Adding a price to Stockpile Energy has also caused opening unity pods that finish a production at the your nearest base to "complete" stockpile energy.

Hmm...I didn't expect that to happen.  I'll look into it and provide a fix.
Title: Re: Make sure Stockpile Energy has a price.
Post by: Dio on April 10, 2014, 04:36:07 AM
Here is a screenshot illustrating the bug. There are two bases, one producing stockpile energy and the other a scout patrol.
Title: Re: Make sure Stockpile Energy has a price.
Post by: Yitzi on April 10, 2014, 04:38:34 AM
Ok, I found what it is; there's a rule that if the thing being built is at least 75% done, you can't get a "complete production" pod.  (You can also never get a "complete production" pod for a project.)  At 0 cost, it's always at least 75% done, but with more it isn't.  I think it doesn't make sense for a pod to help "produce" stockpile, so a fix will be along shortly.

(Once it's clear what the bug is, screenshots don't really help much.)
Title: Re: Make sure Stockpile Energy has a price.
Post by: Yitzi on April 10, 2014, 04:45:53 AM
Ok, the patch is posted and ready for approval.

By the way, BUncle, it would actually boost EC creation by the full size of a row (as the amount you get is enough to set it equal to row size times the cost), though you'd lose anything you had left over from last turn.
Title: Re: Make sure Stockpile Energy has a price.
Post by: Anon Zytose on April 10, 2014, 04:49:19 AM
Salutations, everyone! Thank you for creating this site! Also, I'm hoping some of you could help me out here...

I've recently regained interest in putting efforts toward modding the game. First run: A few visible errors caused by invisible line breaks. Still not sure how that happened. More importantly, the second run has a situation where attempting to change production would cause the game to crash inexplicably.

After a great deal of trial and error, I found the source of the game-crashing effect: I had set the price of Stockpile Energy to zero. That cost has since been switched to a single mineral row

It's not a single mineral row; if you're using my patch (which you must be, as without my patch the game ignores the "cost" for Stockpile Energy), the "cost" for Stockpile Energy is in minerals rather than rows, and is the number of minerals it takes to produce 1 energy.  So if you set it to 1, stockpile energy will be twice as effective as in the unpatched game; if you don't want to change things, it should be set to 2 (as it is in the version of alphax attached to my patch.)
That's good to know, thank you. And yes, I am using your patch. Thank you so much for creating it, by the way! :D
Title: Re: Make sure Stockpile Energy has a price.
Post by: Yitzi on April 10, 2014, 12:17:41 PM
Salutations, everyone! Thank you for creating this site! Also, I'm hoping some of you could help me out here...

I've recently regained interest in putting efforts toward modding the game. First run: A few visible errors caused by invisible line breaks. Still not sure how that happened. More importantly, the second run has a situation where attempting to change production would cause the game to crash inexplicably.

After a great deal of trial and error, I found the source of the game-crashing effect: I had set the price of Stockpile Energy to zero. That cost has since been switched to a single mineral row

It's not a single mineral row; if you're using my patch (which you must be, as without my patch the game ignores the "cost" for Stockpile Energy), the "cost" for Stockpile Energy is in minerals rather than rows, and is the number of minerals it takes to produce 1 energy.  So if you set it to 1, stockpile energy will be twice as effective as in the unpatched game; if you don't want to change things, it should be set to 2 (as it is in the version of alphax attached to my patch.)
That's good to know, thank you. And yes, I am using your patch. Thank you so much for creating it, by the way! :D

You're welcome.
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]