Jump to content

Where to find specific kit abilities and how to copy an entire kit?


Recommended Posts

I just finished a mod for the shapeshifter kit and now im thinking about making one for the Dragon Disciple, I want to make copies that each focus on one of the other dragon elemental types ( cold, electricity, poison and acid) and I want to see how easy\viable that would be.

So two questions:

1. Where do I find out what files the Dragon Disciple uses? For the Shapeshifter I used this:  https://gibberlings3.github.io/iesdp/appendices/bg2kitabilities.htm but it seems its for the original release and not the EE versions, so no Sorcerer.

2. How do I copy a kit? I know there's the ADD_KIT command but I don't want to recreate form scratch. Just copy the kit and make changes.

Edited by gamemaster76
Link to comment

I believe there is a COPY_KIT macro that is part of Weidu, works similar to ADD_KIT. But I vaguely recall Camdawg saying it is imperfect... maybe because it does not handle EE kit attributes, and fl#add_kit_ee doesn't work with it?

In any event, @argent77's ADD_KIT_EX function is perfect for this sort of thing. As an extreme example, my mod uses it to systematically clone every single cleric and druid kit into several multiclass versions. Adds ~150 or more kits to the game in one fell swoop.  That particular application is quite complicated, but for something like copying the DD kit into a variant version, ADD_KIT_EX could serve your purpose well.

Link to comment
4 hours ago, subtledoctor said:

I believe there is a COPY_KIT macro that is part of Weidu, works similar to ADD_KIT. But I vaguely recall Camdawg saying it is imperfect... maybe because it does not handle EE kit attributes, and fl#add_kit_ee doesn't work with it?

In any event, @argent77's ADD_KIT_EX function is perfect for this sort of thing. As an extreme example, my mod uses it to systematically clone every single cleric and druid kit into several multiclass versions. Adds ~150 or more kits to the game in one fell swoop.  That particular application is quite complicated, but for something like copying the DD kit into a variant version, ADD_KIT_EX could serve your purpose well.

That's awesome! Just to make sure, how do I use the files in the zip file? .gitattributes, a7#add_kit_ex.tpa, etc.

Link to comment

You put the .tpa file somewhere in your mod... like /my_mod/lib/ or something. Then in your .tp2 file you make sure the function is available to the mod by including it:

INCLUDE ~my_mod/lib/a7#add_kit_ex.tpa~


(That can be in your AKWAYS block, if you have one.)

Then, after the function is INCLUDE’d, you can use it according to the documentation. 

Link to comment
1 hour ago, subtledoctor said:

You put the .tpa file somewhere in your mod... like /my_mod/lib/ or something. Then in your .tp2 file you make sure the function is available to the mod by including it:

 


INCLUDE ~my_mod/lib/a7#add_kit_ex.tpa~


(That can be in your AKWAYS block, if you have one.)

Then, after the function is INCLUDE’d, you can use it according to the documentation. 

Ah ok! 

Also I still need to figure out what files it uses. Something like this  https://gibberlings3.github.io/iesdp/appendices/bg2kitabilities.htm  but up to date for the Enhanced Edition.

Link to comment
2 hours ago, subtledoctor said:

AKWAYS block,

ALWAYS block...

And the dragon disiple uses the luso1.2da as the HLA table, and the clabso01.2da as the irregular sorcerer ability table that you talked about in the last post.

And assuming, you don't want to clone, but add a new kit, you use the regular add_kit -command, and if you use within the EE games, you need to use the EE-fuctions, aka you just launch the patch fuction like so... , and that uses this as the library(which you do not need to undestand), but have a copy of it in the mod files to have it to INCLUDE as a library.

Edited by Jarno Mikkola
Link to comment
1 hour ago, Jarno Mikkola said:

And assuming, you don't want to clone, but add a new kit, you use the regular add_kit -command, and if you use within the EE games, you need to use the EE-fuctions, aka you just launch the patch fuction like so... , and that uses this as the library(which you do not need to undestand), but have a copy of it in the mod files to have it to INCLUDE as a library.

Actually ADD_KIT_EX is good for that as well, probably better than ADD_KIT, and no need for the extra fl#_ function. If I was starting making kits now I would be using the new function, rather than the old one. 

Link to comment
36 minutes ago, subtledoctor said:

Actually ADD_KIT_EX is good for that as well, probably better than ADD_KIT, and no need for the extra fl#_ function. If I was starting making kits now I would be using the new function, rather than the old one. 

yeah add_kit_ex worked great! now im just altering the effects. Although im stuck at changing the breath weapon damage type.

https://gibberlings3.github.io/iesdp/opcodes/bgee.htm#op12 opcode 12 has a bunch of possible values.. except in-game according to near infinity:

image.png.dd39c9e7b004bcec4ec850e199183dc3.png

 

So now im assuming I need to do it according to what near infinity says. so my code is:

 

COPY_EXISTING ~spdd03.spl~ ~override/spdd08.spl~  // creates file for electric breath weapon

LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // Changes breath weapon to electric damage
          INT_VAR
            match_opcode = 12
            check_globals = 1
            check_headers = 1
            header = 1
            header_type = 1
            parameter2 = 4

        END

 

.... but its not doing anything, and ive tried parameter2 = 262144 like in the documentation but that didn't work either. 

 

Also there's four of these for each time the breath weapon gets stronger:

image.png.0142d516f572c004774b861350e6c707.png

 

So would that ALTER_SPELL_EFFECT affect all of them or just one?

Link to comment
1 hour ago, subtledoctor said:

Actually ADD_KIT_EX is good for that as well, probably better...

Yes. But there's no good documentation of that, in a tutorial level... and my instruction can be applied to yours, but not easily in reverse. Well, OK, so I did request such, and the outcome was this, which to be legetable, you need the info from the tutorials. At least I suppose that gamemaster76 is not an expert on weidu/infinity engine, when they can't even find the files requested. So rather tutorial level it is.

Link to comment

There are actually kit_example.tph, kit_example2.tph, kit_example3.tph and kit_example4.tph to demonstrate how to add a regular singleclass kit, copy an existing kit, retrieving attributes from an existing kit and adding a true multiclass kit in addition to the readme. The parameters are largely the same as for the old ADD_KIT/fl#add_kit_ee combo, so there shouldn't really be a need for another tutorial.

Link to comment
1 hour ago, argent77 said:

There are actually... so there shouldn't really be a need for another tutorial.

Really ? To someone that has never made a kit before... which is likely what the original poster is. I'll assure you, the more examples you got, the more likely you will be to be able to make it. And there's no freaking way your tutorial is better than the CamDawg's in showing the basics of the kit making code, or the files involved. It's 4 different tutorials about this one subject. Yes, the link in it work.

Link to comment
5 hours ago, argent77 said:

There are actually kit_example.tph, kit_example2.tph, kit_example3.tph and kit_example4.tph to demonstrate how to add a regular singleclass kit, copy an existing kit, retrieving attributes from an existing kit and adding a true multiclass kit in addition to the readme. The parameters are largely the same as for the old ADD_KIT/fl#add_kit_ee combo, so there shouldn't really be a need for another tutorial.

Those are great! Thanks! they were in the download but I didnt know I could open .tph files 😂

Link to comment
10 hours ago, gamemaster76 said:

COPY_EXISTING ~spdd03.spl~ ~override/spdd08.spl~  // creates file for electric breath weapon

LAUNCH_PATCH_FUNCTION ~ALTER_SPELL_EFFECT~ // Changes breath weapon to electric damage
          INT_VAR
            match_opcode = 12
            check_globals = 1
            check_headers = 1
            header = 1
            header_type = 1
            parameter2 = 4

        END

I think opcode 12 combines both damage type and modifier type in parameter2, so it’s difficult to work with. Try:

LPF ALTER_EFFECT INT_VAR match_opcode = 12 parameter2 = (0 + (4 << 16)) END

The ‘0’ is for modifier type (increment) and the ‘4’ is damage type (electric) but you are applying the ‘4’ two bytes over within the field, so to speak (i.e. 16 bits over, thus ‘<< 16’). Adding the two values together gives you the whole value for parameter2. If you expressed it as an integer it would indeed be 262144. But that seems even more inscrutable than (0 + (4 << 16))... to me at least.

 
Edited by subtledoctor
Link to comment
13 hours ago, subtledoctor said:

I think opcode 12 combines both damage type and modifier type in parameter2, so it’s difficult to work with. Try:










LPF ALTER_EFFECT INT_VAR match_opcode = 12 parameter2 = (0 + (4 << 16)) END

The ‘0’ is for modifier type (increment) and the ‘4’ is damage type (electric) but you are applying the ‘4’ two bytes over within the field, so to speak (i.e. 16 bits over, thus ‘<< 16’). Adding the two values together gives you the whole value for parameter2. If you expressed it as an integer it would indeed be 262144. But that seems even more inscrutable than (0 + (4 << 16))... to me at least.










 

It worked! thanks!

yeah thats extremely confusing. 

My bit fields are VERY rusty, so if I wanted to do Acid damage it would be: 

LPF ALTER_EFFECT 
    INT_VAR 
    match_opcode = 12 
    parameter2 = (0 + (1 << 4))  (0 + (1 << 16)) 
END

1 is the damage type and 4 is two bytes over?

Edit: Nevermind, I misunderstood something. 16 stays there and only the middle number changes! I have ll the breath weapons to what they should be!

 

 

Also, which command would work to just rename the original kit to Dragon Disciple (Fire)? ADD_KIT_EX and overwrite the original? Or is there an Alter command that would be simpler?

Edited by gamemaster76
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...