gamemanual:gm_racing
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gamemanual:gm_racing [2022/06/07 15:49] – [Racing Score] admin | gamemanual:gm_racing [2022/06/08 02:30] (current) – [Variables] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======= Racing 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 ^ | ||
+ | | **EngineeringEmployees** | The number of engineers you have | | **MaxEngineeringEmployees** | The number of engineers you need | | ||
+ | | **Morale** | Engineering employee morale | | **RacingSeries_EndTurn** | Last turn of a series season | | ||
+ | | **RacingSeries_StartTurn** | The first turn of a series season | | **RacingSeries_races** | Number of races in a season | | ||
+ | | **RacingSeries_FundingMod** | Modifier variable for how expensive this series is to run | | **NumberOfTeamsInSeries** | Number of teams racing in the series | | ||
+ | | **orgRacesMonth** | Races per month | | **RacingTeam_Funding** | Race Team's budget | | ||
+ | | **RacingTeam_Driver_Quality** | Race team's driver quality slider | | **RacingTeam_Team_Quality** | Race team's team quality slider | | ||
+ | | **RacingTeam_TeamGrowthFocus** | Race team's team growth focus slider | | **RacingTeam_TeamSizeFocus** | Race team's team size focus slider | | ||
+ | | **RacingTeam_winFocus** | Racing Team's Win Focus slider | | **RacingTeam_victories** | Racing Team's wins for the month in this series. | | ||
+ | | **RacingTeam_Car_Spec_AccellerationSix** | Vehicle' | ||
+ | | **RacingTeam_Car_Spec_HP** | Vehicle' | ||
+ | | **RacingTeam_Car_Rating_Performance** | Vehicle' | ||
+ | | **RacingTeam_Car_Rating_Fuel** | Vehicle' | ||
+ | | **RacingTeam_Engine_Weight** | Engine' | ||
+ | | **RacingTeam_Engine_FuelConsumption** | Engine' | ||
+ | | **ex_1d03p_year99** | 1.03%%^%%(year-1899) | | **ex_1d06p_year99** | 1.06%%^%%(year-1899) | | ||
+ | |||
+ | |||
+ | |||
+ | ====== Racing Contracts ====== | ||
+ | |||
+ | See: [[gamemanual: | ||
+ | |||
+ | |||
+ | |||
+ | ====== Racing Results ====== | ||
+ | |||
+ | ===== Racing Score ===== | ||
+ | |||
+ | <code cpp> | ||
+ | |||
+ | EngineeringEmployeeMod = 0.5+0.5*((EngineeringEmployees/ | ||
+ | |||
+ | For Each Series: | ||
+ | { | ||
+ | |||
+ | lengthOfSeries = RacingSeries_EndTurn - RacingSeries_StartTurn | ||
+ | |||
+ | if(Turn = RacingSeries_EndTurn) | ||
+ | { | ||
+ | RacesPerMonth = RacingSeries_races%lengthOfSeries | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | |||
+ | if(lengthOfSeries != 0) | ||
+ | RacesPerMonth = RacingSeries_races / lengthOfSeries | ||
+ | else | ||
+ | RacesPerMonth = 1 | ||
+ | | ||
+ | } | ||
+ | |||
+ | |||
+ | minBudget = (5000*ex_1d03p_year99)+(15000*RacingSeries_FundingMod*ex_1d06p_year99) | ||
+ | maxBudget = (25000*ex_1d03p_year99)+(75000*RacingSeries_FundingMod*ex_1d06p_year99) + minBudget | ||
+ | |||
+ | |||
+ | For Each Team in Series: | ||
+ | { | ||
+ | |||
+ | |||
+ | Team_Funding = ((RacingTeam_Funding)/ | ||
+ | |||
+ | RacingTeam_RaceValue = (20+Random Number Between ( 0 AND 5)) * | ||
+ | (Team_Funding-((RacingTeam_Driver_Quality*2 + RacingTeam_Team_Quality + | ||
+ | RacingTeam_TeamGrowthFocus + RacingTeam_TeamSizeFocus*1.5)/ | ||
+ | |||
+ | |||
+ | if(RacingTeam_Car_Spec_AccellerationSix == -1 || RacingTeam_Car_Spec_AccellerationSix > 26) | ||
+ | RacingTeam_Car_Spec_AccellerationSix = 26 | ||
+ | |||
+ | if Supplying Vehicles | ||
+ | { | ||
+ | if(RacingTeam_Car_Spec_Weight != 0) | ||
+ | hpWeightRatio = (RacingTeam_Car_Spec_HP)/ | ||
+ | else | ||
+ | hpWeightRatio = 0 | ||
+ | |||
+ | if(hpWeightRatio > 2) | ||
+ | hpWeightRatio = 2 | ||
+ | |||
+ | hpBonus = (RacingTeam_Car_Spec_HP^1.15) /(10.0 * ex_1d02p_year99) | ||
+ | |||
+ | RacingTeam_RaceValue = RacingTeam_RaceValue + (hpBonus*3.5) + | ||
+ | (hpWeightRatio*10 | ||
+ | ((RacingTeam_Car_Rating_Drivability) / 100.0)*36 + | ||
+ | 12*((RacingTeam_Car_Rating_Performance) / 100.0) + | ||
+ | 30*((RacingTeam_Car_Spec_TopSpeed)/ | ||
+ | (3 * (RacingTeam_Car_Rating_Fuel/ | ||
+ | |||
+ | } | ||
+ | else if Supplying Engines | ||
+ | { | ||
+ | hpWeightRatio = ((RacingTeam_Engine_HP) / (RacingTeam_Engine_Weight)) | ||
+ | |||
+ | |||
+ | if(hpWeightRatio > 10) | ||
+ | hpWeightRatio = 10 | ||
+ | |||
+ | hpBonus = (RacingTeam_Engine_HP) | ||
+ | |||
+ | RacingTeam_RaceValue = RacingTeam_RaceValue + hpBonus*3.5 + ( hpWeightRatio*5 | ||
+ | ((RacingTeam_Engine_Dependability) / 100.0)*(3 * ex_1d02p_year99) + | ||
+ | ((RacingTeam_Engine_FuelConsumption/ | ||
+ | |||
+ | } | ||
+ | else Supplying Funding | ||
+ | { | ||
+ | RacingTeam_RaceValue = RacingTeam_RaceValue + Random Number Between ( 0 AND 10) + | ||
+ | 4.5 * (RacingTeam_TeamGrowthFocus - RacingTeam_TeamSizeFocus) + 15 * | ||
+ | (Team_Funding*2-RacingTeam_Driver_Quality + RacingTeam_Team_Quality) | ||
+ | |||
+ | } | ||
+ | |||
+ | RacingTeam_RaceValue = RacingTeam_RaceValue + ((10+Random Number Between ( 0 AND 10)) * | ||
+ | ((RacingTeam_Driver_Quality*3.5 + RacingTeam_Team_Quality + | ||
+ | RacingTeam_TeamGrowthFocus + RacingTeam_TeamSizeFocus*1.5)/ | ||
+ | (Team_Funding/ | ||
+ | |||
+ | RacingTeam_RaceValue = RacingTeam_RaceValue +(40 * RacingTeam_teamXP) + | ||
+ | (3 * RacingTeam_teamSize) + (10*RacingTeam_winFocus)*EngineeringEmployeeMod | ||
+ | |||
+ | |||
+ | Total_RaceSeries_RacingValues = Total_RaceSeries_RacingValues + RacingTeam_RaceValue | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | </ | ||
+ | ===== Race Winners ===== | ||
+ | |||
+ | <code cpp> | ||
+ | firstVal = 0 | ||
+ | secondVal = 0 | ||
+ | thirdVal = 0 | ||
+ | forthVal = 0 | ||
+ | fifthVal = 0 | ||
+ | |||
+ | For Each Team in Series | ||
+ | { | ||
+ | For Each Team In Series | ||
+ | { | ||
+ | if(firstVal < RacingTeam_RaceValue) | ||
+ | { | ||
+ | victorID = RacingTeam_CompanyID | ||
+ | firstVal = RacingTeam_RaceValue | ||
+ | } | ||
+ | else if(secondVal < RacingTeam_RaceValue) | ||
+ | { | ||
+ | secondID= RacingTeam_CompanyID | ||
+ | secondVal = RacingTeam_RaceValue | ||
+ | } | ||
+ | else if(thirdVal < RacingTeam_RaceValue) | ||
+ | { | ||
+ | thirdID= RacingTeam_CompanyID | ||
+ | thirdVal = RacingTeam_RaceValue | ||
+ | } | ||
+ | else if(forthVal < RacingTeam_RaceValue) | ||
+ | { | ||
+ | forthID= RacingTeam_CompanyID | ||
+ | forthVal = RacingTeam_RaceValue | ||
+ | } | ||
+ | else if(fifthVal < RacingTeam_RaceValue) | ||
+ | { | ||
+ | fifthID= RacingTeam_CompanyID | ||
+ | fifthVal = RacingTeam_RaceValue | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | | ||
+ | RacesPerMonth = RacesPerMonth - firstWins | ||
+ | secondWins = ((secondVal/ | ||
+ | RacesPerMonth = RacesPerMonth - secondWins | ||
+ | thirdWins = ((thirdVal/ | ||
+ | RacesPerMonth = RacesPerMonth - thirdWins | ||
+ | forthWins = ((forthVal/ | ||
+ | RacesPerMonth = RacesPerMonth - forthWins | ||
+ | fifthWins = ((fifthVal/ | ||
+ | RacesPerMonth = RacesPerMonth - fifthWins | ||
+ | |||
+ | if(RacesPerMonth > 0) | ||
+ | { | ||
+ | firstWins = firstWins + (RacesPerMonth/ | ||
+ | RacesPerMonth = RacesPerMonth - (RacesPerMonth/ | ||
+ | secondWins = secondWins + (RacesPerMonth/ | ||
+ | RacesPerMonth = RacesPerMonth - (RacesPerMonth/ | ||
+ | firstWins = firstWins + RacesPerMonth | ||
+ | |||
+ | RacesPerMonth = 0 | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | </ | ||
+ | ===== Racing Points ===== | ||
+ | |||
+ | <code cpp> | ||
+ | |||
+ | For Each Team In Series: | ||
+ | |||
+ | RacingTeam_Points = (RacingTeam_victories * 6 * | ||
+ | (NumberOfTeamsInSeries)) + (orgRacesMonth - RacingTeam_victories) * | ||
+ | ((NumberOfTeamsInSeries * 10) * (RacingTeam_RaceValue/ | ||
+ | | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Team XP ===== | ||
+ | |||
+ | <code cpp> | ||
+ | TeamXP = TeamXP + (((0.75 - RacingTeam_Driver_Quality) + (0.75-RacingTeam_Team_Quality)+ | ||
+ | (RacingTeam_TeamGrowthFocus-0.5)+(0.5-RacingTeam_TeamSizeFocus)+ | ||
+ | (1-RacingTeam_winFocus))/ | ||
+ | </ |