Jump to content

How to apply conditions for a specific item effect?


Recommended Posts

Sup fellow modders,

I'm trying to make a mod that ports a few items from the first game to Deadfire. I'm using @MaxQuest's Spoils Of Caed Nua as a comparison to get the basics down, but I've run into a bit of a conundrum with my first item, the Ring Of Thorns.

Its "Preservation" ability provides a bonus to Deflection while prone or stunned (or both, I figure, as rare an happenstance that can be.) Problem is, I can't find in the game files how to apply a condition to an ability/effect.

Edited by AndreaColombo

"Time is not your enemy. Forever is."

— Fall-From-Grace, Planescape: Torment

"It's the questions we can't answer that teach us the most. They teach us how to think. If you give a man an answer, all he gains is a little fact. But give him a question, and he'll look for his own answers."

— Kvothe, The Wise Man's Fears

My Deadfire mods: Brilliant Mod | Faster Deadfire | Deadfire Unnerfed | Helwalker Rekke | Permanent Per-Rest Bonuses | PoE Items for Deadfire | No Recyled Icons | Soul Charged Nautilus

 

Link to comment
Share on other sites

All right, I've got that down.

Problem now is, instead of granting +50 to all defenses while prone or stunned, my item makes the wearer immune to stun (and Stunned doesn't seem to get its description when hovering the mouse on it, while Prone somehow does.)

I've checked my code and it looks sound, there is no immunity anywhere. Appreciate if more experienced modders could tell me what I did wrong.

Tagging @Elric Galad as I know he's active and knowledgeable :)

 

item_ring_ring_of_thorns.gamedatabundle

Edited by AndreaColombo

"Time is not your enemy. Forever is."

— Fall-From-Grace, Planescape: Torment

"It's the questions we can't answer that teach us the most. They teach us how to think. If you give a man an answer, all he gains is a little fact. But give him a question, and he'll look for his own answers."

— Kvothe, The Wise Man's Fears

My Deadfire mods: Brilliant Mod | Faster Deadfire | Deadfire Unnerfed | Helwalker Rekke | Permanent Per-Rest Bonuses | PoE Items for Deadfire | No Recyled Icons | Soul Charged Nautilus

 

Link to comment
Share on other sites

I do believe the error is in the filter. I used the Guardian Plate as a template but that was keyworded for mental and physical afflictions in general, which isn’t the same thing. If/when you get a chance to see code, perhaps you’ll be able to spot where the error is. I tried to figure it out all day to no avail.

I’m quite sure I’m not getting the bonus against attacks as that would require additional coding. When I attack the wearer with a stunning attack, the combat log downright says the wearer is immune.

"Time is not your enemy. Forever is."

— Fall-From-Grace, Planescape: Torment

"It's the questions we can't answer that teach us the most. They teach us how to think. If you give a man an answer, all he gains is a little fact. But give him a question, and he'll look for his own answers."

— Kvothe, The Wise Man's Fears

My Deadfire mods: Brilliant Mod | Faster Deadfire | Deadfire Unnerfed | Helwalker Rekke | Permanent Per-Rest Bonuses | PoE Items for Deadfire | No Recyled Icons | Soul Charged Nautilus

 

Link to comment
Share on other sites

By the by, would you happen to know where keywords are stored? I'd like to know which GUID number corresponds to which Keyword.

"Time is not your enemy. Forever is."

— Fall-From-Grace, Planescape: Torment

"It's the questions we can't answer that teach us the most. They teach us how to think. If you give a man an answer, all he gains is a little fact. But give him a question, and he'll look for his own answers."

— Kvothe, The Wise Man's Fears

My Deadfire mods: Brilliant Mod | Faster Deadfire | Deadfire Unnerfed | Helwalker Rekke | Permanent Per-Rest Bonuses | PoE Items for Deadfire | No Recyled Icons | Soul Charged Nautilus

 

Link to comment
Share on other sites

For the Stunned/Prone thing, I'd try IsStunned or HasStatusEffectType with KnockedDown/Stunned. (I'm not sure if the latter works with knockdowns from Attacks that Prone directly...)

"ActivationPrerequisites": {
	"Conditional": {
		"Operator": 0,
		"Components": [
			{
				"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
				"Data": {
					"FullName": "Boolean HasStatusEffectType(Guid, StatusEffectType)",
					"Parameters": [
						"7d150000-0000-0000-0000-000000000000",
						"KnockedDown"
					]
				},
				"Not": false,
				"Operator": 1
			},
			{
				"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
				"Data": {
					"FullName": "Boolean IsStunned(Guid)",
					"Parameters": [
						"7d150000-0000-0000-0000-000000000000"
					]
				},
				"Not": false,
				"Operator": 1
			}
		]
	}
}

 

  • Like 1
Link to comment
Share on other sites

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...