Author Topic: Bugs, notes, and just plain weird features regarding resource production  (Read 2672 times)

0 Members and 1 Guest are viewing this topic.

Offline Yitzi

I've gone through the code, and most of it is what would be expected, but I found some really strange things:

1. As I mentioned in another thread, if there is a nutrient bonus in a base square, it adds the amount listed under the nutrients for a base, rather than the nutrients for a nutrient bonus.  Unmodded, they're both 2, but with mods it could be different.  Since this does not apply to minerals or energy, I think it's pretty clearly a bug.
2. Monoliths are not affected by jungle or mineral-boosting landmarks, but are affected by energy-boosting landmarks and rivers, as well as all resource bonuses.  Because of the split between energy and the other two, I think it's pretty clearly a bug, and they should be affected by all landmarks just as they are by resource bonuses.
3. The resource cap does not apply to monolith squares or fungus squares.  This is probably not a bug; if you're producing that much from fungus, you probably should get it whether you've learned Gene Splicing or not.  (Unmodded, it's impossible to get that much without Gene Splicing unless you trade for techs or get them from pods.)  It is also lifted by a resource bonus of the relevant type (as I'm sure we all know), and nutrient caps are also lifted by condensers (probably not a bug) and by boreholes (presumably a bug, though one that is not relevant unless modding.)
4. Fungus ignores all bonuses, such as resource bonuses, landmarks, rivers, and ECONOMY.  It does not, however, ignore random event bonuses/penalties.  It is unclear whether this is a bug, though the consensus in the other thread seems to be that there should be no bonuses if you're not getting that resource already, so an option will be added to decide whether bonuses should apply when you're getting the resource already.
5. In ocean and ocean trench squares (i.e. where only the Pirates can build improvements), improvements have no effect in SMAC, but do have an effect in SMAX.  Fungus never applies to such squares; it is sometimes there (and will appear if the squares are raised), but is not visible and has no effect on resource production.
6. Borehole squares ignore nutrient and mineral landmarks, but count energy landmarks.  This is clearly a bug; they should count all landmarks.
7. I'm not sure if it's possible to have more than one landmark in the same square, but if it is you still only apply one bonus to each resource.
8. If you click on a square and click on the square data to show its productivity, it never includes the effects of facilities or golden ages, even for the base square itself.
9. Random events are added at the very end, after the resource cap, i.e. the resource cap does not include bonuses/decreases from random events.
10. If you have only one base, you don't lose energy in your HQ for having -1 ECONOMY.  Once you have a second base, your HQ loses one.
11. The Planetary Governor gets +1 energy in every base.
12. If you have fungus and a borehole in the same square, the borehole applies.
13. Forests only replace the normal square productivity on land.  At sea, they do not affect nutrients or minerals at all, but provide -1 to energy.  I see no way this could have been added as a bug, and no reason that anyone would add it intentionally (particularly as forests cannot be in sea squares), so I'm marking it as "just plain weird" and leaving it alone (since it has no effect.)
14. Likewise, when calculating the resource value of a square with a borehole, the borehole counts as a mine for mineral production and grants +1 energy/elevation like a solar collector (but with no benefit from mirrors); this applies to the value which is overridden anyway by the borehole, so it has no effect and I have no idea what's going on there.
« Last Edit: August 05, 2013, 07:34:22 AM by sisko »

Offline Green1

A question for you Yitzi. Given your research into the actual working formulas behind SMAX (minus the AI algorithms) is it possible to recreate the formulas without AI/graphics into an open source program?

In other words, transcribe this into C+, python, or better language?

With actual "duplicated" source code instead of having to worry with hard and complex assembly fixes, the community could probably help.


Offline Yitzi

I've learned some of the formulas, but nowhere near all.  Furthermore, if I drew directly from the game for a program like you describe, copyright issues might become a problem.  Finally, once you know what formulas you want to use (whether the ones from the current game or not), anyone with the coding skills could move it to a different language.  (I personally don't know any good languages well enough to do that, though considering how I've done with assembly I probably could learn them fairly quickly if I needed to.)

Offline Fal

10. If you have only one base, you don't lose energy in your HQ for having -1 ECONOMY.  Once you have a second base, your HQ loses one.

Presumably to keep factions with -ECON from having overly punishing starts?

Quote
11. The Planetary Governor gets +1 energy in every base.

Is this in addition to the +1 energy for every commerce partner?

Offline Yitzi



Presumably to keep factions with -ECON from having overly punishing starts?

Probably.  Though it really only affects the Cult; the Hive gets -1 in every base and so gets in their first base too.

Quote
Is this in addition to the +1 energy for every commerce partner?

Yes; this +1 is actually added to the output of the base square.

Offline Yitzi

A correction to what I wrote: The energy resource cap does apply to monoliths, but the nutrient and mineral caps don't.  This is clearly a bug, and in fact it seems that none of the caps should apply.

Offline TarMinyatur

Re: Bugs, notes, and just plain weird features regarding resource production
« Reply #6 on: December 01, 2013, 09:53:37 PM »
It seems strange that a borehole located in fungus provides 2 minerals and 6 energy. But if you remove the fungus, the borehole only produces 2 minerals and 2 energy.

This can occur early in the game, when you build a base near the Borehole Cluster landmark. So no production caps have been removed yet.

Bug? Feature?

Offline Yitzi

Re: Bugs, notes, and just plain weird features regarding resource production
« Reply #7 on: December 01, 2013, 10:37:50 PM »
It seems strange that a borehole located in fungus provides 2 minerals and 6 energy. But if you remove the fungus, the borehole only produces 2 minerals and 2 energy.

This can occur early in the game, when you build a base near the Borehole Cluster landmark. So no production caps have been removed yet.

Bug? Feature?

It is indeed a bug, thank you for finding it.  A fix will be up shortly.

Offline Yitzi

Re: Bugs, notes, and just plain weird features regarding resource production
« Reply #8 on: December 01, 2013, 11:07:47 PM »
Ok, download will be available as soon as it's approved.  It also includes some bugfixes, plus the change to unit cost that was requested (now when using modes 2 or 4, it will multiply by the chassis cost divided by 4, rather than a fixed amount depending on land/sea/air and whether it's infantry, so there's more room for modding.)

Offline gwillybj

Re: Bugs, notes, and just plain weird features regarding resource production
« Reply #9 on: December 02, 2013, 02:37:50 PM »
7. I'm not sure if it's possible to have more than one landmark in the same square, but if it is you still only apply one bonus to each resource.
As a solo-player, I've made quite a few maps and I believe it is true that you can't have two landmarks in one square, i.e., overlapping landmarks; e.g., you can't put The Ruins atop Pholus Ridge or Sunny Mesa, or have Fossil Field Ridge in Geothermal Shallows.
Two possibilities exist: Either we are alone in the Universe or we are not. Both are equally terrifying. ― Arthur C. Clarke
I am on a mission to see how much coffee it takes to actually achieve time travel. :wave:

 

* 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

Go through, my children! The time of miracles is upon us. Let us cast off sin and walk together to the Garden of the Lord. With God's mercy we shall meet again on the other side.
~ Sister Miriam Godwinson ’Last Testament’

* 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: 47 - 1280KB. (show)
Queries used: 46.

[Show Queries]