Ludeon Forums

Ludeon Forums

  • December 04, 2020, 02:52:04 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: New medicine selection API  (Read 368 times)


  • Colonist
  • ***
  • Posts: 133
  • Refugee
    • View Profile
New medicine selection API
« on: November 12, 2018, 04:29:06 PM »

I currently run Pharmacist by Fluff, and am considering Smart Medicine as well.

Herein lies the problem.

Presently IIRC the medical API just looks at the worst wound and then grabs a bunch of medicine for it without even checking to see how much is really needed.

What if instead:

1.  When a doctor job is run, take the patient and iterate through all their wounds and do the "pick a medicine" hooks.
2.  When each wound has been tallied, add up all the results and pick up that much medicine.
3.  Go to the patient, and use the medicines as directed one at a time.  It's ok if the medicine is good enough to treat multiple wounds at the same time, but if this is the case then don't forget to skip medicine selections for a wound that has already been treated.  This implies that each wound needs to be tracked separately.

Presently, Fluffy's pharmacist mod is unable to tell the doctor to only grab one medicine to treat a patient that has just a single deadly wound but a bunch of simple bruises with it.  For obvious reasons I'd like to only have the doctor bring one medicine and save the rest for my other patient having a nasty case of malaria.
« Last Edit: November 12, 2018, 04:34:08 PM by shentino »