June 29, 2017, 09:08:19 AMLatest Member: tgheretford

Author Topic: working on alien ... but  (Read 8461 times)

0 Members and 1 Guest are viewing this topic.

JustChris

  • Registered member
  • *
  • Posts: 25
    • View Profile
working on alien ... but
« on: December 26, 2010, 07:40:07 PM »
... how do I tell the lua.-files that the patient shouldn't knock on doors ? fixed
... how do I can make this disease showing up in emergancies only?

... where is the animation that appears while curring the aliens? I'm sure that I have seen this animation in the Animation viewer, but I can not recover it  :o

here is what I got so far...
« Last Edit: December 27, 2010, 01:58:07 PM by JustChris »
My wish list 12/21/2010
- implementation: animation of contaminated person
- implementation: animation of person without backbone
- implementation: missing menues (graphs)
- fix: KI is implemented but not really playing
- change startreputation

Lego3

  • Project Owner
  • *****
  • Posts: 398
    • View Profile
Re: working on alien ... but
« Reply #1 on: December 27, 2010, 10:02:03 AM »
- Does it crash because they try to knock as it is now? One way is to specify the standing animation as knock animation in humanoid.lua.

- Someone wrote someone not too long ago that they could actually come as normal patients too, so don't worry  too much about that yet...

- I don't remember the exact number, but it is there somewhere. Look at layer 10 and 11 when scrolling through. One reason the room hasn't been implemented yet is that it will need some extra work with the animation. It both uses additional sprites and transforms the humanoid over time.
For the end of the world spell, press Control, Alt, Delete.

JustChris

  • Registered member
  • *
  • Posts: 25
    • View Profile
Re: working on alien ... but
« Reply #2 on: December 27, 2010, 01:54:01 PM »
Now I fixed the crashes occuring, when aliens want to use doors.
I found all animations but the "healing" animation, when the alien is in the "machine". It would help if someone could find it ... I'm sure that I have seen it.

The "problems" at the moment are:
-   alien visit the hospital as normal patient.
-   missing "healing"-animation (where is it?, could you help me please?)
-   weird animation when patient leaves the machine (even if I found the correct animation)
-   graphical glitches

My video shows that it is working, even there are the problems, that I've mentioned above.
>>>>> See the video *klick* <<<<<
(sry for the quality - I'll improve that, when I make a further one.)
This video is not public. Watch it in fullscreenmode to see details.


Btw: A forum for developers would be a great idea to discuss things or to get help in coding (?)  :)
« Last Edit: December 27, 2010, 02:01:33 PM by JustChris »
My wish list 12/21/2010
- implementation: animation of contaminated person
- implementation: animation of person without backbone
- implementation: missing menues (graphs)
- fix: KI is implemented but not really playing
- change startreputation

KasperVld

  • Community Manager
  • ****
  • Posts: 88
  • Work to ride, ride to work
    • View Profile
    • Corsix-TH Community website
Re: working on alien ... but
« Reply #3 on: December 27, 2010, 02:04:36 PM »
Looking nice, although I'm pretty sure that only doctors with a researchers degree can operate the DNA Fixer

KasperVld

  • Community Manager
  • ****
  • Posts: 88
  • Work to ride, ride to work
    • View Profile
    • Corsix-TH Community website
Re: working on alien ... but
« Reply #4 on: December 27, 2010, 02:09:33 PM »
On the topic of making the disease emergency only, I think the best way to do it is make a flag for the diseases to set them as 'emergency only'

Code: ("world.lua:403") [Select]
local disease = self.available_diseases[math.random(1, #self.available_diseases)]

to something like

Code: [Select]
local disease
do
{
disease = self.available_diseases[math.random(1, #self.available_diseases)]
} while (!disease.onlyEmergencies)
(not sure if the do/while loop is implemented in LUA)

found an example of something similar in LUA:
Code: [Select]
i = 1
repeat
print (i)
i = i + 1
until i > 5
« Last Edit: December 27, 2010, 02:12:56 PM by KasperVld »

JustChris

  • Registered member
  • *
  • Posts: 25
    • View Profile
Re: working on alien ... but
« Reply #5 on: December 27, 2010, 05:53:52 PM »
Looking nice, although I'm pretty sure that only doctors with a researchers degree can operate the DNA Fixer
Are you really sure? I only played trough the game on playstation one - I didn't get so far on pc.
Anyway ... I am able to change this, if it's really the case.  :)

And I tried to implement your suggestion, but I think I need to improve my skills in programming to to this :D
My wish list 12/21/2010
- implementation: animation of contaminated person
- implementation: animation of person without backbone
- implementation: missing menues (graphs)
- fix: KI is implemented but not really playing
- change startreputation

KasperVld

  • Community Manager
  • ****
  • Posts: 88
  • Work to ride, ride to work
    • View Profile
    • Corsix-TH Community website
Re: working on alien ... but
« Reply #6 on: December 27, 2010, 06:26:24 PM »
Code: ("world.lua:403") [Select]
local disease = self.available_diseases[math.random(1, #self.available_diseases)]

-->

Code: [Select]
local disease
local i = 0
repeat
   disease = self.available_diseases[math.random(1, #self.available_diseases)]
   i = i + 1
until (!disease.onlyEmergencies || i >= 50)
not sure if that last thing works though, I don't actually know LUA

and in each of the diseases (the .Lua)
find:
Code: [Select]
disease.initPatient = function(patient)
add below:
Code: [Select]
disease.onlyEmergencies = falseor true, if you only want them to be emergencies
again, not sure if it works this way in LUA...

KasperVld

  • Community Manager
  • ****
  • Posts: 88
  • Work to ride, ride to work
    • View Profile
    • Corsix-TH Community website
Re: working on alien ... but
« Reply #7 on: December 27, 2010, 06:30:45 PM »

JustChris

  • Registered member
  • *
  • Posts: 25
    • View Profile
Re: working on alien ... but
« Reply #8 on: December 28, 2010, 12:57:10 AM »
ok, I changed that. Now only researcher can use this room.  :)
I'm not able to implement your code.
The last line doesn't work and when I change it a little bit, so that I can start C-TH, than I get an error message, when the game tries to spawn the alien. (see the attached errormessage)

Now I'm going to upload my working, but not completed files, so that you can add them and maybe keep working on it (if that helps) :)

- implemented new files:
/diseases/,   /objects/,   / rooms/, 
- changed files
/entities/humanoid.lua
/levels/example.level (just to proove the behaviour better)

this is working:
- aliens can use swing-doors and of course those green ones
- correct sound
- researcher is required and a lot of more

this is missing / wrong:
- correct animation when alien is transformed into a human (pls help me to find it - I'm sure I've seen that in the animation viewer)
- aliens occur as a normal patient too, instead of in cases of emergency only.


If you want to, you can add the files into the next developer snapshoots (corsix-th-rXXXX-win32.zip).  :)
The're based on r.1137!

I hope I could help a little bit ^^
My wish list 12/21/2010
- implementation: animation of contaminated person
- implementation: animation of person without backbone
- implementation: missing menues (graphs)
- fix: KI is implemented but not really playing
- change startreputation

snowblind

  • Registered member
  • *
  • Posts: 67
    • View Profile
Re: working on alien ... but
« Reply #9 on: December 28, 2010, 12:14:42 PM »
Actually, in my game, any doctor can use the DNA Fixer, and they are only coming from emergency:
(I'm so glad I don't have to play in this resolution anymore.)


JustChris

  • Registered member
  • *
  • Posts: 25
    • View Profile
Re: working on alien ... but
« Reply #10 on: December 28, 2010, 02:59:20 PM »
this is the original isn't it?
Well, I was of the opinion, that any doctor can use this room, too. But the link, that KasperVld has mentioned here, says that a researcher is required. How do we handle this now?

Quote from: koanxd0
[...] and they are only coming from emergency
You're right. But I don't know how to program this, so I uploaded what I've got untill now. Maybe someone will implement and improve it. I hope, that I helped a litle bit by doing this.  :)
My wish list 12/21/2010
- implementation: animation of contaminated person
- implementation: animation of person without backbone
- implementation: missing menues (graphs)
- fix: KI is implemented but not really playing
- change startreputation

KasperVld

  • Community Manager
  • ****
  • Posts: 88
  • Work to ride, ride to work
    • View Profile
    • Corsix-TH Community website
Re: working on alien ... but
« Reply #11 on: December 28, 2010, 06:54:59 PM »
When you built the DNA Fixer it always used to say in the tooltip that a researcher was required, if any doctor can operate the DNA Fixer then I guess it's a bug in TH

tobylane

  • Registered member
  • *
  • Posts: 53
    • View Profile
Re: working on alien ... but
« Reply #12 on: December 28, 2010, 07:07:06 PM »
The animations are the major roadblock, the emergency-ness and skills (un)required are acceptable bugs for now.

Your video only shows one graphical error I can see, that things are in the wrong order. This isn't your fault, it's the same problem with ward beds and training room chairs, it can also be ignored.

I tried your zip, the doctors won't treat them, they walk out of the room instantly. If they can't be diagnosed it would be important to be emergency only.

edit:Can we just tell it not to animate those things? E.g the alien stands up on the spot of the GP's chair or bench, never gets thirsty or full?
« Last Edit: December 28, 2010, 07:17:39 PM by tobylane »

KasperVld

  • Community Manager
  • ****
  • Posts: 88
  • Work to ride, ride to work
    • View Profile
    • Corsix-TH Community website
Re: working on alien ... but
« Reply #13 on: December 28, 2010, 07:09:37 PM »
Found another error, patients with Alien DNA that try to use a bench will trigger an error as no animation is available (I dont think there ever was one), I'll try to fix some things tonight

and as Tobylane said they wont enter a GPs office (I think this would cause errors with animations as well

There's also no animations for:
Alien DNA patients getting a soda, going to the toilet etc... etc...
« Last Edit: December 28, 2010, 07:11:08 PM by KasperVld »

JustChris

  • Registered member
  • *
  • Posts: 25
    • View Profile
Re: working on alien ... but
« Reply #14 on: December 28, 2010, 08:55:12 PM »
Quote from: KasperVld
Found another error, patients with Alien DNA that try to use a bench will trigger an error as no animation is available (I dont think there ever was one), I'll try to fix some things tonight
Hmm yeah, I didnt thought about that ... I only prooved it with the 2 rooms and one reception. (like you see it in the video).

But today I found another interesting thing .... Animation 3848, 3850 and 3852 ... Could it be, that these are the animation, used for the transforming animation? compare it with the picture that koanxd has posted ... Look at the bottom of the machine...
My wish list 12/21/2010
- implementation: animation of contaminated person
- implementation: animation of person without backbone
- implementation: missing menues (graphs)
- fix: KI is implemented but not really playing
- change startreputation