Jump to content

Discussion: BG2 Kit Creation Series


Recommended Posts

Wow thanks a lot for writing that snippet of code! So if I that code block as a tp2 file and run it with WeiDU.exe it should replace all the relevant lines in the dialog.tlk? I'm guessing thats much cleaner than going into the dialog.tlk directly. Thanks a lot Mike!

Yeah, you'd stick this in the .tp2 of your own minimod. Technically, the code leaves the existing strings in dialog.tlk as they are (it's possible something like Gladiator could be used elsewhere in the game, so you wouldn't want to make it lowercase everywhere), but it adds new strings and updates the kits to use the new ones. This method is portable and can easily be changed or uninstalled as well.

Link to comment
LOCALS instead of GLOBAL and Myself() instead of Player1 would probably work too.
The scripts actions and consequences might be better replaced with the use of invisible creature using it and so the Myself() would of course be LastSummonerOf(Myself) ... because it's a unhealthy either for you or your computer to run even a single script with the Player Character that you cannot switch off, because you end up either with a smashed computer, or arms, legs and a peace of mind, because you hate the devour-ation of your mind it will end up to create... this will of course effect the structure of the script, like the removal of the OnCreation() trigger. But then again the action it leads to is totally unnecessary in the above case... and the spell structures, as you have to summon the .cre and set the GLOBAL . Edited by Jarno Mikkola
Link to comment

Maybe you are correct in your statement, but if the blocks aren't triggered, it doesn't matter whether the whole thing is in baldur(25).bcs or only a summoned creature block is in baldur(25).bcs which processes its own script (with identical blocks) once summoned.

Besides, if you install a mod purposely to get X to happen, it makes little sense to complain that X is happening (like messing with the sorcerer class/kit). Uninstalling is always an option.

 

As for the coding bits I agree. It could be more cleaned up and some parts may be transferred to a summoned creature script, but the general behaviour will not be very different. I am still looking into the summoned creature adaptation of the class changing in my mod, but I'm kind of stuck trying to figure out on how to read and transfer local variables from playerX to the summoned creature and back again (onto playerX). This seems impossible to implement without defining (temporary) globals again.

 

As always, I enjoy your input. If you can convince me that my reasoning is flawed, I would appreciate it very much.

Link to comment
I am still looking into the summoned creature adaptation of the class changing in my mod, but I'm kind of stuck trying to figure out on how to read and transfer local variables from playerX to the summoned creature and back again (onto playerX). This seems impossible to implement without defining (temporary) globals again.

I think a creature's local variables can only be retrieved when running that creature's scripts or dialogues. You can set local variables on other creatures via ActionOverride or spell.

 

Why don't you have each spell summon a different creature? One would have a script to change the summoner to a sorcerer, and the other would have a script to change the summoner to a thief.

Link to comment

Yes, unfortunately, something like actionoverriding to get a local variable is sadly impossible.

I figured out that I can set the local on a PC, then when casting a spell which sets a global, trip a block that checks both of these and then sets a temporary global, after which the summon comes in, checks the temporary global which is a reflection of the PCs local, the summon does his thing and actionoverrides the PC to change the local and kill the temporary global... *sigh* a very simple but cumbersome solution to allow different PlayerXs to run the same script. It's easier to not use a summoned creature and go fully with locals. I haven't decided yet for my bard<->thief mod because I do intend to keep the patching on baldur(25).bcs to a minimum as Jarno and thebigg suggested to me before in June.

 

You can manage it with only one summon. Simply put both blocks in its script and put a check for the class in there as well as a DestroySelf() to stop it from executing the other block. Of course different spells and different summons works too.

Link to comment
You can manage it with only one summon. Simply put both blocks in its script and put a check for the class in there as well as a DestroySelf() to stop it from executing the other block. Of course different spells and different summons works too.

Right you are.

 

It's easier to not use a summoned creature and go fully with locals. I haven't decided yet for my bardthief mod because I do intend to keep the patching on baldur(25).bcs to a minimum as Jarno and thebigg suggested to me before in June.

Since player scripts don't function when party AI is turned off and we've established variables aren't needed when using a summoned creature, what's left to decide?

Link to comment

...

Why don't you have each spell summon a different creature? One would have a script to change the summoner to a sorcerer, and the other would have a script to change the summoner to a thief.
Or use 1 creature, with the original two spells setting the GLOBAL to a value and then summon the creature that runs the script. The creature then checks and script which the effect then sets the global to zero after and depending what the Global was, either switches the character to Sorcerer or Thief and then sets the proper kit on that adds the other spell and removes the current one, kill self and leave the game alone when the creature doesn't exist.

...Iroumen kinda just ninjaed me a lot. But as said we suggested this to him ...

 

...what's left to decide?
Who makes the mod(Sorcerer->Thief->Sorcerer) and try to include it on their insurance health plan. Edited by Jarno Mikkola
Link to comment

lol, I'm not writing that one, I still need to update my bard<->thief<->bard mod. The bits I'm struggling with there are gained innate abilities and whether to script that using invisible summons (and thereby a ridiculous method of reading player locals) or to immediately use locals and forget about the invisible summons there (since you cannot put them into a clab file because upon classchange all clab bonuses are appended on your character even if they are duplicates).

Link to comment

By the way, this:

WEAPPROF.2da - This file determines the maximum number of stars that a kit or class can put in a specific weapon proficiency. Note that allowing a kit to place stars in a certain weapon will not grant them the ability to use the weapon--i.e. allowing a cleric kit a proficiency in spears--will not allow the kit to use them. The first column lists the weapons and the various columns match the clases and kits in the game. The CLUB proficiency in spells and items is also referred to as EXTRA1. The other EXTRA proficiencies do not have any function in game.
Is not the whole of it, the sum of the numbers also defines the total maximum proficiency points the kit can have... so if you put 5 to one of the extra proffs, you can go over the maximum allocatable prof points on normal proficiencies, which makes you never be able to gain the extra level... the original game has this feature on the Fighter, Bard and Paladin & Ranger, Fighter-Mage, Fighter-Thief, Berserker, Kensai, Wizard Slayer... and Barbarian has 2 in them all.

 

I ran across this in Kwiat_W's kit mod, when he put zero to all the lines, he was able to make the kit have no assignable proficiency points, even though it was a Fighter class based kit. This feature is in the Change-class->Mage kits actually a very good thing.

Edited by Jarno Mikkola
Link to comment

I'm in the process of creating a kit that I recently made a thread on here for. However, I don't know how to go about creating the spells/making sure the effects are correct. Also, I don't know how to enforce the May not turn undead restriction I want to put on the class.

 

Here's the .tp2 I have so far:

 

BACKUP ~CoT/backup~

AUTHOR ~bryanswpaulsen@yahoo.com

displayed if installation fails

 

BEGIN ~Champion of Torm~

ADD_KIT ~CofTorm~

~CofTorm 1 1 1 1 1 1 1 1~

~CofTorm 1 1 0 1 1 1 1 0 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 2 1 1 1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5~

~CofTorm 15 0 0 0 14 17~

~CofTorm 0 0 0 0 0 0~

~CofTorm 0 0 0 0 0 0~

~CofTorm 0 0 0 0 0 0~

~CofTorm 1 0 0 1 0 0 1 0 0~

~CofTorm 0 0 0 0 0 0~

~CoT/clabcot.2da~

~K_P_H K_P_D K_P_E K_P_HE K_P_HL K_P_HO~

~0x00000008 6~

~Pa0~

~PLAT15 * HELM01 BAG27 RING06 RING31 CLCK26 BOOT01 AMUL19 BRAC10 BELT10 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW2H10 STAF08~

SAY ~Champion of Torm~

SAY ~Champion of Torm~

SAY ~Champion of Torm: Champions of Torm are powerful individuals in the service of 'The Loyal Fury'. These holy warriors are dedicated to the protection of holy sites, priests, pilgrims, and furthering the causes important to Torm.

 

Advantages:

- May use 'Divine Wrath' ability once per day. This ability lasts for 5 rounds, and becomes more powerful over time:

Level 1: +1 to hit, +1 to damage, +3% damage resistance

Level 8: +2 to hit, +2 to damage, +6% damage resistance

Level 15: +3 to hit, +3 to damage, +9% damage resistance

Level 22: +4 to hit, +4 to damage, +12% damage resistance

Level 29: +5 to hit, +5 to damage, +15% damage resistance

- May use 'Sacred Defense' ability once per day. This ability lasts for 1 round per level, and becomes more powerful over time:

Level 1: +1 to saving throws

Level 8: +2 to saving throws

Level 15: +3 to saving throws

Level 22: +4 to saving throws

Level 29: +5 to saving throws

 

Disadvantages:

- May not turn undead

- May not use missile weapons

- May not specialize in melee weapons other than Two Handed Sword~

 

COPY ~CoT/spells/DivWra.spl~ ~override~

COPY ~CoT/spells/SacDef.spl~ ~override~

Edited by BPaulsen
Link to comment
Guest Monty

Greetings, everyone.

 

I'm using CamDawg's really helpful tut to create my very first kit. I just have two problems at this point and I think I can package this up quickly.

 

1. I have finished all the requisite spells and abilities and edited the necessary tables. However, I seem to be running blind as to where I can disable the set trap ability of the thief. Do I just exclude the Set Snare ability from my 2da file? On an unrelated note, how about backstab?

 

2. I have this certain HLA--let's call it Speed--that ups the movement rate of a character by 1 every time it is chosen. I want it to be selected five times. However, on the fifth time, I want it to also add a +1 attack per round. I tried to scour the other files from other mods and the guides online and I think my search powers are failing me. Basically, I want the table to "recognize" that I've selected Speed four times prior and that I get the +1APR perk on the fifth take. I thought about making a Speed2 HLA that requires Speed to be taken... but then the same problem arises: the recognition that I've taken Speed 4 times. Is this even possible?

 

Much gratitude to everyone in advance.

 

Monty

Link to comment
1. I have finished all the requisite spells and abilities and edited the necessary tables. However, I seem to be running blind as to where I can disable the set trap ability of the thief. Do I just exclude the Set Snare ability from my 2da file? On an unrelated note, how about backstab?
The backstab is easy, you just don't put the normal thief bonuses to the first .2da file in the mod, disabling the set trap is done the same way, you just don't give the character spells to set the traps with. So yeah.

 

2. I have this certain HLA--let's call it Speed--that ups the movement rate of a character by 1 every time it is chosen. I want it to be selected five times. However, on the fifth time, I want it to also add a +1 attack per round. I tried to scour the other files from other mods and the guides online and I think my search powers are failing me. Basically, I want the table to "recognize" that I've selected Speed four times prior and that I get the +1APR perk on the fifth take. I thought about making a Speed2 HLA that requires Speed to be taken... but then the same problem arises: the recognition that I've taken Speed 4 times. Is this even possible?
Well, you can make 5 spells and make the x always require the x-1 first... and allow the HLA's to be taken only once.
Link to comment
Guest Monty
The backstab is easy, you just don't put the normal thief bonuses to the first .2da file in the mod, disabling the set trap is done the same way, you just don't give the character spells to set the traps with. So yeah.

 

Thank you for this. I was thinking I was making a mistake.

 

Well, you can make 5 spells and make the x always require the x-1 first... and allow the HLA's to be taken only once.

 

Ah, but that would mean creating 5 spells and occupying 5 slots in the HLA table, yes? That could work but it... hurts the eyes. Heh. (Obviously, this is just an aesthetic thing I'm peeved about. Sorry. :laugh: )

 

I'm thinking of just changing them to level requirements rather than "prior pick" ones. I think that's more balanced and less complicated.

 

Anyway, thanks for all the help. Will post if there are more questions.

Link to comment
Guest Monty

Thank you very much, Jarno. I was able to finish my kit today without many hitches. Just a couple of parsing problems and lots of CTRL+F in the WeiDU documentation and I'm good.

 

It's a rough kit and I'm still figuring out how to add abilities to spells/items using WeiDU but it's a great start.

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...