Jump to content


Photo

A Series of Questions about aspects of the IE engine

Summons Levels Dual Class Item Properties

27 replies to this topic

#16 subtledoctor

subtledoctor
  • Modders
  • 2493 posts
  • Gender:Male

Posted 09 March 2018 - 03:22 PM

Conjure an invisible creature and use the AddKit script action.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#17 lynx

lynx
  • Modders
  • 3099 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 10 March 2018 - 02:19 AM

Or addsuperkit, depending on what you want to achieve.


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Market android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...

#18 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6637 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 10 March 2018 - 05:45 AM

I have another question, though this one requires something of a preface.  A kit can be applied to a character at any time using utilities like EEkeeper; in fact a character can even retain a kit for a class different than their own, for example, a Fighter could have the Assassin Kit applied to him, and, even though it will not effect his fighter levels in any way, the game will remember that said character has that kit.  Then if that fighter chooses to dual classes into a thief, rather than becoming a True-Class thief, he will start his second class as an Assassin, with all of it's unique class features and restrictions intact, and then will continue the game as a Fighter x / Assassin x dual.  It is an interesting engine feature that I'm surprised has never been utilized in the main game.

 

With that said, my question is how is the most direct way to apply a kit to a character, preferably via an opcode?  I know there are opcodes to change alignment, sex, level, etc.

A script action. Usually though, one uses a spell that casts; a summon spell; that makes an invisible creature; that runs that script.


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#19 Reddbane

Reddbane
  • Members
  • 40 posts

Posted 10 March 2018 - 08:44 AM

Could someone point to some mods or other examples that use this kind of scripting?  That way I can study them and try to get a grasp upon the mechanics.



#20 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6637 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 10 March 2018 - 10:19 AM

Well, for EE kits, look at sudtledoctor's signature, and go to the Faith and Powers mod should have multiple... or if you like non-EE mods, I have a few: the Megamodkits has a Divine Wizard kit that has that.


Edited by Jarno Mikkola, 10 March 2018 - 10:20 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#21 Reddbane

Reddbane
  • Members
  • 40 posts

Posted 13 March 2018 - 12:37 PM

@subtledoctor

As a followup to Jan's recommendation, are there any of specific class or kits among your major mods you would recommend I look at if I want to examine this pseudo summon scripting?  Moreover, have any of your mods ever used a kit changes script?



#22 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 13 March 2018 - 12:49 PM

Is anything wrong with simply using this in the creature's own script?
 

This action removes the active creature's current kit and adds the specified kit. Abilities from any previous kit are removed. AddKit(0) can be used to remove a creatures current kit without adding a new one. Class restrictions apply for kits. When attempting adding an invalid kit, the existing kit (if any) will be replied.

 

Why is there need for spells or invisible helpers or other such?
 
Sorry, I forgot to mention that I look from the EE side of things, although it used tow work in BGT as far as I remember.

Edited by Roxanne, 13 March 2018 - 01:24 PM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#23 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6637 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 13 March 2018 - 01:07 PM

@Reddbane, Roxanne can't see my posts, ... cause she has prevented them from showing up. Which ... kinda makes her blind.


Edited by Jarno Mikkola, 13 March 2018 - 10:00 PM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#24 subtledoctor

subtledoctor
  • Modders
  • 2493 posts
  • Gender:Male

Posted 13 March 2018 - 01:31 PM

@Roxanne, sure, I guess, but it's kind of hard to say whether it could be "added to the creature's script" when we don't know which creature Reddbane is talking about. Further, he seems to be discussing adding a kit to a character in-game... if you just add AddKit to its script, how do you determine when it fires? Wouldn't it happen immediately? In that case wouldn't you just design the .CRE to have the kit in tbe first place?

@Reddbane, a fairly simple example of using the AddKit script with an invisicre (invisible creature) is in the old version of my mod, in which you could get a multiclass kit by using an item. See the multiclass kits component here:
https://github.com/U...f56036fce7b2e66

 

You can repurpose the .SPLs, .CREs and/or .BAFs from there to use in an item or spell of your own.  (E.g. scales_of_balance/mc/d5_mieli.spl, d5_mieli.cre, and d5_mieli.baf)


Edited by subtledoctor, 13 March 2018 - 01:41 PM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#25 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 13 March 2018 - 01:50 PM

Roxanne, sure, I guess, but it's kind of hard to say whether it could be "added to the creature's script" when we don't know which creature Reddbane is talking about. Further, he seems to be discussing adding a kit to a character in-game... if you just add AddKit to its script, how do you determine when it fires? Wouldn't it happen immediately? In that case wouldn't you just design the .CRE to have the kit in tbe first place?

@Reddbane, a fairly simple example of using the AddKit script with an invisicre (invisible creature) is in the old version of my mod, in which you could get a multiclass kit by using an item. See the multiclass kits component here:

You can repurpose one of the .ITMs, .SPLs, and/or .CREs from there to use in an item or spell of your own.

The example I had in one of my mods was to give a (joined) NPC a special kit after completion of a personal task. So yes, in this case the AddKit had some script conditions like the globals from the successful solved quest. But you can use that any other way you want, e.g. reaching some level of having some XP or what else.

IF 
ANY NUMBER OF ANY TYPE OF CONDITIONS OR GLOBALS YOU WANT TO CHOOSE
Global("GiveKit","Locals",0) 
THEN 
RESPONSE #100 
SetGlobal("GiveKit","Locals",1) 
AddKit("thenewkit") 
END

PS  - I still have the issue with one of your mods in my EET game that used a (light blue) scroll.itm for that purpose and they are found on nearly every dead enemy priest's corpse (Yes, I know you improved that in a newer version, but in an EET game these things stick around for a LONG time...).

And all those invisible helpers...they work fine, but in a game of some hundred hours there are quite a lot of them that for whatever reason did not destroy after they did their job. Some areas can get mighty crowded unless you know where to look for the source of some problems. And one can easily have 20+ mods installed that all use the invisibles.


Edited by Roxanne, 13 March 2018 - 02:02 PM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#26 subtledoctor

subtledoctor
  • Modders
  • 2493 posts
  • Gender:Male

Posted 13 March 2018 - 03:05 PM

Well yeah. If it is meant to be conditioned on some environmental/quest-related factors, then it can and should simply be scripted. In that case you're scripting things anyway.

But if you want to initiate it at a time and place of you're choosing, rather than depending on external conditions, then it can be handy to trigger it by .SPL effects. and in that case an invisible creature is the most convenient solution.

Plus there is the issue that script conditions in a .CRE's script or in BALDUR.BCS orcsomething like that are checked constantly, which uses some nonzero amout of resources. There's something to be said for only firing a script once, if it's the sort of thing that is only meant to happen once. (Frankly this sort of thing would more appropriately be done via a spell, if only there were a spell effect to do it.)

Anyway as far as invisible helpers, I agree with you that they should be avoided wherever possible. I only use them for stuff like this, where you choose a kit once, running a script once, from a creature that was summoned once and then dismissed. As far as your games go, I can only guess, knowing about your taste in mods, that you have some installed that may not use the most efficient or modern techniques...

Edited by subtledoctor, 13 March 2018 - 03:06 PM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#27 Reddbane

Reddbane
  • Members
  • 40 posts

Posted 13 March 2018 - 04:22 PM

@subtledoctor

I'm actually studying your Kensai revision, since it does use a script to apply a kit, after using a script to initiate a dialogue choice.  I've been able to locate the relevant files (Spl, script, cre) files that initiate dialogue that begins the choice, but I wonder if you could help point me to the relevant script and creature files that apply the respective (weapon) kit change once the dialogue decision had been taken?  That is what names shoud be looking for .BCS and .CRE, since all I could disover, so far, was D5_KENF.CRE and D5D5_KENF.BCS, which I assume is used to "create" the dialogue choice?



#28 subtledoctor

subtledoctor
  • Modders
  • 2493 posts
  • Gender:Male

Posted 13 March 2018 - 05:27 PM

Dialogues can initiate Script Actions. So the main thing that needs to be done is to initiate the dialogue. You summon the .CRE, you give the .CRE a super-simple script that uses ActionOverride to get its summoner (you) to start a dialogue, then certain dialogue responses trigger script actions like AddKit.

Don't look at the kensai stuff after it's installed; look at the mod's .tpa file and see what files are COMPILEd, and take a look at those .D and .BAF files.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE




Reply to this topic



  



Also tagged with one or more of these keywords: Summons, Levels, Dual Class, Item Properties

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users