Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Bug/Patch Discussion => Topic started by: Yitzi on March 30, 2014, 08:53:59 PM

Title: Bug found, looking for input on how it should be fixed
Post by: Yitzi on March 30, 2014, 08:53:59 PM
TarMinyatur found a bug in that if the cost and value of the chassis are modded different, abilities whose cost depends on speed value will describe the cost in the unit workshop as based on the value of the chassis, but the actual cost calculation will use the unit cost instead.  Clearly this is a bug; the question is which side the bug is on.  Is it really supposed to use the value (which affects speed, etc.) and the use of chassis cost is a bug, or is it really supposed to use the cost, and the description that has it using the value is the bug?

Whichever we choose, it seems it should be consistent, so the same would apply to something like resonance armor; if the value is used, artillery on res-3 infantry will add 50% to cost like on plasma (normal-3 armor) infantry, while if cost is used it would add 75% like on silksteel infantry (which has the same cost as res-3.)
Title: Re: Bug found, looking for input on how it should be fixed
Post by: Nexii on March 30, 2014, 11:00:57 PM
Based on how it's worded in alphax.txt, I want to say unit ability cost modes -4,-6,-7 (assuming this as only these mods use chassis) should depend on chassis speed.  But overall unit cost modes (such as mode 2) were created that rely on chassis cost, so speed might make less sense for those. 

Would it be difficult to make new unit ability cost modes (i.e. -8 on chassis cost, -9 on chassis+armor), etc?  Not sure this is a huge bug anyways, I find the negative cost modes other than -1 tend to create a lot of oddities.  Only artillery has one of these by default (-7).  The thing is chassis cost (pre-divided by 4) would be very high. like 4-12.  So you'd probably have to make it something like C/4+A for mode:2.
Title: Re: Bug found, looking for input on how it should be fixed
Post by: Yitzi on March 30, 2014, 11:16:30 PM
Based on how it's worded in alphax.txt, I want to say unit ability cost modes -4,-6,-7 (assuming this as only these mods use chassis) should depend on chassis speed.  But overall unit cost modes (such as mode 2) were created that rely on chassis cost, so speed might make less sense for those. 

All modes depend on chassis cost; that's what it's for.  If anything, it would make more sense to use speed for mode 2, as there value is pretty much the same effect as the original and cost is not.

Quote
Would it be difficult to make new unit ability cost modes (i.e. -8 on chassis cost, -9 on chassis+armor), etc?  Not sure this is a huge bug anyways, I find the negative cost modes other than -1 tend to create a lot of oddities.  Only artillery has one of these by default (-7).  The thing is chassis cost (pre-divided by 4) would be very high. like 4-12.  So you'd probably have to make it something like C/4+A for mode:2.

It wouldn't be that difficult, but would be extra work, so unless there's demand for it it wouldn't be worth doing.
Title: Re: Bug found, looking for input on how it should be fixed
Post by: Dio on March 31, 2014, 12:54:28 AM
I would say go with the original intention of using the chassis speed to determine the costing in both areas. It might help illustrate this particular bug to other people if someone where to post a screenshot.
Title: Re: Bug found, looking for input on how it should be fixed
Post by: TarMinyatur on April 01, 2014, 08:30:39 PM
The bug is this: You are using Unit Cost Formula #2 or #4. In workshop, you browse through special abilities, such as artillery, to add to your 4-1-1 infantry. The window, on the right-hand side, displays a cost of 0 (Armor + Speed - 2) for Artillery. Great, you decide to add the "free" special ability, but you're surprised to see that it adds 75% to the cost of your unit! It cost 70 minerals, instead of 40.

The game uses chassis cost (instead of chassis speed) to calculate overall costs. Normally this isn't an issue because speed is identical to cost in a default alphax.txt. However, chassis cost has to be >=4 for Unit Cost Formula #2 and #4. Therefore the calculation for artillery uses at least 4 for speed, instead of 1, greatly increasing the cost.

There is an inconsistency here: the workshop window uses a different formula than the unseen overruling formula. The workshop uses chassis speed, while the unseen formula uses chassis cost. This conflict needs to be corrected. 

In my opinion, Weapon and Armor calculations should always use cost (instead of value) because many units have a 0 or -1 value for Weapon or Armor. Other items have a cost that is greater than value: for instance, Res-3 Armor has a nominal value of 3, but a cost of 5. It costs more than Plasma(3) and Silksteel(4) because of its PSI bonus. Using a "3" would understate the capabilities of this armor.

Weapon and Armor cost calculations should use, as one would expect, costs (e.g. 5 for Res-3 Armor, 10 for PSI Attack.)
Speed cost calculations, on the other hand, should use nominal speed instead of chassis cost (e.g. 1 for Infantry, 2 for Speeder, 3 for Tank, etc.)  Otherwise, special abilities that are not straight-cost become prohibitively expensive.
Title: Re: Bug found, looking for input on how it should be fixed
Post by: Lord Avalon on April 01, 2014, 10:09:56 PM
What TarMinyatur said. (Is that a 'none of the above'?)
Title: Re: Bug found, looking for input on how it should be fixed
Post by: Yitzi on April 01, 2014, 10:15:04 PM
That's essentially "for weapons and armor it follows cost, but for chassis it follows value."
Title: Re: Bug found, looking for input on how it should be fixed
Post by: Nexii on April 09, 2014, 08:42:48 PM
Agree, by chassis speed is fine then.  Especially if breaking it out is cumbersome
Title: Re: Bug found, looking for input on how it should be fixed
Post by: TarMinyatur on October 07, 2014, 06:20:21 PM
Noticed this issue is still present in version 3.1e. Artillery are exceptionally expensive using any of the scaled special ability values ("-7" by default) that are calculated by chassis cost instead of chassis speed.

Meanwhile, I've decided to make the artillery ability a simple 50% increase ("2"). It would be nice to be able to have differing costs for Rover and Tank Arty, but a straight cost is workable.

Do we have a concensus on this bug?
Title: Re: Bug found, looking for input on how it should be fixed
Post by: Nexii on October 07, 2014, 06:56:14 PM
Consensus for how it should be calculated?  I assume it should be +25% cost per movement >1 for ability cost categories -4 and -7.  So rover gets cost: 1 (+25%) if move 2.   Hovertank would get cost: 2 (+50%) if set at move 3.

Negative cost modes tend to get really expensive.  I think in general if you want to discourage fast artillery you could also disable it with flags.  But then it can't be made at all.
Title: Re: Bug found, looking for input on how it should be fixed
Post by: Yitzi on October 07, 2014, 10:39:01 PM
As soon as there's a consensus as to how the modes should work for cost modes such as 2, I can add it to the list.
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: 18.

[Show Queries]