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

Go down
sleepy068
sleepy068
fellow
Posts : 85
Reputation : 24
Join date : 2019-11-28
Age : 31
Location : Australia

Question about removing an existing symptom of a diagnosis Empty Question about removing an existing symptom of a diagnosis

Tue Apr 14, 2020 2:37 pm
Hi!

I am currently trying to phase out a symptom I added into my mod awhile ago that is already in the stock game (swollen lymph nodes). The main issue at first was that old saves will link to the old diagnosis structures that no longer exist technically, which is fine if the patient is just chilling out somewhere because the player can just send them home (as it'll show no possible diagnosis). Annoying, but they won't generate again so it is a one time deal luckily. The problem is if the patient happens to be conducting a lab test and I've noticed the following issue occurs:

System.NullReferenceException at Lopital.BehaviorPatient.UncoverSymptomsFromLabExamination (.GameDBExamination labExamination) [0x00000] in <filename unknown>:0
at Lopital.LabProcedure.Finish () [0x00000] in <filename unknown>:0
at Lopital.ProcedureComponent.FinishLabProceduresWithResultsReady () [0x00000] in <filename unknown>:0
at Lopital.ProcedureScriptStatLabResult.UpdateStateSampleTakingResults () [0x00000] in <filename unknown>:0
at Lopital.ProcedureScriptStatLabResult.ScriptUpdate (Single deltaTime) [0x00000] in <filename unknown>:0
at Lopital.ProcedureManager.Update (Int32 updateCount) [0x00000] in <filename unknown>:0

Naturally, the lab can't uncover what it was going to anymore because the diagnosis that has this old symptom technically doesn't exist anymore. I didn't actually expect this error, I assumed that the patient would just discover whatever it was going to and continue to have no possible diagnosis.
Is there anyway I can avoid this? Or am I just going to have to bite the bullet and revert my diagnosis to my version of swollen lymph nodes (how it was)? Luckily nothing is live yet as I'm doing all the testing now so no players but myself will be having this issue.
The biggest problem is the player does not appear to be able to recover here, this error causes the patient and lab staff to get stuck, sending the patient home did nothing at this point. Another possible issue is if Oxymoron expands their symptom base further in the future, it might be difficult for mods to utilise those with an existing diagnosis.

Is there an easy way to fix this asides from duplicating my diagnosis file to include both versions of the diagnosis (the old one with my version and then a new one with the stock one) or simply reverting? I can't rely on players rushing through their hospital to send affected patients home just in case they miss one so right now I am considering just putting my version back.
Unless i broke something else and that's the issue.
Thanks none the less.
sleepy068
sleepy068
fellow
Posts : 85
Reputation : 24
Join date : 2019-11-28
Age : 31
Location : Australia

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

Thu Apr 23, 2020 12:12 pm
Just noticed this line of code that the developers use on their diagnosis code:
<Disabled>true</Disabled>
I assume this keeps it intact for old saves but 'removes' the possibility of it from new patients.

I'll try this out and create a new 'obsolete' diagnosis xml. Might be the answer I was looking for.
roman.oxymoron
roman.oxymoron
developer
Posts : 103
Reputation : 81
Join date : 2018-03-22
http://oxymoron.games/projecthospital/

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

Thu Apr 23, 2020 12:18 pm
sleepy068 wrote:Just noticed this line of code that the developers use on their diagnosis code:
<Disabled>true</Disabled>
I assume this keeps it intact for old saves but 'removes' the possibility of it from new patients.

I'll try this out and create a new 'obsolete' diagnosis xml. Might be the answer I was looking for.

Yep, it's for deprecated diagnosis you don't want to use anymore ... but if you would remove any diagnose/symptom, all old saves won't load, because of missing those ID.
sleepy068
sleepy068
fellow
Posts : 85
Reputation : 24
Join date : 2019-11-28
Age : 31
Location : Australia

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

Thu Apr 23, 2020 1:30 pm
Hi Roman,

Thanks very much, this knowledge is going to fix so many problems going forward, for all modders. I'll have to hurry up and finish these detailed modding tutorials so I can get all this information in one place.

Again thank you, especially for the latest mod support additions, the collapse issue was definitely an easy mistake to be made and now, a much more difficult mistake to not notice.
roman.oxymoron
roman.oxymoron
developer
Posts : 103
Reputation : 81
Join date : 2018-03-22
http://oxymoron.games/projecthospital/

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

Thu Apr 23, 2020 2:44 pm
sleepy068 wrote:Hi Roman,

Thanks very much, this knowledge is going to fix so many problems going forward, for all modders. I'll have to hurry up and finish these detailed modding tutorials so I can get all this information in one place.

Again thank you, especially for the latest mod support additions, the collapse issue was definitely an easy mistake to be made and now, a much more difficult mistake to not notice.

np, if you would need any help, just contact us Wink
sleepy068
sleepy068
fellow
Posts : 85
Reputation : 24
Join date : 2019-11-28
Age : 31
Location : Australia

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

Sat Apr 25, 2020 9:01 am
Hi Roman,

Another quick question on the same topic, can <Disabled>true</Disabled> be added to exams? Doesn't happen too often anymore but I've had to remove exams from my mod and it can lead to issues if a patient is currently getting that exam. If disable works though, I can leave those in for old saves but prevent those exams showing up for players playing in one of the Doctor modes when playing with with no hints in diagnostics.

How do you guys remove exams? When you remove one, does it still show up in specialist mode? Or do you just leave it in until it is very unlikely anyone has it running?
Like EXM_OBSERVATION, that doesn't show up but I am not sure how.

PS: What's the infectious disease department? Did happen to notice on the new exams their localisation mentions this? (Exciting future content maybe?) Wink
By the way big thanks for making the new exams general medicine too (not actually department specific), Oncology Dpt. will be able to make a heap use out of ELISA.

Thanks very much! Very Happy
roman.oxymoron
roman.oxymoron
developer
Posts : 103
Reputation : 81
Join date : 2018-03-22
http://oxymoron.games/projecthospital/

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

Sat Apr 25, 2020 11:38 am
sleepy068 wrote:Hi Roman,

Another quick question on the same topic, can <Disabled>true</Disabled> be added to exams? Doesn't happen too often anymore but I've had to remove exams from my mod and it can lead to issues if a patient is currently getting that exam.  If disable works though, I can leave those in for old saves but prevent those exams showing up for players playing in one of the Doctor modes when playing with with no hints in diagnostics.

How do you guys remove exams? When you remove one, does it still show up in specialist mode? Or do you just leave it in until it is very unlikely anyone has it running?
Like EXM_OBSERVATION, that doesn't show up but I am not sure how.

PS: What's the infectious disease department? Did happen to notice on the new exams their localisation mentions this? (Exciting future content maybe?) Wink
By the way big thanks for making the new exams general medicine too (not actually department specific), Oncology Dpt. will be able to make a heap use out of ELISA.

Thanks very much! Very Happy

Hi, I'm not sure right now if it's possible, but I'll take a look next week and let you know ... if necessary we can make a new parameter for examinations and treatments too Wink

btw. "infectious disease dep" is one of DLC's we're preparing, so don't tell anybody pls Wink
sleepy068
sleepy068
fellow
Posts : 85
Reputation : 24
Join date : 2019-11-28
Age : 31
Location : Australia

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

Sun Apr 26, 2020 8:19 am
Hi Roman, Thanks very much, stress not, your secret is safe with me! Wink
roman.oxymoron
roman.oxymoron
developer
Posts : 103
Reputation : 81
Join date : 2018-03-22
http://oxymoron.games/projecthospital/

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

Mon Apr 27, 2020 4:45 pm
Hi, so for now it's not possible to hide examinations or treatments ... our programmer will take a look on this issue so we'll let you know ... but can't promise anything.
sleepy068
sleepy068
fellow
Posts : 85
Reputation : 24
Join date : 2019-11-28
Age : 31
Location : Australia

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

Tue Apr 28, 2020 12:30 pm
Hi Roman, no worries at all, honestly nothing critical, I do my best to not get into that situation where I need to remove an exam anymore but I can't say the same for other modders. Not really a major issue unless the exams are straight up removed and leaving them in the code is only really a minor issue for players using intern mode. Plenty of workarounds for now but I absolutely appreciate you guys looking into it.
Sponsored content

Question about removing an existing symptom of a diagnosis Empty Re: Question about removing an existing symptom of a diagnosis

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