Jump to content


Photo

question on opcode 177 and 341 [use eff and set critical hit effect]


18 replies to this topic

#1 eugene

eugene
  • Members
  • 37 posts

Posted 07 February 2018 - 07:53 AM

hello everyone,

 

has anyone tried and managed to make a weapon having an ability like below? I have been trying to do it for some days but could not managed to work and I started to believe it is not possible in IE.

weapon +1

Equipped Abilities:
 - Demon Slayer: kills demons on critical hit (only with Tieflings)

So I want a weapon which is a basically +1 weapon in hands of other races than a tiefling but when a tiefling wields it and hits critical, then "demon" targets die. no effect to dragons for example or when wielded by another race even against tieflings.

 

The ability needs two condition to work unfortunately (held by tieflings plus target is demon) which seems to be the problem to implement.

 

I managed to do something like below with 177 [4/153] and 177 [2/0] and 178 [4/121]:

weapon +1

Equipped Abilities:
 - Demon Slayer: gets +3 TH and +6 damage to demons (only with Tieflings)

Any ideas?

 

Note: Limiting usability is a solution but I dont want to go with this approach and looking for a fancy solution. Of course solution does not need to use these opcodes only (177 and 341).

 

thanks



#2 kjeron

kjeron
  • Members
  • 92 posts

Posted 07 February 2018 - 08:16 AM

The "This Weapon Only" option of opcode 341 doesn't work when used in an EFF, it has to be directly on the weapon, so you will need to go through two subspells to filter the race of both the user and the target.

On item(global/equipping effect): Critical Hit Effect (341), Self(1), "This Weapon Only" (1), While Equipped(2), (resource)
(resource).SPL: Apply Effects List (326), Self(1), RACE(104)/TIEFLING(153), (resource2)
(resource2).SPL: Slay (55), Preset Target(2), RACE(4)/DEMONIC(121)

Edited by kjeron, 07 February 2018 - 08:18 AM.


#3 eugene

eugene
  • Members
  • 37 posts

Posted 07 February 2018 - 08:45 AM

thanks for reply. it works fine

 

On Item: as you wrote, Resource: CRIT.SPL

 

CRIT.SPL : opcode 326, Spell Target: Self, Effect Target: Self, Duration: Permanent-1, Resource: VORP.SPL, Values 104-153 (although I think it is supposed to be 268-153 as https://gibberlings3.../bgee.htm#op324 says it is 0x10c for RACE which is 268, 104 works only)

 

VORP.SPL : opcode 55, Spell Target: Creature, Effect Target: Preset Target, Duration: Permanent-1, Race/Value 4-121

 

 

for testing I use BALOR01, it did not work. Something is wrong on this creature where as it works on FINBALOR, no idea why as race is correct

for IDEMON02 it worked. perhaps BALOR01 had something preventing death, duh...

 

thanks a lot


Edited by eugene, 07 February 2018 - 09:10 AM.


#4 kjeron

kjeron
  • Members
  • 92 posts

Posted 07 February 2018 - 10:29 AM

0x10c would be used in SPLPROT, where the checks are defined, but there is already an entry for it by default in SPLPROT:
RACE 0x10c -1 1
It happens to be row# 104. The row number for the check is the value used for Parameter2 in opcode 326.
The first column is just an irrelevant label with no function(RACE), the second row is the stat/IDS to check (0x10c = RACE.IDS), the third is the value (-1 = use Parameter1), the last is the relation (1 is 'equal')

Critical Hit effects no longer bypass Weapon Immunity in the most recent beta version (v2.5b), which may be why it's not working on some demons, balor's require +3 or better to hit.

Edited by kjeron, 07 February 2018 - 10:35 AM.


#5 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6557 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 07 February 2018 - 11:40 AM

opcode 326 ... 341 ... plah

Make sure you use:

REQUIRE_PREDICATE GAME_IS ~bgee bg2ee eet~

...


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#6 eugene

eugene
  • Members
  • 37 posts

Posted 07 February 2018 - 12:05 PM

@kjeron, thanks for explanation. btw the weapon I was testing was +5 enchanted (weapon +1 is just a tag). weird behavior is not because of the enchantment. the damage was very small (1d1) AND had opcode 301 [20] to see if the tiefling was seriously triggering the critical hit, she damages balor as I can see but not killing right away on crits. I will ignore the BALOR01 for the moment.

 

 

@Jarno Mikkola, yeah, back to tp2 then. thanks for reminding this.



#7 kjeron

kjeron
  • Members
  • 92 posts

Posted 07 February 2018 - 12:25 PM

@kjeron, thanks for explanation. btw the weapon I was testing was +5 enchanted (weapon +1 is just a tag). weird behavior is not because of the enchantment. the damage was very small (1d1) AND had opcode 301 [20] to see if the tiefling was seriously triggering the critical hit, she damages balor as I can see but not killing right away on crits. I will ignore the BALOR01 for the moment.

Helmet maybe? Critical Hit protection also blocks extra effects from opcode 341. Because Balor's are clearly wearing them and not just given undeserved immunities to make them arbitrarily harder.

#8 eugene

eugene
  • Members
  • 37 posts

Posted 07 February 2018 - 01:05 PM

 

@kjeron, thanks for explanation. btw the weapon I was testing was +5 enchanted (weapon +1 is just a tag). weird behavior is not because of the enchantment. the damage was very small (1d1) AND had opcode 301 [20] to see if the tiefling was seriously triggering the critical hit, she damages balor as I can see but not killing right away on crits. I will ignore the BALOR01 for the moment.

Helmet maybe? Critical Hit protection also blocks extra effects from opcode 341. Because Balor's are clearly wearing them and not just given undeserved immunities to make them arbitrarily harder.

 

 

yes that balor has helmet. I did not know "protection from crits" would also protect from this opcode. then this opcode is useless against almost half of the enemies. .. and I spent 2 days just trying to implement this :(

 

there are some balors out there without helm and also many demons do not have helmets. I need a test run to see how useful this weapon will be.

 

cheers



#9 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6557 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 07 February 2018 - 09:02 PM

Then get rid of the helm from the monsters .cre... problem solved.


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#10 subtledoctor

subtledoctor
  • Modders
  • 2445 posts
  • Gender:Male

Posted 08 February 2018 - 07:15 AM

why not just give it a 5% chance...? Functionally similar.

- Give a -20 penalty to crit chance with the weapon
- Give a 5% chance of triggering several effects:
-- screen shake
-- extra damage
-- instakill fiends

That's not exactly the same - it won't reflect other bonuses to your crit chance - but you can retcon that in the item description.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#11 eugene

eugene
  • Members
  • 37 posts

Posted 09 February 2018 - 05:53 AM

I prefer to use Critical hit effect instead of a fixed percentage. it gives another reason to invest in weapon styles (2handed and single) and use those rare items that improve critical hit chance. I see the increased percentage as a result of the investment on your character.

 

if we think about vanilla gear, probably effects are same but there are a lot of custom items I have seen that provide critical hit chance (which I also did in my mod). it gives a fancy description to your weapon and provide variance to the currently implemented gear pool because such an effect is rare at a gear (even it is considered useless in most cases).



#12 subtledoctor

subtledoctor
  • Modders
  • 2445 posts
  • Gender:Male

Posted 09 February 2018 - 07:32 AM

Yeah but it comes down to pick your poison. You could remove crit immunity from a bunch of critters, but then you're making a pretty massive game-wide change that players might not want.

This is probably why most of the existing vorpal/instakill weapons don't use crit effects, but just a straight percentage.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#13 eugene

eugene
  • Members
  • 37 posts

Posted 10 February 2018 - 12:12 AM

This is probably why most of the existing vorpal/instakill weapons don't use crit effects, but just a straight percentage.

 

could it be the reason the revisions on vorpal weapons and immunities against them were implemented way before EE games and introduction of opcode 341? perhaps original author of these revisions would use opcode 341 if it was available at that time, who knows.

 

I am not into making a massive game change unless everything works fine and if engine does not support all scenarios then why should I try even and fix such issues.

 

another disadvantage of fixed percentage on hit stuff is the "real" percentage of effects triggering. if a character's hit percentage is ridiculously low (lets say on 18-20 hits target) then the real percentage of vorpal hit is way too lower than %5 actually where as critical hit is always %5 (or even higher with other effects). yes, helms prevent it but it is the limitation of the engine. I believe the engine missed a very good chance of design decision here. if helms did not protect against 341 then the engine would align more with v3 DnD versions.

 

I just checked some random oozes and undead in game and they are open to critical hits (and did a backstab to an undead as well) but our helm wearing character is immune to critical hits :) this is against DnD rules in core. I dont think it is allowed in 2nd version but I may be wrong on this, it was decades since I played that version.

 

maybe my efforts are towards the change the game to similar to v3 (which I find it more fun and logical) but anyway the engine has limitations and I am fine with it unless there is a way to do stuff properly even with workarounds.



#14 subtledoctor

subtledoctor
  • Modders
  • 2445 posts
  • Gender:Male

Posted 10 February 2018 - 09:54 AM

I didn't say it was a panacea, I said "pick your poison" :( Seems to me the options are:

1) Make it a crit effect and deal with it not working against some few random creatures who have helmets or crit immunity

2) Make it a crit effect and change the helmet/crit immunity of a bunch of creatures, and deal with the much wider range of consequences separate from your mod (there may be some interaction between this and IR's "revised criticals")

3) Make it a % effect

EDIT

4) Something else I haven't thought of

Edited by subtledoctor, 10 February 2018 - 03:14 PM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#15 Avenger

Avenger
  • Modders
  • 3789 posts
  • Gender:Male
  • Location:Hungary

Posted 11 February 2018 - 02:18 AM

If you don't like that helmets give critical hit protection, mark them to not give it.

If you want to give oozes critical hit protection, mark their ring or other armor to give critical protection.

 

In EE it is very easy to flip the critical protection flag in items.

 

"if helms did not protect against 341 then the engine would align more with v3 DnD versions."

 

That's not really a point, because this engine was supposed to align more with v2. 

There are features that allow some v3 rules to be brought in, but the main goal wasn't v3.


Edited by Avenger, 11 February 2018 - 02:21 AM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users