Guest Test1499 Posted July 1, 2023 Posted July 1, 2023 I wish to turn certain party members to turn hostile I had look at BG2 vanilla game and DLG from poisoning the grove appeals to me but i have trouble to turn it to functioning code OR(3) !IfValidForPartyDialog("Aerie") // Aerie !IfValidForPartyDialog("Jaheira") // Jaheira !IfValidForPartyDialog("Cernd") // Cernd ActionOverride("Valygar",LeaveParty()) ActionOverride("Valygar",Enemy()) ActionOverride("Minsc",LeaveParty()) ActionOverride("Minsc",Enemy()) ActionOverride("Keldorn",LeaveParty()) ActionOverride("Keldorn",Enemy()) ActionOverride("Mazzy",LeaveParty()) ActionOverride("Mazzy",Enemy()) Quote
jmerry Posted July 2, 2023 Posted July 2, 2023 The basic commands there are clear and standard enough: LeaveParty() and Enemy(). Those apply to the "active" creature, so they need an ActionOverride() if the script block is being run from someone else's perspective. You can't just throw the ActionOverride in without thought, though - if the active creature is the same as the one being overridden to, that command and any that follow it won't be executed. So, for example, if it's in Jaheira's dialogue and I want her to leave the party and become an enemy, I need to use LeaveParty() Enemy() on their own. (That appears in the same conversation you were quoting from, in a branch that Jaheira speaks up in.) What else is there? The conditions. In a dialogue, responses can have a "trigger" script block - those "!IfValidForPartyDialog" lines in your example - to determine when that response appears. Then the response can have an "action" script block; this is what actually gets done when the conversation goes through that response. The same scripting language is used by the game's BCS scripts. For example, Keldorn has this block in his script for if you attack his family: IF OR(9) Dead("peony") // Peony Allegiance("peony",ENEMY) // Peony Dead("maria") // Lady Maria Allegiance("maria",ENEMY) // Lady Maria Dead("leona") // Leona Allegiance("leona",ENEMY) // Leona Dead("vesper") // Vesper Allegiance("vesper",ENEMY) // Vesper Global("AttackedKeldornsFamily","GLOBAL",1) InParty(Myself) AreaCheck("AR1003") // Firecam's Estate Global("KeldornKickMe","LOCALS",0) THEN RESPONSE #100 SetGlobal("KeldornKickMe","LOCALS",1) DisplayStringHead(Myself,11532) // This is the end, m'<PRO_LADYLORD>. It always was... My destiny demands it as much as yours. LeaveParty() Enemy() END (First block of KELDORN.BCS) Here, the condition block is "when does this happen?"; if the script is running and the conditions are met, the action block will be executed. Subject to priority order, of course - creature override scripts are higher priority than creature class scripts, the first block in a BCS script is higher priority than the second, and so on. You haven't gotten into the details of what you're trying to do, so I can't get more specific about anything. Quote
Guest Test 1499 Posted July 4, 2023 Posted July 4, 2023 The example is probably enough to recap In Dialogue >> Select option NPCs dont like >> proclamation of hostility from either of 3 NPCs >> Calls for reinforments dialogue >> If in party they will turn hostile >> EOD 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.