Can I attach a script to a character class??
#1
Posted 14 April 2008 - 09:47 PM
#2
Posted 14 April 2008 - 10:33 PM
But if it's a skill(spell) you want the kit to use all the time, you first need to give him the spell and then make the spell refresh after it has been cast. Then and only then you can determine the when you want it to be casted, which in turn gives you the IF -commands. No I can't help you there.
Deactivated account. The user today is known as The Imp.
#3
Posted 14 April 2008 - 11:41 PM
- Liam
Modding Projects
Complete:
Arath NPC - Nephele NPC - Xulaye NPC - Iylos NPC - Ninde NPC - Darian NPC - Yeslick NPC - Adrian NPC - Dace NPC - Valerie NPC - Isra NPC
Viconia Friendship - Mazzy Friendship - Imoen Friendship - Yoshimo Friendship - Sarevok Friendship - Neera Expansion
IEP Extended Banter
Sarevok Romance
Haer'Dalis Romance
In Progress:
Khadion NPC - Delainy NPC - Sarine NPC
#4
Posted 15 April 2008 - 12:09 AM
I realize they might the things stated above might be confusing (since they have nothing to do with your question), so please allow me to clarify--and also answer your question:
No, it really doesn't depend on what you want to do. Regardless of whether you want the kitted character to shout "I'm [kit]!" every thirty seconds, do variable setting/checking or cast custom spells, the circumstances do not change whether you are able to assign/attach a script to a certain kit. The short answer to the question is, no matter what you want it to do, "no." There are certain workarounds that can serve the same purpose, though. (See below.)It really depends greatly on what you want it to do.
Unfortunatly, I cannot clarify this since I have no idea whatsoever of what it means. Reading several times still doesn't make it clearer, I'm afraid. However, I can assure you that it has absolutely nothing to do with your question.I would advice you to really think about the fact of; whether you want to make the playing of a kit, a job or just plain fun? Cause a casual player can't just play the game if for example his reputation is 1 so every NPC he meets, attacks him... etc.
I believe suggestion here is somewhat equivalent to "please shoot yourself in the foot." I don't advise doing that; hence, I don't advise you to listen to any of the above.But if it's a skill(spell) you want the kit to use all the time, you first need to give him the spell and then make the spell refresh after it has been cast. Then and only then you can determine the when you want it to be casted, which in turn gives you the IF -commands. No I can't help you there.
As for your question:
As mentioned, there are several workarounds you could use. The easiest one would be to use bladur.bcs (and baldur25.bcs for ToB). It is a script that always is running (regardless of whether AI is on or off), in which you can add scripting blocks that do exactly what you want them to. You will have to ensure that these blocks only execute if the character has your kit, which is accomplished by using the Kit() identifier. So, for example, if your scripting block looks like this in your intended kit-based script:
IF Condition() THEN RESPONSE #100 Action() END...it will have to look like this if put in baldur.bcs:
IF Kit(Player1,3) Condition() THEN RESPONSE #100 Action() END...if intended for the PC (Player1). Please note that the kit identifier value, 3, in this case refers to the Kensai kit. This value is unique to your script and will be assigned when you use WeiDU to ADD_KIT, and you cannot know beforehand what the value will be. To work around this, it gets slightly more complicated. You may want to look at CamDawg's excellent kit-making tutorial first to understand how ADD_KIT works, and then you can use what Cam calls the "internal name of the kit" to solve the problem.
For example, if you use ADD_KIT ~mykit~, then you can do the following in your script:
IF Kit(Player1,%mykit%) Condition() THEN RESPONSE #100 Action() END...as long as you EXTEND_* or COMPILE the script in your .tp2 (if you're appending baldur.bcs, please use EXTEND_TOP) after you've added the kit. Make sure you use EVALUATE_BUFFER in your EXTEND_* or COMPILE statement, like this:
EXTEND_TOP ~baldur.bcs~ ~mykit/scripts/script.baf~ EVALUATE_BUFFERIt should also be noted that while this may solve the direct question you asked, there might be other ways to do what you intend to accomplish without using a script at all. In order to evaluate the situation and make sure what the best solution is, we would need to know exactly what you want to do.
I hope this has been a bit more informational, and that it makes sense. Please don't hesitate to reply with additional questions if there's anything you don't quite understand or are unsure about!
Good luck modding!
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#5
Posted 15 April 2008 - 01:23 AM
As a reminder, I assume you realize that using two of every punctuation character will tend to break scripts, when you go to write them?
Edited by Azkyroth, 15 April 2008 - 01:26 AM.
"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard
#6
Posted 17 April 2008 - 01:44 PM
Other problems I want to handle include: You cannot have a casting time or cool effects when transitioning back to human (weapon switching just immediately switches you to human, which nags at my role-playing consciousness), and also the mod permits unlimited spell casting while shapeshifted. I think this is wrong (and unbalanced) - a Druid trains all his life to control the shapeshifting, mastering speaking should be a whole other matter (whereas Gnoll mages were born as Gnolls and naturally develop Gnoll linguistic skills). I know the latter can be handled by adjusting the weapon item with miscast magic or some such but I'm going for having everything the way I think it should be. I've also added effects such as a damage animation and falling down after reverting to human, confused for the 1st 3 secs of becoming a werewolf, etc.). But after a lot of messing around and adjusting, I think that I can't get exactly what I want to trigger and untrigger the werewolf form without some scripting. Probably, I will go for a script that detects the presence of the werewolf form (created by an unmovable armor item created in the armor slot when the ability is used) and the lack of presence of the werewolf paws, and if this is true (which means the paw was dispelled), than the script immediately re-casts the magical werewolf paws.
Any other views?
#7
Posted 17 April 2008 - 02:30 PM