Jump to content


Photo

How to stop a bard song via opcode?


7 replies to this topic

#1 Ulb

Ulb
  • Members
  • 146 posts
  • Gender:Male

Posted 08 August 2017 - 10:16 PM

Heya,

 

I have a bard song that has a chance to do some stuff and disable the bard song ability for a while. The problem is when that effect goes off but the character doesn't get any new action input it will just continue singing the bard song even though the button is disabled.

 

I tried using opcode 356 (which NI calls “Stop all actions”) but that just crashes my game (which, if you think about it, is a good way to stop all actions..)

 

I also tried using stun/cure stun effects but if I chain them up like that they won't break the bard song either.

The only solution I can think of right now is to spawn a helper creature and use an actionoverride on the caster but that seems like a pretty shitty solution.

 

I' be grateful for any ideas.

 

On a somewhat related note:

Is there a newer version of IESDP floating around somewhere? The g3 version is outdated and the newer version that was here: http://iesdp.baldurs...pcodes/bgee.htm seems to be gone.



#2 lynx

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

Posted 08 August 2017 - 10:22 PM

ClearActions(O:Object*) scripting action should also take care of modals.

 

Latest IESDP is always here: https://gibberlings3.github.io/iesdp/


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 ...

#3 Ulb

Ulb
  • Members
  • 146 posts
  • Gender:Male

Posted 08 August 2017 - 10:36 PM

 

Thanks lynx,

 

ClearActions(O:Object*) would also involve a helper creature though?

 

I think I just found a way to do it within the spell effects by having him cast an empty dummy spell via opcode 146, that seems to work.

 

I've also noted another possibly bigger issue though:

Combat scripts like aTweaks' simple scripts (I love those) will ignore the disabled bard song button and merrily continue to activate the song..

So is there a way to prevent this outside of re-writing/not using those scripts?


Edited by Ulb, 08 August 2017 - 10:38 PM.


#4 subtledoctor

subtledoctor
  • Modders
  • 2144 posts
  • Gender:Male

Posted 09 August 2017 - 03:22 AM

Oppose 146 to stop the song. (It can't be totally instantaneous, you need the casting animation.) Then disable the button for a while. And finally, change the bard song to something with no effect so scripted singing won't cheat.

Then at the end of the duration, switch the song back to the original and re-enable the button.

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


#5 Ulb

Ulb
  • Members
  • 146 posts
  • Gender:Male

Posted 09 August 2017 - 04:30 AM

Aye,  I'm using the cast spell trick, that works quite nicely.

As for the bard song change, the whole thing was more about flavor anyway (since the effect turns the bard into a brutish monster I didn't want it to continue to sing) and since changing the bard song would still show him "singing" I'll just give him protection form the bardsong for the duration and be done with it.

 

Thx for the help guys!



#6 subtledoctor

subtledoctor
  • Modders
  • 2144 posts
  • Gender:Male

Posted 09 August 2017 - 05:58 AM

You could actually, theoretically, do a temporary class change. I'm toying with this idea for druid shapechanges... but I'm not sure how viable that is for something that might need to happen in combat. I think it requires scripts, not just spells.

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


#7 Ulb

Ulb
  • Members
  • 146 posts
  • Gender:Male

Posted 09 August 2017 - 06:24 AM

It's not really an option for my situation since it's such a minor cometic thing but it sounds interesting.
There are probably a lot of things that can go wrong though. Like, what happens if you get enough xp to levle up as the other class (druids are notorious for there level gap).



#8 Avenger

Avenger
  • Modders
  • 3710 posts
  • Gender:Male
  • Location:Hungary

Posted 12 August 2017 - 01:22 AM

Yeah, opcode 356 is more like a global timestop (if it even works in the given engine). 





Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users