Jump to content


Q on modding on top of RR


  • Please log in to reply
1 reply to this topic

#1 -grodrigues-

-grodrigues-
  • Guest

Posted 09 January 2012 - 02:03 PM

Hi all,

Wanted to ask a question about RR's changes to the Blade kit and how to roll my own modification *based* on RR. Bear with me as I am a novice in modding BG2.

My changes (purely for personal use) relative to RR revised Blade kit consist in the following:

1. do *not* give Blades 3 dual wield proficiencies at the *beginning*.
2. allow Blades to put two proficiencies in one-handed bladed weapons (swords, scimitars, etc.).

I know how to do 2 (relatively simple patch to weapprof.2da), but in order to accomplish 1 I either have to hack directly RR code or roll a mod of my own that undoes RR's changes. Looking at the relevant portion of the .tp2 file (starts with the comment "// Blade kit revision"), we see:

1. set up the kit description via STRING_SET.
2. patch weapprof.2da to prevent assigning proficiencies to dual wielding.
3. assign abilities by patching clabba02.2da. The relevant line that gives 3 pips in dual wielding is:

LPF set_clab_2da_entries INT_VAR f_MinLevel = 1 f_MaxLevel = 1 STR_VAR f_Entry = AP_RR#BBLIT END

So, *if* I were to hack directly into RR's code I would have to:

1. change the line in the .tra file describing the blade kit.
2. comment out the block doing 2 above.
3. comment out the above LPF call.

Am I correct? I will assume yes; next step. Hacking into somebody else's code is always a bad idea; a much better solution (from all points of view) is simply to roll your own mod that checks for the relevant component of RR and does The Right Thing. Assuming my analysis above is correct, what I have to do is:

1. change the description of the Blade kit using STRING_SET.
2. patch weapprof.2da to give 3 proficiencies in dual wielding to Bards.
3. patch clabba02.2da by either deleting the row with AP_RR#BBLIT or blank out the relevant column (second column) in the relevant row by writing ****.

Is this analysis correct?

And as long as I am pestering you, let me add another, completely unrelated, question. To set the kit's description you use STRING_SET and a fixed strref. Does this mean that strref's set by the original, unmodded game do not change? Is there a more "invariant" way to pick out the relevant strref -- say, pick the relevant kit and look up the strref index into the .tlk file (information should be available in IESDP)?

thanks in advance, regards,
G. Rodrigues

#2 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 09 January 2012 - 07:52 PM

Assuming my analysis above is correct, what I have to do is:

1. change the description of the Blade kit using STRING_SET.
2. patch weapprof.2da to give 3 proficiencies in dual wielding to Bards.
3. patch clabba02.2da by either deleting the row with AP_RR#BBLIT or blank out the relevant column (second column) in the relevant row by writing ****.

Is this analysis correct?


Yup, that looks good to me.

To set the kit's description you use STRING_SET and a fixed strref. Does this mean that strref's set by the original, unmodded game do not change?


Actually, it's the other way around. The string number which RR alters is the one that is used in the original game (i.e. 25217 for the Blade kit). On the other hand, if you don't want to change the original strref you can replace it with a custom one by patching KITLIST.2DA.