Jump to content

Discussion: BG2 Kit Creation Series


Recommended Posts

Hey, thanks for the reply.

I changed the names from C!Selune and Ninka both to Ninja, and I went through the spells in my CLAB, and the spells seemed fine to me.

 

Still the game crashes at the Skills Section during creation.

Would anyone be able to help me if I posted my CLAB contents, or would it more likely be a problem with the spells?

 

Thanks,

Landr

Link to comment
Guest Guest

Would it be possible to add a kit to a character by having them use a special item?

I ask because I heard about some AddKit() function. Could an item be modified to invoke this?

 

If you can, this could overcome the usual 9-kit limitation by adding a vendor that sells "kits" in the promenade. These "kit tome" items maybe could be set to be usable only by a corresponding trueclass that has the prerequisite stats.

Link to comment
Would it be possible to add a kit to a character by having them use a special item?

I ask because I heard about some AddKit() function. Could an item be modified to invoke this?

 

If you can, this could overcome the usual 9-kit limitation by adding a vendor that sells "kits" in the promenade. These "kit tome" items maybe could be set to be usable only by a corresponding trueclass that has the prerequisite stats.

The AddKit() function is for scripts. There may be a way to set up things as you suggest but I think it might be a little cumbersome compared to just creating an NPC that can apply kits when you talk to them.

Link to comment
Guest Guest
NPC that can apply kits when you talk to them
What do you mean exactly? NPC applies kit to itself, or to the one talking to them? (Or to anyone?)

 

If it's the former, that won't work on the PC, and I especially want this to work for the PC too.

 

If it's the latter, then the "kit tome" item could be made to summon a custom genie or something to run the script (if that's easier than getting an item to run a script).

 

Of course, going from vendor-to-item-to-genie might be too much if the vendor can do the genie's job in the first place through some dialog. I'm not sure which would be better.

 

Using items in between might have two advantages:

 

One, there needs to be restrictions (like starting class or stats) to who can get the kit. (for balancing, to prevent bugs etc.) I don't know if it's easier to place such restrictions on the item, or in the script.

 

And two, if I had a collection of kits in a mod, and I or someone else wanted to add another without removing it, it might be easier to simply add a kit tome to the vendor's selection and create a new custom genie than to change the vendor's dialog and risk breaking something.

 

I'm making a lot of assumptions here. :(

Link to comment
NPC that can apply kits when you talk to them
What do you mean exactly? NPC applies kit to itself, or to the one talking to them? (Or to anyone?)

I didn't mean a joinable NPC - I meant a regular NPC that anyone in the party can go up and talk to. You can set conditions in their dialogue to provide different options based on the class of the person who initiates dialogue with them (among many other things), and the kit can be directly applied to whoever they are talking to. It is also fairly easy for makers of new kits to insert more dialogue options to allow the choosing of their kit. If you plan to implement this, my biggest tip is to ensure your KIT.IDS has been properly fixed (ie. via BG2Fixpack) before testing.

Link to comment

Ok I say it again I don't speak english everydays I'm French so sorry when I don't speak corectly.

Then I have quite a lot of question :

1 I'm wondering : when we put a 0 or a 1 in the CLASWEAP.2da file we are telling the game if yes or not the kit can use some king of item. So if I do this ~K?ArchSyl 0 0 0 1 1 0 0 0 ~ my kit can use only er raged weapon ? So the "flag" 0x00028000 12 is there to control all item wich aren't weapon ? But stangely in doing this using my kit I can use some melee weapon.

2 I'd like do make another kit of druid,clerc or even a ranger but using only the spell I'd give him. Is it possible : I mean keep the spell button but in order to use my spell and not the spell that the class ranger or druid will give. Is this possible or will I have to supress the button and add my spell as innate spell ?

3 And the last one : it's about LUXXX.2DA file. While doing it I just have to copy one in near infinity change what I need and then using the comand copy in put my file in the game and my kit which is link to this file will use it ? It seems that in doing so I've made something wrong so my PC don't get HLA. I am using the right methode ? er sorry I'm pretty that's not how an English speaker would have say that but I not really that skilled in foreing laguage sorry !

 

Thanks for reading and another thanks for those who try to answer !

Link to comment
Ok I say it again I don't speak english everydays I'm French so sorry when I don't speak corectly.

Then I have quite a lot of question :

1 I'm wondering : when we put a 0 or a 1 in the CLASWEAP.2da file we are telling the game if yes or not the kit can use some king of item. So if I do this ~K?ArchSyl 0 0 0 1 1 0 0 0 ~ my kit can use only er raged weapon ? So the "flag" 0x00028000 12 is there to control all item wich aren't weapon ? But stangely in doing this using my kit I can use some melee weapon.

I don't think that either CLASWEAP or WEAPPROF change which weapons are usable by a kit - they relate to the proficiencies available when creating or levelling up a character. The base class of your kit (in your example, "12" for Ranger) determines which weapons and armour your class cannot use. The UNUSABLE hexadecimal value (0x00028000) puts further restrictions on a kit, such as limiting the type of armour they can wear.

2 I'd like do make another kit of druid,clerc or even a ranger but using only the spell I'd give him. Is it possible : I mean keep the spell button but in order to use my spell and not the spell that the class ranger or druid will give. Is this possible or will I have to supress the button and add my spell as innate spell ?

It is possible, but a little complicated, from what I've heard. The second paragraph of this thread explains more about doing so.

3 And the last one : it's about LUXXX.2DA file. While doing it I just have to copy one in near infinity change what I need and then using the comand copy in put my file in the game and my kit which is link to this file will use it ? It seems that in doing so I've made something wrong so my PC don't get HLA. I am using the right methode ? er sorry I'm pretty that's not how an English speaker would have say that but I not really that skilled in foreing laguage sorry !

 

Thanks for reading and another thanks for those who try to answer !

It sounds like you are doing everything right. You will need to make a LUXXX.2DA file and use the COPY command to put it in your game, and then in your ADD_KIT command, you will need to specify it like this:

 // HLA table to use; see LUABBR.2da
~XXX~

So it has the same name as your .2DA file, but WITHOUT the "LU" before it.

 

 

Your English is quite understandable - certainly it is more understandable than my French! I hope this post was able to help clarify things for you - and maybe someone else can jump in here if I've mistakenly provided any faulty information. ???

Link to comment
The UNUSABLE hexadecimal value (0x00028000) puts further restrictions on a kit, such as limiting the type of armour they can wear.

Why unusuable ? I tought that if we add hexadecimal value of two kit restriction we can have new value for a new kit ?

 

I don't think that either CLASWEAP or WEAPPROF change which weapons are usable by a kit - they relate to the proficiencies available when creating or levelling up a character.

Ok so there are a flile wich control if yes or not there is the button to add proficiencies and the other how many you can put ?

 

The base class of your kit (in your example, "12" for Ranger) determines which weapons and armour your class cannot use.

So 12 is not only here to say where the kit is ? I mean if we click on druid the kit will be here or if we click on ranger the kit will be here.

But if I'm correct different kit of the same class haven't the same restrction so it can't be that 12 is the only things who say what item a kit may use or not.

 

It is possible, but a little complicated, from what I've heard. The second paragraph of this thread explains more about doing so.

That's quite a mess ;) don't really know where to begin. But in order to add only my spell I have to install divine remix first ?

 

So what I have to do is with this :

 

// add spells to base abilities
INCLUDE ~Divine_Remix/lib/macro_spell_remove_good.tph~
INCLUDE ~Divine_Remix/lib/macro_reindex_clab.tph~
COPY_EXISTING ~cdselune.2da~ ~override~
 APPEND_FILE ~Divine_Remix/spheres/al_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/an_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/as_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/co_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/di_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/gu_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/he_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/ne_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/nu_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/su_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/sn_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/tr_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/we_major.2da~
 APPEND_FILE ~Divine_Remix/spheres/cm_minor.2da~
 APPEND_FILE ~Divine_Remix/spheres/ex_minor.2da~
 APPEND_FILE ~Divine_Remix/spheres/ea_minor.2da~
 APPEND_FILE ~Divine_Remix/spheres/ee_minor.2da~
 APPEND_FILE ~Divine_Remix/spheres/ef_minor.2da~
 APPEND_FILE ~Divine_Remix/spheres/ew_minor.2da~
 APPEND_FILE ~Divine_Remix/spheres/pl_minor.2da~
 APPEND_FILE ~Divine_Remix/spheres/wd_minor.2da~
 APPEND_FILE ~Divine_Remix/spheres/lastline.2da~
 LAUNCH_PATCH_MACRO ~spell_remove_good~ // removes neutral- and evil-only spells
 LAUNCH_PATCH_MACRO ~reindex_clab~ // re-index lines
 BUT_ONLY_IF_IT_CHANGES

 

What a mess ;)

Link to comment
Why unusuable ? I tought that if we add hexadecimal value of two kit restriction we can have new value for a new kit ?

Yes you get a new restriction but that restriction includes the restrictions of both of the values you added together to make the new one. So you add restrictions of cleric and kensai you then have a new restriction that can't use edged weapons (cleric) and can't wear armour (kensai).

 

So 12 is not only here to say where the kit is ? I mean if we click on druid the kit will be here or if we click on ranger the kit will be here.

But if I'm correct different kit of the same class haven't the same restrction so it can't be that 12 is the only things who say what item a kit may use or not.

Yes the 12 tells the game where the kit lies on the game creation screen. It does affect restrictions too but in a different way to the hex value for kits. In an item file (sword, shield, bow etc) there are settings to say who can use the weapon (ranger but not stalker, ranger but not elve, everyone etc).

 

The number you assign to the kit tells the game that as well as the kit restrictions hex value you should be treated as a ranger (12) so weapons that a ranger can't use your kit won't be able to use either.

 

For example, the ranger normally can use all weapons but he can't use a magical weapon that was made for only Paladins (Carsomyr) so the game knows your kit is not a paladin because you chose 12 instead of 6 (paladin).

 

Think of the numbers (12 etc) as high level restrictions and the hex value as more detailed restrictions within the number.

Edited by Rabain
Link to comment
I don't think that either CLASWEAP or WEAPPROF change which weapons are usable by a kit - they relate to the proficiencies available when creating or levelling up a character.

Ok so there are a flile wich control if yes or not there is the button to add proficiencies and the other how many you can put ?

 

You can fully control how many proficiency points can be put into which proficiencies with WEAPPROF.2DA. I don't believe CLASWEAP.2DA does anything in the BG2 engine, but you still need to include the line that appends to it when using the ADD_KIT command.

 

It is possible, but a little complicated, from what I've heard. The second paragraph of this thread explains more about doing so.

That's quite a mess ;) don't really know where to begin. But in order to add only my spell I have to install divine remix first ?

 

So what I have to do is with this :

 

*snip*

 

What a mess ;)

 

Sorry I wasn't more clear - I meant the second paragraph of the first post, not the second post. Here's the relevant information.

 

First, an overview of how DR creates the sphere system. As we found through several frustrating releases, removing spells from divine casters is unreliable at best. The engine automatically puts spells of the name sppr[1-7][0-9][0-9] into divine spellbooks if the spell is of the correct type, defined by the two bytes at 0x20 in the spell files. DR removes this automatic granting of spells by changing the type of all spells of the name sppr[1-7][0-9][0-9] to invalid for all divine casters. The spells are added manually via the kit's ability tables, aka the CLAB 2da files. Adding to the spellbook through script or spells resulted in the cleric receiving experience points for 'learning' the spell.

 

So, if you want to have a properly working custom divine spell list that doesn't interfere with the normal classes and other kits, you might want to see how Divine Remix does it. If you don't mind that the spell lists of your base class and all of its kits will be changed, it probably isn't too much work to create or edit a spell so that it fits the naming scheme of "sppr[1-7][0-9][0-9]" and has the correct Spell Type and Priest Type value set (or remove a spell from the list by changing these values).

Link to comment

From the small part I've understand if I want to add spell to a ranger or a cleric in their "spellbook" without having the ordinary spell I must install clerix remix and do a lot of things that I don't even understant. Cause if I try doing something I risk to mess everythings in the game files and change all the kit using spell table. Maybe I just should supress the button which allow a clerc or a ranger to use spell by their spellbook and add my spell in the inate section, players won't be able to choose what their player will learn but at least it will work whithout crashing the game or my brain :)

So thanks but I think that I must do what I can do so I just find another way.

Thanks anyways :) (uh I hope thats the good word :) )

Link to comment
From the small part I've understand if I want to add spell to a ranger or a cleric in their "spellbook" without having the ordinary spell I must install clerix remix and do a lot of things that I don't even understant. Cause if I try doing something I risk to mess everythings in the game files and change all the kit using spell table. Maybe I just should supress the button which allow a clerc or a ranger to use spell by their spellbook and add my spell in the inate section, players won't be able to choose what their player will learn but at least it will work whithout crashing the game or my brain :)

So thanks but I think that I must do what I can do so I just find another way.

Thanks anyways :) (uh I hope thats the good word :p )

:) You don't need to install Divine Remix. Also, I completely overlooked something (even though I quoted it) in my last post. If you only want to add a small number of spells (8 extra per level should fit in the default spellbook for everything except level 7 because of HLAs) and not remove any, it should be very easy. You just have to create the divine spell and use GA_SPLNAME in the kit's CLAB file (the same way you'd add the innate spells). Then only your kit will have it, and other kits and classes will be unaffected. Sorry for any mumbo jumbo in my last post that might have caused your brain to crash.

Edited by Mike1072
Link to comment

I kwow how to add spell to a kit in the "spellbook" of a kit but how make sur the kit receive only the spell I whant and not my spell and the spell of the mother class.

That's what do the "brain crashing" :) add a spell is really simple but add only my spell not at all

If adding spell needed only one file it would have been more simple :p

But no :)

What trouble me is how add only my spell to a kit wich have already the spell of the mother class, that's why you give me the link and that's cause my brain to crash or is there a great misunderstanding ? :)

Link to comment
I kwow how to add spell to a kit in the "spellbook" of a kit but how make sur the kit receive only the spell I whant and not my spell and the spell of the mother class.

That's what do the "brain crashing" :) add a spell is really simple but add only my spell not at all

If adding spell needed only one file it would have been more simple :p

But no :)

What trouble me is how add only my spell to a kit wich have already the spell of the mother class, that's why you give me the link and that's cause my brain to crash or is there a great misunderstanding ? :)

Forgive me for misdirecting you with that link earlier. For what we're talking about now, you won't need to bother with it.

 

Your kit will automatically gain all the spells that its parent class knows. It is difficult to remove those spells from the kit but it is easy to add new ones. Use WeiDU to COPY over the new spells, and name them with your own prefix - not SPPR###. As long as you do this, the spells will not get automatically added to any spellbooks. You let your kit learn them by adding GA_ entries in their CLAB file. Make sure the spells have their Spell Type set to 2 (Priest). I just tested all of this and it seemed to work fine.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...