Ludeon Forums

RimWorld => Mods => Help => Topic started by: Simulacrum0 on October 26, 2016, 12:45:19 AM

Title: Can this be done with just XML
Post by: Simulacrum0 on October 26, 2016, 12:45:19 AM
can a surgery recipe be done so the surgery can only be done in a hospital bed?
Title: Re: Can this be done with just XML
Post by: sulusdacor on October 26, 2016, 04:08:14 AM
as far as i know no. you can just set the difficulty factors for the surgerys.

you can check the xml documentation for the possible xml commands in recipes:
https://github.com/RimWorldMod/RimworldModdingFiles/blob/master/Defs/RecipeDefs/Recipes.xml
(just search for "surgery" and you will get the factors modifing the difficulty.)
Title: Re: Can this be done with just XML
Post by: Simulacrum0 on October 26, 2016, 04:26:44 AM
i waned to make a "Strap to bed" recipe to deal with pwns that are going to start having issues with out having to use any meds. like 4 leather to lock down that pawn with mechanites, plague and is to smart.
Title: Re: Can this be done with just XML
Post by: Fluffy (l2032) on October 26, 2016, 08:07:16 AM
why would you need it to be only on hospital beds? Wouldn't any beds allowed for surgery (so either hospital or their own bed) also work just fine?

As for the actual strap down, I think that would be possible as well. Basically you'd want to apply a status effect (hediff, in RW terminology) of -100% movement ability, and provide another recipe ('take off restraints') that removes the hediff. Should be xml only, may require a tiny .dll for a hediff worker (not sure), but in either case it wouldn't require any overriding of core functionality, so it would be fairly straightforward.
Title: Re: Can this be done with just XML
Post by: kaptain_kavern on October 26, 2016, 09:36:44 AM
Haha that is smart.

The only maybe issue is that for applying a surgery recipe that will add a hediff with no movement is that surgery are always performed in a bed. A weapon/item that apply the hediff is possible I think though (for not having them to be in bed for the first step).

My 2 cents
Title: Re: Can this be done with just XML
Post by: Simulacrum0 on October 26, 2016, 02:27:27 PM
hospital beds are built so you can strap some one in to it a normal bed would work yes i don't want it to work in a sleeping spot.
i all ready know how to make all the hediff's just not if if can be made to only work in a bed.