The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> kit creation question
lroumen
post Jun 1 2009, 08:38 AM
Post #1





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




Hello everyone.

I am attempting to create a kit, but I run into a problem and I would like to hear some opinions.

I was thinking that since you cannot change the layout of the functional buttons, you may be able to change their behaviour. So I figured, since the bard already has a thieving button for his pick pocket skill, would it be possible to give a bardkit the ability to pick locks and remove traps?

1. I have attempted to add an OPEN_LOCKS line into the bard 2da right under his pick pocket ability, but I'm guessing that that never gets read by the game.
2. Next I tried to give him thieving points with shadowkeeper to see it that worked in any way. But when I detected a trap with another thief I simply could not get the trap disable button with the bard.

So I guess my current conclusion is that the bardic thieving button only works for pick pocketing. Now that means that it must have some of its natural capabilities disabled by the game (the pick locks and remove traps ability). Therefore, I wonder if anyone has ever looked further into the game to see how these abilities are removed. Since it is possible to disable a functional button using an op-code, maybe part of the thieving has also been disabled with an op-code and can be undisabed (reenabled).

It is also possible that thieving for thieves is added by thieving points, whereas the thieving for other classes (monk, ranger, bard) is added through a 2da. It does not seem possible to have a non-thief class to get thieving points per level, so perhaps additional thieving skills are impossible for the other classes as well.



Lastly I think I will probably be able to fix the usability of a bardkit as a semi-thief by giving it a few knocks per day and a few find traps spells per day as kit ability. That makes him all-purpose in the end, but too powerful due to 100% successrate for the skills. Is it possible to have the spells efficiency scale per level (knock and find traps are only effective for trap difficulty of 50% or less for instance, to be increased upon level ups)? I'm guessing that the answer is no, but perhaps I'm wrong. Related to this, is it possible to re-memorise the casting of a spell after it has been used but without requiring sleep? That way I only need to give 1 knock and 1 find traps as kit ability, but that still does not give it proper scalability (such that it does not become overpowered compared to a normal thief who has scalability of the thieving skills).

Thanks for the responses.
Go to the top of the page
 
Quote Post
Ardanis
post Jun 1 2009, 08:10 PM
Post #2





Forum Member
Posts: 146
Joined: 1-November 06
From: Saint-Petersburg, Russia




Next to everything about classes-buttons is hardcoded. As for people who actively make such kinds of exe hacking nowadays, I only know of Taimon.

QUOTE
it possible to have the spells efficiency scale per level (knock and find traps are only effective for trap difficulty of 50% or less for instance, to be increased upon level ups)?
The spell can deal with a trap/lock that a regular thief can deal with having a skill value of 50%, but not one with the 75% requirement? No. To tell the truth, I can't even begin to imagine a possible workaround. Well, I think I can, but likely nobody in their sane mind would do that.

QUOTE
is it possible to re-memorise the casting of a spell after it has been used but without requiring sleep?
See how Polymorph Self and Shapechange spells work.


--------------------
aka GeN1e
Go to the top of the page
 
Quote Post
lroumen
post Jun 2 2009, 06:52 PM
Post #3





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




Yes, exe hacking is a bit beyond the scope of my fiddling.

I think I'll look into the scalable knock. I have not really attempted this yet so it was a preliminary question.

Also thank you for the tip on polymorphing. Maybe I can find some clues there.
Go to the top of the page
 
Quote Post
lroumen
post Jun 3 2009, 06:30 AM
Post #4





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




I've had a thought-wave.

Perhaps it would be a nice idea just to give the bardkit the ability to polymorph into a thief that has x% in all thieving skills, and then have the thief cre (and thereby thieving skills) scale with the bardlevels/castinglevel.

It is probably impossible to give a kit abilities though GA_ or AP_ that exclude one another upon choice in a similar way that HLAs can require and exclude one another, right?
I mean, Fallen Deva excludes the choice of a Normal Deva and Critical Strike requiring Power Attack. It wouldn't be possible to give the bard the choice to shapeshift into a thief that upgrades towards trap detection first or a thief that upgrades towards lockpicking first, correct?
Go to the top of the page
 
Quote Post
Ardanis
post Jun 3 2009, 05:29 PM
Post #5





Forum Member
Posts: 146
Joined: 1-November 06
From: Saint-Petersburg, Russia




QUOTE
Perhaps it would be a nice idea just to give the bardkit the ability to polymorph into a thief that has x% in all thieving skills, and then have the thief cre (and thereby thieving skills) scale with the bardlevels/castinglevel.
It will probably work.

QUOTE
It wouldn't be possible to give the bard the choice to shapeshift into a thief that upgrades towards trap detection first or a thief that upgrades towards lockpicking first, correct?
I can think of such a trick - to give an invokable ability that will either trigger a dialog (via summoning a creature that's scripted to start a dialog) or will let to select the desired ability as per Spell Immunity, and then disappears from the character. I think a dialog would be better, as it also easily allows for storing and calling back variables. This way, you can get your select_the_type one-time ability from 2da at every odd level and each time to select from a pool of options - to get +15% to traps, or maybe to locks, or maybe to illusions. And since your previous choices can be stored in a form of local variables, then at the next selection those can be called back and you'll see somewhat like +15% to traps, another +15% to locks, etc. Though it may take quite a lot of work, to make all of those spl and cre. Of maybe not so much, now that I think of it, as the transform_into_thief can instead summon yet another invisible creature, which will scan the bard for his skill values (as he most certainly can have them, just no buttons to actually make a use of them), then transfrom into a thief, and finally boost it with skills that were on a bard.

If all that rambling makes sense to you...


--------------------
aka GeN1e
Go to the top of the page
 
Quote Post
lroumen
post Jun 4 2009, 06:27 AM
Post #6





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




It does make sense. Perfect sense. I cannot believe I forgot the creature summoning to get this done. Now I'm just going to wonder whether I would make it an invisible creature or whether I would make it a Dao for the fun of it.

I will give the summon+boosting a try, but I think the quick fix would still be to make all the spl/cre files. I'm thinking it would be less of a problem to get that to work code-wise.
Go to the top of the page
 
Quote Post
Ardanis
post Jun 4 2009, 03:11 PM
Post #7





Forum Member
Posts: 146
Joined: 1-November 06
From: Saint-Petersburg, Russia




QUOTE
I will give the summon+boosting a try, but I think the quick fix would still be to make all the spl/cre files. I'm thinking it would be less of a problem to get that to work code-wise.
That largely depends on how many times a bard will get to 'distribute' thieving points, and how many skills into. If you have three skills and 7 distributions then it'll be

(3+7)! / (7! * 3!) = 120

different cre and spl. Imo way too many.

Here is a slight revamp of my own code. File names and directories are just for an example. Same goes to 'ag_' prefix, you likely want to use your own one.

In table.2da the first column contains stats' names (from stats.ids, you can un fact use numbers instead), the second - the template for boosting spell's name (ag_loc4.spl is supposed to increase the polymorphed bard's lockpicking by 15*4=60 points, ag_ill12.spl - detect illusions by 12*15=180), the third one - how precise the scanning should be, 15 means it will detect each 15% (if before morphing you had 37% then it will consider you having 30=15*2). The fourth - how many times that skill may get improved, which is determined within the dialog. Apparently, this way the boosting spells are better to follow the %spell%[1;%max%].spl - +'%value%*[1;%max%]' rule. Though one can expand this code to generate those spells alongside with the script.


CODE
MKDIR ~mymod/workspace~ // for testing purpose, the finished mod should already have premade folders

<<<<<<<<inlined/table.2da
DETECTILLUSIONS  ag_ill  15  6
LOCKPICKING      ag_loc  15  6
TRAPS            ag_tra  15  6
>>>>>>>>

<<<<<<<<inlined/script.baf
IF
/*GLOBAL*/
THEN
RESPONSE #100
/*SETGLOBAL*/
ReallyForceSpellRES("polymorp",LastSummonerOf(Myself)) // polymorp.spl transforms you into a thief
END
/*BIG_BLOCK*/
>>>>>>>>
COPY ~inlined/script.baf~ ~mymod/workspace/script.baf~
COPY ~inlined/table.2da~ ~mymod/workspace/table.2da~
  COUNT_2DA_ROWS 4 rows
  FOR (i=0;i<rows;i+=1) BEGIN
    READ_2DA_ENTRY i 0 4 ~skill~
    READ_2DA_ENTRY i 1 4 ~spell~
    READ_2DA_ENTRY i 2 4 ~value~
    READ_2DA_ENTRY i 3 4 ~max~

    INNER_ACTION BEGIN
      COPY ~mymod/workspace/script.baf~ ~mymod/workspace/script.baf~
        REPLACE_TEXTUALLY EXACT_MATCH ~/*GLOBAL*/~
~
Global("ag_%skill%_set","locals",1)
/*GLOBAL*/~
        REPLACE_TEXTUALLY EXACT_MATCH ~/*SETGLOBAL*/~
~
SetGlobal("ag_%skill%_set","locals",2)
/*SETGLOBAL*/~
        FOR (j=1;j<(max+1);j+=1) BEGIN
          SET value_min = (j*value - 1)
          PATCH_IF j=max BEGIN
            SET value_max = 300
          END ELSE
          SET value_max = ((j+1)*value)
          REPLACE_TEXTUALLY EXACT_MATCH ~/*BIG_BLOCK*/~
~
IF
Global("ag_%skill%_set","locals",0)
CheckStatGT(LastSummonerOf(Myself),%value_min%,%skill%)
CheckStatLT(LastSummonerOf(Myself),%value_max%,%skill%)
THEN
RESPONSE #100
SetGlobal("ag_%skill%_set","locals",1)
SetGlobal("ag_%skill%","locals",%j%)
END

IF
Global("ag_%skill%_set","locals",2)
Global("ag_%skill%","locals",%j%)
THEN
RESPONSE #100
SetGlobal("ag_%skill%_set","locals",3)
ReallyForceSpellRES("%spell%%j%",LastSummonerOf(Myself))
END
/*BIG_BLOCK*/~
        END // inner FOR loop
    END // INNER_ACTION
  END // FOR loop


This post has been edited by Ardanis: Jun 4 2009, 03:18 PM


--------------------
aka GeN1e
Go to the top of the page
 
Quote Post
lroumen
post Jun 5 2009, 07:37 AM
Post #8





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




I see that this code greatly reduces the amount of files to create. I am impressed.

But thinking on it even further. I think it is possible to just create one spl for each of the thieving skills which bumps the thieving with +15% (or less if need be).

We can increase the Global("ag_%skill%_set","locals",0) with 1 every time we pick a certain skill upon level up as suggested.
Then upon shapeshifting/polymorphing we check the value of the global of each skill and apply the +15% several times per skill at once.

So just check what the x is in Global("ag_%skill%_set","locals",x) and apply the skill spl x times. It is possible to put a FOR loop in the RESPONSE #100 part to invoke the ReallyForceSpellRES("%spell%",LastSummonerOf(Myself)) x times, correct?

I'm not certain that that would help reduce the work because the code just gets longer where we reduce the amount of files.
Go to the top of the page
 
Quote Post
Ardanis
post Jun 5 2009, 05:17 PM
Post #9





Forum Member
Posts: 146
Joined: 1-November 06
From: Saint-Petersburg, Russia




QUOTE
We can increase the Global("ag_%skill%_set","locals",0) with 1 every time we pick a certain skill upon level up as suggested.
Then upon shapeshifting/polymorphing we check the value of the global of each skill and apply the +15% several times per skill at once.
I've thought of it, and it's how I had things to work in my case as well. But in game it may look a bit technical as IIRC there'll be a flood of '<CHARNAME> - SpellName' lines it the game log, whereas applying the boosts via single file would be 3-4 at most. Also, local variables can only be called by their owner, so if they're assigned to Charname then there's no direct way for a summon to read them. Though nobody prohibits to have Charname to temporarily switch his script.

While I was typing, I thought of something else - instead of polymorphing (and thus needing the scanning routine), the bard can simply change their class to a thief. I can see possible issues with the items currently being equipped, but it may work. Question is, what to do if such a character will decide to level up? Though it likely will remain a problem even with polymorphing.

PS Btw, said 120 files can be generated as well, without much effort involved. Then there won't a hassle with scripts at all, although the dlg will grow up and there'll many files in the override folder (which, while is undesired, isn't that much of an issue if their numbers are within a hundred or two). But the main drawback would be the large dialog file.

This post has been edited by Ardanis: Jun 5 2009, 05:38 PM


--------------------
aka GeN1e
Go to the top of the page
 
Quote Post
lroumen
post Aug 25 2009, 08:28 AM
Post #10





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




Unfortunately, I really didn't have much time to work on it this summer but I have set up a bunch of items, spells and cres. So far I have done a lot of thining and I have come up with a method that allows me to handle it a bit differently. I am currently attempting the following:

cre:
- thiefform
- djinni
I took a look at the polymorphing spells and they seem to use only one cre. I'm thinking that the level of the char is inherited from the original cre and that the HP, thac0, saves etc are based on the level of the caster with adjustments for str, dex and con. Seems like I would thus only require one cre file.

itm:
- thief weapon.
This is not necessary, but I thought it would remove problems with weapons that cannot be used by the thief. Bard gear is not removed upon polymorph, but I could script it in or limit the item use. If I limit item use to the cumulative value of bard+thief, would that mean that bard-only items would become unusable? I'm guessing so.

d:
- bard
- djinn

spl:
- shapeshift to thief
- shapeshift to neutral
- 10% bonus to thieving set A
- 10% bonus to thieving set B
- 10% bonus to thieving set C
- backstab bonus.... though probably not necessary, will test later on
- summon djinni

I will do a forcespell upon level up to summon the djinni. Using the dialogue I intend to have the djinni cast a spell upon the bard to enhance the thieving skills through the eff (permanent after death). Since polymorphed chars would inherit the thieving effect of the eff, I think it would be fine to just polymorph without having to apply the bonuses at the time of morphing. If I apply the same effect twice, the bonuses should stack, correct?

The problem I'm running into now is to give the djinni a dialogue option to check how many times a thieving set has been increased already. I keep track of it using a global variable (which should be LOCALS if there are more of the same bards in the party, correct?) which is incremented every time one of the sets is chosen (so I actually have 3 globals keeping track of A, B and C. The problem is, I would like to have the djinni answer: "you have picked set A an X amount of times", where X is the value of the global variable.

So questions:
- ad itm: would item restriction of bard+thief mean I cannot use bard-only items anymore?
- ad spl: are permanent after death effs inherited by the polymorphed forms?
- ad spl: if the effs are applied multiple times, the bonuses should stack with one another, correct?
- ad d: is it possible to change a global variable value into a string in a dialogue file?
- Would I be going wrong somewhere? I can still edit in the spell upgrade suggestions by Ardanis.
Go to the top of the page
 
Quote Post
lroumen
post Oct 6 2009, 07:49 AM
Post #11





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




Short update

Coding the globals to work for 6 NPCs is too much work at the moment, so I fixed it such that at least it should work for 1 party member (protagonist or any other npc regardless).

I am currently at the point of actually doing an alpha test with the mod. I have not fired up BG2 yet so who knows how many mistakes I must have made, lol. This is not going to be fun to debug...
Go to the top of the page
 
Quote Post
lroumen
post Oct 8 2009, 06:52 AM
Post #12





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




Well, I tried the polymorph ability into a thief, and whereas the creature does polymorph, my weapon works and upon polymorphing back I regain my ability to polymorph.... the menu buttons do not change, thus the thieving part does not work. I do seem to have created a really good polymorph though, hahaha.

Soo.... scratch the simple polymorph approach.
I will have to do it by scripting a classchange rather than having a kit ability that allows polymorphing. I can probably use the following bit of code (though changed to some extend):

IF
Kit((??),"LRSWITCH") //internal name of the kit is LRSWITCH
Global("LR_SWITCH_CLASS","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("LR_SWITCH_CLASS","GLOBAL",1)
ChangeClass((),THIEF)
END

But I would really prefer it if I could do this using an F12 ability.

Question: Is it possible to create a spell that executes a script (in which I change the class from bard to thief or back)?

I would probably have to do an AddKit(0) to remove the bardkit when I change the class and somehow use the AddKit() again to regain the class when switching back to the bard form.

I have tried a spell with the effect:
Set IDS state (#72)
but that crashed my game. I cannot remember how I have done it before, but I have been able to get set ids state to work.

Any tips?

This post has been edited by lroumen: Oct 8 2009, 06:57 AM
Go to the top of the page
 
Quote Post
lroumen
post Oct 22 2009, 07:45 AM
Post #13





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




woohoo. I got changeclass and addkit to work to some extent.

use the following block which seems to work okay.

IF
Class(Player1,BARD)
Kit(Player1,LRswitch)
Global("LRFORM","GLOBAL",0)
THEN
RESPONSE #100
ActionOverride(Player1, ChangeClass(Player1,Thief))
ActionOverride(Player1, AddKit(LRswitchthief))
SetGlobal("LRFORM","GLOBAL",1)
END


Problem: the class change is instantaneous, but the menu buttons (Functional keys) do not immediately change. That only happens if I enter a new area.
Is there a trick to destroy my character and recreate my character to overcome these problems? Since it's on the protagonist, it should probably done in such a way that it does not end the game.

Go to the top of the page
 
Quote Post
Hoppy
post Oct 28 2009, 05:26 PM
Post #14



Group Icon

Gold Member
Posts: 402
Joined: 24-May 07
From: New York, USA




Have you tried creating innate abilities for your kit that can allow you the effects you want? That may give you more creativity with the bonuses too. Those can be applied through your CLABxxxx.2da file.

This post has been edited by Hoppy: Oct 28 2009, 05:29 PM


--------------------
“May God defend me from my friends; I can defend myself from my enemies.” - Voltaire

Go to the top of the page
 
Quote Post
lroumen
post Oct 29 2009, 08:18 AM
Post #15





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




Thanks for the tip, but the kit bonuses are not really a big problem. I can make a few spells as innates and give the kit a few nice bonuses that way, however, I would like it if I were able to choose my bonuses as I level up. That is why I have been trying to code this through a dialogue-based bonus-acquirement.

It turned out to be quite easy to get the dialogue and the bonuses to work, but getting back the information on how I have picked my bonuses has been rather complex as it involved this token business. I have managed this at the moment though. The token settings now work properly too, so the summoning of the djinni works well and his dialogue is fixed. The only problem is going to be when you gain several levels at the same time... you also summon multiple djinnis. I think I will fix that later as it is not a big issue at the moment. I will probably set a few triggers that will check whether you start in BG1, SOA or TOB related to the level you start with upon charactercreation.... otherwise you get a lot of summonings at the same time and the count can get lost somehow in the chaos making the dialogue inconsistent.


The class changing has proven more difficult.
I tried to make an innate that allows me to change form, but that does not change your class menu buttons (F1 to F12). As such, the bardsong is still there and the thieving abilities do not transfer such that you cannot pick locks or remove traps (and you do not have the detect traps/illusions button nor the stealth button).

The only way to get this done is to script an actual class change. I am doing this by scripting a baf that is appended to baldur.bcs which always runs in the background. The script allows me to change a class when a certain global is tripped. The global is changed by an innate spell which is indeed added to the CLAB again. I can refresh that innate just fine so the innate is unlimited, though it will disappear when the innate is interrupted. Maybe I should make it uninterruptable.

Anyway, the class changing was working a while ago, but now it seems faulty again. The global is tripped but the class is not changed and the block does not execute. I will need to bugtest this very thoroughly as I have done for an hour every day over the past month. At least I got it to work a few times, now to figure out how to get it to stay working.


If I can get this to work well, I will be able to script a custom fighter kit which can be picked by any race and then script a class-change such that you become a half-orc-mage or a dwarven-bard or a halfling paladin or whatever, the 'legal' way, since you just gain the bonuses of the mage/bard/whatever class when you change to that class. Class limitations may be hard-coded but can be circumvented this way. I probably have to fix some bonuses at that point though, thac0, health, XP-level... Could be interesting at least for my own tampering within the game.
Go to the top of the page
 
Quote Post
Hoppy
post Oct 30 2009, 02:16 AM
Post #16



Group Icon

Gold Member
Posts: 402
Joined: 24-May 07
From: New York, USA




QUOTE(lroumen @ Oct 29 2009, 04:18 AM) *
Anyway, the class changing was working a while ago, but now it seems faulty again. The global is tripped but the class is not changed and the block does not execute. I will need to bugtest this very thoroughly as I have done for an hour every day over the past month. At least I got it to work a few times, now to figure out how to get it to stay working.


If I can get this to work well, I will be able to script a custom fighter kit which can be picked by any race and then script a class-change such that you become a half-orc-mage or a dwarven-bard or a halfling paladin or whatever, the 'legal' way, since you just gain the bonuses of the mage/bard/whatever class when you change to that class. Class limitations may be hard-coded but can be circumvented this way. I probably have to fix some bonuses at that point though, thac0, health, XP-level... Could be interesting at least for my own tampering within the game.


You may be able to do the class/kit change via cutscene and have your blocks run through that. It won't take much and that way you can make sure everything fires. Zyraen's Hidden Kits mod does similar things to changing kits when specific quests are over or enemies are defeated. From memory, I don't think it changes a class though.

However, you may try to run two blocks. One for the class change and then a secondary block for the kit change. It may be easier than that but it will keep major changes separate because sometimes they won't fire all at once especially since a class change needs to adjust.

Your original post gave me the idea for the innates:
QUOTE
I was thinking that since you cannot change the layout of the functional buttons, you may be able to change their behaviour. So I figured, since the bard already has a thieving button for his pick pocket skill, would it be possible to give a bard kit the ability to pick locks and remove traps?


I think the only way to give a bard like thieving abilities (traps/locks) would be to create your own innate spells to be applied to the kit. The bard will have his normal buttons but in F12 list, your spells that mimic the set traps, remove traps, hide in shadows and so on. It would just be a dual/class created through the creature file rather than all the preset .2da's. There may be something similar to this kind of ability arranging in a Cleric/Thief dual class in the vanilla game or Tiax biggrin.gif in BG1. Or you could change the class to thief all together and give an innate for Bard song.

Cheers and have fun!





--------------------
“May God defend me from my friends; I can defend myself from my enemies.” - Voltaire

Go to the top of the page
 
Quote Post
lroumen
post Oct 30 2009, 08:06 AM
Post #17





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




Thanks for the tips. I will look into the possibilities.
Spells don't have a 'failure' measure though, so trap detection like the cleric spell is always 100%. That is kind of irritating.


I got my class changing to work again. It is relatively simple:

IF
Global("LR","GLOBAL",1)
Kit(Player1,LRBARDKIT)
THEN
RESPONSE #100
ChangeClass(Player1,THIEF)
ActionOverride(Player1,AddKit(LRTHIEFKIT))
SetGlobal("LR","GLOBAL",2)
END

IF
Global("LR","GLOBAL",1)
Kit(Player1,LRTHIEFKIT)
THEN
RESPONSE #100
ChangeClass(Player1,BARD)
ActionOverride(Player1,AddKit(LRBARDKIT))
SetGlobal("LR","GLOBAL",2)
END

The bardkit gets an innate that when tripped sets the global to 1 and trips the first portion of the script to change into a thief.
The thiefkit is hidden and gets an innate too that when tripped sets the global to 1 and trips the second portion of the script to change back.


The problem why it did not work for a while is because this does not work for some stupid reason:
If the innate sets the global to 0 and I use the block:
IF
Global("LR","GLOBAL",0)
Kit(Player1,LRBARDKIT)
THEN
RESPONSE #100
ChangeClass(Player1,THIEF)
ActionOverride(Player1,AddKit(LRTHIEFKIT))
SetGlobal("LR","GLOBAL",1)
END

The block is not executed. Weird. If the global does not exist, the block does execute.
So the cure was to set the global to a different value that 0 (as above I just use 1 and 2 instead of 0 and 1) such that the block can activate.

The block fires instantaneous. The kit addition is also instantaneous. The F1-F12 buttons do not change if you still have the character selected but if you unselect and reselect the buttons also change, so it is a minor hamperment but it does work the way it should.


Btw: I cannot add bonus abilities to the CLAB anymore if I keep shifting ingame. That is because any bonuses of previous levels will be applied when you change to a class. That means a simple bonus like +1AC will be re-added when you shift from one class to the next and back again multiple times. Cheating-galore.
But anyway, I only needed my bardsongchange to be in the CLAB and my "gain shifting innate" in the 2da, which is fine since it does not give any innate-duplication problems. Similarly, the hidden thiefkit has a CLAB that only contains the innate to shift back.
I can always add into my scripts the removal of an innate skill like a thief trap setting of course. That should be no big problem.




I did a test and you can make a mage-kit that does not show up under the mage kit list since it's full and then you basically slap in a fighterkit pickable by all races who has no bonuses and such (I suggest also mage-like proficiencies) and then set a block that simply changes this fighterkit to change your class and kit into the desired mage-kit.
Who says protagonists cannot have a custom mage kit?

IF
OnCreation()
Global("LRSHIFT","GLOBAL",0)
Kit(Player1,LRFIGHTERKIT)
THEN
RESPONSE #100
ChangeClass(Player1,MAGE)
ActionOverride(Player1,AddKit(LRMAGEKIT))
SetGlobal("LRSHIFT","GLOBAL",1)
END

Note: now the global does work since "LRSHIFT" does not exist yet in a new game.
Extremely simple! Am I reinventing the wheel here because stuff like this I cannot find anywhere in a kitcreation readme or across the boards.


Edit reason. Fixed the ClassChange -> ChangeClass issue.
Additionally, as discussed below, this will also work in a more general fashion:

IF
OnCreation()
Global("LRSHIFT","LOCALS",0)
Kit(Myself,LRFIGHTERKIT)
THEN
RESPONSE #100
ChangeClass(Myself,MAGE)
ActionOverride(Myself,AddKit(LRMAGEKIT))
SetGlobal("LRSHIFT","LOCALS",1)
END


This post has been edited by lroumen: Nov 3 2009, 08:53 AM
Go to the top of the page
 
Quote Post
Jarno Mikkola
post Oct 31 2009, 08:23 AM
Post #18





Forum Member
Posts: 80
Joined: 25-January 07
From: We call it Swamp Pit, you call it Finland.




Hmm, intresting. thumb.gif
QUOTE(lroumen @ Oct 30 2009, 11:06 AM) *
IF
Global("LR",1)
Kit(Player1,LRBARDKIT)
THEN
RESPONSE #100
ClassChange(Player1,THIEF)
ActionOverride(Player1,AddKit(LRTHIEFKIT))
SetGlobal("LR",2)
END

IF
Global("LR",1)
Kit(Player1,LRTHIEFKIT)
THEN
RESPONSE #100
ClassChange(Player1,BARD)
ActionOverride(Player1,AddKit(LRBARDKIT))
SetGlobal("LR",2)
END
Just so you know, this will probably fail if you'll install the Refinements mod, and it would be better if you made the script like this:
CODE
IF
Global("LR","LOCALS",1)
THEN
RESPONSE #100
ChangeClass(Myself,THIEF)
ActionOverride(Myself,AddKit(LRTHIEFKIT))
SetGlobal("LR","LOCALS",0)
END

IF
Global("LR","LOCALS",2)
THEN
RESPONSE #100
ChangeClass(Myself,BARD)
ActionOverride(Myself1,AddKit(LRBARDKIT))
SetGlobal("LR","LOCALS",0)
END
As the LR = 0, would be the normal state, while the 1 and 2 would be the class and kit changing mode... so the initiate just needs to set the LR to 1 or 2. wink.gif

This post has been edited by Jarno Mikkola: Nov 3 2009, 07:37 AM
Go to the top of the page
 
Quote Post
lroumen
post Nov 2 2009, 09:55 AM
Post #19





Forum Member
Posts: 522
Joined: 12-April 06
From: Netherlands




QUOTE(Jarno Mikkola @ Oct 31 2009, 09:23 AM) *
Hmm, intresting. thumb.gif


Just so you know, this will probably fail if you'll install the Refinements mod, and it would be better if you made the script like this:


As the LR = 0, would be the normal state, while the 1 and 2 would be the class and kit changing mode... so the initiate just needs to set the LR to 1 or 2. wink.gif

Thanks for the suggestion. Indeed it does not really matter which number the LR global is and for nicety if might as well be 0. It's just that using 0 as a trigger did not work, so I kind of forgot that I could do it the other way around.

Question though, why would it not work with refinements? Is it because I swap classes a lot causing conceptual incompatibilities?
Go to the top of the page
 
Quote Post
Jarno Mikkola
post Nov 2 2009, 10:29 PM
Post #20





Forum Member
Posts: 80
Joined: 25-January 07
From: We call it Swamp Pit, you call it Finland.




QUOTE(lroumen @ Nov 2 2009, 11:55 AM) *
Question though, why would it not work with refinements? Is it because I swap classes a lot causing conceptual incompatibilities?
Well, I might be wrong of course, but as the Refinements sets the classes up with a 'fake kits', it might bring problems.
Hmm, yes it sounds that I am wrong. blush.gif

PS: I made a small but significant improvement... adding the "LOCALS" to the global field, and changed the 'Player1' to 'Myself', so even the NPCs can use the class too. And according to this, it's 'ChangeClass()', not 'ClassChange()'. biggrin.gif

This post has been edited by Jarno Mikkola: Nov 3 2009, 07:42 AM
Go to the top of the page
 
Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 19th November 2024 - 04:06 AM