Help - Search - Members - Calendar
Full Version: Northlander's War Axe
The Black Wyrm's Lair - Forums > Mod development resources & discussion > Modder's Workshop
EiriktheSkald
We were discussing a technique with a light axe... hooking the axe over the opponent's shield and pulling it out of position, a nicely effective trick. Effect #264 - Drop Weapons in Panic (Example: gauntlets of fumbling) causes the target to drop all weapons it is holding. If it's a weapon-wielding humanoid, it's largely disabled by this. I would like to cause the target to either drop its shield or suffer a penalty in armor class on a successful hit (5-10% chance). Can this be done? What would be required to cause the target to drop its shield?

Edit:] This script might work:

IF
HasItem("SHLD01",NearestEnemyOf())
THEN
RESPONSE #100
DropItem("SHLD01",NearestEnemyOf())
END

But I'm not sure how to implement it into the item.
Rabain
If might be an idea to come up with some other effect because the poor non-joinable npc's can't pick up their shields etc again once dropped.

Actually looking at the description of Effect 264 you cannot make it drop a shield as shields are always in the left hand (offhand):

Known values for 'Type' are:
0 Drop random equipment
1 Drop a quickslot item (won't drop the left-hand weapon).

So you can make it drop a weapon (not necessarily the equipped weapon either) or some random item. Doing it by script would require you to write a hefty block accounting for all shields in the game. It would not cover mod added shields though unless you were to trawl through every mod that adds new shields to enemies.

I'd look for another effect were I you! smile.gif

EiriktheSkald
I found some tutorials that may help:

Non-Lethal Combat
Complicated Item Creation

Not easy, but I think it can be done. [Edit:] Another idea is this:

258 FillSlot(I:Slot*SLOTS)
This action will attempt to fill a slot in a character's inventory with the appropriate item type. Using FillSlot(SLOT_WEAPON) will look for any items (let's use, SW1H01, for example) in the inventory, and move the first it comes across into the weapon slot. This is a dangerous function because it will not check whether or not an item already exists in the slot. This means that an item already in the slot would be destroyed.

Although if the creature had a nice magical shield, that would be a bummer.
Rabain
How about just lowering the targets resistance to slashing weapons. That way if you are using only an axe or an axe and sword you will get some benefit from using the axe.

This would somewhat simulate the inability of the enemy to defend against the next attack due to the axe.
EiriktheSkald
If I set up the following item effect like so:

Type = THAC0 vs Type Bonus
Targettype = TargetSelf
Power = 1 (+1 to bonus?)
IDS Target = General/Shield
Duration = Instant/Limited
Dispel/Resistance = No Dispel/Bypass Resistance
Time = (what is equivalent of 1 round?)
Probability 1 = 5
Probability 2 = 0

Does this mean the one wielding the axe will gain a +1 THAC0 bonus against creatures holding a shield, 5% of the time?
Rabain
I don't think you can use the IDS target in this sense. The General.ids relates to a setting in the cre file. This isn't changed by wearing a shield.

I've looked at some creatures using NI that carry shields and their General setting is Humanoid. In fact I couldn't find a cre that used anything other than Humanoid, Monster, Giant-humanoid or Undead from general.ids. This means that even if your item was working it would never get a chance to as there are no creatures in the game generally classed as shield.

This is the description for the thaco modifier opcode in DLTCEP: Applies the modifier value specified by the 'Statistic Modifier' field in the style specified by the 'Type' field.

Known values for 'Type' are:
0 Cumulative Modifier -> THAC0 = THAC0 + 'Statistic Modifier' value
1 Flat Value Modifier -> THAC0 = 'Statistic Modifier' value
2 Percentage Modifier -> THAC0 = (THAC0 * 'Statistic Modifier' value) / 100

You don't need to use the Power field.

I don't think you'll be able to do what you want to do without a script.
EiriktheSkald
The axe is for an NPC mod I'm working on. It's basically a viking's battle axe. I'm told the the way to do this is like so:

The axe calls the .eff with its new effect, using opcode 177 and a 5% chance.

The .eff does opcode 67 (summon creature) on your target, summoning the creature you've made.

The creature (which is invisible) runs the script you've made and destroys itself.

One possible script would simulate hooking the axe around the target's ankle, thus:

CODE
IF
True()
THEN
RESPONSE #100
ActionOverride(LastSummonerOf(Myself),PlayDead(75))  // target is tripped for 5 secs or whatever
END


This is measured in AI updates. There are 15 AI updates per second. What's a reasonable amount of time for the target to get back on its feet again?

Alternatively, a script to check for target's shield might look like this:

CODE
IF
OR(3)
HasItemEquiped("SHLD01",LastSummonerOf(Myself))
HasItemEquiped("SHLD02",LastSummonerOf(Myself))
HasItemEquiped("SHLD03",LastSummonerOf(Myself))
etc.
THEN
RESPONSE #100

END


But I can find no action to remove target's shield.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.