Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

Ill figure it out when i get home

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

27 (edited by MrPonton 2017-03-26 22:06:37)

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

You have to modify it in the ControlsScript.cs since it's going to be in-game.

Look for

if (myMoveSetScript.intro == null && !introPlayed) {
            introPlayed = true;
            UFE.CastNewRound();

On a new line below, add:

            myInfo.currentGaugePoints = myInfo.maxGaugePoints;
            opInfo.currentGaugePoints = opInfo.maxGaugePoints;

That will make it work for Round 1. For any other rounds you have to modify the following. Look for:

    private void StartNewRound(){
        UFE.config.currentRound ++;
        UFE.ResetTimer();

        ResetData(true);
        opControlsScript.ResetData(false);
        if (UFE.config.roundOptions.resetPositions) {
            CameraFade.StartAlphaFade(UFE.config.gameGUI.roundFadeColor, true, UFE.config.gameGUI.roundFadeDuration / 2);
            cameraScript.ResetCam();
        }

        UFE.config.lockInputs = true;
        UFE.ResetRoundCast();
        UFE.CastNewRound();

Add the following on a new line at the bottom:

            myInfo.currentGaugePoints = myInfo.maxGaugePoints;
            opInfo.currentGaugePoints = opInfo.maxGaugePoints;

Share

Thumbs up Thumbs down

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

Thanks matt

But make sure the name is congruent with the meter you want maxed out

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

29 (edited by acidfmhq 2017-03-27 15:49:26)

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

Awesome this works perfect now I can check this off my last of to code.

Much Thanks to you King for sharing your second meter code and much thanks to you MrPonton for solving the full meter gain on rounds.

Terrordrome Reign of the Legends Out now on Steam!!
https://store.steampowered.com/app/1291 … e_Legends/
Terrordrome Project Manager

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

No problem

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

Hi guys...maybe I am missing something but I have an issue with the extra gauge. It fills but it does not drain. Any idea why that would be? I know I am missing something.

32 (edited by MrPonton 2017-11-23 01:04:59)

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

chameleoncreations wrote:

Hi guys...maybe I am missing something but I have an issue with the extra gauge. It fills but it does not drain. Any idea why that would be? I know I am missing something.

Most likely you'd want to check that you have updated ControlsScript.cs to decrease the bar when the move has been performed.

xFTLxKingPhoenix wrote:

ControlScript.cs
find

            AddGauge(move.gaugeGainOnMiss);
            RemoveGauge(move.gaugeUsage);

add

            RemoveGauge2(move.gauge2Usage);

find

    private void RemoveGauge(float gaugeLoss) {
        if ((isDead || opControlsScript.isDead) && UFE.config.roundOptions.inhibitGaugeGain) return;
        if (!UFE.config.gameGUI.hasGauge) return;
        if (UFE.gameMode == GameMode.TrainingRoom && playerNum == 1 && UFE.config.trainingModeOptions.p1Gauge == LifeBarTrainingMode.Infinite) return;
        if (UFE.gameMode == GameMode.TrainingRoom && playerNum == 2 && UFE.config.trainingModeOptions.p2Gauge == LifeBarTrainingMode.Infinite) return;
        myInfo.currentGaugePoints -= (myInfo.maxGaugePoints * (gaugeLoss / 100));
        if (myInfo.currentGaugePoints < 0) myInfo.currentGaugePoints = 0;

        if ((playerNum == 1 && UFE.gameMode == GameMode.TrainingRoom && UFE.config.trainingModeOptions.p1Gauge == LifeBarTrainingMode.Refill) ||
            (playerNum == 2 && UFE.gameMode == GameMode.TrainingRoom && UFE.config.trainingModeOptions.p2Gauge == LifeBarTrainingMode.Refill)) {
            if (!UFE.FindAndUpdateDelaySynchronizedAction(this.RefillGauge, UFE.config.trainingModeOptions.refillTime))
                UFE.DelaySynchronizedAction(this.RefillGauge, UFE.config.trainingModeOptions.refillTime);
        }
    }

add space then add

    private void RemoveGauge2(float gaugeLoss)
    {
        if ((isDead || opControlsScript.isDead) && UFE.config.roundOptions.inhibitGauge2Gain) return;
        if (!UFE.config.gameGUI.hasGauge2) return;
        if (UFE.gameMode == GameMode.TrainingRoom && playerNum == 1 && UFE.config.trainingModeOptions.p1Gauge2 == LifeBarTrainingMode.Infinite) return;
        if (UFE.gameMode == GameMode.TrainingRoom && playerNum == 2 && UFE.config.trainingModeOptions.p2Gauge2 == LifeBarTrainingMode.Infinite) return;
        myInfo.currentGauge2Points -= (myInfo.maxGauge2Points * (gaugeLoss / 100));
        if (myInfo.currentGauge2Points < 0) myInfo.currentGauge2Points = 0;

        if ((playerNum == 1 && UFE.gameMode == GameMode.TrainingRoom && UFE.config.trainingModeOptions.p1Gauge2 == LifeBarTrainingMode.Refill) ||
            (playerNum == 2 && UFE.gameMode == GameMode.TrainingRoom && UFE.config.trainingModeOptions.p2Gauge2 == LifeBarTrainingMode.Refill))
        {
            if (!UFE.FindAndUpdateDelaySynchronizedAction(this.RefillGauge2, UFE.config.trainingModeOptions.refillTime))
                UFE.DelaySynchronizedAction(this.RefillGauge2, UFE.config.trainingModeOptions.refillTime);
        }
    }

Share

Thumbs up Thumbs down

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

I did what you said and after I added the new lines I pulled the errors below.

Assets/UFE/Scripts/ControlsScript.cs(2770,64): error CS1061: Type `ControlsScript' does not contain a definition for `RefillGauge2' and no extension method `RefillGauge2' of type `ControlsScript' could be found. Are you missing an assembly reference?

Assets/UFE/Scripts/ControlsScript.cs(2771,50): error CS1061: Type `ControlsScript' does not contain a definition for `RefillGauge2' and no extension method `RefillGauge2' of type `ControlsScript' could be found. Are you missing an assembly reference?

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

Yeah... so wherever "RefillGauge" is, duplicate it, then rename the duplicate to RefillGauge2. smile

Share

Thumbs up Thumbs down

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

Thank You! The error is gone and everything works great! You're awesome man.

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

I feel Bad for Not being here to help with my own tutorial

Thanks MrPonton

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up +1 Thumbs down

37 (edited by MrPonton 2017-11-29 23:13:21)

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

xFTLxKingPhoenix wrote:

I feel Bad for Not being here to help with my own tutorial

Thanks MrPonton

No problem, I do it for the Karma apparently.

Share

Thumbs up Thumbs down

38 (edited by shannonrattler33 2018-02-25 23:27:20)

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

so when i add the script i get no error but when i set to gauge 2 to add on hit in the move editor it doesn't add to the gauge2 bar

Share

Thumbs up Thumbs down

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

Yea I accidently reset my ufe scripts and noticed this problem myself when redoing this

I am going to redo this tutorial when i fix it up again and my hand heals. Ill properly mark it this time so I dont forget anything

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

you can just tell me what script i need to look at and i can try to figure it out

Share

Thumbs up Thumbs down

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

The scripts I mention may have missing code not mentioned

Also controlsScript.cs is most likely the culprit

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up Thumbs down

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

oh ok help cant wait till u update so get better fam

Share

Thumbs up Thumbs down

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

Yeah no problem Ill get this fixed up as soon as I have time

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up +2 Thumbs down

44 (edited by xFTLxKingPhoenix 2018-06-27 21:25:46)

Re: Additional Static Gauge/Meter [Tutorial] (Source Only) Edited

Updated Additional Gauge/Meter [Tutorial]


To Start Things Off we are gonna open up the CharacterInfo.cs file

Search for this text block

[System.Serializable]
public class CharacterInfo: ScriptableObject {
    public Texture2D profilePictureSmall;
    public Texture2D profilePictureBig;
    public string characterName;
    public Gender gender;
    public string characterDescription;
    public AnimationClip selectionAnimation;
    public AudioClip selectionSound;
    public AudioClip deathSound;
    public float height;
    public int age;
    public string bloodType;
    public int lifePoints = 1000;
    public int maxGaugePoints;

Below add this line

public int maxGauge2Points = 100;

Go all the way to bottom of this page and search

    public CombatStances currentCombatStance{get; set;}
    public float currentLifePoints{get; set;}
    public float currentGaugePoints { get; set; }

Add

public float currentGauge2Points { get; set; }

Save this and open up the ControlsScript.cs

Search out this below line

if (UFE.gameMode == GameMode.TrainingRoom) {
myInfo.currentLifePoints = (float)myInfo.lifePoints * (UFE.config.trainingModeOptions.p1StartingLife / 100);
myInfo.currentGaugePoints = (float)myInfo.maxGaugePoints * (UFE.config.trainingModeOptions.p1StartingGauge / 100);

just under add this line :

myInfo.currentGauge2Points = (float)myInfo.maxGauge2Points * (UFE.config.trainingModeOptions.p1StartingGauge2 / 100);

Search out this line:

if (UFE.gameMode == GameMode.TrainingRoom) {
myInfo.currentLifePoints = (float)myInfo.lifePoints * (UFE.config.trainingModeOptions.p2StartingLife / 100);
myInfo.currentGaugePoints = (float)myInfo.maxGaugePoints * (UFE.config.trainingModeOptions.p2StartingGauge / 100);

Add

myInfo.currentGauge2Points = (float)myInfo.maxGauge2Points * (UFE.config.trainingModeOptions.p2StartingGauge2 / 100);

Search out :

if (UFE.gameMode == GameMode.TrainingRoom && myInfo.currentGaugePoints < myInfo.maxGaugePoints &&
((playerNum == 1 && UFE.config.trainingModeOptions.p1Gauge == LifeBarTrainingMode.Infinite) ||
(playerNum == 2 && UFE.config.trainingModeOptions.p2Gauge == LifeBarTrainingMode.Infinite))) RefillGauge();

add:

if (UFE.gameMode == GameMode.TrainingRoom && myInfo.currentGauge2Points < myInfo.maxGaugePoints &&
((playerNum == 1 && UFE.config.trainingModeOptions.p1Gauge2 == LifeBarTrainingMode.Infinite) ||
(playerNum == 2 && UFE.config.trainingModeOptions.p2Gauge2 == LifeBarTrainingMode.Infinite))) RefillGauge2();

Search for:

AddGauge(move.gaugeGainOnMiss);
RemoveGauge(move.gaugeUsage);

add:

AddGauge2(move.gauge2GainOnMiss);
RemoveGauge2(move.gauge2Usage);

Search for

// Check Projectiles
foreach (Projectile projectile in move.projectiles){
            if (
                !projectile.casted && 
                projectile.projectilePrefab != null &&
                move.currentFrame >= projectile.castingFrame
                ){
                projectile.casted = true;
                projectile.gaugeGainOnHit = move.gaugeGainOnHit;
                projectile.gaugeGainOnBlock = move.gaugeGainOnBlock;
                projectile.opGaugeGainOnHit = move.opGaugeGainOnHit;
                projectile.opGaugeGainOnBlock = move.opGaugeGainOnBlock;
                projectile.opGaugeGainOnParry = move.opGaugeGainOnParry;

Add:

       projectile.gauge2GainOnHit = move.gauge2GainOnHit;
                projectile.gauge2GainOnBlock = move.gauge2GainOnBlock;
                projectile.opGauge2GainOnHit = move.opGauge2GainOnHit;
                projectile.opGauge2GainOnBlock = move.opGauge2GainOnBlock;
                projectile.opGauge2GainOnParry = move.opGauge2GainOnParry;

Search for:

                        AddGauge(move.gaugeGainOnBlock);
                            opControlsScript.AddGauge(move.opGaugeGainOnBlock);

Add;

                        AddGauge2(move.gaugeGain2OnBlock);
                            opControlsScript.AddGauge2(move.opGauge2GainOnBlock);

Search for:

                            opControlsScript.AddGauge(move.opGaugeGainOnParry);

Add;

                            opControlsScript.AddGauge2(move.opGauge2GainOnParry);

Search for :

                            AddGauge(move.gaugeGainOnHit);
                            opControlsScript.AddGauge(move.opGaugeGainOnHit);

add:

                            AddGauge2(move.gauge2GainOnHit);
                            opControlsScript.AddGauge2(move.opGauge2GainOnHit);

Search for this big chunk:

    public void AddGauge(float gaugeGain) {
        if ((isDead || opControlsScript.isDead) && UFE.config.roundOptions.inhibitGaugeGain) return;
        if (!UFE.config.gameGUI.hasGauge) return;
        if (inhibitGainWhileDraining) return;
        myInfo.currentGaugePoints += (myInfo.maxGaugePoints * (gaugeGain / 100));
        if (myInfo.currentGaugePoints > myInfo.maxGaugePoints) myInfo.currentGaugePoints = myInfo.maxGaugePoints;
    }
    
    private void RemoveGauge(float gaugeLoss){
        if ((isDead || opControlsScript.isDead) && UFE.config.roundOptions.inhibitGaugeGain) return;
        if (!UFE.config.gameGUI.hasGauge) return;
        if (UFE.gameMode == GameMode.TrainingRoom && playerNum == 1 && UFE.config.trainingModeOptions.p1Gauge == LifeBarTrainingMode.Infinite) return;
        if (UFE.gameMode == GameMode.TrainingRoom && playerNum == 2 && UFE.config.trainingModeOptions.p2Gauge == LifeBarTrainingMode.Infinite) return;
        myInfo.currentGaugePoints -= (myInfo.maxGaugePoints * (gaugeLoss / 100));
        if (myInfo.currentGaugePoints < 0) myInfo.currentGaugePoints = 0;

        if ((playerNum == 1 && UFE.gameMode == GameMode.TrainingRoom && UFE.config.trainingModeOptions.p1Gauge == LifeBarTrainingMode.Refill) ||
            (playerNum == 2 && UFE.gameMode == GameMode.TrainingRoom && UFE.config.trainingModeOptions.p2Gauge == LifeBarTrainingMode.Refill)) {
                if (!UFE.FindAndUpdateDelaySynchronizedAction(this.RefillGauge, UFE.config.trainingModeOptions.refillTime)) 
                UFE.DelaySynchronizedAction(this.RefillGauge, UFE.config.trainingModeOptions.refillTime);
        }
    }

Add this after a space:

    public void AddGauge2(float gaugeGain)
    {
        if ((isDead || opControlsScript.isDead) && UFE.config.roundOptions.inhibitGauge2Gain) return;
        if (!UFE.config.gameGUI.hasGauge2) return;
        if (inhibitGainWhileDraining) return;
        myInfo.currentGauge2Points += (myInfo.maxGauge2Points * (gaugeGain / 100));
        if (myInfo.currentGauge2Points > myInfo.maxGauge2Points) myInfo.currentGauge2Points = myInfo.maxGauge2Points;
    }

    private void RemoveGauge2(float gaugeLoss)
    {
        if ((isDead || opControlsScript.isDead) && UFE.config.roundOptions.inhibitGauge2Gain) return;
        if (!UFE.config.gameGUI.hasGauge2) return;
        if (UFE.gameMode == GameMode.TrainingRoom && playerNum == 1 && UFE.config.trainingModeOptions.p1Gauge2 == LifeBarTrainingMode.Infinite) return;
        if (UFE.gameMode == GameMode.TrainingRoom && playerNum == 2 && UFE.config.trainingModeOptions.p2Gauge2 == LifeBarTrainingMode.Infinite) return;
        myInfo.currentGauge2Points -= (myInfo.maxGauge2Points * (gaugeLoss / 100));
        if (myInfo.currentGauge2Points < 0) myInfo.currentGauge2Points = 0;

        if ((playerNum == 1 && UFE.gameMode == GameMode.TrainingRoom && UFE.config.trainingModeOptions.p1Gauge2 == LifeBarTrainingMode.Refill) ||
            (playerNum == 2 && UFE.gameMode == GameMode.TrainingRoom && UFE.config.trainingModeOptions.p2Gauge2 == LifeBarTrainingMode.Refill))
        {
            if (!UFE.FindAndUpdateDelaySynchronizedAction(this.RefillGauge2, UFE.config.trainingModeOptions.refillTime))
                UFE.DelaySynchronizedAction(this.RefillGauge2, UFE.config.trainingModeOptions.refillTime);
        }
    }

Search for this here:

private void RefillGauge(){
AddGauge(myInfo.maxGaugePoints);
}

add after a space

private void RefillGauge2()
{
AddGauge2(myInfo.maxGauge2Points);
}

We are finally finished with Controlsscript.cs so save and go on and open up GlobalInfo.cs

We are gonna start by searching out:

[System.Serializable]
public class TrainingModeOptions {
    public bool inputInfo;
    public bool freezeTime;
    public float p1StartingLife = 100f;
    public float p2StartingLife = 100f;
    public float p1StartingGauge = 0f;
    public float p2StartingGauge = 0f;
    public LifeBarTrainingMode p1Life;
    public LifeBarTrainingMode p2Life;
    public LifeBarTrainingMode p1Gauge;
    public LifeBarTrainingMode p2Gauge;

and add just under

    public float p1StartingGauge2 = 0f;
    public float p2StartingGauge2 = 0f;
    public LifeBarTrainingMode p1Gauge2;
    public LifeBarTrainingMode p2Gauge2;

Search out :

[System.Serializable]
public class GameGUI{
public bool hasGauge = true;

Add:

public bool hasGauge2 = true;

Search for

    public bool inhibitGaugeGain = true;

add

    public bool inhibitGauge2Gain = true;

Done Here save and open MoveInfo.cs

Search for this

public enum GaugeUsage {
    Any,
    None,
    Quarter,
    Half,
    ThreeQuarters,
    All
}

Add a space after

then add

public enum Gauge2Usage {
    Any,
    None,
    Quarter,
    Half,
    ThreeQuarters,
    All
}

Search for this

    public bool casted{get; set;}
    public float gaugeGainOnHit{get; set;}
    public float gaugeGainOnBlock { get; set; }
    public float opGaugeGainOnHit { get; set; }
    public float opGaugeGainOnBlock { get; set; }
    public float opGaugeGainOnParry { get; set; }

Add this

    public float gauge2GainOnHit { get; set; }
    public float gauge2GainOnBlock { get; set; }
    public float opGauge2GainOnHit { get; set; }
    public float opGauge2GainOnBlock { get; set; }
    public float opGauge2GainOnParry { get; set; }

search for

[System.Serializable]
public class MoveClassification {
    public AttackType attackType;
    public HitType hitType;
    public FrameSpeed startupSpeed;
    public FrameSpeed recoverySpeed;
    public HitConfirmType hitConfirmType;
    public CharacterDistance preferableDistance;
    public GaugeUsage gaugeUsage;

Add

    public Gauge2Usage gauge2Usage;

search for this

    public bool gaugeToggle;
    public bool startDrainingGauge;
    public bool inhibitGainWhileDraining;
    public bool stopDrainingGauge;
    public float gaugeDPS;
    public float totalDrain;
    public float gaugeRequired;
    public float gaugeUsage;
    public float gaugeGainOnMiss;
    public float gaugeGainOnHit;
    public float gaugeGainOnBlock;
    public float opGaugeGainOnBlock;
    public float opGaugeGainOnParry;
    public float opGaugeGainOnHit;

add this

    public float gauge2GainOnHit;
    public float gauge2GainOnMiss;
    public float gauge2GainOnBlock;
    public float opGauge2GainOnHit;
    public float opGauge2GainOnBlock;
    public float opGauge2GainOnParry;
    public float gauge2Required;
    public float gauge2Usage;

Save this file and move on to MovesetScript.cs


Search for

    private bool hasEnoughGauge(float gaugeNeeded){
        if (!UFE.config.gameGUI.hasGauge) return true;
        if (controlsScript.myInfo.currentGaugePoints < (controlsScript.myInfo.maxGaugePoints * (gaugeNeeded / 100))) return false;
        return true;
    }

Add after a space

    private bool hasEnoughGauge2(float gaugeNeeded)
    {
        if (!UFE.config.gameGUI.hasGauge2) return true;
        if (controlsScript.myInfo.currentGauge2Points < (controlsScript.myInfo.maxGauge2Points * (gaugeNeeded / 100))) return false;
        return true;
    }

Search for this

    public bool ValidateMoveExecution(MoveInfo move) {
        if (!searchMove(move.moveName, attackMoves)) return false;
        if (!ValidateMoveStances(move.selfConditions, controlsScript, true)) return false;
        if (!ValidateMoveStances(move.opponentConditions, controlsScript.opControlsScript)) return false;
        if (!ValidadeBasicMove(move.selfConditions, controlsScript)) return false;
        if (!ValidadeBasicMove(move.opponentConditions, controlsScript.opControlsScript)) return false;
        if (!hasEnoughGauge(move.gaugeRequired)) return false;

Add this after

        if (!hasEnoughGauge2(move.gauge2Required)) return false;

search for

private MoveInfo TestMoveExecution(MoveInfo move, MoveInfo currentMove, ButtonPress[] buttonPress, bool inputUp, bool fromSequence, bool forceExecution) {
if (!hasEnoughGauge(move.gaugeRequired)) return null;

Add this after

        if (!hasEnoughGauge2(move.gauge2Required)) return null;

Save the file and open up the ProjectileMoveScript.cs

look for

            if (opControlsScript.currentSubState != SubStates.Stunned && opControlsScript.isBlocking && opControlsScript.TestBlockStances(hit.hitType)){
                myControlsScript.AddGauge(data.gaugeGainOnBlock);
                opControlsScript.AddGauge(data.opGaugeGainOnBlock);

just under that add

                myControlsScript.AddGauge2(data.gauge2GainOnBlock);
                opControlsScript.AddGauge2(data.opGauge2GainOnBlock);

Search for this

            }else if (opControlsScript.potentialParry > 0 && opControlsScript.TestParryStances(hit.hitType)){
            opControlsScript.AddGauge(data.opGaugeGainOnParry);

Add right after

                opControlsScript.AddGauge2(data.opGauge2GainOnParry);

Search

            }else{
                myControlsScript.AddGauge(data.gaugeGainOnHit);
            opControlsScript.AddGauge(data.opGaugeGainOnHit);

Add

                myControlsScript.AddGauge2(data.gauge2GainOnHit);
                opControlsScript.AddGauge2(data.opGauge2GainOnHit);

we can save this and open up UFE.cs

search up

        UFE.config.player1Character.currentLifePoints = (float)UFE.config.player1Character.lifePoints;
        UFE.config.player2Character.currentLifePoints = (float)UFE.config.player2Character.lifePoints;
        UFE.config.player1Character.currentGaugePoints = 0;
        UFE.config.player2Character.currentGaugePoints = 0;

then add after

        UFE.config.player1Character.currentGauge2Points = 0;
        UFE.config.player2Character.currentGauge2Points = 0;

Thats it
save and move on to DefaultBattleGui.cs or BattleGui.cs

Search

public Image gaugeMeter;

add

public Image gauge2Meter;

Search

            if (UFE.config.gameGUI.hasGauge)
            {
                if (this.player1GUI != null && this.player1GUI.gaugeMeter != null)
                {
                    this.player1GUI.gaugeMeter.fillAmount = UFE.config.player1Character.currentGaugePoints / UFE.config.player1Character.maxGaugePoints;
                }

                if (this.player2GUI != null && this.player2GUI.gaugeMeter != null)
                {
                    this.player2GUI.gaugeMeter.fillAmount = UFE.config.player2Character.currentGaugePoints / UFE.config.player2Character.maxGaugePoints;
                }
            }

add

            if (UFE.config.gameGUI.hasGauge2)
                {

                    if (this.player1GUI != null && this.player1GUI.gauge2Meter != null)
                {
                    this.player1GUI.gauge2Meter.fillAmount = UFE.config.player1Character.currentGauge2Points / UFE.config.player1Character.maxGauge2Points;
                }

                if (this.player2GUI != null && this.player2GUI.gauge2Meter != null)
                {
                    this.player2GUI.gauge2Meter.fillAmount = UFE.config.player2Character.currentGauge2Points / UFE.config.player2Character.maxGauge2Points;
                }
            }

Search

        else
        {
            if (this.player1GUI != null && this.player1GUI.gaugeMeter != null)
            {
                this.player1GUI.gaugeMeter.gameObject.SetActive(false);
            }

            if (this.player2GUI != null && this.player2GUI.gaugeMeter != null)
            {
                this.player2GUI.gaugeMeter.gameObject.SetActive(false);
            }
        }

add under

        if (UFE.config.gameGUI.hasGauge2)
        {
            if (this.player1GUI != null && this.player1GUI.gauge2Meter != null)
            {
                this.player1GUI.gauge2Meter.gameObject.SetActive(true);
                this.player1GUI.gauge2Meter.fillAmount = UFE.config.player1Character.currentGauge2Points / UFE.config.player1Character.maxGauge2Points;
            }
            if (this.player2 != null && this.player2GUI.gauge2Meter != null)
            {
                this.player2GUI.gauge2Meter.gameObject.SetActive(true);
                this.player2GUI.gauge2Meter.fillAmount = UFE.config.player2Character.currentGauge2Points / UFE.config.player2Character.maxGauge2Points;
            }

        }
        else
        {
            if (this.player1GUI != null && this.player1GUI.gauge2Meter != null)
            {
                this.player1GUI.gauge2Meter.gameObject.SetActive(false);
            }

            if (this.player2GUI != null && this.player2GUI.gauge2Meter != null)
            {
                this.player2GUI.gauge2Meter.gameObject.SetActive(false);
            }
        }

Save this file and open up CharacterEditorWindow.cs


Search this out

                    EditorGUILayout.BeginVertical();{
                        EditorGUIUtility.labelWidth = 90;
                        characterInfo.characterName = EditorGUILayout.TextField("Name:", characterInfo.characterName);
                        characterInfo.age = EditorGUILayout.IntField("Age:", characterInfo.age);
                        bloodTypeChoice = EditorGUILayout.Popup("Blood Type:", bloodTypeChoice, bloodTypeChoices);
                        characterInfo.bloodType = bloodTypeChoices[bloodTypeChoice];
                        characterInfo.gender = (Gender) EditorGUILayout.EnumPopup("Gender:", characterInfo.gender);
                        characterInfo.height = EditorGUILayout.FloatField("Height:", characterInfo.height);
                        characterInfo.lifePoints = EditorGUILayout.IntField("Life Points:", characterInfo.lifePoints);
                        characterInfo.maxGaugePoints = EditorGUILayout.IntField("Max Gauge:", characterInfo.maxGaugePoints);

Add this right after

                        characterInfo.maxGauge2Points = EditorGUILayout.IntField("Max Gauge2l:", characterInfo.maxGauge2Points);

Save this file and move to Globaleditorwindow.cs

search put

globalInfo.roundOptions.allowMovementEnd = EditorGUILayout.Toggle("Allow movement after K.O", globalInfo.roundOptions.allowMovementEnd);
globalInfo.roundOptions.inhibitGaugeGain = EditorGUILayout.Toggle("Inhibit gauge after K.O", globalInfo.roundOptions.inhibitGaugeGain);

and just under add

globalInfo.roundOptions.inhibitGauge2Gain = EditorGUILayout.Toggle("Inhibit Gauge2 after K.O", globalInfo.roundOptions.inhibitGauge2Gain);

look for

EditorGUILayout.Space();
globalInfo.gameGUI.hasGauge = EditorGUILayout.Toggle("Has Gauge/Meter", globalInfo.gameGUI.hasGauge);

add

globalInfo.gameGUI.hasGauge2 = EditorGUILayout.Toggle("Has Gauge2/Meter", globalInfo.gameGUI.hasGauge2);

look for

EditorGUIUtility.labelWidth = 200;
globalInfo.trainingModeOptions.inputInfo = EditorGUILayout.Toggle("Display Input", globalInfo.trainingModeOptions.inputInfo);
globalInfo.trainingModeOptions.freezeTime = EditorGUILayout.Toggle("Freeze Timer", globalInfo.trainingModeOptions.freezeTime);
globalInfo.trainingModeOptions.p1StartingLife = EditorGUILayout.Slider("Player 1 Starting Life:", globalInfo.trainingModeOptions.p1StartingLife, 1, 100);
globalInfo.trainingModeOptions.p2StartingLife = EditorGUILayout.Slider("Player 2 Starting Life:", globalInfo.trainingModeOptions.p2StartingLife, 1, 100);
globalInfo.trainingModeOptions.p1StartingGauge = EditorGUILayout.Slider("Player 1 Starting Gauge:", globalInfo.trainingModeOptions.p1StartingGauge, 0, 100);
globalInfo.trainingModeOptions.p2StartingGauge = EditorGUILayout.Slider("Player 2 Starting Gauge:", globalInfo.trainingModeOptions.p2StartingGauge, 0, 100);
globalInfo.trainingModeOptions.p1Life = (LifeBarTrainingMode)EditorGUILayout.EnumPopup("Player 1 Life:", globalInfo.trainingModeOptions.p1Life, enumStyle);
globalInfo.trainingModeOptions.p2Life = (LifeBarTrainingMode)EditorGUILayout.EnumPopup("Player 2 Life:", globalInfo.trainingModeOptions.p2Life, enumStyle);
globalInfo.trainingModeOptions.p1Gauge = (LifeBarTrainingMode)EditorGUILayout.EnumPopup("Player 1 Gauge:", globalInfo.trainingModeOptions.p1Gauge, enumStyle);
globalInfo.trainingModeOptions.p2Gauge = (LifeBarTrainingMode)EditorGUILayout.EnumPopup("Player 2 Gauge:", globalInfo.trainingModeOptions.p2Gauge, enumStyle);
globalInfo.trainingModeOptions.refillTime = EditorGUILayout.FloatField("Refill Time (seconds)", globalInfo.trainingModeOptions.refillTime);

add under

globalInfo.trainingModeOptions.p1StartingGauge2 = EditorGUILayout.Slider("Player 1 Starting Gauge2:", globalInfo.trainingModeOptions.p1StartingGauge2, 0, 100);
globalInfo.trainingModeOptions.p2StartingGauge2 = EditorGUILayout.Slider("Player 2 Starting Gauge2:", globalInfo.trainingModeOptions.p2StartingGauge2, 0, 100);
globalInfo.trainingModeOptions.p1Gauge2 = (LifeBarTrainingMode)EditorGUILayout.EnumPopup("Player 1 Gauge2:", 
globalInfo.trainingModeOptions.p2Gauge2, enumStyle); 
globalInfo.trainingModeOptions.p2Gauge2 = (LifeBarTrainingMode)EditorGUILayout.EnumPopup("Player 2 Gauge2:", globalInfo.trainingModeOptions.p2Gauge2, enumStyle);

Save this and open MoveEditorWindow.cs finally the last page

search

SubGroupTitle("Self");
moveInfo.gaugeGainOnHit = StyledSlider("Gauge Gain on Hit (%)", moveInfo.gaugeGainOnHit, EditorGUI.indentLevel, 0, 100);
moveInfo.gaugeGainOnMiss = StyledSlider("Gauge Gain on Cast (%)", moveInfo.gaugeGainOnMiss, EditorGUI.indentLevel, 0, 100);
moveInfo.gaugeGainOnBlock = StyledSlider("Gauge Gain on Block (%)", moveInfo.gaugeGainOnBlock, EditorGUI.indentLevel, 0, 100);
moveInfo.gaugeRequired = StyledSlider("Gauge Required (%)", moveInfo.gaugeRequired, EditorGUI.indentLevel, 0, 100);
moveInfo.gaugeUsage = StyledSlider("Gauge Cost (%)", moveInfo.gaugeUsage, EditorGUI.indentLevel, 0, 100);

Add just under

moveInfo.gauge2GainOnHit = StyledSlider("Gauge2 Gain on Hit (%)", moveInfo.gauge2GainOnHit, EditorGUI.indentLevel, 0, 100);
moveInfo.gauge2GainOnMiss = StyledSlider("Gauge2 Gain on Cast (%)", moveInfo.gauge2GainOnMiss, EditorGUI.indentLevel, 0, 100);
moveInfo.gauge2GainOnBlock = StyledSlider("Gauge2 Gain on Block (%)", moveInfo.gauge2GainOnBlock, EditorGUI.indentLevel, 0, 100);
moveInfo.gauge2Required = StyledSlider("Gauge2 Required (%)", moveInfo.gauge2Required, EditorGUI.indentLevel, 0, 100);
moveInfo.gauge2Usage = StyledSlider("Gauge2 Cost (%)", moveInfo.gauge2Usage, EditorGUI.indentLevel, 0, 100);

just abit further down find

SubGroupTitle("Opponent");
moveInfo.opGaugeGainOnHit = StyledSlider("Gauge Gain on Hit (%)", moveInfo.opGaugeGainOnHit, EditorGUI.indentLevel, 0, 100);
moveInfo.opGaugeGainOnBlock = StyledSlider("Gauge Gain on Block (%)", moveInfo.opGaugeGainOnBlock, EditorGUI.indentLevel, 0, 100);
moveInfo.opGaugeGainOnParry = StyledSlider("Gauge Gain on Parry (%)", moveInfo.opGaugeGainOnParry, EditorGUI.indentLevel, 0, 100);

then add

moveInfo.opGauge2GainOnHit = StyledSlider("Gauge2l Gain on Hit (%)", moveInfo.opGauge2GainOnHit, EditorGUI.indentLevel, 0, 100);
moveInfo.opGauge2GainOnBlock = StyledSlider("Gauge2l Gain on Block (%)", moveInfo.opGauge2GainOnBlock, EditorGUI.indentLevel, 0, 100);
moveInfo.opGauge2GainOnParry = StyledSlider("Gauge2 Gain on Parry (%)", moveInfo.opGauge2GainOnParry, EditorGUI.indentLevel, 0, 100);

Find this

                            GaugeUsage gaugeUsageTemp = GaugeUsage.None;
                            if (moveInfo.gaugeUsage < 50) gaugeUsageTemp = GaugeUsage.Quarter;
                            else if (moveInfo.gaugeUsage < 75) gaugeUsageTemp = GaugeUsage.Half;
                            else if (moveInfo.gaugeUsage < 100) gaugeUsageTemp = GaugeUsage.ThreeQuarters;
                            else if (moveInfo.gaugeUsage >= 100) gaugeUsageTemp = GaugeUsage.All;
                            moveInfo.moveClassification.gaugeUsage = gaugeUsageTemp;

Add this with a space between the 2

                            Gauge2Usage gauge2UsageTemp = Gauge2Usage.None;
                            if (moveInfo.gauge2Usage < 50) gauge2UsageTemp = Gauge2Usage.Quarter;
                            else if (moveInfo.gauge2Usage < 75) gauge2UsageTemp = Gauge2Usage.Half;
                            else if (moveInfo.gauge2Usage < 100) gauge2UsageTemp = Gauge2Usage.ThreeQuarters;
                            else if (moveInfo.gauge2Usage >= 100) gauge2UsageTemp = Gauge2Usage.All;
                            moveInfo.moveClassification.gauge2Usage = gauge2UsageTemp;

And There you have it, 100% finished should have no problems but ask me anything about this

Eternal Rift Studios
    Current Projects:
         Destined Soels
Always happy to help when possible. If its something pretty minor ill just help you out. But i do commissions as well. Hit me up if you need a commission.

Share

Thumbs up +3 Thumbs down