Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#626167 04/10/17 04:05 PM
Joined: Jul 2014
F
fhrosty Offline OP
stranger
OP Offline
stranger
F
Joined: Jul 2014
Brand new to modding, but I've got some programming experience. I've followed the tutorial on adding a new skill and skillbook to the game, and now I'd like to take my modding power up a few notches. Is it possible to run some script whenever combat starts or ends? I'd like to automatically apply some buffs or debuffs at the start of combat that last for X rounds.

fhrosty #626247 04/10/17 06:38 PM
Joined: Jul 2014
Location: East Coast
journeyman
Offline
journeyman
Joined: Jul 2014
Location: East Coast
The event you are looking for is OnEnteredCombat. Use a charscript and include it in base or defaultbehavior.

Code
ON
	OnEnteredCombat(__Me, _)
CHECK "c1"
	CharacterIsPlayer(__Me)
Actions
	Do a thing for players


Alter as needed based on your needs.

Last edited by Sinistralis; 04/10/17 06:38 PM.
fhrosty #626309 04/10/17 08:21 PM
Joined: Jul 2014
F
fhrosty Offline OP
stranger
OP Offline
stranger
F
Joined: Jul 2014
Thanks! Do you have a link to where I can learn more about what functions are available and what types of scripts I need to use for different goals? Or has the wiki not gotten that fleshed out yet?

Edit: Answered my own question:
https://docs.larian.game/Osiris

Last edited by fhrosty; 04/10/17 08:42 PM.
fhrosty #626353 04/10/17 09:48 PM
Joined: Sep 2017
G
stranger
Offline
stranger
G
Joined: Sep 2017
Originally Posted by fhrosty
Thanks! Do you have a link to where I can learn more about what functions are available and what types of scripts I need to use for different goals? Or has the wiki not gotten that fleshed out yet?

Edit: Answered my own question:
https://docs.larian.game/Osiris


For item/char/gameScripts there is also this list: https://docs.larian.game/Character_and_Item_Script_Triggers,_Calls,_and_Queries

And you can type for example "On" in the scripting editor and it will suggest you all possible functions. If you select one and then type ( you get a hover window with the parameters and a short description about the function.

Not quite as good, but also usable: in the story editor you can type for example "trigger" and then cmd+space and it will show you a list of suggested functions/values etc.


Moderated by  Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5