- juraj.horvathspecialist
- Posts : 146
Reputation : 8
Join date : 2018-08-07
Age : 45
Location : Bratislava, Slovak Republic
[RESOLVED] Early bird perk is not applied
Fri Jan 03, 2020 9:25 am
Description
Early bird perk is not applied to performance or efficiency of employees.
While investigating how works skill experience gain and leveling and their effect on employee performance (with dnSpy), I found typo in Lopital.EmployeeComponent.GetEfficiencyPercent() method (Project Hospital version 1.1.17753, Doctor mode DLC)
Early bird perk is not applied to performance or efficiency of employees.
While investigating how works skill experience gain and leveling and their effect on employee performance (with dnSpy), I found typo in Lopital.EmployeeComponent.GetEfficiencyPercent() method (Project Hospital version 1.1.17753, Doctor mode DLC)
- Code:
...
if (component.m_perkSet.HasPerk("PERK_>EARLY_BIRD"))
{
if (this.m_state.m_shift == Shift.DAY)
{
num += 20f;
}
else
{
num -= 20f;
}
}
- jan.oxymorondeveloper
- Posts : 2309
Reputation : 336
Join date : 2018-03-23
Re: [RESOLVED] Early bird perk is not applied
Mon Jan 06, 2020 9:41 am
Hi, happy new year and thanks for finding this! A fix will be included in the next patch - and here's a slightly embarrassing fun fact: this went undetected for about 18 months.
- juraj.horvathspecialist
- Posts : 146
Reputation : 8
Join date : 2018-08-07
Age : 45
Location : Bratislava, Slovak Republic
Re: [RESOLVED] Early bird perk is not applied
Mon Jan 06, 2020 10:44 am
Hello, happy new year to you and all team members in Oxymoron Games
And that's why this was undetected for such long time. By my opinion, it's mainly because of this code (sorry for disassembling your code):
And that's why this was undetected for such long time. By my opinion, it's mainly because of this code (sorry for disassembling your code):
- Code:
public float GetActionTime(Entity character, int characterTimeConstant, float characterSkill)
{
return (float)characterTimeConstant * character.GetComponent<EmployeeComponent>().GetEfficiencyTimeMultiplier() / characterSkill;
}
- Code:
<m_satisfactionModifiers>
<GameDBPointerOfGameDBSatisfactionModifier>
<GameDBPointer ID="SAT_MOD_FOOD_EATEN" />
</GameDBPointerOfGameDBSatisfactionModifier>
<GameDBPointerOfGameDBSatisfactionModifier>
<GameDBPointer ID="SAT_MOD_TOILET_USED" />
</GameDBPointerOfGameDBSatisfactionModifier>
<GameDBPointerOfGameDBSatisfactionModifier>
<GameDBPointer ID="SAT_MOD_RESTED" />
</GameDBPointerOfGameDBSatisfactionModifier>
<GameDBPointerOfGameDBSatisfactionModifier>
<GameDBPointer ID="SAT_MOD_NICE_ENVIRONMENT" />
</GameDBPointerOfGameDBSatisfactionModifier>
<GameDBPointerOfGameDBSatisfactionModifier>
<GameDBPointer ID="SAT_MOD_GOOD_BOSS" />
</GameDBPointerOfGameDBSatisfactionModifier>
</m_satisfactionModifiers>
- Code:
float num = (float)this.m_entity.GetComponent<MoodComponent>().GetTotalSatisfaction() * 0.5f + 50f;
- Code:
95 * 0.5f + 50f = 97.5f
Permissions in this forum:
You cannot reply to topics in this forum