Brynzananas-Demolisher icon

Demolisher

Adds a melee-ranged style switching survivor based on Demoman and Demoknight from Team Fortess 2. Multiplayer compatible. Partially configurable. Work in progress.

Last updated 2 months ago
Total downloads 44784
Total rating 1 
Categories Mods Player Characters Seekers of the Storm Update
Dependency string Brynzananas-Demolisher-0.3.6
Dependants 2 other packages depend on this package

This mod requires the following mods to function

RiskofThunder-R2API_Core-5.1.5 icon
RiskofThunder-R2API_Core

Core R2API module

Preferred version: 5.1.5
Brynzananas-Body_Model_Additions_API-2.1.0 icon
Brynzananas-Body_Model_Additions_API

Adds a system for developers to load custom objects onto characters in game and in lobby. Model additions can require selected skins, skills, skins and skills or custom condition.

Preferred version: 2.1.0
RiskofThunder-R2API_Networking-1.0.3 icon
RiskofThunder-R2API_Networking

Networking API around the Unity UNet Low Level API (LLAPI)

Preferred version: 1.0.3
RiskofThunder-HookGenPatcher-1.2.9 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.9
RiskofThunder-R2API_Skills-1.0.2 icon
RiskofThunder-R2API_Skills

API for skills

Preferred version: 1.0.2
Brynzananas-Fix_King_Mod_Utilities-1.0.0 icon
Brynzananas-Fix_King_Mod_Utilities

Fixes KingModUtilities issue in RecalculateStats if the modded character is too good

Preferred version: 1.0.0

README

Character

I will just put survivor description from the game here for now:

Demolisher is a powerfull character that can switch between melee and ranged styles at any moment. To switch styles, hold Utility button and click Secondary/Special button.

Passive allows Demolisher for harmless landing. His explosives have knockback that can be used as a quick position relocation. Holding jump button will redirect knockback force to face your aim direction.

Swords have a small radius of attack, so you must aim at the target you want to hit. They compensate it with their high burst damage and strong effects. Primary sword hits recharge 25% of Utility charge.

In ranged style swords are replaced with trap bomb launchers. On impact they stick to the surface and wait for user input for detonation signal. After a while they fully arm, gaining additional damage and blast radius.

Grenades are available for both styles and are a quick way of dealing with targets on distance.

Shield charge is a great movement skill while also having attack capabilities of increasing sword damage. Shield charge is cancelled upon sword attack, but retains damage increase for a short time.

In ranged style shield charge is replaced with traps detonation. Traps require time to be armed for detonation and have time before explosion after detonation request.

Specials can utilise primary selection and base their effects from them.

Work in Progress

This is an early release, so expect missing features.

Configuration

Currently there are only projectiles configs because I am lazy to implement all of them. Keep in mind that these configs are server side. You can turn off voicelines on your side

Multiplayer Compatability

There is a work done towards multiplayer compatability. Report any multiplayer issues

Bug Report

Report bugs in Github Issues.

Adding custom weapon models for your skin

Custom weapon models are handled by this mod.

Here is the method:

private static void InitWeaponModels()
{
    ModelPartInfo modelPartInfo = new ModelPartInfo
    {
        bodyName = "DemolisherBody",
        gameObject = ThunderkitAssets.LoadAsset<GameObject>("Assets/Demoman/Weapons/Swords/skullcutter.prefab"),
        inputString = "WeaponR",
        skillDef = SkullcutterSkillDef,
        codeAfterApplying = Rotate
    };
    SkullcutterSwordSkin = new ModelPart(modelPartInfo);
    modelPartInfo.gameObject = ThunderkitAssets.LoadAsset<GameObject>("Assets/Demoman/Weapons/Swords/zatoichi.prefab");
    modelPartInfo.skillDef = ZatoichiSkillDef;
    ZatoichiSwordSkin = new ModelPart(modelPartInfo);
    modelPartInfo.gameObject = ThunderkitAssets.LoadAsset<GameObject>("Assets/Demoman/Weapons/Swords/caber.prefab");
    modelPartInfo.skillDef = CaberSkillDef;
    CaberSwordSkin = new ModelPart(modelPartInfo);
    modelPartInfo.gameObject = ThunderkitAssets.LoadAsset<GameObject>("Assets/Demoman/Weapons/Swords/eyelander.prefab");
    modelPartInfo.skillDef = EyelanderSkillDef;
    EyelanderSwordSkin = new ModelPart(modelPartInfo);
    modelPartInfo.gameObject = ThunderkitAssets.LoadAsset<GameObject>("Assets/Demoman/Weapons/Shield/HeavyShield.prefab");
    modelPartInfo.skillDef = HeavyShieldSkillDef;
    modelPartInfo.inputString = "Shield";
    modelPartInfo.codeAfterApplying = null;
    HeavyShieldSkin = new ModelPart(modelPartInfo);
    modelPartInfo.gameObject = ThunderkitAssets.LoadAsset<GameObject>("Assets/Demoman/Weapons/Shield/LightShield.prefab");
    modelPartInfo.skillDef = LightShieldSkillDef;
    LightShieldSkin = new ModelPart(modelPartInfo);
    void Rotate(GameObject gameObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
    {
        gameObject.transform.localEulerAngles = new Vector3(0f, 180f, 0f);
    }
}

To make, for example, a unique model for Skullcutter for your skin, do something like this:

ModelPartInfo modelPartInfo = new ModelPartInfo
    {
        bodyName = "DemolisherBody", // Put character body name
        gameObject = yourSkinDef// Put your skin requirement
        skinDef= yourWeaponSkinPrefab, // Put your weapon skin model
        inputString = SkullcutterSwordSkin.bone, // Copy input string
        skillDef = SkullcutterSwordSkin.skill, //Copy skill requirement
        codeAfterApplying = SkullcutterSwordSkin.codeAferApplying, // Copy this delegate
	modelPartOverride = SkullcutterSwordSkin // Override model part
    };
YourSkullcutterSwordSkin = new ModelPart(modelPartInfo );

Smoke horns particles are also done with this API:

ModelPartInfo modelPartInfo = new ModelPartInfo
{
    bodyName = "DemolisherBody",
    gameObject = ThunderkitAssets.LoadAsset<GameObject>("Assets/Demoman/DemoSmokes.prefab"),
    inputString = "Head",
    codeAfterApplying = CustomParticleSimulationSpace,
};
DemoSmokes = new ModelPart(modelPartInfo);
void CustomParticleSimulationSpace(GameObject gameObject, ChildLocator childLocator, CharacterModel characterModel, ActivePartsComponent activePartsComponent)
{
    EmoteCompatAbility.DemoEmotesComponent demoEmotesComponent = characterModel.GetComponentInChildren<EmoteCompatAbility.DemoEmotesComponent>();
    ParticleSystem[] particleSystems = gameObject.GetComponentsInChildren<ParticleSystem>();
    foreach (ParticleSystem particleSystem in particleSystems)
    {
        ParticleSystem.MainModule mainModule = particleSystem.main;
        particleSystem.simulationSpace = ParticleSystemSimulationSpace.Custom;
        mainModule.customSimulationSpace = childLocator.FindChild("Base");
        if (demoEmotesComponent != null)
        {
            demoEmotesComponent.customSpaceParticles.Add(mainModule);
        }

    }

}

You can override it to null to remove it and add your particles or anything