Jump to content

script in character abilities


mTk

Recommended Posts

OK, let me make this clear right away. I'm a total newbie - started editing stuff today, actually.

 

Great. So I started making a kit. Alright, the kit exists now, and it even has some silly special abilities (when levelling). As far as I figured out, you can give any "spell" as a special ability to the character.

But what I really want is to have some sort of "script" style stuff into those "spells". You know, something like "When the special ability is used, if char HP is below 50%, get +5 to strength for 4 rounds. Otherwise get +2 to strength" ...that kind of stuff. So what I basically would want to do is a special ability that is if-ed.

 

Can this be done? And most inportant how? :D

Thanks for helping out a n00b soul.

Link to comment

Yes and no. There are certain things you can do by special effects, but they're limited to what the type of identifiers in the IDS files. The IDS files only contain basic designations, such as race, class, alignment, etc. So you could have one spell have different effects based on these by using an EFF file. However, that won't work in the case of, say, hit point level.

 

If the kit is only for Miella, you can implement a scripting solution fairly easily. The spell could simply set a GLOBAL variable and then her personal script could check for it and apply the proper spell depending on her HP level. There are two effects for setting a LOCALS variable, but one is a ToB opcode (meaning SoA-only users are out) and I've never gotten the other one to work properly. :/

Link to comment

I don't seem to be getting anywhere, so I'll just tell the long story.

 

I really liked that G3 Sharpshooter kit (so it's not a NPC). I've been thinking of something similar for a long time now. Unfortinatelly the kit wasn't exactly what I wanted, so I thought I'd just make my own... hope nobody takes offence. :D

 

So, to make the hiding aspect of a ranged character more usable, I thought of having some sort of "ranged backstab". Guess the only way for doing this is some sort of special ability (as you can't backstab with ranged weapons, duh).

My idea was that once the special ability is being used, it would check if the user is invisible (hiding in shadows) and if so then give him triple damage or something like that.

 

Alright that hit points story was a bad example, but there's the full story. In other words, I need to check if the user is invisible (or hiding, if it's a different thing). Any help would be much appreciated.

 

Btw, what tools do you use for this stuff? I have Weidu and Near Infinity, and they seem to work alright so far.

Link to comment
You could summon an invisible, immortal creature from your special ability, and then use CheckStat on LastSummoner, and then apply the actual spell if the checks are met.

I'm sorry, but I fail to see the need for an invisible creature. Sure, you can't have a player-script checking the stuff, but baldur.bcs should. Throw in a check for the kit, then a check for the spell, and voila!

 

Unless I've failed to see if there was something else the creature was supposed to do...

Link to comment

Archived

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

×
×
  • Create New...