Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Falling over animations #476

Closed
TheCycoONE opened this issue Dec 23, 2014 · 57 comments · May be fixed by #1848
Closed

Falling over animations #476

TheCycoONE opened this issue Dec 23, 2014 · 57 comments · May be fixed by #1848
Labels

Comments

@TheCycoONE
Copy link
Member

From mark.l1...@hotmail.co.uk on September 22, 2011 15:12:11

What are the major things which your patch changes / adds? Adds yawning for some patients that are waiting or if they have sleeping illness.
Added queue to the list of possible vomit/pee patients to test it out
Also add falling over and shaking of fist for some patients. What version of the product are you using? On what operating system? The falling animations are for when there is an earth quake, as some patients should fall down. Please provide any additional information below. As earth quakes are not in the game yet (fingers are crossed that they never will be) I have made it that from time to time if you click on a patient he or she could fall over. This is not in TH, but I thought it may make people smile.

Original issue: http://code.google.com/p/corsix-th/issues/detail?id=1020

@TheCycoONE
Copy link
Member Author

From cgja...@gmail.com on September 26, 2011 11:08:11

Hey Mark, this looks great. Good job finding all the extra animations, they really make the game feel more alive.

I have a couple of minor qualms about the code. Could you rename the actions to be more consistent with what already exists (i.e. gets_up/get_up, shakes/shake, etc.).
I think it might be a good idea to take the random out of Patient:falling() and use it whenever it's called instead so it can be different depending on how it's used.

I think making queuing patients puke is good. I really like knocking patients down but I don't think it happens often enough! I love other games that do things like this like how you can annoy units in Warcraft by clicking on them a bunch of times or how the imps struggle when you pick them up in Dungeon Keeper.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on September 26, 2011 12:32:04

I am okay with renaming, I take it you want the s off the end?

I get stuck when it comes to moving the random though. Logic says that the next best place is where falling is being called, but it won't work for me from there and at this stage I can't see why!

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on September 27, 2011 11:29:11

It is working after-all, I guess I should have allowed more time from spawning to testing it out (I assume the patient code is loaded at spawning, as it was not working at first)
I have added more adviser messages, as falling will now occur more often as suggested. (I thought that if he says the same thing each time it will be less funny)
Also renamed some of the actions, I assume you wanted them making singular?

@TheCycoONE
Copy link
Member Author

From cgja...@gmail.com on September 27, 2011 14:33:33

Also renamed some of the actions, I assume you wanted them making singular?

Yea, I know it seems nitpicky but keeping naming consistent is important. Thanks for making the changes.

@TheCycoONE
Copy link
Member Author

From cgja...@gmail.com on September 27, 2011 16:40:10

So I play tested it. There seems to be a problem. I managed to get an empty action queue. Maybe it was by clicking on someone and causing them to fall as they were getting up. Just spam click someone and you'll see it happen. You've got to be really careful messing with the action queue to make sure that doesn't happen.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on September 28, 2011 00:54:02

I think I know what causes that error and the same could happen with pee and puke too.
I have added current.name == "queue" to pee and puke function and forgot to do the same for when returning to the action. Stupid thing is that I did have it in and for some reason took it out again.

I will look at it when I get home.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on September 28, 2011 11:38:18

it wasn't that - shame, sob, sob - so any thoughts on what it could be?

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on September 28, 2011 12:38:00

I did some more testing and the empty action queue happens for me when you catch the patient before he or she has been to reception or when they are made to fall too often. Queue also seems to have an impact, so I have removed queue from pee or puke function for now, also added a new variable for being booked in and once a patient has fallen it will take a day to reset. With these changes you can't make a patient fall until they have been through reception or twice in the same day. I now don't get an empty action queue error.
I have also removed some of the randomness from the diagnosis process - which was a part of another issue.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 09, 2011 12:32:48

updated the patch to the lastest revision

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on October 09, 2011 15:16:25

Patched this upon r1420 without problems.
I get several errors when trying to run the game with that patch.

See attached file.

Attachment: error.txt

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 10, 2011 00:52:57

Odd, I'll look into this tonight

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 10, 2011 10:59:13

sorted, one of the other patches had written to the same file as this one, so it clashed.

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on October 10, 2011 11:37:24

I'm sorry, but I still get similar errors.
This time patched upon r1423 .

Attachment: error.txt

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 10, 2011 12:42:00

I wasn't getting the error, then I used the patch on a clean install and wham.

it was all down to a missing coma!

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on October 10, 2011 15:06:12

Now it works! :)
But with this I am experiencing a new error.

Is this related?

Error in timer handler:
C:\Games\CorsixTH\Lua\humanoid_actions\queue.lua:94: Proper idle not in action_queue
stack traceback:
[C]: in function 'error'
C:\Games\CorsixTH\Lua\humanoid_actions\queue.lua:94: in function 'action_queue_find_idle'
C:\Games\CorsixTH\Lua\humanoid_actions\queue.lua:185: in function 'onChangeQueuePosition'
C:\Games\CorsixTH\Lua\queue.lua:194: in function 'pop'
C:\Games\CorsixTH\Lua\objects\reception_desk.lua:101: in function 'tick'
C:\Games\CorsixTH\Lua\world.lua:811: in function 'onTick'
C:\Games\CorsixTH\Lua\app.lua:674: in function 'dispatch'
C:\Games\CorsixTH\Lua\app.lua:579: in function <C:\Games\CorsixTH\Lua\app.lua:574>

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 11, 2011 03:32:58

You had better not add it then.

What were you doing when the error happened?

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on October 11, 2011 06:39:17

I didn't add this patch to the repo.

It happened when a patient left the GP's (in the door).

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 11, 2011 07:39:33

It doesn't sound related, but if you have the save from before the error, can you try to run it in an unpatched version to see if you get the same error?

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on October 11, 2011 09:26:15

I ran a test with a clean version ( r1424 ), and I got no errors after 6 years!

I also tested your patch again.
Got the error within 1 game year.
Uploaded the save game (wait for a few patient visits before it happens).

Attachment: errorsave.sav

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 11, 2011 11:37:47

initially I was getting errors, but when I slowed the game down, dealt with all the faxes it ran fine. The only error I got then was trying to re-enable the adviser, but that could be down to the different language as I never saw that error before when I tested the disable adviser or disable information. Are A and I in a different place on your keyboard or are all keyboards the same? For me A is on left next to caps lock and I is between u and o on top row.
oh and I have tested your save on patched and unpatched copies of TH.

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on October 11, 2011 13:07:16

Ok, so you think the error comes from too much faxes and speed?
My keyboard is just like what you describe (a QWERTY-keyboard).

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 12, 2011 00:53:06

I think the error might come from the build up of faxes, there is perhaps a limit to how many can queue. Odd with the adviser and information as I did not turn them off and could not turn them on - perhaps it does remember on saving, but then why can't I switch them on in your save?
Hopefully the devs will have the answer.

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on October 15, 2011 05:10:28

But don't you think it's weird that with you patch, it took under a year to get the error, and without it it didn't happen at all (for as long as I tested, 6 years).

Yes, it would be nice if a dev could say his mind on this :)

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 15, 2011 05:59:40

I think your error was connected to one of the patients with a pending faz. When I tested your save I did it with both the patched and unpatched game and got the error. As soon as I opened any of the faxes I got the error. The only way I could continue without an error was to pause the save straight away, kick out all the patients with a pending fax then play from then.

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on October 15, 2011 07:15:10

Couldn't the error already been "loaded" into the save when you test it on both versions (with and without patch)?

I didn't think you could cross-test unrestricted on the same save across versions.
But maybe I'm wrong.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on November 24, 2011 05:02:04

It could just be that your save was bugged.

Have you tested this with a different save, I still don't get any errors when I run it, only with your save.

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on November 28, 2011 05:16:08

Status: Fixed

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 25, 2012 12:54:18

I think that I may have finally got this to work without it throwing errors if anyone wants to test it.
ideally during a quake the patient should stop on the ground for longer than they do at the moment, but that can be sorted at a later date

Summary: Falling over animations
Status: New
Owner: mark.l1...@hotmail.co.uk

Attachment: falling.patch

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 26, 2012 11:23:57

I was getting an error with the patched files (using the earthquake-cheat):

Created game with savegame version 54.
Savegame version is 54 (Trunk)
Savegame version is 54 (Trunk)
Error in timer handler:
...rogram Files\CorsixTH\Lua\humanoid_actions\queue.lua:71: Proper idle not in action_queue
stack traceback:
[C]: in function 'error'
...rogram Files\CorsixTH\Lua\humanoid_actions\queue.lua:71: in function 'action_queue_find_idle'
...rogram Files\CorsixTH\Lua\humanoid_actions\queue.lua:96: in function 'action_queue_finish_standing'
...rogram Files\CorsixTH\Lua\humanoid_actions\queue.lua:179: in function 'action_queue_on_change_position'
...rogram Files\CorsixTH\Lua\humanoid_actions\queue.lua:297: in function 'after_use'
...m Files\CorsixTH\Lua\humanoid_actions\use_object.lua:315: in function 'timer_function'
C:\Program Files\CorsixTH\Lua\entity.lua:165: in function 'tick'
C:\Program Files\CorsixTH\Lua\world.lua:954: in function 'onTick'
C:\Program Files\CorsixTH\Lua\app.lua:734: in function <C:\Program Files\CorsixTH\Lua\app.lua:732>
(tail call): ?
C:\Program Files\CorsixTH\Lua\app.lua:636: in function <C:\Program Files\CorsixTH\Lua\app.lua:631>

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 26, 2012 12:35:32

do you have the save?
I have tested this with the quake cheat and never saw that error
thanks

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 26, 2012 12:39:55

Yes, here is the save!

Attachment: Nieuw awesome time.sav

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 26, 2012 12:52:26

I am not getting any errors with your save either!
Did you have any issues when you applied the patch?
I am thinking that maybe not all the files got patched for you.
If you are using svn, look for the files with the red ! and delete them.
then update to get fresh files
then apply the patch again
If you have been adding patches on top of each other that are not yet added to the trunk you can get conflicts - especially if the same files are being patched by different people at the same time

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 26, 2012 13:00:22

I have changed the patch slightly so that during an earthquake the patients don't fall over too often
Could do with some help though
How can I make the patients stop on the ground for longer, instead of getting straight up? I thought that perhaps they should stay down for the duration of the quake.

Attachment: falling.patch

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 26, 2012 13:01:46

@ maartenpeters did you read comment 40?

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 26, 2012 13:49:28

Yes, you're right. I've updated the trunk again and applied the patch again: no errors! Sorry.

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 26, 2012 13:57:58

I think that I'm wrong, but I don't see any patients fall.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 27, 2012 03:14:27

if it is an old save you won't.
run the game for a while so that new patients arrive, I have not added any code to update existing patients with the new fields or you can start a new game

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 27, 2012 04:26:06

You're right, I will start a new game tonight and test it again!

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 27, 2012 08:18:40

I still don't see people fall when I'm using the earthquake-cheat or am I stupid. How does ''fall over'' look like? Can you attach an image of it?

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 27, 2012 11:17:28

I still don't see patients fall over. So, a patient would fall if he's walking? And not if he's waiting for a treatment, a room or the reception?

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 27, 2012 11:26:33

walking,
standing around,

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on October 27, 2012 11:35:40

Only the normal looking patients will fall as there are not that many animations. So invisible, elvis or hairy ones won't fall.

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 27, 2012 12:53:37

I will look at this again tonight or tomorrow.

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 29, 2012 12:04:56

I'm still not seeing anybody fall, do you have a save with people who should fall when an error occurs. I've build a reception and a GP's office, but when they're walking between these rooms and a earthquake occurs, nobody falls! What the hell am I doing wrong!? :)

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on October 29, 2012 12:10:48

And I'm still getting sometimes an error and I'm using the latest patched revision:

Created game with savegame version 51.
Savegame version changed from 51 (0.01) to 55 (Trunk).
Error in timer handler:
...rogram Files\CorsixTH\Lua\humanoid_actions\queue.lua:71: Proper idle not in action_queue
stack traceback:
[C]: in function 'error'
...rogram Files\CorsixTH\Lua\humanoid_actions\queue.lua:71: in function 'action_queue_find_idle'
...rogram Files\CorsixTH\Lua\humanoid_actions\queue.lua:225: in function 'onChangeQueuePosition'
C:\Program Files\CorsixTH\Lua\queue.lua:194: in function 'pop'
...rogram Files\CorsixTH\Lua\objects\reception_desk.lua:100: in function 'tick'
C:\Program Files\CorsixTH\Lua\world.lua:954: in function 'onTick'
C:\Program Files\CorsixTH\Lua\app.lua:734: in function <C:\Program Files\CorsixTH\Lua\app.lua:732>
(tail call): ?
C:\Program Files\CorsixTH\Lua\app.lua:636: in function <C:\Program Files\CorsixTH\Lua\app.lua:631>

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on January 20, 2013 01:49:44

The falling-patch does not work with the latest revision (missing hunks-errors.) Maybe you can update this patch and then we can maybe add it?

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on May 05, 2013 12:33:37

Summary: Falling over animations - Patch attached (was: Falling over animations)
Status: Started
Labels: Milestone-0.30

@TheCycoONE
Copy link
Member Author

From maartenp...@hotmail.nl on August 04, 2013 10:13:28

I think somebody should update this patch to the latest revision and then we could add it to the trunk for more testing I think.

@TheCycoONE
Copy link
Member Author

From mark.l1...@hotmail.co.uk on August 04, 2013 10:20:34

It will be added as part of the adding a tremor to the earthquake at some
point in the future

@TheCycoONE
Copy link
Member Author

From Grim...@gmail.com on August 17, 2013 06:55:24

Summary: Falling over animations (was: Falling over animations - Patch attached)
Labels: -Type-Enhancement Type-Patch

@tobylane
Copy link
Member

This was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants