Alright, it's me, again... and i've an issue with an Armor i created a few days ago in BGEE SoD. It worked as intended ever since i completed it until today.
I didn't change anything on the armor or on it's related spell, but it is completely dysfunctional right now and i have no clue why.
Here is a link to the related post i made about it.
The Armor is supposed to trigger Armor of Faith with a 35% chance when hit, but what it currently does is triggering on EVERY hit and displaying "One of the spells has failed", which it didn't do before.
If anyone wants to take a direct look at it i added the files in the attachments.
@Maerdyl The "one of the spells has failed" thing shows because Dynaheir was too far away to be hit by the Fireshield: Red damage.
Also, I looked at the file for that armor. You should set the probability1 of the Cast Spell on Condition effect to 100%; only the Cast Spell effect on PLAT08B.SPL should have less than 100% probability.
@OvlynChuru I only changed the probability1 on the Cast Spell on Condition effect to 35% because it started acting as i described beforehand, i thought that it might change something, but it's still the same regardless of the value.
P.S: The spell itself doesn't apply properly, it is supposed to cast a lvl 25 Armor of Faith, that would provide 25% to all resistances (it used to do exactly that). Now the Armor of Faith i get is a lvl 1 providing only 5% resistance.
As you can see here:
P.P.S: Actually it seems to do both 25 and 1 lvl Armor of Faith, but it's completely random and it's only applying one of them at a time.
P.P.P.S: Alright i solved it on my own in the end, still thanks for the reply!
Just a quick question,
Still about BGEE SoD, i created a weapon that has 5% chance to cast Sunray on each hit, the effect works as intended, there is just a slight inconvenience i'd like to fix: The Sunray appears on top of my target and not on the caster.
It still works in benefit of the caster, but it's visually annoying and just feels wrong in general.
Does anybody know a way to prevent this from happening ?
P.S: I attached the item and its related spell if someone wants to take a look.
@bubb I tested it out again and PartyRested() is working for me, but like Ratatoskr it often takes several times to make it work. That's ok though, as long as it kicks in eventually. Maybe there's a percentage that it triggers instead of an absolute, and I was just unlucky before.
Does anyone know if there are potential problems caused by using weapon damage with the type set to "None (0)" in the Extended Header. I tested it and it seems to ignore all resistances (but respects armor class) but the damage will also not appear in the combat log (although it will appear in the floating text for Planescape).
Does anyone know if there are potential problems caused by using weapon damage with the type set to "None (0)" in the Extended Header. I tested it and it seems to ignore all resistances (but respects armor class) but the damage will also not appear in the combat log (although it will appear in the floating text for Planescape).
It ignores specific Crushing AC, but it still deals crushing damage.
The amount dealt changes heavily depending on the diceNum field.
If diceNum and damageBonus are both zero, the weapon will deal zero damage, regardless of other damage modifiers. Inventory will display "(null)" for damage.
If just diceNum is zero, the weapon will deal damage equal to damageBonus field, ignoring most damage modifiers (but not all, I know Strength is still applied if flagged to).
If diceNum is non-zero, the weapon will function as if using the "Set Value" damage mode (same thing Harm uses to set a target's HP to 1) which inherently ignores damage resistance.
It's ideal for a "touch-attack", as it can ignore all attack damage modifiers and ignores all specific-AC.
@kjeron, this is great information. I was going to use it for a weapon that always dealt 4d8 "true" (ish) damage, but was not affected by damage modifiers, special AC, or resistance. I know I can turn Strength off directly. Currently I just have type = 0 [None]; diceNum = 4; diceSize = 8 and disabled the Strength damage bonus. Will that produce the desired effect?
@kjeron, this is great information. I was going to use it for a weapon that always dealt 4d8 "true" (ish) damage, but was not affected by damage modifiers, special AC, or resistance. I know I can turn Strength off directly. Currently I just have type = 0 [None]; diceNum = 4; diceSize = 8 and disabled the Strength damage bonus. Will that produce the desired effect?
No, it would set the target's HP to 4d8 (4-32).
You could just set all the damage fields to zero, and deal the damage through an added op12 effect. (If all the damage fields are zero, the inventory will also display the damage range of the first op12 effect on the header in the inventory.)
As for bypassing resistance, you could either deal Non-lethal damage or any unsupported damage value (any value above 2048, or any combination of others). Or you could set the target's resistance to that damage type to 0 instantly for no duration.
Does anyone know how to prevent chunking (exploding) death on non-party CRE files? I've been testing it with KEG1 animation and tried following stuff:
- LPF ADD_CRE_EFFECT INT_VAR opcode = 295 /*Disable Permanent Death*/ target = 1 parameter2 = 1 /*Stat value*/ timing = 9 END
- LPF ADD_CRE_EFFECT INT_VAR opcode = 208 /*Minimum HP*/ target = 1 parameter1 = "-9" /*HP amount*/ timing = 9 END
- 'Permanent corpse' CRE flag (BIT1)
- 'EE: No exploding death' CRE flag (BIT20)
- equipping RING95 (used by Shadows and other creatures that don't chunk)
What's the efficient idiom for concatenating multiple strings / making multiple replacements in a string?
Lets say I have a loop:
OUTER_SET i = 4
OUTER_TEXT_SPRINT res ~~
OUTER_WHILE i >= 0 BEGIN
OUTER_TEXT_SPRINT res ~%res%xxx~
END
This is obviously a simplified example, but if in reality 'xxx' or the number of iterations is large, this is grossly ineffective. I assume here an immutable string implementation on a hunch. Alternatively, if all string variables are mutable, passing a string to any function (and any ~%string%~ expression) results in copying.
For a long time I assumed optimistically that REPLACE_EVALUATE (and REPLACE_TEXTUALLY) is implemented efficiently using some intermediate buffer, but my recent issues with it make me think it's a simple iteration of 'find next occurence; replace; repeat'.
How can I find out what a spell does? I'm checking with NI but I can't make sense of the info it provides.
OK, maybe this question was a bit too general. Let me try with an example: I want to check the probability that Carrion Summons summons two crawlers instead of one (the description says it's 35%, but some testing suggests it might be lower). How can I find out?
The spell has 3 effects (at each level). Each one does the same thing (summons one crawler).
The first effect has probability range [0 - 65].
The second and third effect have probability range [66 - 100].
[0 - 65] = 66% for only the first effect to trigger
[66 - 99] = 34% for only the second and third effect to trigger
(the range is [0 - 99], not [1 - 100], resulting in the common and known 1% variance from stated values)
Since they are all summoning the same creature, it could also have been done with two effects:
First effect with range [0 - 99].
Second effect with range [0 - 34] or [1 - 35] or [2 - 36] or etc...
First effect always triggers, second effect has a 35% chance of triggering.
Anyone know the location of the text that scrolls at the beginning of the game (I.E Prologue screen), the one which has the "Nestled atop the cliffs that rise from the Sword Coast" lines? I'm trying to edit it for a personal project/mod for a friend of mine and can't seem to locate it.
Does anyone know what makes an NPC walk over to you and talk automatically, and more importantly, how to make it stop?
It's driving me a little nuts.
These actions are triggered by script. There is no universal way to suppress them.
However, NPCs won't pester you if they can't see you. For example, you could
turn your party members invisible (doesn't work if they can see through invisibility).
apply the blindness effect to the target (doesn't work if they are immune to blindness).
protect your party members from certain creature types via opcode 100 (similar to how Protection from Undead scrolls are working), e.g. by protecting yourself from neutral characters (EA=NEUTRAL).
You could create a ring that applies the latter effect when equipped.
@argent77 . So I've got a weird problem. When I make an NPC leave, including my new one, setting the kickedoutlocals as usual and sending them somewhere else, they always come to talk to me as soon as they see me. Even though, as far as I know, I'm not setting any script that should do that.
Setting the ai script to default when they leave seems to fix the talking issue, except it may be causing other problems because that same NPC is now randomly triggering the kicked out dialogue.
Any ideas on what could be going on? I noticed a lot of mod NPCs make their own kicked out variable instead, but I don't know if that's just preference or if kicked out locals is glitchy.
I'm no expert with the party join/kickout mechanism. But I think the conversation after kicking out a party member is automatically triggered by the game engine. There won't be a conversation however if there is no dialog file or no valid condition within the dialog for the NPC.
The immediate kicking out dialogue is actually fine. The problem it's that if I say, go wait for me somewhere else, they try to talk to me immediately over there.
But I'll probably just need to start fresh and go through the code line by line if there's no standard trigger. Half the time it's just some tiny typo screwing up everything.
Ok, I guess I need to make it a manual choice then.
An unrelated question: how tricky and bug prone would it be to implement different weapon proficiency effects for different weapons? From what I have seen, proficiency working regardless of weapon type is hardcoded, but one could always apply 'on equip' scripts to weapons and, paired with 'on level up' (and possibly a script for bracers of extraordinary proficiency) it could, in theory, make training have varying effect. After all, a greatsword is tad harder to master than a dagger.
And I'll also answer my question about a way to achieve O(n) string concatenation in weidu:
OUTER_PATCH_SAVE result ~~ BEGIN
SET total = 0
FOR (i=0; i<42; ++i) BEGIN
INSERT_BYTES total 1
WRITE_ASCII total ~*~
SET total += 1
END
END
(Example: using opcode 248 in the .EFF, triggering a second .EFF for on-hit effects on the enemy. Sky's the limit, really.)
op248 isn't really ideal - as it will always apply to both main and offhand weapon.
For on-hit effects, it would be better to just add op326 effects to the weapon ability, checking proficiency.
As long as op326 targets self, and the effects in the subspell target Preset, it will check the attackers prof while affecting the attacked target. (One thing it won't work with is AoE weapons - Arrows of Detonation).
For my Undivided mod, I need to equip a ring on characters (currently: Vhailor) that allows them to clear fog of war. This item should only be active while they are functioning as a familiar. I have the following script on any join dialog.
The problem is that this script also creates an equivalent item in the Protagonist's inventory. I could band-aid fix this with a check to remove the item from the protagonist's inventory, but is there something more problematic happening under the hood that I should be aware of?
Does it have to be a ring? You could instead apply spells to turn on/off "Clear fog of war". Opcode 268 with permanent timing and dispel/resistance = 0 to turn sight on. Opcode 337 (Remove effect by opcode) to turn it off.
Comments
I didn't change anything on the armor or on it's related spell, but it is completely dysfunctional right now and i have no clue why.
Here is a link to the related post i made about it.
The Armor is supposed to trigger Armor of Faith with a 35% chance when hit, but what it currently does is triggering on EVERY hit and displaying "One of the spells has failed", which it didn't do before.
If anyone wants to take a direct look at it i added the files in the attachments.
Any help would be hugely appreciated!
Also, I looked at the file for that armor. You should set the probability1 of the Cast Spell on Condition effect to 100%; only the Cast Spell effect on PLAT08B.SPL should have less than 100% probability.
P.S: The spell itself doesn't apply properly, it is supposed to cast a lvl 25 Armor of Faith, that would provide 25% to all resistances (it used to do exactly that). Now the Armor of Faith i get is a lvl 1 providing only 5% resistance.
As you can see here:
P.P.S: Actually it seems to do both 25 and 1 lvl Armor of Faith, but it's completely random and it's only applying one of them at a time.
P.P.P.S: Alright i solved it on my own in the end, still thanks for the reply!
Still about BGEE SoD, i created a weapon that has 5% chance to cast Sunray on each hit, the effect works as intended, there is just a slight inconvenience i'd like to fix: The Sunray appears on top of my target and not on the caster.
It still works in benefit of the caster, but it's visually annoying and just feels wrong in general.
Does anybody know a way to prevent this from happening ?
P.S: I attached the item and its related spell if someone wants to take a look.
It ignores specific Crushing AC, but it still deals crushing damage.
The amount dealt changes heavily depending on the diceNum field.
It's ideal for a "touch-attack", as it can ignore all attack damage modifiers and ignores all specific-AC.
You could just set all the damage fields to zero, and deal the damage through an added op12 effect. (If all the damage fields are zero, the inventory will also display the damage range of the first op12 effect on the header in the inventory.)
As for bypassing resistance, you could either deal Non-lethal damage or any unsupported damage value (any value above 2048, or any combination of others). Or you could set the target's resistance to that damage type to 0 instantly for no duration.
- LPF ADD_CRE_EFFECT INT_VAR opcode = 295 /*Disable Permanent Death*/ target = 1 parameter2 = 1 /*Stat value*/ timing = 9 END
- LPF ADD_CRE_EFFECT INT_VAR opcode = 208 /*Minimum HP*/ target = 1 parameter1 = "-9" /*HP amount*/ timing = 9 END
- 'Permanent corpse' CRE flag (BIT1)
- 'EE: No exploding death' CRE flag (BIT20)
- equipping RING95 (used by Shadows and other creatures that don't chunk)
Nothing seems to work. @kjeron?
Lets say I have a loop:
This is obviously a simplified example, but if in reality 'xxx' or the number of iterations is large, this is grossly ineffective. I assume here an immutable string implementation on a hunch. Alternatively, if all string variables are mutable, passing a string to any function (and any ~%string%~ expression) results in copying.
For a long time I assumed optimistically that REPLACE_EVALUATE (and REPLACE_TEXTUALLY) is implemented efficiently using some intermediate buffer, but my recent issues with it make me think it's a simple iteration of 'find next occurence; replace; repeat'.
The first effect has probability range [0 - 65].
The second and third effect have probability range [66 - 100].
[0 - 65] = 66% for only the first effect to trigger
[66 - 99] = 34% for only the second and third effect to trigger
(the range is [0 - 99], not [1 - 100], resulting in the common and known 1% variance from stated values)
Since they are all summoning the same creature, it could also have been done with two effects:
First effect with range [0 - 99].
Second effect with range [0 - 34] or [1 - 35] or [2 - 36] or etc...
First effect always triggers, second effect has a 35% chance of triggering.
It's driving me a little nuts.
However, NPCs won't pester you if they can't see you. For example, you could
You could create a ring that applies the latter effect when equipped.
Setting the ai script to default when they leave seems to fix the talking issue, except it may be causing other problems because that same NPC is now randomly triggering the kicked out dialogue.
Any ideas on what could be going on? I noticed a lot of mod NPCs make their own kicked out variable instead, but I don't know if that's just preference or if kicked out locals is glitchy.
But I'll probably just need to start fresh and go through the code line by line if there's no standard trigger. Half the time it's just some tiny typo screwing up everything.
IsTouchGUI() trigger
edit: sorry, missed the "weidu" part.
An unrelated question: how tricky and bug prone would it be to implement different weapon proficiency effects for different weapons? From what I have seen, proficiency working regardless of weapon type is hardcoded, but one could always apply 'on equip' scripts to weapons and, paired with 'on level up' (and possibly a script for bracers of extraordinary proficiency) it could, in theory, make training have varying effect. After all, a greatsword is tad harder to master than a dagger.
And I'll also answer my question about a way to achieve O(n) string concatenation in weidu:
For on-hit effects, it would be better to just add op326 effects to the weapon ability, checking proficiency.
As long as op326 targets self, and the effects in the subspell target Preset, it will check the attackers prof while affecting the attacked target. (One thing it won't work with is AoE weapons - Arrows of Detonation).