Jump to content

Bonuses when using specific weapons?


Guest Guest

Recommended Posts

Hi all

 

I'm fairly new at this (I've flailed around with NearInfinity and WeiDu quite a bit, but I've only just started actively trying to create stuff), and I have a question:

 

I am trying to create a kit that, among other things, gets an AC bonus when using longswords. This has proven quite difficult. Anybody have any ideas?

 

 

Here's what I've tried:

 

Effect #183 (0xb7) Apply Effect Itemtype

Apparently, nobody has ever seen this work. I didn't see it work, either.

 

Effect #72 (0x48) IDS: Set IDS State

I tried to give the kit some sort of unique IDS value, and then add a "Use EFF" effect to the sword .itm files, but couldn't get it to work properly. Maybe somebody who knows more about this effect has ideas.

 

Scripting: Much pain and suffering culminated in this sort-of solution

I added a script to the kit that goes something like this:

 

IF
HasItemEquipedReal("SW1H04",Myself) // Long Sword
Global("HASSWORD","LOCALS",0)
THEN
RESPONSE #100
	ApplySpellRES("SWBONUS.SPL",Myself)
	SetGlobal("HASSWORD","LOCALS",1)
END

This successfully gives me the bonus when I equip the sword, but the bonus won't go away when I de-equip it. The best I could come up with was to give the SWBONUS spell a very short duration (1), and then set a timer to keep recasting the spell as long as the sword was equipped. Unfortunately, I couldn't get the timer to sync up with the spell duration, so that the effects fluctuate--at times the bonus isn't applied at all, at others it's applied multiple times.

 

This led me to some specific scripting questions:

Is there a way to undo/remove the ApplySpellRES? I considered having another spell applied when the sword is unequipped that applied a penalty to counter the bonus, but I worry that that might result in a lot of effects piling up, which might be bad (?).

 

Is there a way to apply an AC bonus directly via the script? It doesn't look like there is, but maybe I missed something.

 

Thanks

Link to comment

Nevermind, I've got it.

Effect #72 (0x48) IDS: Set IDS State

I tried to give the kit some sort of unique IDS value, and then add a "Use EFF" effect to the sword .itm files, but couldn't get it to work properly. Maybe somebody who knows more about this effect has ideas.

I used a script to give it a unique SPECIFIC.IDS value. That worked where Effect #72 didn't.

Link to comment

ApplyEffectItemType and related effects don't work.

We know (guess) their name and supposed functions only from scraps of documentation and debug info left in the game distributions.

 

What's even more frustrating is that they DO something, they are not completely empty code.

 

The IDS value change should work from spell.

As this is a kit, you need an AP_<spell> in the clab file.

And a permanent ids change with #72.

This should be safer than scripting it.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...