Author Topic: NPC Weapons  (Read 2062 times)

Offline Wounded_Lion

  • Planewalker
  • *****
  • Posts: 208
  • Gender: Male
  • Dungeon Dweller
NPC Weapons
« on: November 24, 2004, 11:38:33 AM »
I was wondering how the game designers restricted NPC-only weapons to the owners of those weapons (i.e. - how is Yoshimo's Katana restricted to use by his character?).  There appear to be no additional usuability flags under the item files of these weapons.  Does this have something to do with scripts?  If so, could you provide me with or point me to a decent scripting tutorial that relates to the above type of thing?  Thanks to any who can provide help.

a Wounded Lion

Offline Andyr

  • Dance Commander
  • PPG
  • Planewalker
  • *****
  • Posts: 3178
  • Gender: Male
    • The Gibberlings Three IE mod community
Re: NPC Weapons
« Reply #1 on: November 24, 2004, 11:40:10 AM »
The best way is to make an item with stat, race, class, kit and alignment requirements which match that of your NPC; this way although they're not truly unique they are pretty close to it.
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

<jcompton> Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

I am unfortunately not often about these days so the best way to get hold of me is via email.

Offline Wounded_Lion

  • Planewalker
  • *****
  • Posts: 208
  • Gender: Male
  • Dungeon Dweller
Re: NPC Weapons
« Reply #2 on: November 24, 2004, 11:48:00 AM »
Ah, simple but effective enough.  Thank you

Offline Zyraen

  • Planewalker
  • *****
  • Posts: 279
Re: NPC Weapons
« Reply #3 on: November 29, 2004, 10:21:58 AM »
I'm new here, been poking about with stuff here and there, lol, after having run across the Tutorial on NPC Creation.

Not sure if my experience at item creation counts for much, since basically I'm just poking around NI on my own, but anyway...

Using a Paladin with all Stats 18 and trying to put on Firecam Armor, I pretty much verified that yes, for BG2 you can only set the general requirements as opposed to making it NPC specific. However there are a few other ways to achieve a person specific item, and probably I'll have to refer to some Mods here, lol.

One way is to make it unremovable, a pretty reasonable consideration with most character weapons. You can make it stick to their weapon slot and can't be removed. Then the item requirements are moot.

Do however make sure you don't check the Unsellable flag for the item, otherwise when the character is kicked from the party using Reform Party the item will be "given" to the main character, to permanently take up an equipment slot there (at least till you use Shadow Keeper etc to fix it).

Other thing to do, I think is to try Chloe's code. I haven't had time to look this over, but basically Chloe's script prevents you from dropping her swords onto the ground. I'm not sure if they are unusable to others simply because they have scripted minimum Dex value of 25 or something, though, haven't had time to check.

The other note also is that you can, using Abilities, create more than 1 ability for an item. This is useful if you want 2 specific item functions for a character, and you want to glue it to their hand, but if you glue it to all their free weapon slots the player will probably find them messed up. I haven't experimented thoroughly but it probably looks as if each item has only max 3 battle abilities (more than enough, I think). Limitations are that it will only show as a single animation on your character screen, and on your paper doll, and you cannot split proficiencies for such "dual" items. See Azuredge among other items, on such item creation.
« Last Edit: November 30, 2004, 02:37:27 AM by Zyraen »
(http://www.geocities.com/arkevaul/btlbn2.gif)
SoA Release - Love between a Law Enforcer and a Fugitive - can such a thing even happen?

Zyraen's Miscellaneous Mods - Ust Natha Accelerator, item tweaks, & more

Offline Wounded_Lion

  • Planewalker
  • *****
  • Posts: 208
  • Gender: Male
  • Dungeon Dweller
Re: NPC Weapons
« Reply #4 on: November 29, 2004, 06:01:11 PM »
I had already thought of some of these methods... but a few are new ideas.  Thank you for your adivce.  I'm still poking with my NPC anyway, and it'll be a looong time before any kind of public release, but I'll keep these things in mind.

a W.L.

Offline Zyraen

  • Planewalker
  • *****
  • Posts: 279
Re: NPC Weapons
« Reply #5 on: November 30, 2004, 03:29:26 AM »
BTW looking over my efforts (Agh I still can't get my dagger-katana to backstab!) here's a few little bits to achieve a few little things, such as creating powerful weapons for your NPCs but seeing that they are not overpowered at a certain point of the game

Here's a direct line of code taken from Chloe's Diag.
TakeItemReplace("CHLOSW2","CHLOSW1","Chloe")
TakeItemReplace("CHLOSW5","CHLOSW4","Chloe")

I'm sure you can figure out to make good use of this, lol, at various stages of the game just run scripts to upgrade your NPC's weapon. Useful for keeping those undroppable items in line with the game, I think.

Other note for NPC weapons is that you can actually create effects to bite yourself. This can be interesting, as I found out that I can use a Bow (I derived from Teleomortis +4) to allow the Archer character I was doing to cast Breach, Dispel and Pierce Magic on the Target as she fired every shot. That was a trial run, and I tested on Kangaxx Lich Form with great success. The truth of the matter though, is that such is probably greatly unbalancing, so to balance it off, you can use an additional effect of damage on your own character, ie with every shot the NPC actually loses HP.

From here the task to create interesting unique NPCs might actually be lessened ;) Just give them a powerful weapon with a powerful drawback, and you've all but created your own unique kit, lol. There are a variety of effects I haven't tried out yet, one of them probably will be a "Binding" Effect where I Stun someone with my NPC, but in return my NPC can't do anything else as well. Kinda like the Wood Elf Wardancers in Warhammer tying up a Bloodthirster. If someone figures out how to do this, do post here, I'm quite curious, though probably I think it will be an ability effect.
(http://www.geocities.com/arkevaul/btlbn2.gif)
SoA Release - Love between a Law Enforcer and a Fugitive - can such a thing even happen?

Zyraen's Miscellaneous Mods - Ust Natha Accelerator, item tweaks, & more

Offline Kish

  • HEROISM OK
  • Planewalker
  • *****
  • Posts: 790
    • Oversight mod.
Re: NPC Weapons
« Reply #6 on: November 30, 2004, 03:40:13 AM »
A melee weapon which can be used by a single-class thief without Use Any Item can be used for backstab.  I'm not sure where a missile weapon component fits in--that may well also prevent the weapon from being used for backstab.  However, first, I'd say you should check and make sure you weapon is flagged as usable by thieves.
Beauty standing amidst fiery destruction.

Offline Zyraen

  • Planewalker
  • *****
  • Posts: 279
Re: NPC Weapons
« Reply #7 on: November 30, 2004, 03:43:16 AM »
Ah  that could be it! :) I'll get right down to that.

I created my NPC with UAI right from the start, so I blacked all the classes. Later on I figured out the item sticky, and more importantly, the Item Replace function, since I intend to up my items power in the game. Probably allowing Thieves would do it
(http://www.geocities.com/arkevaul/btlbn2.gif)
SoA Release - Love between a Law Enforcer and a Fugitive - can such a thing even happen?

Zyraen's Miscellaneous Mods - Ust Natha Accelerator, item tweaks, & more

Offline Zyraen

  • Planewalker
  • *****
  • Posts: 279
Re: NPC Weapons
« Reply #8 on: December 05, 2004, 11:28:01 AM »
Btw, I'm not sure if this will work, but I believe that there is a section called "Strength Bonus Required" in the Item section for NI, and if you set that to a value say 103, which is not attainable in game levels, I think it should prevent the Item from being used by anyone without UAI.

I'm also not sure also if you your NPC has strength 17, if you add a bonus of 103, to the person, will the NPC function as a Str 18/103 character or as a Str 17 Char. My hazard is that the NPC would function as a Str 17 char and yet be able to use the item ;) But I could be wrong.. just thoughts all around. I may try this out myself and post up if it works.
(http://www.geocities.com/arkevaul/btlbn2.gif)
SoA Release - Love between a Law Enforcer and a Fugitive - can such a thing even happen?

Zyraen's Miscellaneous Mods - Ust Natha Accelerator, item tweaks, & more

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: NPC Weapons
« Reply #9 on: December 05, 2004, 04:33:38 PM »
That's a very interesting theory.  I'll test it right now, actually.
Earn Money Sleeping.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: