gamemanual:gm_contracts
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| gamemanual:gm_contracts [2022/06/06 14:54] – [Variables] admin | gamemanual:gm_contracts [2022/06/06 14:56] (current) – [Variables] admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ======= Contracts Game Mechanics ======= | ||
| + | |||
| + | |||
| + | The Game Mechanics section of the manual details the internal formula used in the game's calculations. | ||
| + | |||
| + | The Game Mechanics part of the manual is mainly designed to be a reference for the frequently asked question, "Why do I get this rating when I do X, Y, Z?!" Usually, this answer involves many different variables, which this section of the manual demonstrates. | ||
| + | |||
| + | **The game mechanics section of the manual shows [[https:// | ||
| + | |||
| + | |||
| + | ====== Variables ====== | ||
| + | |||
| + | ^ Name ^ Description ^ ^ Name ^ Description ^ | ||
| + | | **govPopulation** | This is the population of the contracting city or country. | | **govCalc** | The war status for the country, 1=Normal, 0=Limited, -1 War, -2 Total War. | | ||
| + | | **year** | This is the game year. | | **Year_Built** | This is the year of the design. | | ||
| + | | **Minimum_Bid_Score** | Minimum required bid score to be selected. | | **ContractPeriod** | How long the contract lasts. | | ||
| + | | **Wealth_Index** | Wealth Index of the design. See [[gamemanual: | ||
| + | | **Lobbying_Budget** | The weighted lobbying budget for your company | | **Max_Lobbying_Budget** | The maximum amount of lobbying budget that can be spent | | ||
| + | | **contractUnitPriceMod** | Price mod for this type of contract as defined in the EngineContracts.xml file. | | **** | | | ||
| + | | **Engine_Type_EngineSize** | Engine Size variable as defined in the EngineContracts.xml file. | | **Engine_Type_UnitNumbers** | This is a modifier variable for the number of units ordered for this type of contract as defined in the EngineContracts.xml file. | | ||
| + | | **Engine_Type_FuelMOD** | Engine Fuel Economy variable as defined in the EngineContracts.xml file. | | **Engine_Type_HPMOD** | Engine horsepower variable as defined in the EngineContracts.xml file. | | ||
| + | | **Engine_Type_torqueMOD** | Engine torque variable as defined in the EngineContracts.xml file. | | **Engine_Type_WidthMOD** | Engine width variable as defined in the EngineContracts.xml file. | | ||
| + | | **Engine_Type_LengthMOD** | Engine length variable as defined in the EngineContracts.xml file. | | **Engine_Type_WeightMOD** | Engine weight variable as defined in the EngineContracts.xml file. | | ||
| + | | **Engine_Type_unitPrice** | This modifier variable affects the unit price of this type of engine contract as defined in the EngineContracts.xml file. | | **** | | | ||
| + | | **Type_Popularity** | This is the popularity value of this type of vehicle. | | **CarContractType_unitNumbers** | This is a modifier value for the number of units for this type of car contract as defined in the EngineContracts.xml file. | | ||
| + | | **CarContractType_HPMOD** | Horsepower modifier value for this type of car contract as defined in the EngineContracts.xml file. | | **CarContractType_FuelMOD** | Fuel Economy modifier value for this type of car contract as defined in the EngineContracts.xml file. | | ||
| + | | **cargoType** | This is the cargo importance rating for this vehicle type. | | **CarContractType_CargoMOD** | Cargo modifier value for this type of car contract as defined in the EngineContracts.xml file. | | ||
| + | | **CarContractType_torqueMOD** | Torque modifier value for this type of car contract as defined in the EngineContracts.xml file. | | **CarContractType_WeightMOD** | Weight modifier value for this type of car contract as defined in the EngineContracts.xml file. | | ||
| + | | **CarContractType_TopSpeedMOD** | Topspeed modifier value for this type of car contract as defined in the EngineContracts.xml file. | | **CarContractType_unitPrice** | Unit price modifier value for this type of car contract as defined in the EngineContracts.xml file. | | ||
| + | | **RacingSeries_Funding_Value** | This is the racing funds variable for racing series as defined in the RacingSeries.xml file. | | **RacingSeries_Races** | This is the number of races a series runs in a season. | | ||
| + | | **ex_1d002p_year99** | 1.002%%^%%(year-1899) | | **ex_1d005p_year99** | 1.005%%^%%(year-1899) | | ||
| + | | **ex_1d008p_year99** | 1.008%%^%%(year-1899) | | **ex_1d01p_year99** | 1.01%%^%%(year-1899) | | ||
| + | | **ex_1d015p_year99** | 1.015%%^%%(year-1899) | | **ex_1d02p_year99** | 1.02%%^%%(year-1899) | | ||
| + | | **ex_1d025p_year99** | 1.025%%^%%(year-1899) | | **ex_1d03p_year99** | 1.03%%^%%(year-1899) | | ||
| + | | **ex_1d035p_year99** | 1.035%%^%%(year-1899) | | **ex_1d04p_year99** | 1.04%%^%%(year-1899) | | ||
| + | | **ex_1d06p_year99** | 1.06%%^%%(year-1899) | | | | | ||
| + | |||
| + | |||
| + | |||
| + | ====== Fleet Contracts Specs ====== | ||
| + | |||
| + | ===== Engine ===== | ||
| + | |||
| + | ==== Displacement ==== | ||
| + | |||
| + | <code cpp> | ||
| + | //Land/Army | ||
| + | EngineCC = (Random Number Between 0 And 5000) + 10000) * Engine_Type_EngineSize | ||
| + | // | ||
| + | EngineCC = (Random Number Between 0 And 10000) + 25000) * Engine_Type_EngineSize | ||
| + | //Aero | ||
| + | EngineCC = (Random Number Between 0 And 18000 + 12000) * Engine_Type_EngineSize | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Unit Demand ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if(EngineCC > 20000) | ||
| + | EngineSizeUnitMod = 1000000 / EngineCC | ||
| + | else | ||
| + | EngineSizeUnitMod = (-0.123 * EngineCC) + 2500 | ||
| + | |||
| + | |||
| + | |||
| + | if Land/Army | ||
| + | Units = ((govPopulation/ | ||
| + | | ||
| + | else if Navy | ||
| + | Units = ((govPopulation/ | ||
| + | | ||
| + | else if Military Aero | ||
| + | Units = ((govPopulation/ | ||
| + | | ||
| + | else if Civil Aero | ||
| + | Units = ((govPopulation/ | ||
| + | | ||
| + | else if Civil Maritime | ||
| + | Units = ((govPopulation/ | ||
| + | | ||
| + | |||
| + | Units = Units * Engine_Type_UnitNumbers | ||
| + | |||
| + | |||
| + | UnitsPerMonth = Units / ContractPeriod | ||
| + | |||
| + | if(UnitsPerMonth < 1) | ||
| + | UnitsPerMonth = 1 | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Fuel Consumption ==== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | fuelRand = Random Number Between 0 And 3 | ||
| + | |||
| + | if Land/Army | ||
| + | MPG = ((10 - (EngineCC/ | ||
| + | else if Navy | ||
| + | MPG =(( 10 - (EngineCC/ | ||
| + | else if Aero | ||
| + | MPG = ((10 - (EngineCC/ | ||
| + | |||
| + | |||
| + | if(MPG < 4 || MPG > 200) | ||
| + | MPG = -1; | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Horse Power ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if Land/Army | ||
| + | HP = (Random Number Between 0 And (EngineCC/ | ||
| + | else if Navy | ||
| + | HP = (Random Number Between 0 And (EngineCC/ | ||
| + | else if Aero | ||
| + | HP = ((Random Number Between 0 And (EngineCC/ | ||
| + | else if Civil Ships | ||
| + | HP = (Random Number Between 0 And (EngineCC/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ==== Torque ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if Land/Army | ||
| + | torque = (15 + Random Number Between 0 And EngineCC/ | ||
| + | else if Navy | ||
| + | torque = (15 + Random Number Between 0 And EngineCC/ | ||
| + | else if Aero | ||
| + | torque = (20 + Random Number Between 0 And EngineCC/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Torque ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if Land/Army | ||
| + | torque = (15 + Random Number Between 0 And EngineCC/ | ||
| + | else if Navy | ||
| + | torque = (15 + Random Number Between 0 And EngineCC/ | ||
| + | else if Aero | ||
| + | torque = (20 + Random Number Between 0 And EngineCC/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Width ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if Land/Army | ||
| + | EngineWidth = (EngineCC/ | ||
| + | else if Navy | ||
| + | EngineWidth = (EngineCC/ | ||
| + | else if Aero | ||
| + | EngineWidth = (EngineCC/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Length ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if Land/Army | ||
| + | EngineLength = (EngineCC / 300 + 12) * Engine_Type_LengthMOD; | ||
| + | else if Navy | ||
| + | EngineLength = (EngineCC / 150 + 12)*Engine_Type_LengthMOD; | ||
| + | else if Aero | ||
| + | EngineLength = (EngineCC / 200 + 12)*Engine_Type_LengthMOD; | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Weight ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if Land/Army | ||
| + | Weight = (EngineCC / 11.5 + 100) * ex_1d008p_year99 * Engine_Type_WeightMOD; | ||
| + | else if Navy | ||
| + | Weight = (EngineCC / 5.5 + 500) * ex_1d008p_year99 * Engine_Type_WeightMOD; | ||
| + | else if Aero | ||
| + | Weight = (EngineCC / 10.0 + 50) * Engine_Type_WeightMOD; | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ==== Penalty, Unit Price, Signing Bonus ==== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | if Units < 50 | ||
| + | bonusPenality = (ex_1d025p_year99 *30000) * (50.0/ | ||
| + | |||
| + | |||
| + | if Land/Army | ||
| + | Penalty = | ||
| + | else if Military Navy | ||
| + | Penalty = | ||
| + | else if Military Aero | ||
| + | Penalty = | ||
| + | else if Civilian Aero | ||
| + | Penalty = (ex_1d025p_year99 * EngineCC/ | ||
| + | else if Civilian Ships | ||
| + | Penalty = | ||
| + | |||
| + | |||
| + | |||
| + | if(Random Number Between 0 And 1 = 1 ) | ||
| + | { | ||
| + | basePrice = 0 | ||
| + | |||
| + | if Easy Difficulty | ||
| + | basePrice = 175; | ||
| + | else if Normal Difficulty | ||
| + | basePrice = 75 | ||
| + | |||
| + | |||
| + | if Land/Army | ||
| + | { | ||
| + | UnitCosts = ((((105 +basePrice) * ex_1d025p_year99) + | ||
| + | Random Number Between 0 And (130 + basePrice/ | ||
| + | EngineCC/ | ||
| + | | ||
| + | Penalty = ((UnitCosts + EngineCC/ | ||
| + | } | ||
| + | else if Military Navy | ||
| + | { | ||
| + | UnitCosts = ((((305 + basePrice) * ex_1d025p_year99) + | ||
| + | Random Number Between 0 And (200 +basePrice/ | ||
| + | EngineCC/50 + 1+(bonusPenality/ | ||
| + | | ||
| + | Penalty = ((UnitCosts + EngineCC/ | ||
| + | } | ||
| + | else if Military Aero | ||
| + | { | ||
| + | UnitCosts = ((((205 | ||
| + | Random Number Between 0 And (230 +basePrice/ | ||
| + | EngineCC/ | ||
| + | | ||
| + | Penalty = ((UnitCosts+EngineCC/ | ||
| + | } | ||
| + | else if Civilian Aero | ||
| + | { | ||
| + | UnitCosts = ((((130 + basePrice) * ex_1d025p_year99) + | ||
| + | Random Number Between 0 And (155 +basePrice/ | ||
| + | EngineCC/ | ||
| + | | ||
| + | Penalty = ((UnitCosts+EngineCC/ | ||
| + | } | ||
| + | else if Civilian Ships | ||
| + | { | ||
| + | UnitCosts = ((((255 | ||
| + | Random Number Between 0 And (200 + basePrice/ | ||
| + | EngineCC/ | ||
| + | | ||
| + | Penalty = ((UnitCosts + EngineCC/ | ||
| + | } | ||
| + | |||
| + | if(Units > 1000) | ||
| + | UnitCosts = (UnitCosts * 0.75) + (UnitCosts * 0.25 * (1000.0/ | ||
| + | else | ||
| + | UnitCosts = (UnitCosts * 0.875) | ||
| + | |||
| + | UnitCosts = UnitCosts * contractUnitPriceMod; | ||
| + | UnitCosts = UnitCosts * Engine_Type_unitPrice; | ||
| + | |||
| + | |||
| + | SigningBonus = UnitCosts / (Random Number Between 0 And 10) + 10) * Units | ||
| + | |||
| + | SigningBonus = SigningBonus * contractUnitPriceMod | ||
| + | SigningBonus = SigningBonus * Engine_Type_unitPrice | ||
| + | |||
| + | |||
| + | Penalty = Penalty + SigningBonus * Random Number Between 0 and 1.0 + 3.0 | ||
| + | |||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Vehicles ===== | ||
| + | |||
| + | |||
| + | ==== Units ==== | ||
| + | |||
| + | <code cpp> | ||
| + | Units = (govPopulation * (0.002 + (0.0025 * Absolute Value of(govStatus*3) ))) * Type_Popularity + 1 | ||
| + | |||
| + | Units = Units * CarContractType_unitNumbers | ||
| + | |||
| + | if(warContract) | ||
| + | Units = Units * 5 | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Displacement ==== | ||
| + | |||
| + | <code cpp> | ||
| + | EngineCC = (Random Number Between 0 And (500) + 1000) * Wealth | ||
| + | </ | ||
| + | |||
| + | ==== Horse Power ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if Military Contract | ||
| + | HP = (Random Number Between 0 And (10)+(5 * ex_1d008p_year99)) * wealth * CarContractType_HPMOD | ||
| + | else if Civilian Contract | ||
| + | HP = (Random Number Between 0 And (15)+10) * ex_1d008p_year99 * wealth * CarContractType_HPMOD | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Fuel Consumption ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if(Military Contract) | ||
| + | MPG = (14 - (wealth * 2)+ Random Number Between 0 And (4)) * CarContractType_FuelMOD + 3; | ||
| + | else if(Civilian Contract) | ||
| + | MPG = (20 - (wealth *1.75)+ Random Number Between 0 And (4)) * CarContractType_FuelMOD + 3; | ||
| + | |||
| + | if(MPG < 4 OR MPG > 200) | ||
| + | No fuel economy limit | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Cargo ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if(Military Contract) | ||
| + | CargoReq = 200 + (Random Number Between 0 And (200) + 200) * (cargoType * 1.2) * CarContractType_CargoMOD | ||
| + | else if(Civilian Contract) | ||
| + | CargoReq = 200 + (Random Number Between 0 And (200) + 150) * (cargoType * 1.2) * CarContractType_CargoMOD | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Torque ==== | ||
| + | |||
| + | <code cpp> | ||
| + | torque = (25 + (EngineCC/ | ||
| + | </ | ||
| + | |||
| + | ==== Weight ==== | ||
| + | |||
| + | <code cpp> | ||
| + | Weight = (500 + (CargoReq / 50) + Random Number Between 0 And (300)) * ex_1d008p_year99 * CarContractType_WeightMOD | ||
| + | </ | ||
| + | |||
| + | ==== Top Speed ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if( Year < 2021 ) | ||
| + | topSpeed = ( (20 + ((year-1899)/ | ||
| + | else | ||
| + | topSpeed = (40 + Random Number Between 0 And (80)) * ex_1d005p_year99 * CarContractType_TopSpeedMOD | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Unit Price, Penalty, Signing Bonus ==== | ||
| + | |||
| + | <code cpp> | ||
| + | basePrice = 0 | ||
| + | |||
| + | if Difficulty is Easy | ||
| + | basePrice = 175 | ||
| + | else if Difficulty Normal | ||
| + | basePrice = 75 | ||
| + | |||
| + | |||
| + | if(Military Contract) | ||
| + | { | ||
| + | UnitCosts = (((350 + basePrice) * ex_1d02p_year99) + | ||
| + | Random Number Between 0 And ((50 + basePrice/ | ||
| + | ex_1d02p_year99)) * (Wealth * 0.8 + 1) | ||
| + | } | ||
| + | else if(Civilian Contract) | ||
| + | { | ||
| + | UnitCosts = (((250 | ||
| + | Random Number Between 0 And ((100 + basePrice/ | ||
| + | ex_1d02p_year99)) * (Wealth * 0.7 + 1) | ||
| + | } | ||
| + | |||
| + | if(UnitCosts > 1000) | ||
| + | UnitCosts = (UnitCosts * 0.75) + (UnitCosts * 0.25 * (1000.0/ | ||
| + | else | ||
| + | UnitCosts = (UnitCosts * 0.875) | ||
| + | |||
| + | |||
| + | UnitCosts = UnitCosts * contractUnitPriceMod | ||
| + | UnitCosts = UnitCosts * CarContractType_unitPrice | ||
| + | |||
| + | if(UnitCosts < 450) | ||
| + | UnitCosts = 450 | ||
| + | |||
| + | SigningBonus = UnitCosts/ | ||
| + | |||
| + | Penalty = Penalty + SigningBonus * RandomNumber-> | ||
| + | |||
| + | Penalty = Penalty + ((ex_1d02p_year99 * EngineCC/ | ||
| + | |||
| + | SigningBonus = SigningBonus * contractUnitPriceMod | ||
| + | SigningBonus = SigningBonus * CarContractType_unitPrice | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | ====== Generate Racing Contracts ====== | ||
| + | |||
| + | ===== Vehicles ===== | ||
| + | |||
| + | Racing series restrictions define displacement, | ||
| + | ==== Signing Bonus, Penalties, Unit Costs ==== | ||
| + | |||
| + | |||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | SigningBonus = ((2000*ex_1d03p_year99)+(5000*RacingSeries_Funding_Value*ex_1d06p_year99)) * | ||
| + | | ||
| + | |||
| + | Penalty = SigningBonus * (Random Number Between (0 And 3.0)+2.0) | ||
| + | |||
| + | if Difficulty = Easy | ||
| + | UnitCosts = (3000*ex_1d025p_year99) * (RacingSeries_Funding_Value/ | ||
| + | else if Difficulty = Normal | ||
| + | UnitCosts = (2000*ex_1d025p_year99) * (RacingSeries_Funding_Value/ | ||
| + | else if Difficulty = Hard or Nightmare | ||
| + | UnitCosts = (1000*ex_1d025p_year99) * (RacingSeries_Funding_Value/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Units ==== | ||
| + | |||
| + | <code cpp> | ||
| + | Units = ((RacingSeries_Races) * RacingSeries_Funding_Value) + 10; | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Minimum HP ==== | ||
| + | |||
| + | <code cpp> | ||
| + | MinHP = (100+(2*(year-1900))) | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Lateral G ==== | ||
| + | |||
| + | <code cpp> | ||
| + | Lateral_G = 1 + (0.0005 * (year-1900)) | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Top Speed ==== | ||
| + | |||
| + | <code cpp> | ||
| + | Top_Speed = 100 + (2 * (year-1900)) | ||
| + | </ | ||
| + | ===== Engines ===== | ||
| + | |||
| + | Displacement, | ||
| + | ==== Signing Bonus, Penalties, Unit Costs ==== | ||
| + | |||
| + | <code cpp> | ||
| + | SigningBonus = ((1000*ex_1d03p_year99)+(2500*RacingSeries_Funding_Value*ex_1d06p_year99)) * | ||
| + | (Random Number Between (0 And 1.0)+0.5) | ||
| + | |||
| + | Penalty = SigningBonus * (Random Number Between (0 And 3.0)+2.0) | ||
| + | |||
| + | |||
| + | |||
| + | if Difficulty = Easy | ||
| + | UnitCosts = (3000*ex_1d02p_year99) * (RacingSeries_Funding_Value/ | ||
| + | else if Difficulty = Normal | ||
| + | UnitCosts = (2500*ex_1d02p_year99) * (RacingSeries_Funding_Value/ | ||
| + | else if Difficulty = Hard or Nightmare | ||
| + | UnitCosts = (1500*ex_1d02p_year99) * (RacingSeries_Funding_Value/ | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ==== Units ==== | ||
| + | |||
| + | <code cpp> | ||
| + | Units = ((RacingSeries_Races * 3.0) * RacingSeries_Funding_Value) + 5; | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Minimum HP ==== | ||
| + | |||
| + | <code cpp> | ||
| + | Min_HP = (100+(2*(year-1900))); | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ====== Contract Winner Selection ====== | ||
| + | |||
| + | |||
| + | ===== Max Bid Price ===== | ||
| + | |||
| + | <code cpp> | ||
| + | if Vehicle Contract | ||
| + | maxBid = ((500 * ex_1d03p_year99) + Random Number Between 0 and (250 * ex_1d03p_year99)) * (Wealth_Index * .75) | ||
| + | else if( Engine Contract ) | ||
| + | maxBid = (((550 * ex_1d03p_year99) + Random Number Between 0 And (550 * ex_1d04p_year99)) + ( HP/(20 * ex_1d02p_year99) ) + 1) | ||
| + | else | ||
| + | maxBid = (((550 * ex_1d035p_year99) + RandomNumber Between 0 And (550 * ex_1d04p_year99)) + 1) | ||
| + | |||
| + | |||
| + | } | ||
| + | | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== Minimum Bid Score ===== | ||
| + | |||
| + | <code cpp> | ||
| + | If Only One Bid | ||
| + | Min_Bid_Mod = 1.6 | ||
| + | If Only Two Bids | ||
| + | Min_Bid_Mod = 1.3 | ||
| + | If Only Three Bids | ||
| + | Min_Bid_Mod = 1.1 | ||
| + | If More Than Three Bids | ||
| + | Min_Bid_Mod = 0 | ||
| + | | ||
| + | | ||
| + | Minimum_Bid_Score = Minimum_Bid_Score * Min_Bid_Mod; | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Vehicle Bid ===== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | |||
| + | if(Lobbying Effectiveness > 60) | ||
| + | { | ||
| + | lobbyMod = (Lobbying Budget / Max_Lobbying_Budget | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | lobbyMod = 0 | ||
| + | } | ||
| + | |||
| + | |||
| + | if(lobbyMod >= 1.5) | ||
| + | { | ||
| + | lobbyMod = 1.499; | ||
| + | } | ||
| + | |||
| + | |||
| + | if Vehicle Contract | ||
| + | { | ||
| + | | ||
| + | if( (Year - Year Built)> 6) | ||
| + | { | ||
| + | ageMod = 7 / (Year - Year Built); | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | ageMod = 1; | ||
| + | } | ||
| + | |||
| + | |||
| + | if Racing Contract | ||
| + | { | ||
| + | BuyerRating = (((Spec_HP - ContractRequirements_HP)*2.5) | ||
| + | ((Spec_Cargo - ContractRequirements_CargoSpace/ | ||
| + | ((Spec_Torque - ContractRequirements_Torque)*2.5) + ((Spec_TopSpeed - ContractRequirements_TopSpeed)*3.5) + (Spec_LateralG - ContractRequirements_LateralG)*3 + | ||
| + | (Rating_Quality*1) + (Rating_Dependability*10))/ | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | BuyerRating = (((Spec_HP - ContractRequirements_HP)/ | ||
| + | ((Spec_Cargo - ContractRequirements_CargoSpace/ | ||
| + | ((Spec_Torque - ContractRequirements_Torque)/ | ||
| + | (Rating_Quality*25) + (Rating_Dependability*30))/ | ||
| + | } | ||
| + | |||
| + | BuyerRating = BuyerRating * ageMod; | ||
| + | |||
| + | |||
| + | Whoever has the highest buyer rating wins the contract. | ||
| + | |||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Engine Bid ===== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | |||
| + | if(Lobbying Effectiveness > 60) | ||
| + | { | ||
| + | lobbyMod = (Lobbying Budget / Max_Lobbying_Budget | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | lobbyMod = 0 | ||
| + | } | ||
| + | |||
| + | |||
| + | if(lobbyMod >= 1.5) | ||
| + | { | ||
| + | lobbyMod = 1.499; | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | if( (Year - Year Built) > 6) | ||
| + | { | ||
| + | ageMod = 7 / (Year - Year Built); | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | ageMod = 1; | ||
| + | } | ||
| + | |||
| + | |||
| + | if(lobbyMod == 1.5) | ||
| + | { | ||
| + | lobbyMod = 1.499; | ||
| + | } | ||
| + | |||
| + | if Racing Contract | ||
| + | { | ||
| + | BuyerRating = (((HP - ContractRequirements_HP)*2) + ((ContractRequirements_EngineWeight - Weight)/ | ||
| + | (FuelConsumption - ContractRequirements_FuelConsumption) + (Overall_Rating * 5) + (EngineReliability_Rating * 5) + | ||
| + | (Fuel_Rating * 5) + (Power_Rating * 5) ) / | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | BuyerRating = (((HP - ContractRequirements_HP)/ | ||
| + | (FuelConsumption - ContractRequirements_FuelConsumption) + (Overall_Rating * 15) + (EngineReliability_Rating * 15) + | ||
| + | (Fuel_Rating * 10) + (Power_Rating * 10) + (Smoothness_Rating * 10)) / | ||
| + | } | ||
| + | |||
| + | BuyerRating = BuyerRating * ageMod; | ||
| + | | ||
| + | Whoever has the highest buyer rating wins the contract. | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Chassis Bid ===== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | |||
| + | if(Lobbying Effectiveness > 60) | ||
| + | lobbyMod = (Lobbying Budget / Max_Lobbying_Budget | ||
| + | else | ||
| + | lobbyMod = 0 | ||
| + | |||
| + | |||
| + | if(lobbyMod >= 1.5) | ||
| + | lobbyMod = 1.499; | ||
| + | |||
| + | |||
| + | |||
| + | if( (Year - Year Built) > 6) | ||
| + | { | ||
| + | ageMod = 7 / (Year - Year Built) | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | ageMod = 1 | ||
| + | } | ||
| + | |||
| + | |||
| + | if Racing Contract | ||
| + | { | ||
| + | BuyerRating = (((ChassisMaxEngineLength+ChassisMaxEngineWidth)-ChassisWeightKG) + | ||
| + | Strength_Rating*1.25 + Comfort_Rating + (Performance_Rating * 25) + | ||
| + | Dependability_Rating*2)/ | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | BuyerRating = ((((ChassisMaxEngineLength*2)+(ChassisMaxEngineWidth*2))) + | ||
| + | Strength_Rating + Comfort_Rating*2 + Performance_Rating*2 + | ||
| + | (Dependability_Rating*4)+Overall_Rating*3)// | ||
| + | |||
| + | } | ||
| + | |||
| + | BuyerRating = BuyerRating * ageMod | ||
| + | |||
| + | |||
| + | Whoever has the highest buyer rating wins the contract. | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Gearbox Bid ===== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | |||
| + | if(Lobbying Effectiveness > 60) | ||
| + | lobbyMod = (Lobbying Budget / Max_Lobbying_Budget | ||
| + | else | ||
| + | lobbyMod = 0 | ||
| + | |||
| + | |||
| + | if(lobbyMod >= 1.5) | ||
| + | lobbyMod = 1.499; | ||
| + | |||
| + | |||
| + | |||
| + | if( (Year - Year Built) > 6) | ||
| + | { | ||
| + | ageMod = 7 / (Year - Year Built) | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | ageMod = 1 | ||
| + | } | ||
| + | |||
| + | |||
| + | if Racing Contract | ||
| + | { | ||
| + | BuyerRating = (((Overall_Rating*1.5+(Comfort_Rating*0.25))-Weight) + | ||
| + | Reliability_Rating*2 + (Performance_Rating*15) + (FuelConsumption_Rating*2) + | ||
| + | Power_Rating*5+(MaxTorqueInput*2.25))/ | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | BuyerRating = (((Overall_Rating*2.5+(Comfort_Rating*2.25))-Weight*2.5) + | ||
| + | Reliability_Rating*1.5 + (Performance_Rating) + (FuelConsumption_Rating*2) + | ||
| + | Power_Rating+(MaxTorqueInput*0.05))/ | ||
| + | |||
| + | } | ||
| + | |||
| + | BuyerRating = BuyerRating * ageMod | ||
| + | |||
| + | Whoever has the highest buyer rating wins the contract. | ||
| + | |||
| + | </ | ||
| + | | ||