Skip to content

Custom Weapon With NI?

Could someone by chance walk me through making a custom weapon mod with NI? I want to have it carry through the entire saga (including SOD), with my character.

Comments

  • jmerryjmerry Member Posts: 3,881
    Step 0: What do you want your weapon to do? Obviously, you need to know what you're aiming for.

    Step 1: Copy an existing weapon that has many of the same characteristics as your objective - find it in the list of items, right-click, select "Add copy of" from the contextual menu, choose your new filename (not the same as any existing item). The less we have to change, the easier it'll be.

    Step 2: NI automatically navigates to the newly created item. Now we can edit it. Go to the "Edit" tab, and start running through the things you want to change. Flags like "magical", "silver", "two-handed" and the like? Minimum stat requirements? What proficiency it uses? Price in stores? Enchantment level? The basic list of stats has lots of stuff, but we haven't come to the attack itself and the equip effects.

    Step 3: The attack ability. Probably the most important thing a weapon does. This is the item ability, of type "melee", "ranged", or "launcher". Melee attacks have the "melee" type, ranged attacks that use arrows, bolts, or bullets have the "launcher" type, and other ranged attacks that don't use that ammo have the "ranged" type. Some weapons, like throwing axes, may have more than one ability here. This ability has fields like "dice size" and "# dice thrown" and "damage bonus" and "bonus to hit" and "damage type", among others. Finally, after all those fields, there are the on-hit effects. The weapon I copied as an example testing this was Kondar, so that's the bonus damage against lycanthropes and doppelgangers in this case (opcode 177 effects, referring to external EFF files).

    Step 4: Magical abilities. Some weapons have additional abilities beyond just attacking, usually activated through the "use items" button. Those are item abilities of the type "magical", and the core of what they do is usually in the effects at the end. Though you can't ignore the header, with information like how it targets and what projectile it uses.

    Step 5: Equip effects. These effects come after the item abilities. They should, in virtually all cases, have timing mode 2 (while equipped). In my example of Kondar, there are a bunch of these - some cosmetic effects to set the weapon's colors, the bonuses to enchantment level against lycanthropes and doppelgangers (opcode 344), and the bonuses to hit against lycanthropes and doppelgangers (opcode 177, referring to different EFFs than the melee ability).

    Step 6: Cosmetics. Want new icons for the weapon in the inventory, on the ground, and in its description? Those are BAM files. Near Infinity may be able to convert pictures into the BAM format, but I don't know the process. And it sure isn't an art program on its own for creating those pictures in the first place.
    Want a custom name and description? That requires adding text to the game, something I'm absolutely unwilling to do in NI. As soon as that becomes a part of things, I move shop and make it a proper WeiDU mod.

    Step 7: Adding your item to the game world. You could just use the cheat/debug console to create it, but why not put it somewhere for your character to find? A container in an area somewhere (ARE file, container substructure, add your item)? A store (STO file, add yours to the list of items for sale)? A creature you're going to kill (CRE file, add yours to the list of items, assign a slot that new item's number so it's actually present)?
    A creature that gives it to you through dialogue? That, I'd start coding in WeiDU.

    Step 8: Both games. You're going to lose the item in the transition from BG1 to BG2 when your equipment gets taken away. And they're separate games with separate files. Whichever game you started with above, repeat for the other. Your item file needs to be there in both games, and it needs to be placed in both campaigns.
Sign In or Register to comment.