sadger / CorsixTH

Open source clone of Theme Hospital
Other
1 stars 0 forks source link

Should the nurse vaccinate walking patients too? #18

Open MarkL1961 opened 10 years ago

MarkL1961 commented 10 years ago

Now that I have spreading epidemics I have noticed that on an unsuccessful vaccination attempt the nurse can end up walking on the spot. You have to pick her up to break the loop.

sadger commented 10 years ago

Oh dear this is an action queue issue hides. If possible can you try and capture a save before it occurs or try and see what the action queue of the nurse looks like and it's likely i have a fight on my hands now :P

MarkL1961 commented 10 years ago

If you load the save I sent you a few days ago and create an epidemic from the cheat menu, it will spread pretty well. Hire an extra nurse or two and place in the corridors and as soon as you see in the console window the message about unsuccessful vaccination attempt take a look around and you should see a nurse doing the reverse moonwalk... For me she has two meanders in the action queue.

I think the vaccination thing still needs some work though, at the moment you can have nurse quite close to marked victims who are sat down and they ignore them most times. Perhaps it should become a greater priority or something?

MarkL1961 commented 10 years ago

Actually I just noticed that the nurses that are just standing around also have the two meanders in their action queues, they were stood still rather than the moonwalk which is why I thought they were either lazy or ignoring the marked victims. Later I got this error right after a vaccination

Error in timer handler: ...imental-epidemics\CorsixTH\Lua\entities\humanoid.lua:637: Can only finish current action stack traceback: [C]: in function 'assert' ...imental-epidemics\CorsixTH\Lua\entities\humanoid.lua:637: in function 'finishAction' ...demics\CorsixTH\Lua\humanoid_actions\answer_call.lua:31: in function '?' ...imental-epidemics\CorsixTH\Lua\entities\humanoid.lua:550: in function 'Humanoid_startAction' ...imental-epidemics\CorsixTH\Lua\entities\humanoid.lua:642: in function 'finishAction' ...cs\CorsixTH\Lua\humanoid_actions\call_checkpoint.lua:24: in function '?' ...imental-epidemics\CorsixTH\Lua\entities\humanoid.lua:550: in function 'Humanoid_startAction' ...imental-epidemics\CorsixTH\Lua\entities\humanoid.lua:642: in function 'finishAction' ...tal-epidemics\CorsixTH\Lua\humanoid_actions\idle.lua:31: in function 'timer_function' ...sixTH-experimental-epidemics\CorsixTH\Lua\entity.lua:178: in function 'tick' ...perimental-epidemics\CorsixTH\Lua\entities\staff.lua:146: in function 'tick' ...rsixTH-experimental-epidemics\CorsixTH\Lua\world.lua:1039: in function 'onTick' ...CorsixTH-experimental-epidemics\CorsixTH\Lua\app.lua:839: in function <...CorsixTH-experimental-epidemics\CorsixTH\Lua\app.lua:836> (tail call): ? ...CorsixTH-experimental-epidemics\CorsixTH\Lua\app.lua:740: in function <...CorsixTH-experimental-epidemics\CorsixTH\Lua\app.lua:735>

MarkL1961 commented 10 years ago

Line 610 in epidemic I have changed to nurse:setNextAction({name="meander"}) from queue action. Not seen any repeat of the moonwalk since, but it is early days :) I noticed both here and in vaccinate.lua had a queue meander, which might be why there were two in the queue.

Nurses don't appear to prioritise vaccinating at all, for a few tests I hired an extra 4 or 5 and they prefer to wander around. Have you thought about creating a humanoid action seek_patients where during an epidemic they wander the corridors like the handymen do looking for litter, only they seek out those marked for vaccination?

sadger commented 10 years ago

I wondered if I managed to put two meanders in when I was fiddling! Best of luck if you are playing with the action queue, it's a a foul beastie!

I did try something like seek patients but moving targets are no fun, try adjusting the "test_radius" in the calls dispatcher (search for this variable) which will make nurses move in from further away. It may just be nurses have to be idle in order to vaccinate, I may try relaxing this condition if you still have lazy nurses! It has been said nurses don't go too much out of their way to vaccinate but they should try at least to do some, the radius changing will help this.

I'm pretty swamped with all this new information you are giving me, it's very helpful but need to get to grips with it over the next few days and i'll be more useful after that!

MarkL1961 commented 10 years ago

The vaccination whilst sitting down works just nice when the patients are sat down waiting (I changed the radius to 10), but they spend a lot of time walking around. Just an idea, I notice that patients can spread the epidemic whilst walking around, can you do something similar for when they walk past a nurse so they become vaccinated? If you could do that, it would not matter that they are on the move, just so long as they pass within one tile of a nurse, then its just a matter of getting idle nurses to wander the corridors when there is an epidemic cover up.

And as for your question, each time you have done a change I have downloaded your branch again so I am always working on the latest. Unless I have been trying something out that is, in which case it will be your latest with some changes. In testing I have sometimes loaded an old save, like when I realised what it might be why I was not seeing spreading, so I tried a few things out to confirm my thoughts.

MarkL1961 commented 10 years ago

Nurse walks on the spot is fixed I reckon so as this now includes other comments I am changing the heading

sadger commented 10 years ago

I could well be fixed but I want to wait until we have multiple nurses vaccinating then we can really tell. But changing the topic is fine, we can discuss anything about nurses here. I hope to have time this week to make some of these changes, I ended up being busy at the end of last week, i'm back at work now to but we'll see.

sadger commented 9 years ago

I think for release we can leave nurses how they are. We'll leave this issue open for post-release if we decide to do something about how the nurses behave.