Jump to content

Recommended Posts

Posted

46c6c0898120d98c112d6ead5921a4d34cf5f90af2621112de046b1f4cb84d31.jpg.1caa4dac31d6f5f7671101869c02afca.jpg

 

Not sure if anyone has seen any charging abilities in the game, but I couldn't find any and finally figured out how to make one.  By charging abilities, I mean abilities that make you "charge up" by dedicating time to the ability, and allow you to release the effect at any time, and the effect is bigger the more you charged up.  Megaman's or Samus's blaster are good examples.

 

The abilities are going to be on an item I'm making called Evelyn's Jaunt.  I made two modal abilities and grouped them together via a modal group:

        {
            "$type": "Game.GameData.ModalGroupGameData, Assembly-CSharp",
            "DebugName": "MG_evelyns_jaunt",
            "ID": "113f042e-5a0e-4b62-95e3-a20bdf957622",
            "Components": [
                {
                    "$type": "Game.GameData.ModalGroupComponent, Assembly-CSharp",
                    "DisplayName": 305151077,
                    "MustBeActive": "true"
                }
            ]
        }

 

Then I made one ability charge up ("Charge Up") and the other bursts you into the air ("Liftoff").  Charge Up will stack effects at a rapid pace, which will be applied OnClear via ApplyStatusEffectOnEvent.  But we need a fast tick rate, so I made one to be 10x per second:

        {
            "$type": "Game.GameData.IntervalRateGameData, Assembly-CSharp",
            "DebugName": "Interval_10_Per_Second_evelynsjaunt",
            "ID": "222ecc89-771e-4a80-b749-d1e552205d3b",
            "Components": [
                {
                    "$type": "Game.GameData.IntervalRateComponent, Assembly-CSharp",
                    "Interval": 0.1,
                    "OnlyWhileMoving": "false"
                }
            ]
        },

 

The Charge Up modal ability is: Ability -> Attack (simple melee attack only to apply status effects) -> ApplyStatusEffectonEvent [OnInterval] -> ApplyStatusEffectOnEvent [OnClear] -> Accuracy stacking bonus, launching stacking effect, and another ApplyStatusEffectonEvent using OnClear after 1s to create visual effects and restrictions to the player at the perfect time

Unfortunately, the VerticalLaunch effect is inconsistent after multiple uses, so I had to make it for a set amount of time and make some graphics changes to hide the limitation.  However, the Accuracy and other effects stack just fine.  I used AddDurationIfAlreadyApplied on the visual effects to last as long as the stacking bonuses, and then made them with "Event": "OnStop" to occur at the end of the status effects.

Then we have the Liftoff modal ability, which is just an attack with a keyword.  This keyword will be used to clear the effects built up during Charge Up, by creating this in the Charge Up trigger settings for the 1st & 2nd ApplyStatusEffectOnEvent :

                    "TriggerAdjustment": {
                        "TriggerOnEvent": "OnLaunchesAttack",
                        "TriggerOffEvent": "None",
                        "ValidateWithAttackFilter": "true",
                        "ParamValue": 0,
                        "ValueAdjustment": 0,
                        "DurationAdjustment": 0,
                        "ResetTriggerOnEffectTimeout": "false",
                        "MaxTriggerCount": 1,
                        "IgnoreMaxTriggerCount": "false",
                        "RemoveEffectAtMax": "true",
                        "ChanceToTrigger": 1
                    },

 

Then on the AttackFilter we put in the keyword that we created and assigned to the Liftoff modal ability's attack.  Keywords can be made via this code:

        {
            "$type": "Game.GameData.KeywordGameData, Assembly-CSharp",
            "DebugName": "evelyns_jaunt_Keyword",
            "ID": "d9f0545a-6897-4b2e-ae36-b9b3e4082fbd",
            "Components": [
                {
                    "$type": "Game.GameData.KeywordComponent, Assembly-CSharp",
                    "GuiDisplayString": 305151076,
                    "AbilitiesDisplayString": -1,
                    "Description": -1,
                    "OverridePluralEffect": -1,
                    "Icon": "",
                    "TintableIcon": ""
                }
            ]
        },

Then you put that keyword ID at the beginning of the Liftoff modal's attack and make sure it's in the attack filter of the Charge Up modal's 2nd ApplyStatusEffectOnEvent.  Now when we use Charge Up, we gain stacks every 0.1 seconds, and when we use Liftoff, our Charge Up effects recognize it and are removed, which triggers them to apply all at once because they're set to OnClear.  To be precise, "OnClear" is at the "EventValue" not the ApplicationType, which can be confusing.  ApplicationType is almost always ApplyOnStart because it has limited options.

 

But wait: What could go wrong?  Well, you'll always have problems with visual effects and deciding when to use HideFromUI or HideFromCombatTooltip.  But what's really wrong with this?  We probably don't want to have the player able to use the Charge Up modal again while the current effects are still applied.  Maybe you do, but for my ability, that would be too good, so we have to disable the other modal ability somehow.

 

How do you disable a modal ability?  It's actually really hard.  DisableKeywordAbilities didn't work for me.  DisableModalAbilities removed all the effects of the Charge Up, even though I don't need to use that modal anymore!  Instead, I had to apply a Conditional to the Charge Up ability so that whenever I had a status effect with a Charge Up keyword used, the Charge Up ability deactivated, then reactivated afterwards:

First I created the new keyword (using the same method as before) for Charge Up (this is a new keyword) and put it on a status effect that would last as long as the others. 

                    "KeywordsIDs": [
                        "4d7d49fc-2305-4c8b-9fe1-5c9c0c244c06"
                    ],

Then I created the Conditional on the Charge Up ability:

                    "ActivationPrerequisites": {
                        "Conditional": {
                            "Operator": 0,
                            "Components": [
                                {
                                    "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
                                    "Data": {
                                        "FullName": "Boolean HasStatusEffectWithKeyword(Guid, Guid)",
                                        "Parameters": [
                                            "7d150000-0000-0000-0000-000000000000",
                                            "4d7d49fc-2305-4c8b-9fe1-5c9c0c244c06"
                                        ],
                                        "Flags": "",
                                        "UnrealCall": "",
                                        "FunctionHash": 0,
                                        "ParameterHash": 0
                                    },
                                    "Not": true,
                                    "Operator": 0
                                }
                            ]
                        }
                    },
                    "ApplicationPrerequisites": {
                        "Conditional": {
                            "Operator": 0,
                            "Components": []
                        }
                    },
                    "DeactivationPrerequisites": {
                        "Conditional": {
                            "Operator": 0,
                            "Components": [
                                {
                                    "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
                                    "Data": {
                                        "FullName": "Boolean HasStatusEffectWithKeyword(Guid, Guid)",
                                        "Parameters": [
                                            "7d150000-0000-0000-0000-000000000000",
                                            "4d7d49fc-2305-4c8b-9fe1-5c9c0c244c06"
                                        ],
                                        "Flags": "",
                                        "UnrealCall": "",
                                        "FunctionHash": 0,
                                        "ParameterHash": 0
                                    },
                                    "Not": false,
                                    "Operator": 0
                                }
                            ]
                        }
                    },

Now this says the Charge Up ability will Deactivate when I have a Charge Up status effect with my new Charge Up keyword, and activate again when that effect is gone.  Now you can charge up and blast off into the air, and a whole new type of abilities are available to Deadfire.

 

What are the downsides to charging abilities?  They take up valuable space on the screen, but only one space per modal group.  I'm not sure what else, but I think it's really cool.

  • Like 1
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...