Project Hospital
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
juraj.horvath
specialist
Posts : 146
Reputation : 8
Join date : 2018-08-07
Age : 42
Location : Bratislava, Slovak Republic

[MODDING] Prolonged laboratory test durations Empty [MODDING] Prolonged laboratory test durations

Fri Jan 10, 2020 10:17 pm
Description
I'm trying to create realistic mod (as realistic as possible). I started with very simple thing, prolonging laboratory test durations to several hours (e.g. cultivation takes 12 hours). But in case of hospitalized patients (in my case Internal Medicine department) are laboratory tests ordering again and again before previous test(s) are finished.

Loading game from save file and showing patient Judy Lopez reveals that patient is waiting for results of microbial cultivation (correct situation).
[MODDING] Prolonged laboratory test durations Prolon11

But after several hours, in diagnostic room are ordered and done another examinations and repeated microbial sampling and microbial cultivation. But another miccrobial sampling and cultivation is not needed, because previous microbial cultivation is not finished, is still executing.
[MODDING] Prolonged laboratory test durations Prolon12

Repro steps
Always after loading save file.
Project Hospital 1.1.17753 CLOUD SAVE TEST

EDIT: Because lab employee skill is affecting lab procedure time I recommend to change the code of Lopital.BehaviorLabSpecialist.SetProcedureTime() method
Code:
public void SetProcedureTime(float skillLevel, LabProcedure procedure)
{
    GameDBExamination entry = procedure.m_state.m_examination.Entry.LabTestingExaminationRef.Entry;
    float durationHours = entry.Procedure.RequiredEquipment[procedure.m_state.m_equipmentIndex].DurationHours;
    if (entry.Procedure.RequiredEquipment[procedure.m_state.m_equipmentIndex].Tag.Equals("biohazard_trash"))
    {
        base.GetComponent<SpeechComponent>().SetBubble("BUBBLE_BIOHAZARD", -1f);
    }
    else if (!entry.Procedure.RequiredEquipment[procedure.m_state.m_equipmentIndex].Tag.Equals("lab_sink"))
    {
        if (entry.CustomIconBigAssetRef != null)
        {
            base.GetComponent<SpeechComponent>().SetBubble("BUBBLE_EMPTY", entry.CustomIconBigAssetRef.XmlID, -1f);
        }
        else
        {
            base.GetComponent<SpeechComponent>().SetBubble("BUBBLE_EMPTY", entry.IconIndex, -1f);
        }
    }
    this.m_state.m_currentEquipmentBlocking = entry.Procedure.RequiredEquipment[procedure.m_state.m_equipmentIndex].BlocksSpecialist;
    if (this.m_state.m_currentEquipmentBlocking)
    {
        // procedure.m_state.m_durationHours = durationHours / skillLevel;
        procedure.m_state.m_durationHours = durationHours;
        return;
    }
    procedure.m_state.m_durationHours = durationHours;
}
The second option is to change skill of all lab employees in save file to 1.0 and keep skill as low as possible to avoid affect on lab procedure time.

Attached

  • saved game
  • mod with prolonged laboratory test durations
Attachments
[MODDING] Prolonged laboratory test durations Attachment
ModTest.zip You don't have permission to download attachments.(3 Kb) Downloaded 1 times


Last edited by juraj.horvath on Sat Jan 11, 2020 2:18 pm; edited 1 time in total (Reason for editing : recommended code changes to remove effect of lab employee skill to procedure time)
jan.oxymoron
jan.oxymoron
developer
Posts : 2240
Reputation : 325
Join date : 2018-03-23

[MODDING] Prolonged laboratory test durations Empty Re: [MODDING] Prolonged laboratory test durations

Mon Jan 13, 2020 2:14 pm
Hi, thanks for the analysis! I can have a look at whether the planning of examinations during doctors rounds takes in account the lab procedure's second stage correctly (probably the issue here), I assume this wasn't needed with the original settings of the durations etc.
avatar
juraj.horvath
specialist
Posts : 146
Reputation : 8
Join date : 2018-08-07
Age : 42
Location : Bratislava, Slovak Republic

[MODDING] Prolonged laboratory test durations Empty Re: [MODDING] Prolonged laboratory test durations

Mon Jan 13, 2020 2:24 pm
jan.oxymoron wrote:Hi, thanks for the analysis! I can have a look at whether the planning of examinations during doctors rounds takes in account the lab procedure's second stage correctly (probably the issue here), I assume this wasn't needed with the original settings of the durations etc.
With original settings it is hardly probably, the longest lab test takes 0.6 hours (EXM_BACTERIA_CULTIVATION_TESTING, EXM_FUNGAL_CULTIVATION_TESTING) for lab employees with lowest skill, increasing their skill shortens the lab procedure time significantly.
Sponsored content

[MODDING] Prolonged laboratory test durations Empty Re: [MODDING] Prolonged laboratory test durations

Back to top
Permissions in this forum:
You cannot reply to topics in this forum