Jump to content


Photo

Is it possible to make weapon ability to target drow?


  • Please log in to reply
17 replies to this topic

#1 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 29 April 2017 - 02:12 PM

"Has 5% chance to slay drow hit by it", what could be simpler, eh? I wish...

While trying to implement it I've learned that targets for effects attached to the weapon are drawn from a certain ids files. Sadly, race.ids doesn't have drow (the hell, it even has duergar and 4 different kinds of wolves!), neither does class.ids, so I'm stuck. Any advice would be appreciated.

 

Should I try to target weapon effect on 2 conditions: race = elf and alignment = mask_evil (iirc that is any evil)? Is it ever possible to make effect happen based on 2 conditions?

 

Should I append "drow" to race.ids and then change race for all cre having "drow" in its name? Is race.ids extendable at all?

 

Is this possible to attain via some custom .eff? BTW what the hell are these .eff's, is there any tutorial/explanation on them and how to mod them?


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#2 -maximus-

-maximus-
  • Guest

Posted 29 April 2017 - 05:25 PM

There was an axe with protection from drow (they can't see you, like protection from undead).  It was in the mod that added that adventurer group to the dungeon under spellhold.  Unfortunately, moongaze? the modder I think it was, updated the mod and removed that feature of the axe.  Too bad you could have checked with dltcep the ids.  IIRC there was no drow ids like you said, try elf ids and see if it works.  Or elf and evil ids.  I'm not a modder though....



#3 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 30 April 2017 - 12:39 AM

Thanks maximus, any chance you remember the name of the mod? I keep a junkyard of old versions just for the cases like this :)


Edited by Creepin, 30 April 2017 - 12:40 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#4 psychlopes

psychlopes
  • Member
  • 83 posts

Posted 30 April 2017 - 07:57 AM

I think it was improved asylum by rastor not moongaze. unfortunately I only have the latest version.



#5 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 30 April 2017 - 08:32 AM

Should I try to target weapon effect on 2 conditions: race = elf and alignment = mask_evil (iirc that is any evil)? Is it ever possible to make effect happen based on 2 conditions?

Nest two 177 opcodes, first one e.g. looking for elves, the child EFF targeting mask_evil. Obviously, it may affect non-drows as well, though.

 

Should I append "drow" to race.ids and then change race for all cre having "drow" in its name? Is race.ids extendable at all?

Changing the race will affect existing elf-specific effects that currently work on drow.

 

For EEs, you can assign drows a custom spellstate (328) and target it with 326.


Retired from modding.


#6 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 30 April 2017 - 09:20 AM

Nesting 2 #177 opcodes works fine: my incoming paladin kit targets only evil dragons, a few spells have different effects on evil and chaotic specific creatures.


Edited by Gwendolyne, 30 April 2017 - 09:22 AM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#7 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 30 April 2017 - 02:14 PM

Can you attach a script to drow CREs that checks if it was hit by that ITM?  Could run at the top of the script.



#8 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 30 April 2017 - 03:00 PM

Can you attach a script to drow CREs that checks if it was hit by that ITM?  Could run at the top of the script.
One could... but that would likely interrupt everything, and by that I mean EVERYTHING, castin.. of away with it, attacking, yeah, we ain't doing that either. Ouh and just so it's fun, let's not even check if we are dead... for funs.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#9 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 30 April 2017 - 07:24 PM

Yeah, bad idea.



#10 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 01 May 2017 - 08:10 AM

I think it was improved asylum by rastor not moongaze. unfortunately I only have the latest version.

Thanks a lot! I have Improved Asylum versions of 2005, 2009 & 2011, hope one of them is old enough :)

Nest two 177 opcodes, first one e.g. looking for elves, the child EFF targeting mask_evil. Obviously, it may affect non-drows as well, though.

Thanks, I see now having weapon ability trigger on elves and call 177 which trigger on evil should work. However this is a bit dirty, because evil elves (like thugs, assassins) will be susceptible as well, even vanilla has some, not to mention mods. I'll keep this way as a last resort measure for now.

Changing the race will affect existing elf-specific effects that currently work on drow.

That much is true, and this is of course unacceptable. I've been thinking of tamper with much less used Specifics.ids fields to tag drow, and let the effect to recognize this tag. This is a lot better than Race.ids, but still not perfect. I can tag drow with Extra Proficiency 19 for example, but will eff be able to read this tag? Actually, the most important question by now is if .eff could read any tags other than these 7 .ids files? Could something bound to an item happen based on target's Animation assigned (this one would be super!), State, something from Detectable Spells, anything?


Edited by Creepin, 01 May 2017 - 12:08 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#11 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 01 May 2017 - 01:31 PM

Actually, the most important question by now is if .eff could read any tags other than these 7 .ids files? Could something bound to an item happen based on target's Animation assigned (this one would be super!), State, something from Detectable Spells, anything?

Only with opcodes 326/328 in EE v2.0+, it lets you target states and stats. No way in vanilla.

 

If you're comfortable with patching a manually composed list of CRE files, you can utilize 146/206.

 

spellA has two 146s - spellB and spellC

spellB has 206 against spellC

spellC delivers whatever the effect you want to target drows

 

By default, whenever A lands, B will block C and nothing will happen. Now, you can 206 drow CREs against B, in which case C will not be blocked and affect them normally.

 

PS If it's a weapon ability, you don't even need A, just 146 B and C directly.

 

 

I've been thinking of tamper with much less used Specifics.ids fields

Specifics are used by AI scripts, namely InMyGroup() trigger. It's not widely used in vanilla indeed, but in SoD about half the actors have custom specifics.


Edited by GeN1e, 01 May 2017 - 01:38 PM.

Retired from modding.


#12 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 01 May 2017 - 02:28 PM

Thank you for your help GeN1e, your information is of great help :)
 
EE is out of my scope so no 326/328 for me. On the bright side, I don't have to worry about SoD at all so specifics.ids is still an option to consider. As I understand, InMyGroup returns true for creatures of the same specifics, so the only problem could arise (please correct me if I'm wrong) if there's case where, at the same time, drow and non-drow i) have the same specifics, ii) are in the same location, and iii) are supposed to fight in unison. Not too likely case according to a brief assessment of vanilla, but with mods in the picture I could kill something. So, unless I'll found some determination to check BWS maximum install for the cases where drow might be involved in use of InMyGroup, I had to drop the idea. I'm aslo worried specifics might be used by BPScripts or SCS.
 
As for your A-B-C spell scheme, it's great, but I'm not that confident I should drag thousands of cre's to override for such minuscule cause, and what of the mods that will be installed after mine? I'll try to adapt your idea the way where I had to modify only drow, and if it won't be possible I guess I'll just have to bury this drow thing at all or return to that "evil elf" substitution.

Edited by Creepin, 02 May 2017 - 12:25 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#13 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 02 May 2017 - 05:38 AM

you can utilize 146/206

Waaait a second! I've re-read your idea after a good night sleep and it seems I misunderstood it's elegance. You say I could create a weapon with a custom vorpal effect and a blocking effect, and then I should block drow from receiving that blocking effect. I just realized that this will not require modifying any creatures other than drow, and thus fully conforms to my original design specification! Woohoo, that's damn cool! GeN1e, you're genious!

Now, you can 206 drow CREs against B

Now, what would you advise as a least damaging compatibility-wise method of applying that block to drow? Should I place a topmost block to drow override script (with the use of (continue) so as not to break anything), or should I give drow an invisible undroppable item? I'm afraid some later installed script could break the former, while on the other hand the latter might look awkward in case of any party joinable drow and could mess with a fully equipped drow since I had to have an open slot to drop my item to. Out of these two evils I think I'd rather take a risk with the script. Or may be there's some obvious long-established third way I'm overlooking?


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#14 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 02 May 2017 - 06:57 AM

Now, what would you advise as a least damaging compatibility-wise method of applying that block to drow?

 

Something like this, I guess

 

ACTION_FOR_EACH drow IN drowcre1 drowcre2 etc BEGIN // list of drow CREs
  ACTION_IF FILE_EXISTS_IN_GAME ~%drow%.cre~ BEGIN
    COPY_EXISTING ~%drow%.cre~ override
      LPF ADD_CRE_EFFECT INT_VAR opcode=206 STR_VAR resource=spellB END // may need to set timing/duration as well, don't remember
  END
END

Retired from modding.


#15 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 02 May 2017 - 07:11 AM

Ahh, perfect, thanks again! :Bow:


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#16 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 02 May 2017 - 09:11 AM

You can also scope all the creature files and check if their animation field (0x28) is 32551 (0x7f27 drow) or 32553 (0x7f29 drow_female).


Edited by Gwendolyne, 02 May 2017 - 09:30 AM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#17 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 02 May 2017 - 09:18 AM

You can zldo scope all the creature files and check if their animation field (0x28) is 32551 (0x7f27 drow) or 32553 (0x7f29 drow_female).

Yep, this was exactly my plan, this way it could cover mod drow too :) Though I was going to check underdark to make sure there's no exceptions...


Edited by Creepin, 02 May 2017 - 09:18 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#18 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 05 May 2017 - 02:41 PM

Dumb question removed, sorry for the mess :)


Edited by Creepin, 05 May 2017 - 02:55 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)