GTFO

Details

Last Updated
6 days ago
First Uploaded
6 days ago
Downloads
14K
Likes
0
Size
69KB
Dependency string
Panthr75-ExtraSyringeCustomization-0.3.11
Dependants

Categories

NOTICE: THIS IS AN ALPHA RELEASE. EXPECT BUGS AND CHANGES

A tool for creating custom syringes, and applying custom effects.

Example Config:

{
    "Syringes": [
        {
            "SyringeID": 140,
            "Properties": {
                "MovementMultiplier": {
                    "Delay": {
                        "HasDelay": true,
                        "Min": 2.5,
                        "Max": 2.5
                    },
                    "Time": {
                        "Min": 10,
                        "Max": 10
                    },
                    "Min": 1.5,
                    "Max": 2,
                    "Enabled": true
                },
                "SelfDestruct": {
                    "DelayTime": {
                        "HasDelay": true,
                        "Min": 15,
                        "Max": 15
                    },
                    "Damage": 10000000,
                    "Radius": 12,
                    "Enabled": true
                }
            }
        },
        {
            "SyringeID": 142,
            "Properties": {
                "MovementMultiplier": {
                    "Delay": {
                        "HasDelay": true,
                        "Min": 2.5,
                        "Max": 2.5
                    },
                    "Time": {
                        "Min": 10,
                        "Max": 10
                    },
                    "Min": 1.5,
                    "Max": 2,
                    "Enabled": true
                },
                "SelfDestruct": {
                    "DelayTime": {
                        "HasDelay": true,
                        "Min": 15,
                        "Max": 15
                    },
                    "Damage": 10000000,
                    "Radius": 12,
                    "Enabled": true
                }
            }
        }
    ]
}

For Rundown Developers

On first run, two files will be autogenerated in /Custom/ExtraSyringeCustomization/:

  • GENERATED_example-syringes.json
  • GENERATED_syringe-properties.json

You can delete any of these files to regenerate them.

Both of these will contain examples on how to set up custom syringes.

To create a custom syringe, first create an associated entry in ItemDataBlock.

Then paste the persistentID in the SyringeID field in a new syringe entry.

And then apply your associated affects.

For Plugin Developers

APIs have been exposed for adding your own syringe properties/effects and adding syringes.

All Syringe Properties extend SyringePropertyBase.

An implementation example:

public class SyringeHealEffectProperty : SyringePropertyBase
{
    [JsonIgnore]
    public override string Name => "Heal";
    
    public override void Apply(PlayerAgent player, SyringeFirstPerson syringe, Random random)
    {
        // heal to 100%
        PlayerBackpackManager.PickupHealthRel(1f, player);
    }
}

Then, to register this property, use ExtraSyringeHandler:

ExtraSyringeHandler.AddProperty<SyringeHealEffectProperty>();

Be sure to do this before GameDataInit.Initialize is called, as that's when the custom syringe file is ready.

Now you can include it in your json:

{
    "Syringes": [
        {
            "SyringeID": 140,
            "Properties": {
                // Must match `Name` specified in the property,
                // in this case, "Heal"
                "Heal": {
                    "Enabled": true
                }
            }
        }
    ]
}
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.