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

Modding tutorial: creating new mods

+6
slink
Adventure4u1
Butch
Luki2410
QEUH
jan.oxymoron
10 posters
Go down
avatar
juanferivera
intern
Posts : 5
Reputation : 0
Join date : 2021-03-10

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Thu Mar 11, 2021 2:17 pm
Hi Jan,


I somehow managed to get the Mod file on the main menu.... which is good.

But i can not find the object that i am trying to add.... as excercise.


Does the mod_objects_small_atlats HAVE to be 2048x8192px? (16x64 objects)

Can it be for example, 64x64px (1x1 Object)?



Since i am just trying to add one object "outdoor" i am just adding ModAddon.xml - ModAssetLists.xml and ModObjects.xml to the Database folder.... would it work just like that?


Thanks for the help
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 335
Join date : 2018-03-23

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Thu Mar 11, 2021 3:03 pm
Hi, probably the best suggestion: find an object from the base game as similar to the one you're adding and check how it's plugged in and what its texture looks like - there are different texture sizes and formats, all graphics are compiled in these atlases, smallest currently supported layout is probably LAYOUT_16_X_16, used for example for decals (so have a look the decals texture as a quideline).
James
James
fellow
Posts : 82
Reputation : 6
Join date : 2019-11-10
Location : Malaysia, Kuala Lumpur

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Sat Jun 19, 2021 9:54 am
Hello! James here, can I ask if Events are supported in mods? I've publish More Events long ago, and it is bugged. Another person has also tried to make events, he/she also experiences bugs. Bugs such as the timer going into negative numbers such as -23:-6 and event not completing after treating all 100% of patients. To view more info please, check the Event Troubles [Issues] topic.

Regards,
James
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 335
Join date : 2018-03-23

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Mon Jun 21, 2021 8:28 am
Hi James, yes, adding events should work, maybe the issue is that there's not a lot of safety checks in the system so it's possible to fill in combinations that won't work.
There's quite a few examples of new events in Traumatology and DID, so I'd definitely recommend to check these and try to see what's different. If it doesn't help, fell free to post the XML of one of your 'troubled' events so we can have a look (for example under the Event Troubles topic you mentioned).
James
James
fellow
Posts : 82
Reputation : 6
Join date : 2019-11-10
Location : Malaysia, Kuala Lumpur

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Mon Jun 21, 2021 2:07 pm
So I've already viewed multiple times, but it doesn't seem to help. It may be because of this line of code <PatientCountDisaster>5</PatientCountDisaster> I do not have this in my events nor do I know what does that do. You may like to download and look at this mod. https://drive.google.com/drive/folders/1GuDtcesoYJXINTAedr6bE03vB1LOEG9l?usp=sharing
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 335
Join date : 2018-03-23

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Tue Jun 22, 2021 10:40 am
Hi, I've managed to have a look at the new events and quickly try them in game and I can't see anything obviously wrong - I think the best next step would be to send us a save where the problems actually manifest themselves (it would probably mean running the game with only the mod with events on your side though so we can easily load it here).

In the meantime, a couple of quick comments on the setup and parameters:
- "Patient count disaster" is only used in the natural disaster events which spawn two sets of patients, some with diseases, some with injuries. There's also another list of diagnoses for these events - there will be some examples in the vanilla game as usually.
- One possible problem could be caused by setting the event time too long (24h or more), but I don't think I've seen it in the xml. If the events take too long, lowering the patient count should be the correct way to balance things.
James
James
fellow
Posts : 82
Reputation : 6
Join date : 2019-11-10
Location : Malaysia, Kuala Lumpur

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Wed Jun 23, 2021 2:52 pm
The events don't have a duration of 24 hours, the maximum should be 22. I don't have a save that has just only More Events. Most of them are heavily modded. You can take a look the the mod page at https://steamcommunity.com/sharedfiles/filedetails/?id=2267341470 . This was one of the subscriber saves, it potentially have several other mods https://1drv.ms/u/s!AnQDDKUj8CD2jLZDW9Qmzq_pX2UZQw?e=TU2tM4 . It is unknown which events are causing problems and which aren't, some say that a few work and some doesn't.
James
James
fellow
Posts : 82
Reputation : 6
Join date : 2019-11-10
Location : Malaysia, Kuala Lumpur

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Tue Jun 29, 2021 2:15 pm
Hope you can solve this soon!
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 335
Join date : 2018-03-23

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Tue Jun 29, 2021 2:28 pm
Hi, well, I still don't think the issue is your mod itself - as long as the affected saves have up to literally 38 different mods installed, there could be all sorts of incompatibilities and issues going on under the hood.

As it's basically impossible for us to open such saves in the development version of the game, the next best shot would be to try to get a log file from one of the players which might guide us to an error in one of the systems in game that we could try to blindly fix - not the best outlook, but probably worth a try.

James likes this post

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

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Tue Jun 29, 2021 2:37 pm
Will do!
James
James
fellow
Posts : 82
Reputation : 6
Join date : 2019-11-10
Location : Malaysia, Kuala Lumpur

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Thu Jul 01, 2021 4:29 pm
From my experience, playing with the events. It seems that the Epidemic Events work but the "Dam Burst" event, seems to cause a bug. This event never ends even after all patients has been treated, going into 0:-35, and possibly further. I don't think its a mod incompatibility, I think it's a code problem. The only thing that is different is that the "Dam Burst" event has the PatientDisaster variable.
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 335
Join date : 2018-03-23

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Thu Jul 01, 2021 4:41 pm
Hi, thanks for the pointer! Now I think I see what's wrong - it looks like some of your disaster events don't have the two lists of medical conditions filled in - should look something like
this:
Code:

 <PatientCount>10</PatientCount>
 <PatientCountDisaster>5</PatientCountDisaster>
...
<MedicalConditions> <!-- Mostly diseases and light wounds, patients that come to the hospital on their own -->
       <MedicalConditionRef>DIA_CLD</MedicalConditionRef>
       ...
</MedicalConditions>  
 <MedicalConditionsDisaster> <!-- Patients delivered by ambulance -->
       <MedicalConditionRef>TRM_LIP</MedicalConditionRef>
      ...
 </MedicalConditionsDisaster>
Let me know if making similar changes helps! I think the game just doesn't expect this type of event with no patients on the second list - not sure though why I didn't see any issues myself when testing your events recently, I think I actually saw the dam burst one - but maybe I just failed it. Smile
James
James
fellow
Posts : 82
Reputation : 6
Join date : 2019-11-10
Location : Malaysia, Kuala Lumpur

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Sat Jul 03, 2021 3:58 am
Hi, thanks for the reply. Before I make any changes, I'd like to know what does this
Code:
<LaunchWorldEvent>true</LaunchWorldEvent>
        <WorldEventType>DLC_WORLD_EVENT_DISEASE_OUTBREAK</WorldEventType>
mean? Could be useful for my mod
jan.oxymoron
jan.oxymoron
developer
Posts : 2309
Reputation : 335
Join date : 2018-03-23

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

Wed Jul 07, 2021 12:43 pm
James wrote:Hi, thanks for the reply. Before I make any changes, I'd like to know what does this
Code:
<LaunchWorldEvent>true</LaunchWorldEvent>
        <WorldEventType>DLC_WORLD_EVENT_DISEASE_OUTBREAK</WorldEventType>
mean? Could be useful for my mod

Hello - yes, this could be used to make some interesting combinations! If the WorldEventType is filled, the game activates the referenced 'world event' when you fail the first event. The world events are the global modifiers that affect numbers of patients, insurance payments etc., you can find some examples under DLCAdminPathology (Hospital Services).
Sponsored content

Modding tutorial: creating new mods - Page 2 Empty Re: Modding tutorial: creating new mods

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