Jump to content

New Modder; Some Questions


Reddbane

Recommended Posts

I want to start modding the EE games but I'm sort of lost. I do have some modding experience, though mainly with Eu4 and more modern (more user friendly) systems, so its a little hard to get into a very archaic system, even if it has been updated a little by Beamdog. I've started checking the links in the tutorial threads here and SHS, though it seems some of the links are dead, but I'm sort of feeling swamped by the information. Is there any other resources and sites experienced modders would recommend for a newcomer to begin with trying to learn about using Near Infinity and Weidu.
To start with I do know how to use Near Infinity, somewhat, as I've been able to mod things like the the Thac0 tables; although trying to find what particular files do what can be a crap shoot for a newcomer. I have checked IESDP, but I'm still rather lost, not to mention not having a clue about how to mod weidu.

 

I want start with simple things, like altering Rangers to be a little closer to P&P. To do this I plan to add a starting ability at the first level that removes the minimum 2 to-hit penalty to offhand weapons. This I can do. However, I also need to make it so that a Ranger starts with 3 pips in two handed weapons rather than merely 2, but I can't find the file that determines automatically gained weapon proficiencies.
Also, is there any way using weidu to change the usability of an entire group of items, say (purely hypothetically) make it so all items in the category "6" (Bracers and Gauntlets) are flagged unusable by Kit: Inquistor, or conversely make all category "6" items flagged usable by Kit: Kensai. (I'm planning on later altering the item restrictions on the Kensai to be more in line with P&P.)
Thanks for your time.
Link to comment

Also, is there any way using weidu to change the usability of an entire group of items, say (purely hypothetically) make it so all items in the category "6" (Bracers and Gauntlets) are flagged unusable by Kit: Inquistor, or conversely make all category "6" items flagged usable by Kit: Kensai. (I'm planning on later altering the item restrictions on the Kensai to be more in line with P&P.)

If a weidu mods does that then yes, and here one, Item Revision, code example... using that and not caring about the item sedcription you can do both simply by:

//weidumods begining 
BACKUP ~modnamefolder/backup~
AUTHOR ~Reddbane~
BEGIN ~Component name~ DESIGNATED 1

//the actual code

ACTION_DEFINE_ARRAY bracers BEGIN
  ~AGBRAC01~  // Bracelet of Wisdom (Aurora's Shoes and Boots)
  ~ARBRAC~    // Bracers of Defense AC 2 (Region of Terror)
  ~BRAC01~    // Bracers of Defense AC 8
  ~BRAC02~    // Bracers of Defense AC 7
  ~BRAC03~    // Bracers of Defense AC 6
  ~BRAC05~    // Bracers
  ~BRAC12~    // Bracers
  ~BRAC13~    // Bracers of Defense AC 5
  ~BRAC14~    // Bracers of Defense AC 4
  ~BRAC15~    // Bracers of Defense AC 3
  ~BRAC16~    // Bracers of the Blinding Strike
  ~BRAC17~    // Gloves of the Burglar
  ~BRAC18~    // Gloves of Missile Snaring
  ~BRAC22~    // Paladin's Bracers
  ~BRAC23~    // Blessed Bracers
  ~BRAC24~    // Bard's Gloves
  ~BRAC25~    // Wondrous Gloves
  ~BRAC26~    // Bands of Focus
  ~BRAC74~    // Gloves of ? (KWolf)
  ~BRACWC~    // Bracers of the Wizard Champion (Region of Terror)
  ~C2BRAC01~  // Gloves of the Master Thief (Item Upgrade: Shadows Of Amn Item Upgrades)
  ~CBBRACRV~  // Bracers of Revelation
  ~CBILMATA~  // Holy Bonds of Ilmater (Check the Bodies)
  ~CBXTLTCC~  // Blessed Bracers of Lathander (Check the Bodies)
  ~CMTUBR02~  // Mage Gloves (The Undying)
  ~CMTUBR03~  // Fighter's Bracers (The Undying)
  ~DEITM102~  // Kandalmar's Bracers (Reign of Virtue (ToB))
  ~DRAGBRCX~  // Silver Dragon Bracers
  ~DSBRAC01~  // Otrad Atwah: 'Gloves of the Magi' (DSotSC)
  ~DSBRAC02~  // Gift of the Woods (DSotSC)
  ~DSBRAC03~  // Mage's Bracers (DSotSC)
  ~DSDRGSKN~  // Dragon Skin Bracers (DSotSC)
  ~ENTERISB~  // Kohrim's Bracers (Region of Terror)
  ~ESLIBRA0~  // Veteran Pickpocketer's Gloves
  ~FWBRAC01~  // Bracers of Infinite Daggers +3 (Revised Forgotten Wars Projects: Item Pack)
  ~FWBRAC02~  // Bracers of Infinite Daggers +5 (Revised Forgotten Wars Projects: Item Pack)
  ~FWBRAC03~  // Bracers of the Summoner (Revised Forgotten Wars Projects: Item Pack)
  ~FWBRAC05~  // Bracers of the Sage (Revised Forgotten Wars Projects: Item Pack)
  ~FWBRAC06~  // Gloves of Spell Speed (Revised Forgotten Wars Projects: Item Pack)
  ~KEDL~      // Silver Bracers of Kedl (Tortured Souls)
  ~M#GFEAT~   // Gloves of Feather Touch (Amber)
  ~MAU011~    // The Warrior's Arm
  ~NEWBR01~   // Bracers of Yuan-Ti (Region of Terror)
  ~NTBRAC01~  // Gloves of Master Thievery (NTotSC)
  ~O!BOM024~  // Laiwethel's Gloves of Extraordinary Arcane Skills (Boards of Magick item pack!)
  ~O!BOM026~  // Colthrun's Blinding Gloves (Boards of Magick item pack!)
  ~O!TALI09~  // Laiwethel's Gloves of Extraordinary Arcane Skills (Boards of Magick item pack!)
  ~O#DCBRA1~  // Bracers of Defense AC +2 (Dungeon Crawl)
  ~PITGLOVZ~  // Pit Gloves
  ~PSBRAC01~  // Gloves of Spell Weaving (PlanarSphereMod)
  ~QUAG~      // Gloves of Detection
  ~RTT011~    // Bracers of Dexterity (RTT Item Pack)
  ~RTT012~    // King Strohm's Bracers (RTT Item Pack)
  ~RTT018~    // Bracers of the Mephit (RTT Item Pack)
  ~RTT028~    // Gloves of Strength (RTT Item Pack)
  ~S#BRAC03~  // Improved Gloves of Healing
  ~SGBRAC01~  // Archmage's gloves (Munchmod)
  ~SGBRAC03~  // Quicksilver bracers (Munchmod)
  ~TSJBRAC~   // Tsujatha's bridal bracelet.
  ~TZBRAC01~  // Bracers of Genius
  ~TZBRAC02~  // Magnet Bracers
  ~U#BRAC01~  // Mits of Shaiman (Ruad Ro'fhessa (ToB))
  ~U#BRAC02~  // Fluent Fingers (Ruad Ro'fhessa (SoA))
  ~UBGLOVE1~  // Gloves of Pick Pocketing (BG1UB: Shilo Chen and the Ogre-Magi)
  
  ~ohbbrac1~  // Enforcer Bracers
END


//////////////////////////////////////////////
//  patching

ACTION_PHP_EACH bracers AS i => bracer BEGIN
  ACTION_IF (FILE_EXISTS_IN_GAME ~%bracer%.itm~) BEGIN
    COPY_EXISTING ~%bracer%.itm~ override
      PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
        // make usable by kensais et inqusidor
        WRITE_BYTE 0x2f (THIS BAND 0b11101011)
      END
      BUT_ONLY
  END
END
Link to comment

I want to start modding the EE games but I'm sort of lost. I do have some modding experience, though mainly with Eu4 and more modern (more user friendly) systems, so its a little hard to get into a very archaic system, even if it has been updated a little by Beamdog. I've started checking the links in the tutorial threads here and SHS, though it seems some of the links are dead, but I'm sort of feeling swamped by the information. Is there any other resources and sites experienced modders would recommend for a newcomer to begin with trying to learn about using Near Infinity and Weidu.

If the broken links are for G3, you should be able to replace forums.gibberlings3.net/ with gibberlings3.net/forums/ and retrieve the content.

 

To start with I do know how to use Near Infinity, somewhat, as I've been able to mod things like the the Thac0 tables; although trying to find what particular files do what can be a crap shoot for a newcomer. I have checked IESDP, but I'm still rather lost, not to mention not having a clue about how to mod weidu.

The IESDP is definitely the best place to learn about specific 2DA and IDS files, game file formats, effects, and scripting triggers and actions. For learning details about specific commands used when writing a WeiDU mod, you'll want the WeiDU readme. For general mod-making advice, one of the best places to start is looking at the code of another mod that does something similar to what you want to do.

 

I want start with simple things, like altering Rangers to be a little closer to P&P. To do this I plan to add a starting ability at the first level that removes the minimum 2 to-hit penalty to offhand weapons. This I can do. However, I also need to make it so that a Ranger starts with 3 pips in two handed weapons rather than merely 2, but I can't find the file that determines automatically gained weapon proficiencies.

There is no file that determines automatically gained proficiencies. Rangers are the only ones who get them and it's hardcoded into the game. I'd recommend applying an effect at level 1 that sets their Two-Weapon Style to 3 points. Then, if you want to make sure nobody wastes points at character creation, you could patch weapprof.2da to prevent them from being able to manually put 3 points in there.

 

Also, is there any way using weidu to change the usability of an entire group of items, say (purely hypothetically) make it so all items in the category "6" (Bracers and Gauntlets) are flagged unusable by Kit: Inquistor, or conversely make all category "6" items flagged usable by Kit: Kensai. (I'm planning on later altering the item restrictions on the Kensai to be more in line with P&P.)

Yes. The traditional way usabilities are defined is on a per-item basis. Each item contains information about which classes, kits, races, and alignments are prohibited from using the item. To patch all item of a specific type and make them usable or unusable by a class or kit, you need a way to identify the items. Often this can be done by relying on information in the .itm file. For example, it's easy to identify all items that go in the gloves slot. The item type is specified at offset 0x1c in the .itm file.

 

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
  PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
    PATCH_IF (SHORT_AT 0x1c == 0x06) BEGIN // gloves
      // make usable by kensais
      WRITE_BYTE 0x2f (THIS BAND 0b11111011)
      // make unusable by inquisitors
      WRITE_BYTE 0x2f (THIS BOR 0b00010000)
    END
  END
  BUT_ONLY
For details on usability patching, see this tutorial.

 

Jarno's code is from a component that doesn't want to patch all items in the gloves category - just ones that are not denoted as being gauntlets. Since there isn't an easy way to determine what is and what isn't a gauntlet based on information in the .itm file, I created a list of all glove-slot items in the games, and filtered it down to ones that are not gauntlets. Only the whitelisted items get patched. That method is inferior to identifying them based on information in the .itm file and should only be taken when there's no other way to accomplish your goal.

 

For EE games only, there's another way to adjust usabilities. Opcode #181 (which existed but didn't work in the original BG2 engine) allows you to forbid items based on item type.

Link to comment

There is no file that determines automatically gained proficiencies. Rangers are the only ones who get them and it's hardcoded into the game. I'd recommend applying an effect at level 1 that sets their Two-Weapon Style to 3 points. Then, if you want to make sure nobody wastes points at character creation, you could patch weapprof.2da to prevent them from being able to manually put 3 points in there.

That can be done. But to fully do that you also need to go through the kitlist.2da and apply the restriction to all the rangers, not just the vanilla game ones, and that requires building a list ranger kits from the file, associating that with the weapprof.2da file, and the clabxxx.2da files .. a quite requirement for a mod making start.

 

Darn, I read wrong on making the bracers ... whatever. Use Mikes code.

 

The IESDP is definitely...

Nice link, though you didn't exactly add it... here. :p
Link to comment

For EE games only, there's another way to adjust usabilities. Opcode #181 (which existed but didn't work in the original BG2 engine) allows you to forbid items based on item type.

As of the 2.0 EE patch (maybe as of 1.3, actuallty), you can also make items usable by any class, and apply opcode 319 as an equipping effect to make the items *unusable* by certain classes or kits. (I'm thinking of doing a new version of the old "Ashes of Embers" usability mod - making everything usable by anyone, and then parsing through weapprof.2da to make each kit unable to use items it cannot be proficient in.)

Link to comment

For changing basic item restrictions (usability for classes and vanilla kits), I'd recommend modifying the usability flags in the .itm header instead of adding 319 effects. It's simpler and better for compatibility with other mods.

 

The big appeal of #319 is the ability to easily restrict items to specific characters and to modify restrictions that aren't listed in the .itm header (like usability for mod-added kits).

 

(I'm thinking of doing a new version of the old "Ashes of Embers" usability mod - making everything usable by anyone, and then parsing through weapprof.2da to make each kit unable to use items it cannot be proficient in.)

Ashes of Embers removes class-based proficiency restrictions.

Link to comment

Ashes of Embers removes class-based proficiency restrictions.

Well to be clear, it removes most, but nor all, for example the paladin only two handed sword is still paladin only. But if a normal fighter can use the weapon, nearly all the others can as well with AoE... the component adds stat based restrictions, which I think should be avoided. Essentially, for example the druid/ranger kit that can't use metal weapons still should not be able to use an axe, but a paladin with STR 9 should be able to use a two handed sword... cause they can carry the sword and train with it, they should be able to use it... what they won't get to do is to put on a normal full plate armor, 10 of those swords and move. But if all those things are magical, they can carry 16 and run... if they were made light enough. Or put them into a bag of holding and forget them there.

And what comes to proficiency, that's a subject on it's own and should be tied to kits, not class. Like for example a priest should be able to use a dagger or an axe ... if the god likes favors those weapons, they should then allow the priests to put a few points they get into them.

 

And if the kit really dislikes a weapon, it's "easy" to apply an effect that gives +20 to thac0 when it's equipped by the kitted char and make the weapon almost useless for them.

Link to comment

Archived

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

×
×
  • Create New...