Jump to content
View in the app

A better way to browse. Learn more.

Obsidian Forum Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I'm wondering if the Scripts fields can be used to directly add a command to the game, like we do using the console or if that function is disabled cuz no-one ability have this field compiled.

 

My purpose is add an ability/status effect that add disposition points, so surfing inside the game docs i found that about script

 

disposition.png

 

could i add that to an ability? And which is the correct syntax?  Because reading the docs i'm a little confused about ChangeStrenghtComponent . Which is the parameter to refer about it? Average, Major?

Cuz i wanna add just few points not a whole disposition rank.

Thnks in advance

 

Void DispositionAddPoints(Guid, Guid)

 

DispositionComponent

 

ChangeStrengthComponent

 

EDIT

 

I found the StrenghtComponent, but an answer about scripts  in ability components is always welcome :)

 

 

EDIT 2

 

Something like that? Could it works?

                "Scripts": [{
        "$type": "OEIFormats.FlowCharts.ScriptCallData, OEIFormats",
         "Data": {
             "FullName": "Void DispositionAddPoints(Guid, Guid)",
             "Parameters": ["c7d9588c-bc62-4c0c-a2e3-76a970e7b7d4", "54772c0d-cf3f-4589-8cab-9f3601d575c2"],
             "UnrealCall": "",
             "FunctionHash": 0,
             "ParameterHash": 0
            }

Edited by kilay

It doesn't look like we currently provide a way on abilities, attacks, or status effects to execute a script call.  Your script call looks correct, though.

  • Author

It doesn't look like we currently provide a way on abilities, attacks, or status effects to execute a script call.  Your script call looks correct, though.

 

Thnks for reply.

So from what i've seen  disposition points  can be changed only via convos or scripted interactions, right?

If the answer is affermative , can i call a scripted interaction to trigger this disposition change (like soulbound weapons)?

Edited by kilay

  • Author

Or if it isn't doable, is there  some other way to add disposition points using an item ?

You can call the script from anywhere that has a "ScriptsOnly" or "ConditionalAndScripts" property in the documentation (search the Components and Structures pages).  Soulbound items can directly fire scripts when they level up - you wouldn't even need a scripted interaction.

  • Author

You can call the script from anywhere that has a "ScriptsOnly" or "ConditionalAndScripts" property in the documentation (search the Components and Structures pages).  Soulbound items can directly fire scripts when they level up - you wouldn't even need a scripted interaction.

 

I would just say thnks, cuz i figured out the problem, i made my first soulbound weapon and it add disposition points when levels...

Many thnks again

Edited by kilay

  • 3 weeks later...

I know you said that you cannot apply scripts from status effects or attacks, BMac, but I stumbled upon this in the documentation:

 

post-153197-0-26127400-1533663351_thumb.png

 

Does this mean that we can NOW launch scripts from attacks?

 

 

No, that component can only trigger scripts on the events available in the DataScriptEvent enum (which would only be OnInspected for an Attack).

No, that component can only trigger scripts on the events available in the DataScriptEvent enum (which would only be OnInspected for an Attack).

 

So would this be a valid declaration of the DataScriptEventComponent for an attack?

{
		"$type": "Game.GameData.AttackMeleeGameData, Assembly-CSharp",
		"DebugName": "Benediction_of_Restoration_Melee",
		"ID": "b0dc0e1a-0b99-4a7a-5a3c-59486bb60243",
		"Components": [{
			"$type": "Game.GameData.AttackBaseComponent, Assembly-CSharp",
			"KeywordsIDs": ["d5e4e9b4-9565-4654-9e2e-2d68d8847c20"],
			"AttackDistance": 5,
			"MinAttackDistance": 0,
			"AttackVariationID": "7439b86f-785c-4551-8851-95b375a02792",
			"UseParentEquippableHand": "false",
			"CastSpeedID": "e4c738a7-4d3f-407f-b035-cc76191fe26b",
			"RecoveryTimeID": "2065a64b-0d53-48b8-9cfd-600992c389fd",
			"ImpactDelay": 0,
			"ForcedTarget": "None",
			"AffectedTargetType": "Friendly",
			"AffectedTargetConditional": {
				"Conditional": {
					"Operator": 0,
					"Components": []
				}
			},
			"AffectedTargetDeathState": "Alive",
			"HostilityOverride": "Default",
			"PushDistance": 0,
			"FaceTarget": "true",
			"AccuracyBonus": 0,
			"PenetrationRating": 0,
			"DamageData": {
				"DamageType": "None",
				"AlternateDamageType": "None",
				"Minimum": 0,
				"Maximum": 0,
				"DamageProcs": []
			},
			"Require****Object": "true",
			"StatusEffectKeywordsIDs": ["d5e4e9b4-9565-4654-9e2e-2d68d8847c20"],
			"StatusEffectsIDs": [],
			"RandomizeStatusEffect": "false",
			"CanGraze": "false",
			"CanCrit": "true",
			"DefendedBy": "None",
			"AfflictionsDefendedBy": "None",
			"AfflictionApplicationModifier": "None",
			"SubstituteHitVisualEffect": "",
			"VisualEffects": [{
				"VisualEffect": "prefabs/effects/abilities/cast/fx_cast_priest_hand.prefab",
				"AttachPoint": "LeftWeapon",
				"AttachObject": "Caster",
				"AttachMode": "Attach",
				"MeshType": "None",
				"Event": "OnAnimEvent",
				"AnimEventID": 2,
				"Loop": "true",
				"Scale": "false"
			},
			{
				"VisualEffect": "prefabs/effects/abilities/cast/fx_cast_priest_hand.prefab",
				"AttachPoint": "RightWeapon",
				"AttachObject": "Caster",
				"AttachMode": "Attach",
				"MeshType": "None",
				"Event": "OnAnimEvent",
				"AnimEventID": 2,
				"Loop": "true",
				"Scale": "false"
			},
			{
				"VisualEffect": "prefabs/effects/abilities/cast/fx_cast_priest_finish.prefab",
				"AttachPoint": "RightWeapon",
				"AttachObject": "Caster",
				"AttachMode": "Attach",
				"MeshType": "None",
				"Event": "OnLaunch",
				"AnimEventID": 0,
				"Loop": "false",
				"Scale": "false"
			},
			{
				"VisualEffect": "prefabs/effects/abilities/cast/fx_cast_priest_finish.prefab",
				"AttachPoint": "LeftWeapon",
				"AttachObject": "Caster",
				"AttachMode": "Attach",
				"MeshType": "None",
				"Event": "OnLaunch",
				"AnimEventID": 0,
				"Loop": "false",
				"Scale": "false"
			}],
			"AttackOnImpactID": "00000000-0000-0000-0000-000000000000",
			"ExtraAttackID": "00000000-0000-0000-0000-000000000000",
			"LaunchBone": "LeftWeapon",
			"HitBone": "Chest",
			"OnHitShakeDuration": "None",
			"OnHitShakeStrength": "None",
			"NoiseLevelID": "82bc1ce9-3a81-41ca-a61a-cc1f73a53de7",
			"AllReactNoise": "false",
			"InterruptsOn": "None",
			"InterruptType": "Normal",
			"TargetAngle": 0,
			"ApplyOnceOnly": "false",
			"PathsToTarget": "true",
			"HideFromCombatLog": "false",
			"AdditionalAttackOnTooltip": "false",
			"DoesNotApplyDamage": "false",
			"TreatAsWeapon": "false",
			"BounceData": {
				"Bounces": 0,
				"Multiplier": 0.5,
				"Range": 10,
				"InRangeOrder": "false",
				"NoRepeatTargets": "false",
				"AlwaysBounceAtEnemies": "false",
				"Delay": 0,
				"NeverBounce": "false"
			}
		},
		{
			"$type": "Game.GameData.AttackMeleeComponent, Assembly-CSharp",
			"EngagementRadius": 1,
			"IsUnarmed": "false"
		},
		{
			"$type": "Game.GameData.DataScriptEventComponent, Assembly-CSharp",
			"Scripts": [{
				"Event": "OnInspected",
				"Script": {
					"Conditional": {
						"Operator": 0,
						"Components": []
					},
					"Scripts": [{
						"Data": {
							"FullName": "Void RemoveAllInjuries(Guid)",
							"Parameters": ["1a26e100-0000-0000-0000-000000000000"],
							"UnrealCall": "",
							"FunctionHash": 0,
							"ParameterHash": 0
						},
						"Conditional": {
							"Operator": 0,
							"Components": []
						}
					}]
				}
			}]
		}]
	}

Yep, that looks correct from my cursory inspection.

Yep, that looks correct from my cursory inspection.

Cool, thanks! I'm having trouble getting any script to fire when the attack launches, but I'm hoping it's more an issue with the attack than with the script call.

I think I accidentally misled you. That particular event (OnInspected) doesn't fire when the attack is launched. It fires when the attack is opened in the inspection window. DataScriptEvent doesn't currently provide an event for when the attack is launched.

You can call scripts, if and when you can apply StatusEffect to a character with a quick slot. First make a dummy item. It can be completely empty (it still needs an ItemComponent) and add a DataScriptEventComponent with OnItemCollected event to it. Attach the scripts you want to call here. Make two StatusEffectGameData one with BonusQuickSlots ("BaseValue": 1, "DurationType": "Instant") and another with SummonConsumable ("DurationType": "Instant", "ItemValueID": "Dummy item Guid"). Make sure you always apply them one after the other, first the BonusQuickSlots then SummonConsumable. Once the summoning is completed (in an instant) both the BonusQuickSlots and the SummonConsumable will be removed, but the script on the dummy item will be called.

 

It works, because the SummonConsumable calls a function that triggers the OnItemCollected event (for example the SummonWeaponPrimarySlot does not). Also the max quick item number can go over 6, the overflow is simply inaccessible, but not for the SummonConsumable status effect.

 

The BonusQuickSlots and the SummonConsumable can be applied from an attack as well. The downside: the attack has to originate from a charater with a quick slot. Make a KeywordGameData for the attack and add it to the "KeywordsIDs" of said attack. Apply a StatusEffectGameData with ApplyStatusEffectOnEvent ("AttackFilter": {"KeywordsIDs": [KeywordGameData attack Guid]}, "StatusEffectsValueIDs": [BonusQuickSlots Guid, SummonConsumable Guid], "EventValue": "OnScoringGrazeHitOrCriticalHit") to the character. Whenever the character hits with the attack, the script will be called as well.

You can call scripts, if and when you can apply StatusEffect to a character with a quick slot. First make a dummy item. It can be completely empty (it still needs an ItemComponent) and add a DataScriptEventComponent with OnItemCollected event to it. Attach the scripts you want to call here. Make two StatusEffectGameData one with BonusQuickSlots ("BaseValue": 1, "DurationType": "Instant") and another with SummonConsumable ("DurationType": "Instant", "ItemValueID": "Dummy item Guid"). Make sure you always apply them one after the other, first the BonusQuickSlots then SummonConsumable. Once the summoning is completed (in an instant) both the BonusQuickSlots and the SummonConsumable will be removed, but the script on the dummy item will be called.

 

It works, because the SummonConsumable calls a function that triggers the OnItemCollected event (for example the SummonWeaponPrimarySlot does not). Also the max quick item number can go over 6, the overflow is simply inaccessible, but not for the SummonConsumable status effect.

 

The BonusQuickSlots and the SummonConsumable can be applied from an attack as well. The downside: the attack has to originate from a charater with a quick slot. Make a KeywordGameData for the attack and add it to the "KeywordsIDs" of said attack. Apply a StatusEffectGameData with ApplyStatusEffectOnEvent ("AttackFilter": {"KeywordsIDs": [KeywordGameData attack Guid]}, "StatusEffectsValueIDs": [BonusQuickSlots Guid, SummonConsumable Guid], "EventValue": "OnScoringGrazeHitOrCriticalHit") to the character. Whenever the character hits with the attack, the script will be called as well.

 

Fantastic work-around!  Do you know if this works if the character in question has all quick slots unlocked?  

Edited by SiliconMage

Yes, the BonusQuickSlots can go above 6. It's a simple addition, but there are two stacking rules:

  1. If the character has BonusQuickSlots from multiple sources (for example Deep Pockets) they stack with each other.
  2. The "MaxStackQuantity" property of the StatusEffectComponent governs the stacking rule for applying the same StatusEffectGameData (same Guid) to a single character.

You can't access the extra quick slots beyond the theoretical max (six) from the UI, but the SummonConsumable can add an item to it just fine.

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.