Was it something like this?
Final Cost = Defined iCost*[( TECH_COST_MODIFIER+100)/100]*(TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER/100)*(Game Speed Modifier /100)*(Handicap Modifier/100)*[(TechCostModifier Era+100)/100]*(Research Era Modifier/100)*[(Beeline Stings+100)/100]*(Map Size Modifier/100)
This one is for production, where modifiers act as should act.
Code:
iProductionNeeded = GC.getBuildingInfo(eBuilding).getProductionCost();
iProductionNeeded *= GC.getDefineINT("BUILDING_PRODUCTION_PERCENT")
iProductionNeeded /= 100;
iProductionNeeded *= GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getConstructPercent();
iProductionNeeded /= 100;
iProductionNeeded *= GC.getHandicapInfo(getHandicapType()).getConstructPercent();
iProductionNeeded /= 100;
iProductionNeeded *= GC.getEraInfo(getCurrentEra()).getConstructPercent();
iProductionNeeded /= 100;
It would look like that but with 8 pairs:
Code:
Beeline Stings += 100
TechCostModifier Era += 100
TECH_COST_MODIFIER += 100
TechCost = Defined iCost
TechCost *= TECH_COST_MODIFIER - tech diffusion constant
TechCost /= 100;
TechCost *= TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER - global defines constant
TechCost /= 100;
TechCost *= Game Speed Modifier
TechCost /= 100;
TechCost *= Handicap Modifier
TechCost /= 100;
TechCost *= TechCostModifier Era
TechCost /= 100;
TechCost *= Research Era Modifier - unused - set to 100 for all eras
TechCost /= 100;
TechCost *= Beeline Stings - activated with game option and affects past techs only
TechCost /= 100;
TechCost *= Map Size Modifier
TechCost /= 100;
There is not much difference from it:
[Tech Cost] = ( iCost TechInfo ) x ( TECH_COST_MODIFIER ) x ( iTechCostModifier EraInfo, depends on what era the tech is in ) x [( iResearchPercent WorldInfo )
+ ( iResearchPercent EraInfo )
+ ( iResearchPercent HandicapInfo )
+ ( iBeelineStingsTechCostModifier EraInfo )] x ( iResearchPercent GamespeedInfo ) x ( TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER )
Without Beeline stings option and since EraInfo is set to 100% everywhere we have something like that:
[Tech Cost] = ( iCost TechInfo ) x ( TECH_COST_MODIFIER ) x ( iTechCostModifier EraInfo, depends on what era the tech is in ) x [( iResearchPercent WorldInfo )
+ ( iResearchPercent HandicapInfo ) ] x ( iResearchPercent GamespeedInfo ) x ( TECH_COST_EXTRA_TEAM_MEMBER_MODIFIER )
Maybe you failed to adjust iBeelineStingsTechCostModifier EraInfo, TechCostModifier Erainfo and TECH_COST_MODIFIER by 100?
In my XML calculator few post earlier research costs didn't strayed too far except in extremes like Duel/Nightmare, Duel/Settler, Gigantic/Nightmare and Gigantic/Settler.
Basically this component: [( iResearchPercent WorldInfo ) + ( iResearchPercent EraInfo ) + ( iResearchPercent HandicapInfo ) + ( iBeelineStingsTechCostModifier EraInfo )]
[( iResearchPercent WorldInfo) x ( iResearchPercent EraInfo ) x ( iResearchPercent HandicapInfo )x ( iBeelineStingsTechCostModifier EraInfo )]
Reducing global modifier doesn't work in way you except - reducing it to 0 reduces building costs to 50%, if and only if two other modifiers are at 100.
It would reduce costs by different percentage, if Handicap and Era components would be different, as you used essentially their sum reduced by 300 (and multiplied by -1 if modifier became negative) for further processing - essentially you are using handicapGLOBAL_PRODUCTIONEra modifier.
Similarly for Techs you aren't using three modifiers independently - Instead of it you are using worlderabeeline modifier in further processing, and this is different animal.