Jump to content

Changing weapon restrictions for multi-class


meat axe

Recommended Posts

Hey, I've read that you can't change weapon restrictions for a certain kit without changing the limitations for the entire class, but what about for a multi-class? Say I want to change the game so that a cleric/ranger class can uses the ranger's weapons instead of the cleric's. Is this possible without changing the cleric's restrictions? As I understand it, multi-class is another class altogether, not just a combination of two classes. (Hopefully that all makes sense. Finished my last exam for the year this morning, so I am running on low sleep)

 

The reason I ask, of course, is that I recently started playing bg2 again, and thought, instead of my usual fighter/mage (either multi- or dual-), I might go for a divine class instead. However, I want to use my katanas (Simply because they are cool, and hurt things a lot).

 

Anyway, any help in this would be appreciated... Or even just point me in the direction of help.

 

Cheers.

Link to comment

Yes, this should be fairly straightforward. Multi-classes have their own usability flags, so they can be set independently of their component classes. For example, this is why fighter-druids have druid restrictions for weapons but not armor--the flag can be set separately from the single-class fighter and druid usabilities.

 

You can use an editor to alter these flags manually, you could try bodging together some code to do it, or check out Ashes of Embers. It removes clerical weapon restrictions so it should open up katanas to everyone, including cleric-rangers.

Link to comment
Yes, this should be fairly straightforward. Multi-classes have their own usability flags, so they can be set independently of their component classes. For example, this is why fighter-druids have druid restrictions for weapons but not armor--the flag can be set separately from the single-class fighter and druid usabilities.

 

You can use an editor to alter these flags manually, you could try bodging together some code to do it, or check out Ashes of Embers. It removes clerical weapon restrictions so it should open up katanas to everyone, including cleric-rangers.

 

Yeah, I've got Ashes of Embers installed at the moment, but didn't like how Viconia and Aerie still have proficiencies in weapons they can no longer use due to their low strength. So I was gonna try figure out how to make a small tweak to just the cleric/ranger class.

 

So anyway, to do this, looking at this thread, would I just modify the CLASWEAP.2da? Or is it more complicated than that... I'm sort of new at the whole modding scene... Sort of meaning that I've never done anything to do with mods before apart from install them.

Link to comment

clasweap.2da is a leftover file from BG; weapprof.2da is what controls this in BG2.

 

The following code wil do what you want--any items usable by rangers will be made usable by cleric-rangers, and you'll be allowed to place stars in all weapons as a ranger does.

 

BACKUP   ~crstuff/backup~
AUTHOR   ~me@mydomain.net~

BEGIN ~Cleric-Ranger Stuff~

COPY_EXISTING ~weapprof.2da~ ~override~
 COUNT_2DA_ROWS ~22~ "rows"
 FOR (index = 1; index < rows; index = index + 1) BEGIN
READ_2DA_ENTRY "%index%" 6  22 "cleric"
READ_2DA_ENTRY "%index%" 11 22 "ranger"
PATCH_IF ("%cleric%" > "%ranger%") BEGIN
  SET_2DA_ENTRY_LATER ~weapprof~ ("%index%" + 2) 21 "%cleric%"
END ELSE BEGIN
  SET_2DA_ENTRY_LATER ~weapprof~ ("%index%" + 2) 21 "%ranger%"
END
 END
 SET_2DA_ENTRIES_NOW ~weapprof~ 1
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
 PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
READ_BYTE 0x20 "ranger"
PATCH_IF (("%ranger%" BAND 0b00100000) = 0b00000000) BEGIN // if usable by ranger
  READ_BYTE  0x1f "rangercleric"
  WRITE_BYTE 0x1f ("%rangercleric%" BAND 0b11111011) // make usable by cleric rangers
END
 END
 BUT_ONLY_IF_IT_CHANGES

 

Drop this into a text file and name it 'setup-crstuff.tp2'. Then create a folder named crstuff and save this file inside it. Next, copy one of your existing mod setup programs (setup-ashesofembers.exe or any of the others) and name it setup-crstuff.exe. Double-click that and off you go.

Link to comment

Wow thanks heaps. That just made my life a whole lot easier.

 

And I just realised that cleric/rangers can't get more than two stars in each weapon. I was just wondering how to make it possible to get grand mastery for weapons. Is that easy enough to do?

 

Thanks for all the help. Much appreciated.

Link to comment
If you install Multi-Class Grand Mastery from Tweaks after this, it should change all of those from 2 to 5 pips allowed.

 

Alright, I tried that and for some reason it didn't do anything. No matter, I think for now I'll make do with just adding proficiencies to other weapons and changing them to katanas with shadow keeper. Thanks again for all the help.

Link to comment

SET_2DA_ENTRY_LATER?

 

SET_2DA_ENTRY_NOW?

 

Hmm... are these new? Commands introduced while I was away, perhaps? I'll be checking the new WeiDU readme for sure. If these do what I think, then they'll make the code that I posted on the Divine Remix boards much more efficient.

 

BTW, thanks a lot everyone for telling me about these commands in the DR thread. It's not like I specifically mentioned being interested in optimization hints or anything... <dripping with sarcasm> :)

 

- D

Link to comment

When you use SET_2DA_ENTRY, it reloads the file, so you quickly start to see a slowdown while installing if you use a lot of these. If you use the _LATER variant, it queues all of these changes until you actually execute them with the _NOW command. devSin's highly informal testing suggests if you're going to be doing more than about 6 SETs, the _LATER/_NOW combo will generally be faster.

Link to comment

I'm trying to do the same for fighter/clerics but I'm running into a problem with setting item usability flags.

 

Here's the relevent piece of code:

COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
 PATCH_IF (SOURCE_SIZE > 0x71) BEGIN

READ_BYTE 0x1f "fighter"
PATCH_IF (("%fighter" BAND 0b00001000) = 0b00000000) BEGIN
  READ_BYTE  0x1f "fightercleric"
  WRITE_BYTE 0x1f ("%fightercleric%" BAND 0b10111111)
END

 END
 BUT_ONLY_IF_IT_CHANGES

 

And the error:

Install Component [Flexible Cleric Test]?
[I]nstall, or [N]ot Install or [Q]uit? 
Installing [Flexible Cleric Test]
Copying and patching 1 file ...
[./override/weapprof.2da] loaded, 70304 bytes
override/weapprof.2da copied to fmcleric/backup/0/weapprof.2da, 70304 bytes
Copied [weapprof.2da] to [override/weapprof.2da]
Copying and patching 2479 files ...
[./override/ABAZRING.ITM] loaded, 1410 bytes
ERROR: [ABAZRING.ITM] -> [override/ABAZRING.ITM] Patching Failed (COPY) (Not_found)
Stopping installation because of error.

Only thing I have installed is the Fixpack v2 (all components)

Link to comment

NOT_FOUND generally means you're trying to manipulate a variable that doesn't exist - "%fighter" is what's causing you grief.

 

You can skip the "%fighter%" entirely when you manipulate numeric variables (or keep them, if it helps you - they harm nothing). Text string manipulation is what requires them :p

Link to comment

Archived

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

×
×
  • Create New...