Jump to content

Is there an easy way to copy a kit?


smeagolheart

Recommended Posts

I just want to copy a kit and change the description a bit.

 

All the powers would remain unchanged. Basically, I want to create a new unselectable kit to paste onto Minsc that actually describes his berserk power. What's the best way to do that?

 

Link to comment

You should just make a new kit and use the same clab****.2da file as the Berserker, and then edit Minscs .cre files you find in the NPCLEVEL.2da -file, in BGEE it's easy, as it's just one .cre file:

... //mods start in .tp2 and then we start
ADD_KIT ~bercerker~ 
~bercerker                 1           1           1           1           1           1           1           1~

//11                               T   S           F   Q             S S
//10                               W   C           L   U             W I
//9        BG1p-           B L S   O   I   W       A   A             O N
//8        roffs           A O H   H   M   A       I   R C   S       R G
//7        L S  '        M S N O   A   I   R     H L   T R L H     2 D L 2                 E E E E E E E E E E E
//6        _ _       S   I T G R   N K T D H     A M   E O O O     H A E W E E E E E E E E X X X X X X X X X X X
//5        S S   S B P   S A S T   D A A A A   S L O   R S N R   S A N W E X X X X X X X X T T T T T T T T T T T
//4        W W   P L I   S R W S   E T R G M C P B R M S S G T D L N D E A T T T T T T T T R R R R R R R R R R R
//3        O O B E U K A I D O W A D A W G M L E E N A T B B B A I D S A P R R R R R R R R A A A A A A A A A A A
//2        R R O A N E X L S R O X S N A E E U A R I C A O O O R N E H P O A A A A A A A A 1 1 1 1 1 1 1 1 1 1 2
//1        D D W R T D E E W D R E W A K R R B R D N E F W W W T G D I O N 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0

~bercerker 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~
~bercerker                 3      3      3      3       3      3~
~bercerker                 0      0      0      0       0       0~
~bercerker                 0      0      0       0       0      0~
~bercerker                 0      0      0       0       0      0~
~bercerker         1       1       1       1       1       1       1     1       1~
~bercerker               0       1       0       0       0       0~
~modfolder-name/CLABRN01.2da~
~~
~0x00004000    12~
~rn01~
~* * * * * * * * * * * * * * * * * * * *~
SAY ~~ //kitname starting with a small letter
SAY ~~ //kitname starting with a big letter
SAY ~~ //kit description
COPY_EXISTING ~Minsc.cre~ ~override~
 WRITE_SHORT 0x244 0 // doesn't change
 WRITE_BYTE  0x246 ~%bercerker%~ // the internal name of your kit, surrounded by %
 WRITE_BYTE  0x247 0x40 // doesn't change
PS, you don't need to make the kit to be play-able by the player, so you don't need to add the Enhanced Editions special function that handles the other tables.

 

@critto, could you actually show how that's used in .tp2 -file? Cause if you don't, then you should probably not post, in moding Q&A forum... :devlook: ..

Small code edit.

Link to comment

Is there a point to your comment or you just being difficult for the sake of it?

 

I don't see any code of conduct post around that provides guidelines on how to post and not post things in the Q&A. If there is one, please, give me a link, I'll familiarise myself with and be sure to not post anything unless it's a strict bullet-point-style set of steps on how to proceed.

Link to comment

Is there a point to your comment or you just being difficult for the sake of it?

Well, in your post so far, I haven't seen a bit of a help to smeagolheart's request for aid. In a useful manner,

So I am being difficult for the sake of help. Cause to me, it seems that you don't know how to use the COPY_KIT. Now there's nothing wrong with being funny in these forums too, but helping people should come first.

Link to comment

Critto's post was extremely helpful. He described the command best suited to the job and linked to the official documentation that describes how to use it.

The documentation mentions that if you want to set the kit's name or description (the lower, mixed, and help fields), you have to specify a strref rather than the text itself, so if smeagolheart wants to provide a new description for the kit, he'd have to do something like this to add the string to the game and get its strref.

OUTER_SET description = RESOLVE_STR_REF(~Boo is a fearsome warrior and I am too!~)

COPY_KIT BERSERKER MINSC_BERSERK (help ~%description%~)
Link to comment

I just realized that copying a kit is probably not going to solve the situation described in the original post. (Doubly so when copying the berserker kit, which is for fighters.)

 

Minsc is a ranger who has no kit. If the goal is to leave his powers unchanged, then you'll want to give him a kit that is otherwise identical to a trueclass ranger. There is no "trueclass" kit that can be copied, so you'd have to create a kit from scratch using ADD_KIT.

Link to comment

I just realized that copying a kit is probably not going to solve the situation described in the original post. (Doubly so when copying the berserker kit, which is for fighters.)

 

Minsc is a ranger who has no kit. If the goal is to leave his powers unchanged, then you'll want to give him a kit that is otherwise identical to a trueclass ranger. There is no "trueclass" kit that can be copied, so you'd have to create a kit from scratch using ADD_KIT.

 

Right he's a trueclass Ranger with a tacked on special ability that I wanted to describe.

Link to comment

@Jarno:

 

 

Well, in your post so far, I haven't seen a bit of a help to smeagolheart's request for aid. In a useful manner,

So I am being difficult for the sake of help. Cause to me, it seems that you don't know how to use the COPY_KIT. Now there's nothing wrong with being funny in these forums too, but helping people should come first.

 

I was not being funny. Not everyone needs a step-by-step walkthrough.

In the original post there was no information on what has been tried and what hasn't. There is no request for a step-by-step explanation. It was perceived by me as a general query about ways to achieve described task. I provided one. Personally, I welcome any idea or comment that is written in response to my threads and/or questions. I can figure out the engineering part of the solution if someone gives me an idea to implement. I see no harm in that sort of discussion in a thread. Even if the author encounters some issue with specific implementation, he can always ask for extra help.

From what I remember about smeagolheart from his activity around in IE community forums, he's already an accomplished modder and has experience with WeiDU. I thought it would be demeaning to explain to him step-by-step how to make a single command call which he surely knows how to do. I might be wrong of course, but I doubt it.

As for your second comment, seriously? Now you're just being condescending. I know how to handle copy_kit, I studied how it works. Before actually posting, I even did a board-wide search for any known issues with COPY_KIT just in case, so that I can give an advance warning if something's been known to cause trouble or if there are any gotchas.

As for for what Mike1072 wrote in his second post, it was a great catch. I understood that smeagolheart wanted to copy some kind of existing kit and assign it to Minsc later on. Such as the Berserker kit of the Fighter class, for example. But I misjudged, that much I will admit.

Link to comment

No offense here. Thanks I have made several mods but have not created a kit. I hope that it looks probably more complicated than it is. I was kind of seeing if it would even be worth it to pursue.

 

Maybe I can either copykit an existing ranger kit and patch away bonuses and negatives to make it vanilla powered. I see the code adding kits and they look somewhat confusing to me but again I have never ran the createakit tutorials.

Link to comment

... I hope that it looks probably more complicated than it is. ... I see the code adding kits and they look somewhat confusing to me but again I have never ran the createakit tutorials.

Here's all you need to know about coding the kits in non-EE games.

 

Not everyone needs a step-by-step walkthrough.

It's actually better to assume that every one needs it, why, cause if they don't, they can skip it.
Link to comment

 

... I hope that it looks probably more complicated than it is. ... I see the code adding kits and they look somewhat confusing to me but again I have never ran the createakit tutorials.

Here's all you need to know about coding the kits in non-EE games.

 

Not everyone needs a step-by-step walkthrough.

It's actually better to assume that every one needs it, why, cause if they don't, they can skip it.

 

 

 

Thanks Jarno, it's okay. I'm aiming for EE compatibility. I've seen the tutorial listed on bgforums..

Link to comment

Thanks Jarno, it's okay. I'm aiming for EE compatibility. I've seen the tutorial listed on bgforums..

 

The only thing extra needed for EE compatibility is the fl#add_kit_ee function, and its usage is extremely simple if you don't need to take advantage of new externalizations offered in the EE engine, so Cam's tutorial is still quite relevant.

 

It's not really that complicated, but here's some code that creates a non-player selectable kit for rangers that is identical to the unkitted ranger except for a different description. It presumes the name of your mod folder is test_mod and the name of the kit you want to add is MINSC_RANGER (you'd probably want to use your own mod prefix). For the different values here, I just copied the ones used by RANGER in the relevant files. You'll need to download fl#add_kit_ee.tpa and include it in your mod folder.

// include function for appending kit info to EE-specific files
INCLUDE ~test_mod/fl#add_kit_ee.tpa~
 
// create a copy of the ranger's CLAB file to be used for this kit
COPY_EXISTING ~clabrn01.2da~ ~test_mod/minsc_rn.2da~
 
// add a ranger kit with the same values that the ranger has, except it is unavailable to players and has a different description
ADD_KIT ~MINSC_RANGER~
   // appended to CLASWEAP.2da
   ~MINSC_RANGER            1           1           1           1           1           1           1           1~
 
   // appended column-wise to WEAPPROF.2da
   ~MINSC_RANGER 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5~
 
   // appended to ABCLASRQ.2da
   ~MINSC_RANGER            13      13      14      0       14      0~
 
   // appended to ABCLSMOD.2da
   ~MINSC_RANGER            0       0       0       0       0       0~
 
   // appended to ABDCDSRQ.2da
   ~MINSC_RANGER            17      17      0       0       17      0~
 
   // appended to ABDCSCRQ.2da
   ~MINSC_RANGER            15      15      0       0       15      0~
 
   // appended to ALIGNMNT.2da
   ~MINSC_RANGER            1       0       0       1       0       0       1       0       0~
 
   // appended to DUALCLAS.2da
   ~MINSC_RANGER            0       1       0       0       0       0~
 
   // path to your CLAB-style 2da file
   ~test_mod/minsc_rn.2da~
 
   // PC races and classes allowed to use this kit, from KITTABLE.2da
   ~~
 
   // usability flags, added to the end of the KITLIST.2da entry
   ~0x00004000     12~
 
   // HLA table to use; see LUABBR.2da
   ~Ra0~
 
   // list of starting equipment for PCs starting in ToB. Appended column-wise to 25STWEAP.2da
   ~LEAT14 * HELM07 BAG24 RING06 RING31 CLCK02 BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H39 STAF08~
 
   // Lower, mixed, and help kit names and descriptions, added to KITLIST.2da
   SAY ~ranger~
   SAY ~Ranger~
   SAY ~RANGER: The ranger is a warrior and a woodsman. He is skilled with weapons and is knowledgeable in the ways of the forest. The ranger often protects and guides lost travelers and honest peasant-folk.  A ranger needs to be strong and wise to the ways of nature to live a full life. 
   
   As a warrior of Rasheman, Minsc has the special ability to go berserk...~

// append to the EE files
LAF ~fl#add_kit_ee~ STR_VAR kit_name = ~MINSC_RANGER~ END
Link to comment

Archived

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

×
×
  • Create New...