EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EvEMath::RAM Namespace Reference

Functions

int32 CopyTime (uint16 BaseTime, uint8 ScienceLevel, float SlotModifier=1, float ImplantModifier=1)
 
int32 InventionTime (uint32 BaseTime, uint8 AdvLabLevel, float SlotModifier=1, float ImplantModifier=1)
 
int32 ProductionTime (uint32 BaseTime, float bpProductivityModifier, float ProductionLevel, float TimeModifier=1)
 
int32 ME_ResearchTime (uint32 BaseTime, uint8 MetallurgyLevel, float SlotModifier=1, float ImplantModifier=1)
 
int32 PE_ResearchTime (uint32 BaseTime, uint8 ResearchLevel, float SlotModifier=1, float ImplantModifier=1)
 
int32 RE_ResearchTime (uint32 BaseTime, uint8 ResearchLevel, float SlotModifier=1, float ImplantModifier=1)
 
float ME_EffectOnWaste (float MaterialAmount, float BaseWasteFactor, float MaterialEfficiency)
 
float ResearchPointsPerDay (float Multiplier, float AgentEffectiveQuality, uint8 CharSkillLevel, uint8 AgentSkillLevel)
 
uint32 PerfectME (uint32 MaterialAmount, uint8 BaseWasteFactor)
 
float WasteSkillBased (uint32 MaterialAmount, float ProductionEfficiency)
 
float InventionChance (float BaseChance, uint8 EncryptionLevel, uint8 DataCore1SkillLevel, uint8 DataCore2SkillLevel, uint8 MetaLevel, float DecryptorModifier)
 

Function Documentation

int32 EvEMath::RAM::CopyTime ( uint16  BaseTime,
uint8  ScienceLevel,
float  SlotModifier = 1,
float  ImplantModifier = 1 
)

Definition at line 84 of file EvEMath.cpp.

Referenced by RamMethods::Calculate().

85 {
86  return (BaseTime * (1.0f - (0.05f * ScienceLevel)) * SlotModifier * ImplantModifier);
87 }

Here is the caller graph for this function:

float EvEMath::RAM::InventionChance ( float  BaseChance,
uint8  EncryptionLevel,
uint8  DataCore1SkillLevel,
uint8  DataCore2SkillLevel,
uint8  MetaLevel,
float  DecryptorModifier 
)

Definition at line 121 of file EvEMath.cpp.

122 {
123  return (BaseChance * (1 + 0.11f * EncryptionLevel) * (1.0f + (DataCore1SkillLevel + DataCore2SkillLevel)
124  * (0.8f / (5.0f - MetaLevel)) * DecryptorModifier));
125  // fuzzysteve's formula (23may13)
126  // base * (1+0.01*EncryptionLevel) * (1+ (skill*(0.1/(5-metalevel)))) * max(decryptor,1)
127  // skill = sum of sciences skill lvls (as required by bpc)
128 
129  // decryptor formula
130  // min(max(rounddown((inputT1BPCruns/T1MaxPerBPC)*(T2MaxPerBPC/10)),1)+decryptorRunBonus, T2MaxPerBPC)
131 
132  // new formula (pre phoebe)
133  // base * skill * decryptor
134  // skill = 1 + EncryptionLevel/40 + (DataCore1SkillLevel + DataCore2SkillLevel)/30
135 }
int32 EvEMath::RAM::InventionTime ( uint32  BaseTime,
uint8  AdvLabLevel,
float  SlotModifier = 1,
float  ImplantModifier = 1 
)

Definition at line 89 of file EvEMath.cpp.

Referenced by RamMethods::Calculate().

90 {
91  return BaseTime * (1.0f - (0.03f * AdvLabLevel)) * SlotModifier * ImplantModifier;
92 }

Here is the caller graph for this function:

float EvEMath::RAM::ME_EffectOnWaste ( float  MaterialAmount,
float  BaseWasteFactor,
float  MaterialEfficiency 
)

Definition at line 94 of file EvEMath.cpp.

95 {
96  float ME_Factor(0.0f);
97  if (MaterialEfficiency >= 0.0f)
98  ME_Factor = 1.0f / (1.0f + MaterialEfficiency);
99  else
100  ME_Factor = 1.0f - MaterialEfficiency;
101 
102  return (floor(0.5f + (MaterialAmount * (BaseWasteFactor / 100.0f) * ME_Factor)));
103 }
int32 EvEMath::RAM::ME_ResearchTime ( uint32  BaseTime,
uint8  MetallurgyLevel,
float  SlotModifier = 1,
float  ImplantModifier = 1 
)

Definition at line 68 of file EvEMath.cpp.

Referenced by RamMethods::Calculate().

69 {
70  return (BaseTime * (13.0f - (0.05f * MetallurgyLevel)) * SlotModifier * ImplantModifier);
71 }

Here is the caller graph for this function:

int32 EvEMath::RAM::PE_ResearchTime ( uint32  BaseTime,
uint8  ResearchLevel,
float  SlotModifier = 1,
float  ImplantModifier = 1 
)

Definition at line 73 of file EvEMath.cpp.

Referenced by RamMethods::Calculate().

74 {
75  return (BaseTime * (15.0f - (0.05f * ResearchLevel)) * SlotModifier * ImplantModifier);
76 }

Here is the caller graph for this function:

uint32 EvEMath::RAM::PerfectME ( uint32  MaterialAmount,
uint8  BaseWasteFactor 
)

Definition at line 105 of file EvEMath.cpp.

106 {
107  return floor(0.02f * BaseWasteFactor * MaterialAmount);
108 }
int32 EvEMath::RAM::ProductionTime ( uint32  BaseTime,
float  bpProductivityModifier,
float  ProductionLevel,
float  TimeModifier = 1 
)

Definition at line 55 of file EvEMath.cpp.

Referenced by RamMethods::Calculate().

56 {
57  float PE_Factor(0.0f);
58  if (ProductionLevel >= 0.0f)
59  PE_Factor = (ProductionLevel / (1.0f + ProductionLevel));
60  else
61  PE_Factor = (ProductionLevel - 1.0f);
62 
63  float effModifier(1.0f);
64  effModifier -= ((bpProductivityModifier / BaseTime) * PE_Factor);
65  return (BaseTime * effModifier * TimeModifier);
66 }

Here is the caller graph for this function:

int32 EvEMath::RAM::RE_ResearchTime ( uint32  BaseTime,
uint8  ResearchLevel,
float  SlotModifier = 1,
float  ImplantModifier = 1 
)

Definition at line 78 of file EvEMath.cpp.

79 {
80  // base RE time is 60 min. we may update/modify this later as system matures
81  return 60;
82 }
float EvEMath::RAM::ResearchPointsPerDay ( float  Multiplier,
float  AgentEffectiveQuality,
uint8  CharSkillLevel,
uint8  AgentSkillLevel 
)

Definition at line 110 of file EvEMath.cpp.

111 {
112  return (Multiplier * (2.0f + (AgentEffectiveQuality / 100.0f)) * pow(CharSkillLevel + AgentSkillLevel,2));
113 }
float EvEMath::RAM::WasteSkillBased ( uint32  MaterialAmount,
float  ProductionEfficiency 
)

Definition at line 116 of file EvEMath.cpp.

117 {
118  return (floor(0.5f + (MaterialAmount * ((25.0f - (5.0f * ProductionEfficiency)) / 100.0f))));
119 }