Giter VIP home page Giter VIP logo

emergency-dice's Introduction

Emergency Dice

This mod adds new items (equipment and scrap)

Emergency Die

This is an item you can buy from the store. It is a one time use only die, which teleports you to the ship with all your items. But, not always.

  • Rolling 6 will return you to the ship with all the crewmates standing near you (they need to be very close).
  • Rolling 4 or 5 will return you to the ship.
  • Rolling 3 will cause a mixed effect.
  • Rolling 2 will cause something bad to happen.
  • You don't want to roll a 1.

The Gambler

A new scrap item with rolling outcomes similar to the Emergency die, but with a larger pool of postivie effects and a bigger chance for a bad outcome.

  • Rolling 6 will cause a Great effect.
  • Rolling 5 will cause a Good effect.
  • Rolling 4 will cause either a Good or a Mixed effect.
  • Rolling 3 will cause a Bad effect.
  • Rolling 2 will cause either a Bad or an Awful effect.
  • Rolling 1 will cause an Awful effect.

You can either sell it, or use it.

Chronos

Similar to The Gambler. Has a higher chance of getting a great effect, but the outcomes change when the time passes. As the night comes, the chances to roll a bad/awful effect increase.

It's probably better to use it earlier in the day, but this can make your whole day troublesome.

  • Rolling 6 will cause a Great effect.
  • Rolling 5 will cause a Good or a Great effect.
  • Rolling 4 will cause either a Bad, Good or a Great effect.
  • Rolling 3 will cause a Bad effect.
  • Rolling 2 will cause either a Bad or an Awful effect.
  • Rolling 1 will cause an Awful effect.

You can either sell it, or use it.

The Sacrificer

Guarantees a return to the ship, and a bad/awful effect.

  • Rolling 6 will cause a Bad effect.
  • Rolling 5 will cause a Bad effect.
  • Rolling 4 will cause a Bad effect.
  • Rolling 3 will cause a Bad or an Awful effect.
  • Rolling 2 will cause an Awful effect.
  • Rolling 1 will cause two Awful effects.

The Saint

This one will never roll a bad or an awful effect. It's the rarest die in this mod, so don't expect to see it a lot.

  • Rolling 6 will show you a menu from which you can select any Effect.
  • Rolling 5 will cause a Great effect.
  • Rolling 4 will cause a Good effect.
  • Rolling 3 will cause a Good effect.
  • Rolling 2 will cause a Good effect.
  • Rolling 1 will waste the die.

Rusty

Spawns scrap. Only scrap. Higher rolls mean more scrap. Has negative outcomes.

  • Rolling 6 will spawn 7-8 scrap.
  • Rolling 5 will spawn 5-6 scrap
  • Rolling 4 will spawn 3-4 scrap.
  • Rolling 3 will spawn 1-2 scrap.
  • Rolling 2 will cause a Bad effect.
  • Rolling 1 will cause an Awful effect

Effects

Great

  • Gives you Pathfinding Blobs - a new item which shows everyone the way to the main entrance when used
  • Increases company's item selling rate for the current quota
  • Gives everyone infinite stamina
  • Makes all the living enemies explode and die
  • Teleports you and anyone near you to the ship with items
  • Revives every dead player
  • Spawns about 3-9 (random) scrap items beneath you with a lower weight.
  • Gives you a shotgun with ammo
  • Gives you the ability to fly with your sprint key
  • Allows you to pick any effect (both good and bad ones)

Good

  • Makes all flashlights brighter
  • Heals all alive players and restores their batteries in every item
  • Gives you infinite stamina
  • Teleports you to the ship with your items

Mixed

  • Swaps places with another player

Bad

  • Makes you emit an annoying sound periodically
  • Spawns spiders and makes them faster
  • Spawns an armageddon outside
  • Spawns a lot of bugs inside
  • Makes the ship door malfunction
  • Creates a lot of fake fire exits
  • Blocks all fire exits
  • Closes all open doors and locks them
  • Jumpscares you (can be changed in the settings to be mild)
  • Spawns a lot of mines inside
  • Changes your speech, and makes it harder to communicate
  • Teleports you inside
  • Turns off all lights permanently
  • Makes you periodcally shake a lot
  • Makes the ship lever moving

Awful

  • Spawns a lot of bee hives outside
  • Detonates a random player
  • Spawns a jester in a popped state, and pops all already existing jesters.
  • Spawns landmines and makes them move
  • Spawns a coilhead outside
  • Causes coilheads to sometimes ignore your stare, which allows them to move while being watched.
  • Creates turrets near the ship
  • Spawns invisible mines inside
  • Creates a lot of turrets inside which shoot instantly
  • Spawns a lot of worms outside
  • Spawns a lot of zombies inside
  • Teleports you to the ship, but leaves a zombie in your place
  • Spawns a lot of mines outside
  • Breaks a neck of a random player

More to come!

Config

Be sure to check out the plugin's config file. It is called Emergency Dice.cfg and it should be generated when you run the game with the mod for the first time.

You can modify which effects you want or not, or change some other settings.

The [Allowed Effects] tab in the config syncs with all the clients, meaning that only server needs to disable/enable effects.

Spawn rates are also serverside only, so no need to worry about having everyone syncing up their values with the host.

Emergency die shop alias

Some mods (like Lethal Things mod) might use conflicting item names in the shop. To solve this I added few aliases for the emergency die in the shop.

Try these aliases in the shop:

  • emergencydie
  • dice
  • die
  • edie

Chat commands

I included some chat commands in the mod, mainly for myself to ease debugging. If you want to use them you have to set

"Allow chat commands = true"

in the config.

To spawn dice use:

  • ~edice dice num

where num is an id of the die. ID's start from 1.

If you want to force an effect, use

  • ~edice effect effectName or
  • ~edice menu

Special thanks

Thanks to everyone who participates on github - for the suggestions, and bug reporting!

All players need this mod

emergency-dice's People

Contributors

theronguard avatar

Stargazers

Xara avatar Jacob - AbsoLambda avatar CoolLKKPS avatar

Watchers

 avatar

emergency-dice's Issues

Non-hosts sometimes can not use the dice.

this is my pack code: 018de5e0-273b-b401-9900-29db3b7a0017
I test 3 times with my two friends, everytime when the game started, they can not use the dice.
First time, we skip to second day and it became normal. non-hosts can use all dice.
Second time, non-hosts didnt skip to second day but just changed the type of dice from The Saint to The Sacrificer, and it became normal.
Third time, non-hosts try to use the saint for 7or 8 times, it doesnt work. and we didnt continue.
non-hosts can't use the dice just like: The animation will play and explode, but it will not take effect and there will be no on-screen tips.
AND after the first time the non-hosts can use the dice, they can use it every time.(The first time here is not the first time mentioned earlier)

I don't know if there have some conficts in my modpack?

impossible to use dices

whether it's the host or the players, the dice don't work, they throw their animation, like, they spin, make an explosion but there's no other effect, we tried with the emergency dice about thirty times and nothing more, if we had a little smiley on the screen

Had a cool idea for a few effects

Possible Bad effect: Replace the current time on the HUD with "???", keep the sun icon in the clock, outdoors the sun never moves, but time still progresses, it could look like it's 8 AM outside and be like 7 PM outside

Why is Hypershake a thing?

All the other Positive and Negative Effects are perfectly fine and more or less Balanced...

then there is this... Abomination... Constant Fall Damage and no way to survive that.

Sorry for the Rage but getting that 5 Times in a Row is very bad.

Incompatible with Lethal Things Mod

Hey it seems like the dice cannot be bought when the lethal things mod is downloaded because it thinks I am trying to buy the emergency flare. I tried typing in just dice and it did not work so I cant buy it. Seems like a pretty simple fix to just make typing in dice also buy the item. Other than that I have not really had any problems.

Suggestion: Add a catch-all and/or custom moon config option for modded moons

Heya!

Our group has been playing with this mod and we think it's really fun! however we were confused why dice eventually stopped appearing, and it turned out that that was because, from what I can tell, they're only set to spawn on vanilla moons. It'd be nice if there was a fallback config option for every other moon not explicitly mentioned in the config, as we typically tend to stop going to vanilla moons after the first 1 or 2 visits to the company. I've seen other mods utilize a string field along the lines of Rend@15, Titan@20, Orion@25 etc. to handle weights on individual moons, such as this one, which would work nicely alongside the fallback as well for moons that aren't explicitly covered by the config.

Also, on an unrelated note, me and my wife have gotten into modding very recently, and I wanted to say we very much appreciate you making this mod open source. So far it's been a great resource to learn from just because it does a bit of everything, and since patching methods is not as intuitive as writing straight source code it's really helpful to have a functional example to learn from!

Keep up the good work :)

V55 still doesn't work

The dice can now be thrown again and explode which is good. However, the dice have no effect after the explosion.

Rolled a all player revived dice and the game is bugged

Hello, we rolled a all player revive dice and the game is bugged. All revived players ui is gone including health and hotbar. One player tp inside and couldnt leave using the front gate. When the revived players die again, they see the hotbar appearing during spectator mode. Thank you

Rusty Dice

For some reason scraps aren't spawning at the location I dropped my rusty dice on. Happens both on ship and in facility

[Bug Report] v1.1.20 Dropped Dice Do Nothing on v49

Dropping the dice has it spin for a short period of time and then stall without an explosion.
The following error is generated in the log.

[19:19:50.8926749] [Error : Unity Log] MissingMethodException: Method not found: void .EnemyAI.HitEnemyOnLocalClient(int,UnityEngine.Vector3,GameNetcodeStuff.PlayerControllerB,bool,int)
Stack trace:
MysteryDice.Dice.DieBehaviour+d__14.MoveNext () (at <213bc49cb90549f1a932d7a0d1fbd50c>:IL_0070)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at :IL_0026)

[19:19:50.8926749] [Error : Unity Log] MissingMethodException: Method not found: void .EnemyAI.HitEnemyOnLocalClient(int,UnityEngine.Vector3,GameNetcodeStuff.PlayerControllerB,bool,int)
Stack trace:
MysteryDice.Dice.DieBehaviour+d__14.MoveNext () (at <213bc49cb90549f1a932d7a0d1fbd50c>:IL_0070)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at :IL_0026)

Dice work, but no popup to tell me what I rolled

The dice function as intended, and the effects occur properly, except we have no popup telling us what we rolled, i.e 1-6. It was working in earlier versions but latest is bugged. Don't currently have a log to help in finding the issue, but I will include it when I manage to capture it

Only Host can use dice

Everyone in the lobby had the mod and all dependencies downloaded. When anyone besides the host used the dice, it would play the animation and that's it. When the host used it, it would actually have effects. We tested it multiple times which each type of dice.

Configurable item spawn weight / Rusty die suggestion

Dear Theronguard,

I just want to start off and say that my friends and I really like this mod so thank you for making it.

I was just posting this as I was going through the configs for the mod and didn't end up seeing a way to configure the item spawn weight/chance for the different dice that can spawn as scrap in the facility/manor so I figured there wouldn't be any harm in asking if you wouldn't mind implementing that functionality.

Additionally, and there's no need to do this should you not want to, but I wanted to add that I love the new die includes that you added but had a thought that the rusty die, instead of simply being a loot spawn die, could randomly be one of the other dice that are in the game which adds a fun sort of multi layered gamble to the scrap. The player just can't tell which it is/will be as it's gotten rusty over the years.

The mod you've made is really quite fun and I look forward to any future die additions/outcomes that might be added into the mod. Also, thank you in advance for any help/feedback you can give!

Sincerely,
Leerabitt

Dices only work on host but not clients V1.1.23

Code: 018f2c85-789b-5b19-d141-62447af76fbf

Updated to latest version today. Only the host can use dice normally. When clients use dice, it just drops on the ground, no spinning, no explosion, no effects.

Dice broken in v56

Howdy! Just wanted to let you that the latest update of Lethal Company has unfortunately broken this mod. Not sure what's going on under the hood, but when you roll the dice, they no longer spin and you can no longer pick them back up.

[00:02:02.3287029] [Error  : Unity Log] MissingMethodException: Method not found: void .Landmine.SpawnExplosion(UnityEngine.Vector3,bool,single,single,int,single,UnityEngine.GameObject)
Stack trace:
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:IL_0026)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
MysteryDice.Dice.DieBehaviour:DropAndBlock(UInt64)
MysteryDice.Dice.DieBehaviour:SyncDropClientRPC(UInt64)
MysteryDice.Dice.DieBehaviour:__rpc_handler_2874552817(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ClientRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendClientRpc(FastBufferWriter&, UInt32, ClientRpcParams, RpcDelivery)
MysteryDice.Dice.DieBehaviour:SyncDropClientRPC(UInt64)
MysteryDice.Dice.DieBehaviour:SyncDropServerRPC(UInt64)
MysteryDice.Dice.DieBehaviour:__rpc_handler_775119853(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ServerRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendServerRpc(FastBufferWriter&, UInt32, ServerRpcParams, RpcDelivery)
MysteryDice.Dice.DieBehaviour:SyncDropServerRPC(UInt64)
MysteryDice.Dice.DieBehaviour:ItemActivate(Boolean, Boolean)
GrabbableObject:UseItemOnClient(Boolean)
GameNetcodeStuff.PlayerControllerB:DMD<GameNetcodeStuff.PlayerControllerB::ActivateItem_performed>(PlayerControllerB, CallbackContext)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)

[00:02:02.3287029] [Error  : Unity Log] MissingMethodException: Method not found: void .Landmine.SpawnExplosion(UnityEngine.Vector3,bool,single,single,int,single,UnityEngine.GameObject)
Stack trace:
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:IL_0026)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
MysteryDice.Dice.DieBehaviour:DropAndBlock(UInt64)
MysteryDice.Dice.DieBehaviour:SyncDropClientRPC(UInt64)
MysteryDice.Dice.DieBehaviour:__rpc_handler_2874552817(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ClientRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendClientRpc(FastBufferWriter&, UInt32, ClientRpcParams, RpcDelivery)
MysteryDice.Dice.DieBehaviour:SyncDropClientRPC(UInt64)
MysteryDice.Dice.DieBehaviour:SyncDropServerRPC(UInt64)
MysteryDice.Dice.DieBehaviour:__rpc_handler_775119853(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ServerRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendServerRpc(FastBufferWriter&, UInt32, ServerRpcParams, RpcDelivery)
MysteryDice.Dice.DieBehaviour:SyncDropServerRPC(UInt64)
MysteryDice.Dice.DieBehaviour:ItemActivate(Boolean, Boolean)
GrabbableObject:UseItemOnClient(Boolean)
GameNetcodeStuff.PlayerControllerB:DMD<GameNetcodeStuff.PlayerControllerB::ActivateItem_performed>(PlayerControllerB, CallbackContext)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)

For now, someone has uploaded a fixed version of this mod so perhaps they can help with what's changed.

Dice does nothing in v1.1.19

i haven't tried on non-modded moons, but when i throw a dice, it stays on the ground doing nothing and i get this error :

[16:55:25.1527322] [Error  : Unity Log] MissingMethodException: Method not found: void .Landmine.SpawnExplosion(UnityEngine.Vector3,bool,single,single,int,single,UnityEngine.GameObject)
Stack trace:
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:IL_0026)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
MysteryDice.Dice.DieBehaviour:DropAndBlock(UInt64)
MysteryDice.Dice.DieBehaviour:SyncDropClientRPC(UInt64)
MysteryDice.Dice.DieBehaviour:__rpc_handler_2874552817(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ClientRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendClientRpc(FastBufferWriter&, UInt32, ClientRpcParams, RpcDelivery)
MysteryDice.Dice.DieBehaviour:SyncDropClientRPC(UInt64)
MysteryDice.Dice.DieBehaviour:SyncDropServerRPC(UInt64)
MysteryDice.Dice.DieBehaviour:__rpc_handler_775119853(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ServerRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendServerRpc(FastBufferWriter&, UInt32, ServerRpcParams, RpcDelivery)
MysteryDice.Dice.DieBehaviour:SyncDropServerRPC(UInt64)
MysteryDice.Dice.DieBehaviour:ItemActivate(Boolean, Boolean)
GrabbableObject:DMD<GrabbableObject::UseItemOnClient>(GrabbableObject, Boolean)
GameNetcodeStuff.PlayerControllerB:DMD<GameNetcodeStuff.PlayerControllerB::ActivateItem_performed>(PlayerControllerB, CallbackContext)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)

[16:55:25.1527322] [Error  : Unity Log] MissingMethodException: Method not found: void .Landmine.SpawnExplosion(UnityEngine.Vector3,bool,single,single,int,single,UnityEngine.GameObject)
Stack trace:
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:IL_0026)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
MysteryDice.Dice.DieBehaviour:DropAndBlock(UInt64)
MysteryDice.Dice.DieBehaviour:SyncDropClientRPC(UInt64)
MysteryDice.Dice.DieBehaviour:__rpc_handler_2874552817(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ClientRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendClientRpc(FastBufferWriter&, UInt32, ClientRpcParams, RpcDelivery)
MysteryDice.Dice.DieBehaviour:SyncDropClientRPC(UInt64)
MysteryDice.Dice.DieBehaviour:SyncDropServerRPC(UInt64)
MysteryDice.Dice.DieBehaviour:__rpc_handler_775119853(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ServerRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendServerRpc(FastBufferWriter&, UInt32, ServerRpcParams, RpcDelivery)
MysteryDice.Dice.DieBehaviour:SyncDropServerRPC(UInt64)
MysteryDice.Dice.DieBehaviour:ItemActivate(Boolean, Boolean)
GrabbableObject:DMD<GrabbableObject::UseItemOnClient>(GrabbableObject, Boolean)
GameNetcodeStuff.PlayerControllerB:DMD<GameNetcodeStuff.PlayerControllerB::ActivateItem_performed>(PlayerControllerB, CallbackContext)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)

A quick question

Hi,

I recently updated your mod as a standalone version with a few changes for myself and my friends. However, I was informed that I need your permission to do so. I wanted to ask if it would be possible for me to edit and post an updated version of your mod in the meantime?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.