#Players become ghosts that can warn friends of impending danger (with a cooldown)

38 messages · Page 1 of 1 (latest)

brazen burrow
#

Gives dead players more agency after death. A ghost can choose to 'pass on' to go to the normal dead player voice chat.

#

Initial thoughts: A ghost in the ethereal plane can rejoin the material plane for 1.5 seconds before returning to the ethereal plane. They cannot do so again for 30 seconds.

#
  1. The player death function would have to be modified to not throw the player into the voice chat lobby and instead spawn a new ghost player model at their corpse.
#
  1. Handling edge cases such as falling into a pit must be handled as well.
#
  1. Depending on how this is coded, the enemy AI will need to be updated to not target ghosts.
#
  1. Add a keybind to go into the normal voice chat. Going back to ghost should not be possible at this point or going back to ghost triggers a longer cooldown.
#
  1. Config options such as max uses of becoming material, or max duration of being a ghost
#
  1. Can ghosts see/hear other ghosts?
#
  1. Special interactions: For example, if the ghost girl kills you, she inhabits your body and hunts down more teammates. Good thing you can try to warn them! Or maybe the ghost girl hunts down ghosts!
#

Final Thoughts: I have a little modding experience having made the LCLightsStartOffMod, I think I may be able to do this myself with help from some more experience modders when my knowledge runs short. The fact that no custom models need to be made is a huge plus. After the new years, if no one else has picked this up, I will give it a hearty attempt.

#

Any feedback, suggestions, or volunteers to help are welcome!

autumn cipher
#

I noticed there is a mesh toggle and a spawn body method when you die. Maybe you can influence the body to spawn but your actually character doesn't get destroyed upon death, yaknow what I mean? There is also a parameter for isPlayerDead.

Summery:

  1. Don't destroy player
  2. Hide player mesh
  3. Spawn body
  4. Ability to pickup items
  5. Disable voice for that player (optional thought)

I am in the same boat as you as far as experience goes. I am pretty new to the Unity modding scene. It's easier than I expected and I have a lot of general programming experience but the lack of knowledge for Unity and game modding does get in the way a little bit. I will play around with this a bit and if I make a breakthrough, I will post my findings here!

#

Making other ghosts hear and see each other is a little beyond me just because I am still in the "manipulate existing code" phase and not entirely sure how to implement new code without breaking some stuff

brazen burrow
#

@autumn cipher This is great info. In some ways modding is easier than I expected, but in others (like adding custom 3dmodels) becomes more complex because I also lack Unity knowledge. This is an ambitious mod that requires knowledge in many areas so I expect to hit a few roadblocks but hopefully the modding community will come to our aid lol

brazen burrow
#

I've got some time today so going to see what I can do with this mod

autumn cipher
#

solid

#

I am working on #1191898460631351507 right now but I came accross some stuff that might be useful

#

PlayerControllerB has a property for each instance called gameplayCamera or something like that. Maybe you could just manipulate the camera for a ghost experience?

brazen burrow
#

I'll take a look at PlayerControllerB and see what I can use

lapis acorn
#

Looks dope, update me

brazen burrow
#

I think public void KillPlayer(...) is where the magic starts.

#

Among other things we need to have it not call DisablePlayerModel(base.gameObject);

#

The next step would be to make the player model invisible. I wonder if there is an easy way to do that

#

or rather make the player model invisible to other clients

autumn cipher
#

@brazen burrow

Try setting these to .enabled = false?

I am playing with my mod right now and thisPlayerModelArms.enabled hides my arms but that might just be for my camera. Not sure how this affects other camera instances

#

This is in PlayerControllerB btw

brazen burrow
#

@autumn cipher You can run two instances of lethal company at the same time and use the lan game option to play as both sides. It's a lot of work but possible.

autumn cipher
#

Oh shiii didn't know that

brazen burrow
#

It is unstable running two clients. One client will often freeze when I am using the other

#

Just to add to the frustration lol

brazen burrow
#

So it looks like PlayerControllerB inherits IVisibleThreat which I think is the mechanism that makes a player a possible target for monsters. I'll have to look how the threat level is used by monsters, but perhaps if we modify the GetThreatLevel and getVisibility function to always return 0 then maybe the ghost will never be selected for targetting. An alternative is to to define a PlayerControllerB without the IVisibleThreat inheritance and swap the models on death but I feel like that might open up another can of worms.

#

There is also public Collider playerCollider; and public Collider[] bodyPartSpraypaintColliders; which we would have to disable (or leave the spray paint one alone so people can spray the ghosts which would be pretty funny).

autumn cipher
# brazen burrow So it looks like PlayerControllerB inherits `IVisibleThreat` which I think is th...

Pretty sure the threat level goes up on conditions like player health, how many players are in the lobby, etc... I am not sure if that handles targeting though. Maybe it does? I just remember seeing it increase "difficulty" or activeness in monsters. Worth checking out to be sure!

I have a vague memory of seeing a method or something that mentions targetplayer or whatever. I might be remembering wrong. However, as I am working on #1191898460631351507, I noticed that the bracken, and maybe other monsters too, don't target the player if isInsideFactory is false. Bit of a messy way to handle it but maybe a last resort or can help you find another way to do it?

#

there is also a variable isPlayerDead. You can manually set that to true and I bet the monsters won't notice you

brazen burrow
#

by setting isPlayerDead = false it disables interacting with things like ladders and doors so definitely need a work around