feat: add zombie cure syringe mod & add audio effects for template mod
@@ -17,3 +17,9 @@ When creating assets using ComfyUI:
|
|||||||
## Image Dimensions
|
## Image Dimensions
|
||||||
- **Any size can be chosen** for sprites
|
- **Any size can be chosen** for sprites
|
||||||
- **Thumbnail**: 512x512 pixels
|
- **Thumbnail**: 512x512 pixels
|
||||||
|
|
||||||
|
## Audio effects:
|
||||||
|
- **Format**: WAV (PCM)
|
||||||
|
- **Sample Rate**: 44.1 kHz
|
||||||
|
- **Bit Depth**: 16-bit
|
||||||
|
- **Channels**: Mono
|
||||||
|
|||||||
26
README.md
@@ -7,16 +7,30 @@ Clone `ppg-snippets` repo:
|
|||||||
git clone https://github.com/mestiez/ppg-snippets.git
|
git clone https://github.com/mestiez/ppg-snippets.git
|
||||||
```
|
```
|
||||||
|
|
||||||
## Important files
|
## Files
|
||||||
- `ppg-snippets/` folder with code snippets from `https://github.com/mestiez/ppg-snippets`
|
|
||||||
- `extracted_wiki_content/` full docs for create mods from `https://wiki.studiominus.nl/`
|
- `extracted_wiki_content/` full docs for create mods from `https://wiki.studiominus.nl/`
|
||||||
- `How-To-Mod-In-People-Playground.md` - complete tutorial to creating a mode (from `https://steamcommunity.com/sharedfiles/filedetails/?id=3363454139`)
|
- `mods/` folder with complete mods
|
||||||
|
- `parsing_docs/` for creating `extracted_wiki_context/` folder
|
||||||
|
- `ppg-snippets/` folder with code snippets from `https://github.com/mestiez/ppg-snippets`
|
||||||
|
- `SledgeHammer/` example mod to understand the structure
|
||||||
|
- `AGENTS.md` for AI
|
||||||
- `CUSTOM-SETTINGS.md` for personal asset style guidelines and custom configuration.
|
- `CUSTOM-SETTINGS.md` for personal asset style guidelines and custom configuration.
|
||||||
|
- `How-To-Mod-In-People-Playground.md` - complete tutorial to creating a mode (from `https://steamcommunity.com/sharedfiles/filedetails/?id=3363454139`)
|
||||||
|
|
||||||
## Example prompt
|
## Example prompt
|
||||||
|
|
||||||
```
|
```
|
||||||
READ `AGENTS.md`, `README.md` and other files that necessary for you to create new mode in new folder.
|
You are a People Playground modding expert. Create mods ONLY in new folders `mods/<Name>/`.
|
||||||
I provide all what you need. You can use grep or whatenver in `extracted_wiki_content/`, `ppg-snippets/` and `How-To-Mod-In-People-Playground.md`.
|
|
||||||
Do whatever you want.
|
**Knowledge base:** `AGENTS.md`, `How-To-Mod-In-People-Playground.md`, `extracted_wiki_content/`, `ppg-snippets/`, `SledgeHammer/`
|
||||||
|
|
||||||
|
**Workflow:**
|
||||||
|
1. Parse mod request (items, mechanics, effects)
|
||||||
|
2. Auto-search knowledge base for relevant examples & base mechanics
|
||||||
|
3. Use SledgeHammer/ to understand basic mod structure and context
|
||||||
|
4. Briefly explain implementation approach
|
||||||
|
5. Generate valid mod
|
||||||
|
- `README.txt` (user-friendly description for players)
|
||||||
|
- Create ComfyUI prompt for .png based on `CUSTOM-SETTINGS.md`
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,25 +1,20 @@
|
|||||||
SledgeHammer Mod
|
SledgeHammer Mod
|
||||||
================
|
================
|
||||||
|
A heavy sledgehammer that makes satisfying impact sounds when hitting things.
|
||||||
|
|
||||||
A basic example mod that introduces a classic sledgehammer weapon to People Playground.
|
How to use:
|
||||||
|
- Spawn it from the Melee category
|
||||||
|
- Swing it around and hit objects
|
||||||
|
- Hear the different impact sounds based on how hard you hit
|
||||||
|
|
||||||
Features
|
Features:
|
||||||
--------
|
- Heavy weight for realistic physics
|
||||||
• Simple, functional sledgehammer item
|
- Custom impact sound effects
|
||||||
• Basic physics and collision detection
|
- Cool sprite design
|
||||||
• Demonstrates core modding concepts
|
|
||||||
• Clean, minimal code structure
|
|
||||||
|
|
||||||
How to Use
|
Includes 3 sound effects:
|
||||||
----------
|
- Light impacts
|
||||||
1. Activate the mod in your mod list
|
- Heavy impacts
|
||||||
2. Find the sledgehammer in the weapons category
|
- Spawn sound when created
|
||||||
3. Spawn it and start smashing!
|
|
||||||
|
|
||||||
Technical Details
|
Enjoy smashing things with style!
|
||||||
-----------------
|
|
||||||
This mod serves as an educational example showing:
|
|
||||||
• Proper mod.json configuration
|
|
||||||
• Item registration with ModAPI
|
|
||||||
• Basic sprite loading and assignment
|
|
||||||
• Simple weapon implementation
|
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
"ThumbnailPath": "thumb.png",
|
"ThumbnailPath": "thumb.png",
|
||||||
"EntryPoint": "Mod.Mod",
|
"EntryPoint": "Mod.Mod",
|
||||||
"Tags": [
|
"Tags": [
|
||||||
"Fun",
|
|
||||||
"Weapons",
|
"Weapons",
|
||||||
"Melee"
|
"Melee"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -24,16 +24,43 @@ namespace Mod
|
|||||||
NameOverride = "SledgeHammer", //new item name
|
NameOverride = "SledgeHammer", //new item name
|
||||||
DescriptionOverride = "A heavy demolition sledgehammer.", //new item description
|
DescriptionOverride = "A heavy demolition sledgehammer.", //new item description
|
||||||
CategoryOverride = ModAPI.FindCategory("Melee"), //new item category
|
CategoryOverride = ModAPI.FindCategory("Melee"), //new item category
|
||||||
ThumbnailOverride = ModAPI.LoadSprite("sledgeHammerView.png"), //new item thumbnail (relative path)
|
ThumbnailOverride = ModAPI.LoadSprite("sprites/sledgeHammerView.png"), //new item thumbnail (relative path)
|
||||||
AfterSpawn = (Instance) => //all code in the AfterSpawn delegate will be executed when the item is spawned
|
AfterSpawn = (Instance) => //all code in the AfterSpawn delegate will be executed when the item is spawned
|
||||||
{
|
{
|
||||||
Instance.GetComponent<SpriteRenderer>().sprite = ModAPI.LoadSprite("sledgeHammer.png"); //get the SpriteRenderer and replace its sprite with a custom one
|
Instance.GetComponent<SpriteRenderer>().sprite = ModAPI.LoadSprite("sprites/sledgeHammer.png"); //get the SpriteRenderer and replace its sprite with a custom one
|
||||||
|
|
||||||
var physical = Instance.GetComponent<PhysicalBehaviour>();
|
var physical = Instance.GetComponent<PhysicalBehaviour>();
|
||||||
if (physical != null)
|
if (physical != null)
|
||||||
{
|
{
|
||||||
physical.InitialMass = 8f; //make it heavier for realistic sledgehammer feel
|
physical.InitialMass = 8f; //make it heavier for realistic sledgehammer feel
|
||||||
physical.TrueInitialMass = 8f; //ensure the mass is actually applied
|
physical.TrueInitialMass = 8f; //ensure the mass is actually applied
|
||||||
|
|
||||||
|
// Add custom impact sounds for different collision types
|
||||||
|
physical.OverrideImpactSounds = new AudioClip[]
|
||||||
|
{
|
||||||
|
ModAPI.LoadSound("sfx/simple-hit.wav"),
|
||||||
|
ModAPI.LoadSound("sfx/hard-hit.wav")
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add custom bullet impact sounds (when shot)
|
||||||
|
physical.OverrideShotSounds = new AudioClip[]
|
||||||
|
{
|
||||||
|
ModAPI.LoadSound("sfx/hard-hit.wav")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a spawn sound when the hammer is created
|
||||||
|
var audioSource = Instance.GetComponent<AudioSource>();
|
||||||
|
if (audioSource == null)
|
||||||
|
{
|
||||||
|
audioSource = Instance.AddComponent<AudioSource>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Play spawn sound
|
||||||
|
var spawnSound = ModAPI.LoadSound("sfx/spawn.wav");
|
||||||
|
if (spawnSound != null && audioSource != null)
|
||||||
|
{
|
||||||
|
audioSource.PlayOneShot(spawnSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
Instance.FixColliders(); //fix colliders to match new sprite
|
Instance.FixColliders(); //fix colliders to match new sprite
|
||||||
|
|||||||
BIN
SledgeHammer/sfx/hard-hit.wav
Normal file
BIN
SledgeHammer/sfx/simple-hit.wav
Normal file
BIN
SledgeHammer/sfx/spawn.wav
Normal file
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -28,7 +28,7 @@ namespace Mod
|
|||||||
NameOverride = "Enhanced SledgeHammer",
|
NameOverride = "Enhanced SledgeHammer",
|
||||||
DescriptionOverride = "A massive demolition sledgehammer with devastating impact force and realistic physics.",
|
DescriptionOverride = "A massive demolition sledgehammer with devastating impact force and realistic physics.",
|
||||||
CategoryOverride = ModAPI.FindCategory("Melee"),
|
CategoryOverride = ModAPI.FindCategory("Melee"),
|
||||||
ThumbnailOverride = ModAPI.LoadSprite("sledgeHammerView.png"),
|
ThumbnailOverride = ModAPI.LoadSprite("sprites/sledgeHammerView.png"),
|
||||||
AfterSpawn = (Instance) =>
|
AfterSpawn = (Instance) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -55,7 +55,7 @@ namespace Mod
|
|||||||
var spriteRenderer = Instance.GetComponent<SpriteRenderer>();
|
var spriteRenderer = Instance.GetComponent<SpriteRenderer>();
|
||||||
if (spriteRenderer != null)
|
if (spriteRenderer != null)
|
||||||
{
|
{
|
||||||
var customSprite = ModAPI.LoadSprite("sledgeHammer.png");
|
var customSprite = ModAPI.LoadSprite("sprites/sledgeHammer.png");
|
||||||
if (customSprite != null)
|
if (customSprite != null)
|
||||||
{
|
{
|
||||||
spriteRenderer.sprite = customSprite;
|
spriteRenderer.sprite = customSprite;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
28
mods/ZombieCureSyringe/README.txt
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Zombie Cure Syringe Mod
|
||||||
|
=======================
|
||||||
|
A revolutionary medical breakthrough that can reverse zombie infections and restore humanity to the undead!
|
||||||
|
|
||||||
|
How to use:
|
||||||
|
- Spawn the Zombie Cure Syringe from the Medical category
|
||||||
|
- Inject it into any zombie or infected person
|
||||||
|
- Watch as the infection is cured and humanity is restored
|
||||||
|
- The cure also provides healing effects to damaged limbs
|
||||||
|
|
||||||
|
Features:
|
||||||
|
- Cures zombie infection completely
|
||||||
|
- Restores normal human appearance and behavior
|
||||||
|
- Provides continuous healing while active
|
||||||
|
- Prevents re-infection
|
||||||
|
- Creates a healing aura effect
|
||||||
|
- Custom green healing liquid with glowing effects
|
||||||
|
|
||||||
|
The cure works by:
|
||||||
|
- Removing zombie poison from the bloodstream
|
||||||
|
- Restoring normal skin color and physical properties
|
||||||
|
- Healing zombie-related damage
|
||||||
|
- Preventing future infections
|
||||||
|
- Providing regenerative effects to all limbs
|
||||||
|
|
||||||
|
Perfect for medical scenarios, zombie apocalypse survival, or bringing your undead friends back to life!
|
||||||
|
|
||||||
|
Note: Works best when injected into the head or torso for maximum effect.
|
||||||
11
mods/ZombieCureSyringe/mod.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"Name": "Zombie Cure Syringe",
|
||||||
|
"Author": "Nuclear.Lab",
|
||||||
|
"Description": "A special syringe that cures zombie infections and restores humanity to the undead.",
|
||||||
|
"ModVersion": "1.0",
|
||||||
|
"GameVersion": "1.27.5",
|
||||||
|
"ThumbnailPath": "thumb.png",
|
||||||
|
"EntryPoint": "Mod.Mod",
|
||||||
|
"Tags": ["Medical", "Biohazard", "Utility"],
|
||||||
|
"Scripts": ["script.cs"]
|
||||||
|
}
|
||||||
154
mods/ZombieCureSyringe/script.cs
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Mod
|
||||||
|
{
|
||||||
|
public class Mod
|
||||||
|
{
|
||||||
|
public static void Main()
|
||||||
|
{
|
||||||
|
// Register the cure liquid first
|
||||||
|
ModAPI.RegisterLiquid(ZombieCureSyringe.CureSerum.ID, new ZombieCureSyringe.CureSerum());
|
||||||
|
|
||||||
|
// Register the zombie cure syringe
|
||||||
|
ModAPI.Register(
|
||||||
|
new Modification()
|
||||||
|
{
|
||||||
|
OriginalItem = ModAPI.FindSpawnable("Zombie Syringe"), // Base it on zombie syringe
|
||||||
|
NameOverride = "Zombie Cure Syringe",
|
||||||
|
DescriptionOverride = "A revolutionary antidote that reverses zombie infection and restores humanity.",
|
||||||
|
CategoryOverride = ModAPI.FindCategory("Medical"),
|
||||||
|
ThumbnailOverride = ModAPI.LoadSprite("sprites/cure_syringe_view.png"),
|
||||||
|
AfterSpawn = (Instance) =>
|
||||||
|
{
|
||||||
|
// Remove the original zombie syringe behavior
|
||||||
|
UnityEngine.Object.Destroy(Instance.GetComponent<SyringeBehaviour>());
|
||||||
|
|
||||||
|
// Add our custom cure behavior
|
||||||
|
Instance.GetOrAddComponent<ZombieCureSyringe>();
|
||||||
|
|
||||||
|
// Customize the appearance
|
||||||
|
Instance.GetComponent<SpriteRenderer>().sprite = ModAPI.LoadSprite("sprites/cure_syringe.png");
|
||||||
|
|
||||||
|
// Add a healing glow effect
|
||||||
|
var glow = Instance.GetComponent<SpriteRenderer>();
|
||||||
|
if (glow != null)
|
||||||
|
{
|
||||||
|
glow.color = new Color(0.3f, 1f, 0.3f, 0.8f); // Green healing glow
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add spawn sound effect
|
||||||
|
var audioSource = Instance.GetComponent<AudioSource>();
|
||||||
|
if (audioSource == null)
|
||||||
|
{
|
||||||
|
audioSource = Instance.AddComponent<AudioSource>();
|
||||||
|
}
|
||||||
|
|
||||||
|
var spawnSound = ModAPI.LoadSound("sfx/cure_spawn.wav");
|
||||||
|
if (spawnSound != null && audioSource != null)
|
||||||
|
{
|
||||||
|
audioSource.PlayOneShot(spawnSound);
|
||||||
|
}
|
||||||
|
|
||||||
|
Instance.FixColliders();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ZombieCureSyringe : SyringeBehaviour
|
||||||
|
{
|
||||||
|
public override string GetLiquidID() => CureSerum.ID;
|
||||||
|
|
||||||
|
public class CureSerum : Liquid
|
||||||
|
{
|
||||||
|
public const string ID = "ZOMBIE CURE SERUM";
|
||||||
|
|
||||||
|
public CureSerum()
|
||||||
|
{
|
||||||
|
// Bright green color for the cure liquid
|
||||||
|
Color = new Color(0.2f, 1f, 0.2f, 0.9f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEnterLimb(LimbBehaviour limb)
|
||||||
|
{
|
||||||
|
// Cure zombie infection by removing zombie-related effects
|
||||||
|
var person = limb.Person;
|
||||||
|
if (person != null)
|
||||||
|
{
|
||||||
|
// Remove zombie poison if present
|
||||||
|
var zombiePoison = person.GetComponent<CirculationBehaviour>()?.GetLiquid("REANIMATION AGENT");
|
||||||
|
if (zombiePoison != null)
|
||||||
|
{
|
||||||
|
person.GetComponent<CirculationBehaviour>().RemoveLiquid(zombiePoison);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Restore human appearance and behavior
|
||||||
|
if (limb.gameObject.name.Contains("Head"))
|
||||||
|
{
|
||||||
|
// Restore normal skin color
|
||||||
|
var spriteRenderer = limb.GetComponent<SpriteRenderer>();
|
||||||
|
if (spriteRenderer != null)
|
||||||
|
{
|
||||||
|
spriteRenderer.color = new Color(1f, 0.85f, 0.7f); // Normal skin tone
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Heal any zombie-related damage
|
||||||
|
limb.WoundIntensity = 0f;
|
||||||
|
limb.BruiseIntensity = 0f;
|
||||||
|
limb.BurnIntensity = 0f;
|
||||||
|
|
||||||
|
// Restore normal physical properties
|
||||||
|
limb.BreakingThreshold = limb.OriginalBreakingThreshold;
|
||||||
|
limb.RegenerationSpeed = limb.OriginalRegenerationSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply healing effect
|
||||||
|
limb.HealDamage(5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnUpdate(BloodContainer container)
|
||||||
|
{
|
||||||
|
// Continuous healing effect while cure is in bloodstream
|
||||||
|
if (container is LimbBehaviour limb)
|
||||||
|
{
|
||||||
|
limb.HealDamage(0.1f);
|
||||||
|
|
||||||
|
// Prevent re-infection
|
||||||
|
var zombiePoison = container.GetLiquid("REANIMATION AGENT");
|
||||||
|
if (zombiePoison != null)
|
||||||
|
{
|
||||||
|
container.RemoveLiquid(zombiePoison);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEnterContainer(BloodContainer container)
|
||||||
|
{
|
||||||
|
// Healing aura effect
|
||||||
|
if (container is LimbBehaviour limb)
|
||||||
|
{
|
||||||
|
var person = limb.Person;
|
||||||
|
if (person != null)
|
||||||
|
{
|
||||||
|
// Apply gentle healing to all limbs
|
||||||
|
foreach (var personLimb in person.Limbs)
|
||||||
|
{
|
||||||
|
personLimb.HealDamage(0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnExitContainer(BloodContainer container)
|
||||||
|
{
|
||||||
|
// Final healing burst when cure leaves the system
|
||||||
|
if (container is LimbBehaviour limb)
|
||||||
|
{
|
||||||
|
limb.HealDamage(2f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
mods/ZombieCureSyringe/sprites/cure_syringe.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
mods/ZombieCureSyringe/sprites/cure_syringe_view.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
mods/ZombieCureSyringe/thumb.png
Normal file
|
After Width: | Height: | Size: 263 KiB |