Hi, i was wondering if anyone knows which script fires up when you activate/deactivate a combat mode, so its is possible to add code in case a combat mode activates.
Combat Modes
Débuté par
mogromon
, août 01 2011 04:06
#1
Posté 01 août 2011 - 04:06
#2
Posté 01 août 2011 - 04:33
Mostly it's hard coded. You can activate them via script, but they are not like spells or feats. Mostly combat is not an area as easy to mod as easy as spells or innate abilities, and some feats. A few ( barbarian rage for example ) are scripted. Generally look at spells.2da as that almost always is used to determine the script involved, there is a column in feats.2da that has the spell id to be used for any feats which are really scripted.
Might want to use a heartbeat type of thing to trigger things after the mode is activated.
Might want to use a heartbeat type of thing to trigger things after the mode is activated.
#3
Posté 01 août 2011 - 12:47
uhmm, well the ones i want to modify dont have any spell id. i thought in adding an extra feat which is persistant with a peuso hearbeat but im sure there must be easier way. Is there a heartbeat script i can modify with the respective conditions???
#4
Posté 01 août 2011 - 03:06
Make the spellid script be an AOE (area of effect) - look through vfxpersistent.2da to see some examples of AOE components - in there there are the "onenter" "heartbeat" "onexit" for the AOEs. With a good examination you could reverse engineer you own - or modify an existing one for that matter (that is a duplicate)
#5
Posté 01 août 2011 - 04:13
What mode are you trying to modify? I've replaced Flurry of Blows in my game with a custom scripted feat so that I can get control of it. It's not the same as a true mode, because those are hard-coded, but it's the only way I can think of to be able to do stuff other than the norm with it. Things like Power Attack would be reasonably easy to do the same way. It kind of depends what you're trying to do, though.
#6
Posté 01 août 2011 - 04:38
thats the one i want to modify to get rid of the extra attack. So you need to create all the code for the feat to work????
#7
Posté 01 août 2011 - 06:03
What I've done is replaced the feat with a custom one. When you use it, it either applies or removes the effects, depending on whether it was already on or not (so it works as a toggle). The code itself is not that complicated, but there are certain issues due to the fact that it's no longer an actual mode any more. This means that it doesn't show up on the mode bar, and can be used with other modes. The former I am working on by making some custom modifications to the mode bar. The latter is a bit harder since though you can turn off other modes when you use Flurry, it's harder to turn off Flurry when you use other modes (since you can't hook directly into the activation of modes - possibly you could hook into the UIs, or just check each round). However, I just decided it wasn't worth it, because I don't see why a person shouldn't be able to Power Flurry or the like anyway.
#8
Posté 01 août 2011 - 10:56
uhmm, if i only add a spell id, does that disables the real effects of the feat??? or is it complemental??? i mean the feat take effects plus the code in the spell id
#9
Posté 01 août 2011 - 11:47
I'm not sure. I think the hardcoded effects would still occur. What I've done is just replaced the feat completely with a custom one of the same name. It appears to be the same feat, but the old one has actually been removed and a new one added. This just gives you more control over stuff. It's a bit of a roundabout way of dealing with things, but I can't see a better one given the way the engine is set up.
EDIT: It might actually be easier to apply a fake AoE effect with it own heartbeat and just check like that to see if the mode has been activated, as suggested - neither approach is really satisfactory, IMO, but there's not a lot of choice with these sorts of hard-coded things.
EDIT: It might actually be easier to apply a fake AoE effect with it own heartbeat and just check like that to see if the mode has been activated, as suggested - neither approach is really satisfactory, IMO, but there's not a lot of choice with these sorts of hard-coded things.
Modifié par The Fred, 01 août 2011 - 11:55 .
#10
Posté 29 août 2011 - 10:33
@The Fred: Is your edit of Flurry posted anywhere? If not, is there way I could snag it?
#11
Posté 29 août 2011 - 10:53
No, I'm still kind of working on it. The Flurry itself seems to be working (though it doesn't show up correctly on the character sheet - I think this is a character sheet issue, though) but the UI is somewhat unfinished, mostly because I'm adding other custom buttons to it for different things. I could probably produce a release version, or I could just send you what I have atm.
#12
Posté 29 août 2011 - 11:07
that would be amazing. what does it do differently, aside from allowing other modes?
#13
Posté 29 août 2011 - 11:19
I was planning on integrating some Warlock Buddy-esq bits into it. Mainly though it's for my custom PrC, which actually I don't think exists yet so probably doesn't have a name (the Shadow Warlock or something, I think), basically the Hellfire Warlock but a bit altered to fit my setting.

You can see there that I've put on buttons for Flurry and my custom Tainted Blast ability. The only thing is that in other people's modules, this PrC would not exist, and in mine, I've disabled Bards, so there are going to be some differences. However you could easily put the Bard button in the leftmost space (I think I actually made the button and things, just commented them out). The Warlock section would be pretty non-functional unless you built something like the Warlock Buddy into it, and the Monk section would just have Flurry (that's all I have but I was considing making new Monk feats, etc). It's sort of half-done at the moment, but it's something I've been meaning to finish off anyway (just I've been busy recently and I still haven't really gotten back into the toolset yet).
EDIT: The screenshots do not show the curse, there it is hovering over various buttons.

You can see there that I've put on buttons for Flurry and my custom Tainted Blast ability. The only thing is that in other people's modules, this PrC would not exist, and in mine, I've disabled Bards, so there are going to be some differences. However you could easily put the Bard button in the leftmost space (I think I actually made the button and things, just commented them out). The Warlock section would be pretty non-functional unless you built something like the Warlock Buddy into it, and the Monk section would just have Flurry (that's all I have but I was considing making new Monk feats, etc). It's sort of half-done at the moment, but it's something I've been meaning to finish off anyway (just I've been busy recently and I still haven't really gotten back into the toolset yet).
EDIT: The screenshots do not show the curse, there it is hovering over various buttons.
Modifié par The Fred, 29 août 2011 - 11:20 .
#14
Posté 29 août 2011 - 12:37
does the mod do anything else to flurry? also, do you know how the game determines how to make a mode available (i know having a bow equipped and rapid shot makes rapid shot available, but I don't know how the game knows)
#15
Posté 29 août 2011 - 08:35
No, I've had to bypass modes entirely because they're pretty much hardcoded. What I have there is that when you press the Flurry button, you don't actually go into Flurry mode, you just get the bonuses and penalties, as applied through script. I've also had to replace the feat with a custom one, so that you can't turn the real and fake Flurries on at the same time.
In terms of making the mode available, I think the modes are linked to in the feats.2da file. However, it doesn't really seem possible to make a new mode or anything, so by bypassing it this way I can add modes to the bar through script and control how they're switched on the same way. It is a bit of a hassle, though, especially since you can just add items to a grid the same easy way you can add rows to a list box, unfortunately.
In terms of making the mode available, I think the modes are linked to in the feats.2da file. However, it doesn't really seem possible to make a new mode or anything, so by bypassing it this way I can add modes to the bar through script and control how they're switched on the same way. It is a bit of a hassle, though, especially since you can just add items to a grid the same easy way you can add rows to a list box, unfortunately.
#16
Posté 31 août 2011 - 11:36
Hey, The Fred,
I may be interested in your flurry scripts. I'm working on an anti-paladin class, which means I had to script a new "Smite Good" feat (I call the new feat "Smite Goodness" for now). Problem is, I'm trying to figure out how to keep the smite from being added to all of the character's attacks during the round instead of just the 1st attack.
I've been combing through the Tome of Battle scripts recently. In other posts concerning smites, Kaedrin has suggested some of his scripts may be of use.
I may be interested in your flurry scripts. I'm working on an anti-paladin class, which means I had to script a new "Smite Good" feat (I call the new feat "Smite Goodness" for now). Problem is, I'm trying to figure out how to keep the smite from being added to all of the character's attacks during the round instead of just the 1st attack.
I've been combing through the Tome of Battle scripts recently. In other posts concerning smites, Kaedrin has suggested some of his scripts may be of use.
Modifié par Axe_Edge, 31 août 2011 - 11:38 .
#17
Posté 01 septembre 2011 - 03:26
i see two posible solutions:
1. you create a custom onhitcastspell property. When you use the feat the property is added to the weapon and you give yourself an extraordinary or supernatural attack bonus effect so it stacks with the weapon bonus and you save via setlocalint the value of the bonus. When the weapon hits the spell is cast, and what the spell does is apply the extra damage, remove the item property you added and remove the effect using GetFirstEffect, GetEffectType (EFFECT_TYPE_ATTACK_INCREASE), GetEffectSubType(supernatural or extraordinary) and GetEffectInteger comparing to the localint you save before, and remember to delete the local int.
2. You give yourself the attack bonus and setlocalint(oCaster, "Smite Goodness", TRUE), and modify the nw_default6 or something similar that fires up each time a creature is damaged, the ondamage script checks using getlocalint(oDamager, "Smite Goodness") and in case its true, applies the extra damage to the damage creature and deletes the local int
1. you create a custom onhitcastspell property. When you use the feat the property is added to the weapon and you give yourself an extraordinary or supernatural attack bonus effect so it stacks with the weapon bonus and you save via setlocalint the value of the bonus. When the weapon hits the spell is cast, and what the spell does is apply the extra damage, remove the item property you added and remove the effect using GetFirstEffect, GetEffectType (EFFECT_TYPE_ATTACK_INCREASE), GetEffectSubType(supernatural or extraordinary) and GetEffectInteger comparing to the localint you save before, and remember to delete the local int.
2. You give yourself the attack bonus and setlocalint(oCaster, "Smite Goodness", TRUE), and modify the nw_default6 or something similar that fires up each time a creature is damaged, the ondamage script checks using getlocalint(oDamager, "Smite Goodness") and in case its true, applies the extra damage to the damage creature and deletes the local int
#18
Posté 01 septembre 2011 - 04:52
I see. Thanks mogormon. Great tips. I'll dig through the spell scripts for a spell that is similar. Looks like deleting the local int immediately after a hit will keep the smite from running into other attacks within the round.
#19
Posté 01 septembre 2011 - 11:29
Could you not just use the Blackguard's Smite Good feat? That ought to work. Failing that, there are things you can do with, say, Hideous Blow (HB is a really cool mechanic, engine-wise, but I haven't gotten 'round to looking at it properly yet). Otherwise Mogromon's first suggestion is probably the best.
#20
Posté 01 septembre 2011 - 02:29
Fred, does your custom flurry add an attack per round, and if so, have you found a way around the bug that keeps on increasing the number of attacks per round every time you load the game?
#21
Posté 01 septembre 2011 - 03:30
Uhm... what bug? ;-)
#22
Posté 01 septembre 2011 - 09:27
I agree with The Fred, the first suggestion i gave you is the best. it's self contained and you avoid an unnecessary check each time damage is done.
I've been checking the hideous blow, but dont fully understand it, especially the part of ¿¿¿EffectHideousBlow(metamagic)????
I've been checking the hideous blow, but dont fully understand it, especially the part of ¿¿¿EffectHideousBlow(metamagic)????
#23
Posté 01 septembre 2011 - 10:47
The Fred wrote...
Could you not just use the Blackguard's Smite Good feat?
Hi The Fred. I gave my anti-paladin the Blackguard's smite good. The engine correctly figures out the attack roll, but does not add the anti-paladin's level to the damage. The engine is obviously looking for blackguard levels for the damage (dang hardcoded feats).
I wonder if your feat buttons/gui can run a few scripts in sequence. That way the regular blackguard smite good can be run, then, a second script would run to add the anti-paladin's levels to the damage. I'm not even sure how to figure out the default command that fires the default smite good.
Wish the devs would have just come up with a general smite good, evil, infidel feats. That way we could just give a 6th level anti-paladin "FEAT_SMITEGOOD_6" and be done with it.
I don't mean to clutter up your thread with my smite problems. Thanks for your insight over there:
social.bioware.com/forum/1/topic/164/index/8242002/1#8248355
Thanks for your help over there.
Modifié par Axe_Edge, 01 septembre 2011 - 10:55 .
#24
Posté 02 septembre 2011 - 11:44
Yeah, a lot of things are kinda unnecessarily hardcoded.
Just a quick explanation of where I am going with HB:
Hideous Blow works by adding an effect to a character which contains an integer corresponding to a "metamagic". These metamagics are actually the Warlock's Eldritch Essences. When the character next hits with an attack, the hideous blow script fires which applies an Eldritch Blast to the target with the corresponding essence, and the hideous blow effect ends on the character.
Now, I suspect it ends before the script is even fired, but if it doesn't you could find the effect and check which spell or feat created it. Then, you could do some other appropriate action instead of a Blast. This would effectively give you a one-shot On Hit property, but as an effect, which would mean that it would persist between weapon switches and also apply to unarmed and natural attacks. Could be really useful.
Just a quick explanation of where I am going with HB:
Hideous Blow works by adding an effect to a character which contains an integer corresponding to a "metamagic". These metamagics are actually the Warlock's Eldritch Essences. When the character next hits with an attack, the hideous blow script fires which applies an Eldritch Blast to the target with the corresponding essence, and the hideous blow effect ends on the character.
Now, I suspect it ends before the script is even fired, but if it doesn't you could find the effect and check which spell or feat created it. Then, you could do some other appropriate action instead of a Blast. This would effectively give you a one-shot On Hit property, but as an effect, which would mean that it would persist between weapon switches and also apply to unarmed and natural attacks. Could be really useful.
#25
Posté 03 septembre 2011 - 04:30
if you create a custom button you can run multiple scripts from it. In the .xml files the command is OnLeftClick..., you can add OnLeftClick0 and OnLeftClick1. Check Master Changer advice on GUI.
Hideous Blow really seems like a cool feature if it can be used in the way you explained.
Hideous Blow really seems like a cool feature if it can be used in the way you explained.





Retour en haut






