Jump to content

Altering Mod-Added Kits


Wounded_Lion

Recommended Posts

How about an early present? ;)

 

The following code will allow you to extend the alignment revisions of Druid Remix to all Druid kits including mod-added kits.

 

The code can be easily adapted for other classes/changes.

 

I wrote this code myself (no cut-and-paste, no copying-from-someone-else's-tp2) and am veeery proud of it. I've playtested the code to verify its functionality. It works like a dream.

 

Being the ninja that you are, you will no doubt be able to understand this without an explanation from me. You could probably even optimize it somehow. :)

 

Hope this helps you out a bit!

 

- D

 

COPY_EXISTING ~ALIGNMNT.2da~ ~override~
SET_2DA_ENTRY 9 2 1 ~1~
SET_2DA_ENTRY 9 4 1 ~1~
SET_2DA_ENTRY 9 6 1 ~1~
SET_2DA_ENTRY 9 8 1 ~1~
SET_2DA_ENTRY 18 2 1 ~1~
SET_2DA_ENTRY 18 4 1 ~1~
SET_2DA_ENTRY 18 6 1 ~1~
SET_2DA_ENTRY 18 8 1 ~1~

COPY_EXISTING ~KITLIST.2da~ ~override~
COUNT_2DA_ROWS ~1~ "rowsk"
FOR ( indexk = 4; indexk < "%rowsk%"; indexk = indexk + 1 ) BEGIN
 READ_2DA_ENTRY "%indexk%" 8 1 "kitclass"
 PATCH_IF ("%kitclass%" = 11) THEN BEGIN
  READ_2DA_ENTRY "%indexk%" 1 1 "kitname"
  INNER_ACTION BEGIN
COPY_EXISTING ~ALIGNMNT.2da~ ~override~
 COUNT_2DA_ROWS ~1~ "rowsa"
 FOR ( indexa = 3; indexa < "%rowsa%"; indexa = indexa + 1 ) BEGIN
  READ_2DA_ENTRY "%indexa%" 0 1 "namekit"
  PATCH_IF (("%namekit%" STRING_COMPARE "%kitname%") = 0) THEN BEGIN
   SET_2DA_ENTRY "%indexa%" 2 1 ~1~
   SET_2DA_ENTRY "%indexa%" 4 1 ~1~
   SET_2DA_ENTRY "%indexa%" 6 1 ~1~
   SET_2DA_ENTRY "%indexa%" 8 1 ~1~
  END
 END
  END
 END
END

 

EDIT: Tweaked code. The FOR loops were running one too many times. I'm surprised that no one else caught that... ;)

 

EDIT: Tweaked code. Again. Removed two unnecessary pairs of parentheses. Good thing that I'm obsessive compulsive... :)

Link to comment

Is this code not useful to you? If I'm not mistaken, DRv5 applies alignment changes only to the druid, fighter-druid, and default kits. This allows it to extend to all druid kits... I thought someone would be excited about this... I sure as hell was when I got it to work. Ah well. Such is life. :)

 

EDIT: :)

 

- D

Link to comment

Since DR does not seem interested in the code, it occurred to me that it might be helpful to post the English-language logic from which I coded the above so that other people might easier make use of it.

 

- D

 

Starting at row 4 (the fifth row), read entry 8 (the ninth entry, class) of every row in KITLIST.2da

 

For each row with entry 8 set to 11 (Druid), read entry 1 (the second entry, name)

 

Starting at row 3 (the fourth row), read entry 0 (the first entry, name) of every row in ALIGNMNT.2da

 

For each row with entry 0 set to name-read-from-KITLIST, set appropriate fields

Link to comment

Settle, settle.

 

I had originally thought about adding this to DR, but in the end I was wary of altering mod kits to this degree--it makes sense for some kits, but not for others. If there's interest, there's no reason it can't be included in the next version.

Link to comment
Settle, settle.

 

I had originally thought about adding this to DR, but in the end I was wary of altering mod kits to this degree--it makes sense for some kits, but not for others. If there's interest, there's no reason it can't be included in the next version.

 

I think its odd to apply a change to the default kits and DR kits but not to mod added kits. Most Druid kits are restricted to True Neutral because that is the rule of thumb in a default installation. If someone's not cool with their kit being altered, it is a simple matter for that modder to include some DR contingency code in their mod and specify that the kit should be installed after DR. But... it matters not. I use the code (a slightly different version) in Morrow Gate, so it wasn't a waste to create it.

 

EDIT: A good example against your response is your own work on the BG2 Tweak Pack. Why do components of the Tweak Pack alter mod added items if you're against altering mod added kits? Seems like the same type of situation to me.

 

:)

 

- D

Link to comment
I think its odd to apply a change to the default kits and DR kits but not to mod added kits. Most Druid kits are restricted to True Neutral because that is the rule of thumb in a default installation. If someone's not cool with their kit being altered, it is a simple matter for that modder to include some DR contingency code in their mod and specify that the kit should be installed after DR. But... it matters not. I use the code (a slightly different version) in Morrow Gate, so it wasn't a waste to create it.

 

EDIT: A good example against your response is your own work on the BG2 Tweak Pack. Why do components of the Tweak Pack alter mod added items if you're against altering mod added kits? Seems like the same type of situation to me.

It's not so much qualms about modder X flipping out because DR modifies their kit--it already does that, and as you already mention Tweaks runs wild on pretty much everything. It's more a concern over whether opening up mod kits to additional alignments makes sense game-wise. For example, DR has no qualms adjusting spell selection because leaving modded kits out of the new sphere system makes no sense RP-wise and makes both the kit and DR itself stand out as mod content. For alignments, there's no way to tell if the modder envisioned the kit as TN because of roleplaying reasons or because it's the current druidic restriction.

 

That being said, I think you've made the case that (in most if not all cases) it's the latter. I think we'll go ahead and change this for the next version and start opening up mod kits to the additional alignments.

Link to comment

Extending the alignment revisions in this way makes good sense to me, but I think it would be best to implement it as a standalone component of DR. That way if someone (who's made a druid kit) objects to it, he/she can simply recommend that the particular DR component not be combined with his/her kit. :)

Link to comment

Aww, there is nothing like rejected X-mas presents. :)

 

:)

 

How come we don't have a crying smiley? We need one! ;)

 

- D

 

Well, your 3 posts were all within the space of a day, and I at least wasn't online frequently enough to reply before the second and third... ;)

Link to comment

Because I like sharing, here is some code that can be used to alter the weapon proficiencies of all kits of a given class including mod-added kits. This particular example allows all druids to place up to one proficiency point in Longbow and Shortbow and up to two proficiency points in Two Handed.

 

I will write and post the code for CLASWEAP.2da soon. Right now, I need to dash off a reply to another thread and get some much-needed sleep. :)

 

BTW, the next preview release of Morrow Gate (due to debut in a week or two) will include this component. It is an updated version of one of Natural Selection's components. Morrow Gate will completely update and replace Natural Selection and be compatible with Divine Remix. So... download Morrow Gate! lol. Sorry. Couldn't resist. Had to plug my own stuff.

 

- D

 

EDIT: I am not suggesting that Divine Remix include this component. In fact, I'd rather the component remain unique to Morrow Gate. What I want to share is the general technique. :)

 

COPY_EXISTING ~WEAPPROF.2da~ ~override~
SET_2DA_ENTRY 5 10 1 ~1~
SET_2DA_ENTRY 27 10 1 ~1~
SET_2DA_ENTRY 28 10 1 ~1~
SET_2DA_ENTRY 31 10 1 ~2~
SET_2DA_ENTRY 5 19 1 ~2~
SET_2DA_ENTRY 27 19 1 ~2~
SET_2DA_ENTRY 28 19 1 ~2~
SET_2DA_ENTRY 31 19 1 ~2~

COPY_EXISTING ~KITLIST.2da~ ~override~
COUNT_2DA_ROWS ~1~ "rowsk"
FOR ( indexk = 4; indexk < "%rowsk%"; indexk = indexk + 1 ) BEGIN
 READ_2DA_ENTRY "%indexk%" 8 1 "kitclass"
 PATCH_IF ("%kitclass%" = 11) THEN BEGIN
  READ_2DA_ENTRY "%indexk%" 1 1 "kitname"
  INNER_ACTION BEGIN
COPY_EXISTING ~WEAPPROF.2da~ ~override~
 FOR ( indexw = 21; indexw < ("%rowsk%" + 18 ); indexw = indexw + 1 ) BEGIN
  READ_2DA_ENTRY 2 "%indexw%" 1 "namekit"
  PATCH_IF (("%namekit%" STRING_COMPARE "%kitname%") = 0) THEN BEGIN
   SET_2DA_ENTRY 5 ("%indexw%" + 1) 1 ~1~
   SET_2DA_ENTRY 27 ("%indexw%" + 1) 1 ~1~
   SET_2DA_ENTRY 28 ("%indexw%" + 1) 1 ~1~
   SET_2DA_ENTRY 31 ("%indexw%" + 1) 1 ~2~
  END
 END
  END
 END
END

Link to comment

Archived

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

×
×
  • Create New...