methority Posted February 22, 2018 Posted February 22, 2018 Long live and prosper to you, mighty wizards of IE modding&scripting 'n stuff. I shouldn't even be here for my misery of appropriate skills and language. But! I humbly ask you to help me with embedding a certain script in BG:EE which should make my main character Rest() (restore spells without movie and game time advanced) on demand with a hotkey. In this case I have absolutely no competence or knowledge and skills to rely on. My aspiration is based on this post: https://forums.beamdog.com/discussion/8317/general-bgee-customization/p1 section 3 - Using Custom Scripts, also I suggest involving script action Rest() ...somehow and make it automated with hotkey, but I have no useful ideas about it and my 15-minute experience of using DLTCEP ended fiasco. So, please, can I get any "step by step" help? Quote
Roxanne Posted February 22, 2018 Posted February 22, 2018 (edited) Long live and prosper to you, mighty wizards of IE modding&scripting 'n stuff. I shouldn't even be here for my misery of appropriate skills and language. But! I humbly ask you to help me with embedding a certain script in BG:EE which should make my main character Rest() (restore spells without movie and game time advanced) on demand with a hotkey. In this case I have absolutely no competence or knowledge and skills to rely on. My aspiration is based on this post: https://forums.beamdog.com/discussion/8317/general-bgee-customization/p1 section 3 - Using Custom Scripts, also I suggest involving script action Rest() ...somehow and make it automated with hotkey, but I have no useful ideas about it and my 15-minute experience of using DLTCEP ended fiasco. So, please, can I get any "step by step" help? 0x0021 HotKey(I:Key*HotKey) Returns true only if the specified key was pressed in the last script round. Hotkeys defined in keymap.ini take precedence over hotkeys expected by this trigger. 96 Rest() This action applies the benefits of resting (i.e. healing, restoring spells and restoring abilities) to the active creature. The action does not play the rest movie or advance game time. IF HotKey(X) THEN RESPONSE #100 StartCutScene("MyRest") END where MyRest.baf is this IF True() THEN RESPONSE #100 CutSceneId(Player1) StorePartyLocations() FadeToColor([20.0],0) Wait(1) Rest() ActionOverride(Player2,Rest()) ActionOverride(Player3,Rest()) ActionOverride(Player4,Rest()) ActionOverride(Player5,Rest()) ActionOverride(Player6,Rest()) Wait(1) RestorePartyLocations() Wait(2) FadeFromColor([30.0],0) EndCutSceneMode() END Just a starting point, you need to test and modify it to your needs. I have no idea where you want to put that first script that triggers the cutscene? Some NPC that must be in party, some creature you create in the area you are in? Baldur,bcs? It must be a script that already runs in the active area, Edited February 22, 2018 by Roxanne Quote
CamDawg Posted February 23, 2018 Posted February 23, 2018 One of the neat things about EE is that you can directly execute scripting actions from the console. This will rest player1: C:Eval('ActionOverride(Player1,Rest())') Repeat for players 2-6. Quote
Roxanne Posted February 23, 2018 Posted February 23, 2018 One of the neat things about EE is that you can directly execute scripting actions from the console. This will rest player1: C:Eval('ActionOverride(Player1,Rest())') Repeat for players 2-6. This is probably what the OP was looking for... I had my modder's view on it, far too complex thinking. Quote
methority Posted February 23, 2018 Author Posted February 23, 2018 I want to execute this command with a hotkey, not by texting it in console. Is it possible? Quote
Roxanne Posted February 23, 2018 Posted February 23, 2018 (edited) I want to execute this command with a hotkey, not by texting it in console. Is it possible? In this case the method with two scripts, I posted would be applicable. While the cutscene script is a *free* script, just called by the other one's action block, the first one needs some *anchor* in the game. It must be running in the active area to react to your hotkey triggering. There's many ways of doing this and depends on your circumstances. Edited February 23, 2018 by Roxanne Quote
Jarno Mikkola Posted February 23, 2018 Posted February 23, 2018 I want to execute this command with a hotkey, not by texting it in console. Is it possible? Well, considering the console has memory of 10 last lines, using a script and hotkey script is rather much the same action. Once you have typed the code one time... Tilde key, the upwards pointing arrow key and Enter. Quote
methority Posted February 23, 2018 Author Posted February 23, 2018 I've found the weird solution spontaneously somehow. I've been poking around with WeiDU in an intuitive manner, copied this text: IF HotKey(K)THEN RESPONSE #100 Rest()END Then I did save/export this as .bcs file, manually converted it to .bs file and added it to player scripts as custom script? Had no idea what I'm doing, but this custom script was accessible ingame, so I choose it for my main character and then, by coincidence, I had "turn AI on-off function" on my "K" button, so it turned out that I have to reload this party AI functionality and my "resting script" works. Sorry for grammar Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.