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
Sirre
intern
Posts : 5
Reputation : 0
Join date : 2020-03-25

Some modding questions Empty Some modding questions

Tue May 05, 2020 10:44 pm
Hi!

Since I'm working for a company developing diagnostics instruments for hospitals, I thought it would be awesome to create our instruments as objects in the game. I'm also replicating my whole office + lab in the game, so I'm aiming to add some office objects as well.

Using the modding tutorials, I've been able to add some instruments so far, but there's a few things I'd like to ask, if anyone knows how to do this:

1. I'd like to create new instances of existing objects. For example, I want to make an object that looks exactly the same as the already existing PC (but naming it differently). Would it be possible, in my mod .xml files, to reference a texture image that is located within the original pathway of the game texture database? Or am I forced to copy the whole graphics file and put it into my mod folder?

2. Is is possible to create "connecting" objects, in the same way that floor patterns works? For example, I would like to create desk parts that changes it's connection points depending on whether there are surrounding desk parts or not. Specifically I want to create a corner table that would not be accessible per se, but located between two accesible desk parts, in an L shape, and interlock with the desk parts on the sides. Also, as of now, I don't know how to make an object that doesn't require access, so I'm not able to put anything in the corner if it gets blocked by other objects.

3. As our instruments require usage in a certain order (in real life), is it possible to define how the lab techinician works with the instruments? E.g. technician gets sample from patient, then goes to Instrument A and "loads" the sample, goes back to PC for a while, then goes back to Instrument A to fetch processed sample, then loads it into Instrument B, and so on. Can I define the process like that?

Thanks in advance!
James
James
fellow
Posts : 82
Reputation : 6
Join date : 2019-11-10
Location : Malaysia, Kuala Lumpur

Some modding questions Empty Re: Some modding questions

Wed May 06, 2020 9:42 am
Hi Sirre!

1: Yes, you can reference the image of the existing PC.
2: I don't really know. I only know you can do that to floor tiles as of now
3. I don't think you can do that, but you can modify exams to use specific objects in a random order.
avatar
Sirre
intern
Posts : 5
Reputation : 0
Join date : 2020-03-25

Some modding questions Empty Re: Some modding questions

Wed May 06, 2020 8:05 pm
Hi James!

Thanks for the reply. My follow-up questions:

1. Great! So how would I do that?

3. I see. Close enough I guess. Where and how do I specify the objects to be used?
James
James
fellow
Posts : 82
Reputation : 6
Join date : 2019-11-10
Location : Malaysia, Kuala Lumpur

Some modding questions Empty Re: Some modding questions

Thu May 07, 2020 4:34 am
1. So to do that, you must have the file Mod_ObjectsAttachments , you can use the code from the existing PC in ObjectsAttachments

<GameDBObject ID="OBJECT_PC">
<AbbreviationLocID>OBJECT_PC_DESCRIPTION</AbbreviationLocID>
<TextureRef>ASSET_TEX_OBJECTS_SMALL</TextureRef>
<TextureAtlasLayout>LAYOUT_16_X_64</TextureAtlasLayout>
<SpriteShape>SHAPE_1_X_1</SpriteShape>
<TextureIDNW>561</TextureIDNW>
<TextureIDNE>566</TextureIDNE>
<TextureIDSE>571</TextureIDSE>
<TextureIDSW>572</TextureIDSW>
<UseOffsetXNW>-0.6</UseOffsetXNW>

<AnimationFramesNW>5</AnimationFramesNW>
<AnimationFramesNE>5</AnimationFramesNE>
<AnimationFramesSE>1</AnimationFramesSE>
<AnimationFramesSW>1</AnimationFramesSW>

<IconIndex>943</IconIndex>
<PlacedToEdge>false</PlacedToEdge>
<AttachedToWall>false</AttachedToWall>
<AttachedToObject>true</AttachedToObject>
<AllowsObjectsOnWallsAbove>true</AllowsObjectsOnWallsAbove>

<LightLevelRed>100</LightLevelRed>
<LightLevelGreen>100</LightLevelGreen>
<LightLevelBlue>100</LightLevelBlue>
<LightRange>3</LightRange>
<LightIsDirectional>true</LightIsDirectional>
<LightAutomatic>false</LightAutomatic>

<Tags>
<Tag>pc</Tag>
<Tag>equipment</Tag>
<Tag>ui_equipment</Tag>
<Tag>ui_pc</Tag>
<Tag>pc_work</Tag>
</Tags>

<RequiredObjectsInRoom>
<RequiredObject>
<Tag>office_chair</Tag>
<MaxDistance>1</MaxDistance>
</RequiredObject>
</RequiredObjectsInRoom>

<UseAnimationsStart>
<Animation>sit_type_in</Animation>
</UseAnimationsStart>
<UseAnimations>
<Animation>sit_type_idle</Animation>
</UseAnimations>
<UseAnimationsEnd>
<Animation>sit_type_out</Animation>
</UseAnimationsEnd>

<SoundEventUseStartRef>SFX_ENV_COMPUTER_TYPE</SoundEventUseStartRef>

<Durability>20</Durability>
<Cost>299</Cost>
</GameDBObject>

You can change the code id like MOD_OBJECT_*YOUR CODE* a
and do the same to the description code ID MOD_OBJECT_*YOUR CODE*_DESCRIPTION

<TextureRef>ASSET_TEX_OBJECTS_SMALL</TextureRef> for this code, it references the texture of the object from object_small_atlas
<Cost>299</Cost> references the cost of the item


3:

For the examinations, let's take CBC for example

<GameDBExamination ID="EXM_CBC_SAMPLING">
<AbbreviationLocID>EXM_CBC_SAMPLING_DESCRIPTION_1_1</AbbreviationLocID>
<DiscomfortLevel>Medium</DiscomfortLevel>
<Procedure>
<StaffSelectionRules>REQUIRED_ROOM_OR_DEFAULT_ROOM</StaffSelectionRules>
<RequiredDoctorQualificationList>
<SkillRef>SKILL_DOC_QUALIF_GENERAL_MEDICINE</SkillRef>
</RequiredDoctorQualificationList>
<RequiredEquipmentList>
<RequiredEquipment>
<Tag>sit_exam</Tag>
</RequiredEquipment>
<RequiredEquipment>
<Tag>doc_equipment</Tag>
</RequiredEquipment>
<RequiredEquipment>
<Tag>clean_hands</Tag>
</RequiredEquipment>
</RequiredEquipmentList>

<RequiredRoomTags>
<Tag>internal_medicine_office</Tag>
<Tag>general_surgery_office</Tag>
<Tag>neurology_office</Tag>
<Tag>orthopaedy_office</Tag>
<Tag>emergency_doctors_office</Tag>
<Tag>observation</Tag>
<Tag>trauma_center</Tag>
<Tag>icu</Tag>
</RequiredRoomTags>

<ProcedureScript>ProcedureScriptExaminationGeneralEquipment</ProcedureScript>
<AnimationSetupSitting>
<AnimationNameIn>stand_blood_sampling_in</AnimationNameIn>
<AnimationNameIdle>stand_blood_sampling_idle</AnimationNameIdle>
<AnimationNameOut>stand_blood_sampling_out</AnimationNameOut>
</AnimationSetupSitting>
<AnimationSetupLying>
<AnimationNameIn>stand_examination_in</AnimationNameIn>
<AnimationNameIdle>stand_examination_idle</AnimationNameIdle>
<AnimationNameOut>stand_examination_out</AnimationNameOut>
</AnimationSetupLying>
<DressLevel>FULL</DressLevel>
<Biohazard>true</Biohazard>
<Priority>20</Priority>
</Procedure>
<Cost>50</Cost>
<IconIndex>1715</IconIndex>
<DurationHours>0</DurationHours>
<LabTestingExaminationRef>EXM_CBC_TESTING</LabTestingExaminationRef>
</GameDBExamination>

<GameDBExamination ID="EXM_CBC_TESTING">
<AbbreviationLocID>EXM_CBC_TESTING_DESCRIPTION_1_1</AbbreviationLocID>
<DiscomfortLevel>None</DiscomfortLevel>
<Procedure>
<StaffSelectionRules>REQUIRED_ROOM_IGNORE_DOCTOR</StaffSelectionRules>
<RequiredSkillsToPrescribe>
<SkillRef>SKILL_DOC_QUALIF_GENERAL_MEDICINE</SkillRef>
</RequiredSkillsToPrescribe>
<RequiredStatLabQualificationRef>SKILL_LAB_SPECIALIST_QUALIF_SCIENCE_EDUCATION</RequiredStatLabQualificationRef>
<RequiredEquipmentList>
<RequiredEquipment>
<Tag>stat_lab_exam</Tag>
<DurationHours>0.1</DurationHours>
<BlocksSpecialist>true</BlocksSpecialist>
</RequiredEquipment>
<RequiredEquipment>
<Tag>hematoanalyzer</Tag>
<DurationHours>0.1</DurationHours>
<BlocksSpecialist>false</BlocksSpecialist>
</RequiredEquipment>
<RequiredEquipment>
<Tag>biohazard_trash</Tag>
<DurationHours>0.1</DurationHours>
<BlocksSpecialist>true</BlocksSpecialist>
</RequiredEquipment>
<RequiredEquipment>
<Tag>clean_hands</Tag>
<DurationHours>0.1</DurationHours>
<BlocksSpecialist>true</BlocksSpecialist>
</RequiredEquipment>
</RequiredEquipmentList>

<RequiredRoomTags>
<Tag>deprecated_lab</Tag>
<Tag>hematology_lab</Tag>
</RequiredRoomTags>

<Biohazard>true</Biohazard>
<Priority>20</Priority>
<FallbackLabDepartmentRef>DPT_LAB</FallbackLabDepartmentRef>
</Procedure>
<Cost>50</Cost>
<IconIndex>1715</IconIndex>
<DurationHours>2</DurationHours>
</GameDBExamination>

<tags> represent what rooms can it be used in for sampling it should be put for doctor's offices and diagnostic units for sampling
eg:
<RequiredRoomTags>
<Tag>internal_medicine_office</Tag>
<Tag>general_surgery_office</Tag>
<Tag>neurology_office</Tag>
<Tag>orthopaedy_office</Tag>
<Tag>emergency_doctors_office</Tag>
<Tag>observation</Tag>
<Tag>trauma_center</Tag>
<Tag>icu</Tag>
</RequiredRoomTags>

for the testing part the
<RequiredRoomTags>
<Tag>deprecated_lab</Tag>
<Tag>hematology_lab</Tag>
</RequiredRoomTags>
should be the labs it's in as you can see.

for the using of objects part:

<RequiredEquipmentList>
<RequiredEquipment>
<Tag>stat_lab_exam</Tag>
<DurationHours>0.1</DurationHours>
<BlocksSpecialist>true</BlocksSpecialist>
</RequiredEquipment>
<RequiredEquipment>
<Tag>hematoanalyzer</Tag>
<DurationHours>0.1</DurationHours>
<BlocksSpecialist>false</BlocksSpecialist>
</RequiredEquipment>
<RequiredEquipment>
<Tag>biohazard_trash</Tag>
<DurationHours>0.1</DurationHours>
<BlocksSpecialist>true</BlocksSpecialist>
</RequiredEquipment>
<RequiredEquipment>
<Tag>clean_hands</Tag>
<DurationHours>0.1</DurationHours>
<BlocksSpecialist>true</BlocksSpecialist>
</RequiredEquipment>
</RequiredEquipmentList>

This is only available in the testing code
<DurationHours> represent how long it would take to do the specific task at the specific object
eg:
<DurationHours>1</DurationHours>
(1 hour)

<Tag>biohazard_trash</Tag> for required equipment represents what objects do they use but for
<Tag>clean_hands</Tag> it represents they have to wash they're hands

<BlocksSpecialist>-
- if set to "true" - lab technician is blocked by object, can't do anything else
- if set to "false" - lab technician is not blocked, after using some object he can make anything else, he will come back when the use duration of the object is over (this is used for example for cultivations, where the samples need to be left alone for a bit)

as for more information you may ask me or go to the modding - database - medical database for more info

https://projecthospital.forumotion.com/t1940-modding-tutorial-database-medical-database
avatar
Sirre
intern
Posts : 5
Reputation : 0
Join date : 2020-03-25

Some modding questions Empty Re: Some modding questions

Sun May 10, 2020 5:02 pm
Thanks for the elaborate answer!

1. For the referencing of the texture:
<TextureRef>ASSET_TEX_OBJECTS_SMALL</TextureRef>

So I don't need to type out any pathway for the original texture file, which is located in the main database folder? I have a texture file of the same name already in my Mod folder, wouldn't it choose that file with this command?

3. Interesting! I will try this out!
James
James
fellow
Posts : 82
Reputation : 6
Join date : 2019-11-10
Location : Malaysia, Kuala Lumpur

Some modding questions Empty Re: Some modding questions

Mon May 11, 2020 9:52 am
You can also do that by making the pictures & the texture and turning it to an asset and still take the PC code and modify it with your texture. EG:

<GameDBObject ID="OBJECT_*YOUR CODE*">
<AbbreviationLocID>OBJECT_*YOUR CODE*_DESCRIPTION</AbbreviationLocID>
<TextureRef>*YOUR CODE*</TextureRef>
<TextureAtlasLayout>LAYOUT_16_X_64</TextureAtlasLayout>
<SpriteShape>SHAPE_1_X_1</SpriteShape>
<TextureIDNW>*YOUR TEXTURE NUMBER*</TextureIDNW>
<TextureIDNE>*YOUR TEXTURE NUMBER*</TextureIDNE>
<TextureIDSE>*YOUR TEXTURE NUMBER*</TextureIDSE>
<TextureIDSW>*YOUR TEXTURE NUMBER*</TextureIDSW>
<UseOffsetXNW>-0.6</UseOffsetXNW>

<AnimationFramesNW>5</AnimationFramesNW>
<AnimationFramesNE>5</AnimationFramesNE>
<AnimationFramesSE>1</AnimationFramesSE>
<AnimationFramesSW>1</AnimationFramesSW>

<IconIndex>967</IconIndex>
<PlacedToEdge>false</PlacedToEdge>
<AttachedToWall>false</AttachedToWall>
<AttachedToObject>true</AttachedToObject>
<AllowsObjectsOnWallsAbove>true</AllowsObjectsOnWallsAbove>

<LightLevelRed>100</LightLevelRed>
<LightLevelGreen>100</LightLevelGreen>
<LightLevelBlue>100</LightLevelBlue>
<LightRange>3</LightRange>
<LightIsDirectional>true</LightIsDirectional>
<LightAutomatic>false</LightAutomatic>

<Tags>
<Tag>pc</Tag>
<Tag>equipment</Tag>
<Tag>ui_equipment</Tag>
<Tag>ui_pc</Tag>
<Tag>pc_work</Tag>
</Tags>

<RequiredObjectsInRoom>
<RequiredObject>
<Tag>office_chair</Tag>
<MaxDistance>1</MaxDistance>
</RequiredObject>
</RequiredObjectsInRoom>

<UseAnimationsStart>
<Animation>sit_type_in</Animation>
</UseAnimationsStart>
<UseAnimations>
<Animation>sit_type_idle</Animation>
</UseAnimations>
<UseAnimationsEnd>
<Animation>sit_type_out</Animation>
</UseAnimationsEnd>

<SoundEventUseStartRef>SFX_ENV_COMPUTER_TYPE</SoundEventUseStartRef>

<Durability>20</Durability>
<Cost>299</Cost>
<CustomIconAssetRef>*YOUR CUSTOM ICON CODE*</CustomIconAssetRef>
</GameDBObject>

And if you want to have it change colours, you can colour the texture and icon purple in a specific area like a purple pot with a green plant on top
,then add <ColorSetRef>*COLOUR CODE*</ColorSetRef> to the code
Sponsored content

Some modding questions Empty Re: Some modding questions

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