Can this be done with just XML

Started by Simulacrum0, October 26, 2016, 12:45:19 AM

Previous topic - Next topic

Simulacrum0

can a surgery recipe be done so the surgery can only be done in a hospital bed?

sulusdacor

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.)

Simulacrum0

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.

Fluffy (l2032)

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.

kaptain_kavern

#4
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

Simulacrum0

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.