Jump to content

Simple interaction Speech


ZeppelinII

Recommended Posts

I am working on my "Hello World" for project zomboid modding. The idea is pretty simple, just interact with the world and have your character say different things based on what your doing. Right now, i haven't tested this in multiplayer so I'm not sure how that would work (might have to rewrite some stuff based on player). The reason why most of these things are in the planning stage is simply because i don't know how to access some of the things like traits/prof/moodles/etc providing i have the player object (zombie.characters.IsoPlayer). So if any one could provide that information to me, that would be great! Anyway, leave a suggestion if you have one or a line that you would like added to the game and under which scenario. Thank you.

 

Working

-say something on attack based on attack type (swing, stab, firearm)

-say something when a zombie dies

-say something when you go outside/inside

-say something when running

-say something when aiming

-say something when sneaking

-speech for different moodles

-speech for falling

-speech for player on fire

-speech for reloading/out of ammo

-speech pending player traits

-balanced so it is conditional and frequency based so it will not fire all the time (spam reduction)

 

Work in progress

-item specific lines for killing zombies

-item specific lines for attacking zombies

-container/item specific speech ("FOUND AXE!" when viewing container inventory)

-player is reloading / out of ammo

 

Planning

-speech for being attacked/scratched/bitten

-food rotten/stale/cooked/burnt/eating

-during an action or on completion of an action (fishing/reading/foraging/etc)

Link to comment
Share on other sites

Saying something for when you're about to die?

 

Rotten food/stale food? and or satisfaction of cooked food.

 

Burning stuff on the campfire? 

 

Drunk. 

 

Feeling sick.

 

Hurting and or breaking legs like screaming or something.

 

Falling to your death? could have like a scream before you smack the concrete or whatever :)

 

 

Also random comments about your mood? for example If your characters depressed he might say something along the lines like

 

"All hope Is lost"

"Why am I still breathing"

"Fuck life, fuck the zombies" or something :0

 

And also when you're on fire! for when your screaming as you're burned down. 

Edited by Decay
Link to comment
Share on other sites

@Decay those are all great ideas and I will be working to incorporate all of them. I will go ahead and add your lines in based on the unhappy moodle. I just figured out  how to get the player traits and different moodles. Currently I have it setup so that your guy has a set of phrases that he will say for each level of endurance that player gains. For instance, if your player is at Moderate Exertion then they will say something like "breath, just breathe", but when you are at Exhausted then you get something like "can't go on..." or whatever it may be.

 

I also have a set of phrases that play for when your endurance moodle goes down, in this case your resting.

 

 I think that i will do something similar for all the different moodles so there is alot of lines that need to be generated. I think i will go ahead and do Hungry, bleeding, boredom, foodEaten, Sick, Pain, unhappy, and some others soon.

 

Please submit some lines people, i can't make up all the copy on my own.

 

Thanks again for taking a look at my mod.

Link to comment
Share on other sites

Implemented

Speech is triggered based on moodle changes. Each increase in moodle level has a set of phrases it can draw from. Reduction in each moodle has a set of phrases. I will list the moodles so that people can add lines they would like to associate with each moodle.

 

Moodles

-endurance

-tired

-hungry

-panic

-sick

-bored

-unhappy

-bleeding

-wet

-hasacold (moodle representing the cold with cough)

-stress

-thirst

-injured

-pain

-heavyload

-drunk

-foodeaten

-hyperthermia (temp hot)

-hypothermia (temp cold)
6426_E79_B22_C6_E0055_A88_F980_D1_F43_C2

 

E240188255_D93_DB44_A220_D351773_B5_B666

Link to comment
Share on other sites

Completed

- idle speech will now draw from player traits in addition to the normal idle speech. only 1 additional line per trait at this time.

-Falling AHHHHHHHH speech has been added

-Speech for your guy being on fire

 

In Progress

-Right now i have it setup so your guy will say "FOUND AXE!!!!", but it isn't always working. Need to figure out what the issue with that is.

-out of ammo / reloading text is working but still in progress because of the different reloading mechanics available (particularly for the pistol). Since there isn't a simple isReloading() function available at this time, i had to make a pseudo reloading solution that might not be optimal. Currently it checks if the player hits the "r" key. If so and the player has a "Firearm" equipped then it will check if the player has the correct ammunition for the gun. If so, it will say "reloading" otherwise "outta ammo". Problem with this, is that you can just keep reloading an empty magazine for the pistol and it will say reloading as long as you have 9mm ammo in your inventory...

 

Planned

-during an action or on completion of an action (fishing/reading/foraging/etc)

-eating food

-completing a recipe

 

Notes

This mod has more than served it's purpose for getting me jump started into pz modding. As such, I feel that i will just complete the last couple things and then move onto my next mod.

http://theindiestone.com/forums/index.php/topic/18111-severe-moodles-extreme-consequences/

 

some aiming speech

F0_FA405_A6_A333_D954_AEDDDAACB2_EE347_F

 

falling speech

8_B880_DD9246952_FB16_D9474_E59_A5811_DD

 

Reloading Speech

62_A1_ED3299_C3_D8_B4_AC592_ADE9_BFE3_C2

 

Drunk moodle speech

10293_A4_F7_F19_DD87711097_DEC41423719_E

Link to comment
Share on other sites

Implemented

-Better overall polish + more lines

-Added Axe/Shotgun specific kill speech

-Added speech for milestone kills

-Added speech on rain start/stop

-created additional modifiers to alter frequency of moodle speech, entering/exiting building speech, plus variable thresholds for action speech

-Added in a button to toggle the amount of speech ("default", "not too chatty", "simple", "stoic", "chatty")

-Player will say one of the speech values to inform user of current mode

 

Notes

Since this was my first mod, I just decided to throw everything into the client lua folder which is why this mod is currently only available for single player. I will be working to remedy that just as soon as I figure out how it all fits together. Additionally I was going to add in speech providing specific injury reports, for instance - "Bastard scratched my leg", but the getWounds() method always seems to return the empty set. For now, I will have to put that feature on hold. As far as checking when a player is performing an action, I think most of that stuff is in the PZ lua code so I will be digging through that for a while. Also might redo how the reloading feature works if I find a better solution available in the pz lua.

 

6_AD3_D6583_A631_C0_DF850_FD76_FAF9_C4_A

2639_FF5_E0_BAE068_C4_D9_E0611_E4_B1186_

 

 

If you would like to test my mod, please PM me.

 

Thanks again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...