Svartypops Posted August 5, 2021 Posted August 5, 2021 (edited) As you might guess from the title, I have been trying to make a mod that lets me open the party selection window because I have the game on a mechanical drive and the load times are ... long. Having to switch several zones to swap in a "Suggested party member" is a somewhat lengthy process that I'd like to enbriefenate. To that end, I've tried the following, but with no success. I made an item, put an itemmod on the item, put a statuseffect on the itemmod, put the item in my character's inventory, made a new hook that checks if the player is in the scene (as above) and if any party member ("b1a7ea1e-0000-0000-0000-000000000000") has the status effect from the item above, with the script to Open Inn (I couldn't find one to open the party selection window) with this guid: "19b74d83-b66b-4cd2-aad2-5f43a2a5b3fa". Does anybody know what I might be doing wrong or a better way to do it, please? Edited August 5, 2021 by Svartypops 2 1
Noqn Posted August 5, 2021 Posted August 5, 2021 Cool idea, I had similar thoughts before. Sadly ScriptHooks only trigger when you load a scene or open a new map, though I think it's possible to utilize the InspectOnUseButton property of an ItemComponent to trigger a script. IIRC that's how Modwyr opens conversations. As for Inns, try "6f88c8c2-e6b7-4429-9407-5ae6c011d4fd" - the ID of Port Maje's crew shop which is globally available and should allow you to edit the party. 1
Svartypops Posted August 11, 2021 Author Posted August 11, 2021 On 8/5/2021 at 2:43 PM, Noqn said: Cool idea, I had similar thoughts before. Sadly ScriptHooks only trigger when you load a scene or open a new map, though I think it's possible to utilize the InspectOnUseButton property of an ItemComponent to trigger a script. IIRC that's how Modwyr opens conversations. As for Inns, try "6f88c8c2-e6b7-4429-9407-5ae6c011d4fd" - the ID of Port Maje's crew shop which is globally available and should allow you to edit the party. This may be grasping at straws... The companion dialogue buttons (speech bubble icon) seem to be dynamic - I've seen them appear after dialogue in a scene - would it be possible to open one on the player's portrait, perhaps? 1
Noqn Posted August 12, 2021 Posted August 12, 2021 I was thinking kinda like how the Burned Book of Law does it: "InspectOnUseButton": [ { "DisplayConditional": { "Operator": 0, "Components": [] }, "DisplayString": 5249, "Script": { "Conditional": { "Operator": 0, "Components": [] }, "Scripts": [ { "Data": { "FullName": "Void StartConversation(Guid, Guid, Int32)", "Parameters": [ "b1a8e901-0000-0000-0000-000000000000", "408c88c5-9239-4268-92a9-b5548abec032", "0" ] }, "Conditional": { "Operator": 0, "Components": [] } } ] } } ], Like this the script will run whenever you press the item's talk/interact button, I think you can even rename the button. 1
Kvellen Posted August 13, 2021 Posted August 13, 2021 That is odd. I would have assumed there would be a script that opens the party management window directly. Opening an inn does seem to be the best solution, and after a quick test I can confirm what @Noqn says does indeed work. 1
Noqn Posted August 13, 2021 Posted August 13, 2021 51 minutes ago, Kvellen said: That is odd. I would have assumed there would be a script that opens the party management window directly. ANNOYINGLY there's a console cheat for this very thing (ManageParty) but it hasn't a corresponding Script Call...
Kvellen Posted August 13, 2021 Posted August 13, 2021 Oh yeah, that's a really strange omission. Looking through the enumerations section, under WindowType there is mention of "PartyManagment". But there seems to be no script that seems to call this type directly and the only context for it from what I can tell is in relation to UI audio events.
Svartypops Posted August 14, 2021 Author Posted August 14, 2021 (edited) On 8/13/2021 at 6:16 PM, Kvellen said: Opening an inn does seem to be the best solution, and after a quick test I can confirm what @Noqn says does indeed work. I can't get it to work. I can't even get the item to appear. I have failed Here is what I tried: Quote { "GameDataObjects": [ { "$type": "Game.GameData.ItemGameData, Assembly-CSharp", "DebugName": "INN_ANYWHERE_Test", "ID": "d62bc9d4-6e6c-4ecf-8770-a9a7675b0439", "Components": [ { "$type": "Game.GameData.ItemComponent, Assembly-CSharp", "DisplayName": 25124, "DescriptionText": 25125, "DescriptionTextTactical": -1, "FilterType": "Quest", "InventoryAudioEventListID": "32023afc-c1c3-4b6a-bcfd-77bde56ee6c3", "IsQuestItem": "true", "IsIngredient": "false", "IsCurrency": "false", "IsAdventuringItem": "false", "IsJunk": "false", "CanSellForFullValue": "false", "MaxStackSize": 1, "NeverDropAsLoot": "false", "CanBePickpocketed": "true", "IsUnique": "false", "Value": 10, "IconTextureSmall": "gui/icons/items/misc/book_paper_s.png", "IconTextureLarge": "gui/icons/items/misc/book_paper_l.png", "PencilSketchTexture": "", "InspectOnUseButton": [ { "DisplayConditional": { "Operator": 0, "Components": [] }, "DisplayString": 5249, "Script": { "Conditional": { "Operator": 0, "Components": [] }, "Scripts": [ { "Data": { "FullName": "Void StartConversation(Guid, Guid, Int32)", "Parameters": [ "b1a8e901-0000-0000-0000-000000000000", "6f88c8c2-e6b7-4429-9407-5ae6c011d4fd", "0" ] }, "Conditional": { "Operator": 0, "Components": [] } } ] } } ], "IsPlaceholder": "false" } ] } ] } I guess 5249 is the button text - I had planned to change it later, if required. I've tried Quest or Misc filtertypes. I've tried adding it to an NPC inventory and the player using the tried-and-tested method that I used for lots of other items, but to no avail. Edited August 14, 2021 by Svartypops
Kvellen Posted August 14, 2021 Posted August 14, 2021 For the Inn window to appear when you click the button you need to change "Void StartConversation(Guid, Guid, Int32)" to "Void OpenInn(Guid)" and remove all the Parameters except the GUID for the Inn. "InspectOnUseButton": [ { "DisplayConditional": { "Operator": 0, "Components": [] }, "DisplayString": 5249, "Script": { "Conditional": { "Operator": 0, "Components": [] }, "Scripts": [ { "Data": { "FullName": "Void OpenInn(Guid)", "Parameters": ["6f88c8c2-e6b7-4429-9407-5ae6c011d4fd"], "Flags": "", "UnrealCall": "", "FunctionHash": 0, "ParameterHash": 0 }, "Conditional": { "Operator": 0, "Components": [] } } ] } } ], 3 hours ago, Svartypops said: I guess 5249 is the button text - I had planned to change it later, if required. I've tried Quest or Misc filtertypes. I've tried adding it to an NPC inventory and the player using the tried-and-tested method that I used for lots of other items, but to no avail. Yup 5249 is the text that displays on the button. I'll be honest I don't know a whole lot about scripting and creating mod script hooks. So when I test item mods I just add them to the stash using a modified version of noqn's NewGame+ Quote { "GameDataObjects": [ { "$type": "Game.GameData.ModScriptHookGameData, Assembly-CSharp", "DebugName": "Grant_Inn_Item_ScriptHook", "ID": "41b4ebb8-13a4-4bc4-81bf-366e8175d49e", "Components": [ { "$type": "Game.GameData.ModScriptHookComponent, Assembly-CSharp", "RunOnlyOnce": "false", "SucceedOnlyOnce": "true", "Script": { "Conditional": { "Operator": 0, "Components": [ { "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats", "Data": { "FullName": "Boolean IsInActiveScene(Guid)", "Parameters": ["546e5d97-c234-46dc-9439-b23aafc02198"], "Flags": "", "UnrealCall": "", "FunctionHash": 0, "ParameterHash": 0 }, "Not": true, "Operator": 0 } ] }, "Scripts": [ { "Data": { "FullName": "Void GiveItems(Guid, Int32)", "Parameters": [ "d62bc9d4-6e6c-4ecf-8770-a9a7675b0439", "1" ] }, "Conditional": { "Operator": 0, "Components": [] } } ] } } ] } ] }
Svartypops Posted August 16, 2021 Author Posted August 16, 2021 (edited) Thanks a lot for that! I'm still struggling with the blasted thing, though. Did you make working version? This is a bit off-topic but the script hook you use there is really curious because when I check for the PC in a scene I use this GUID: "546e5d97-c2fe-42dd-a22e-e8cbd7888131" but yours is only partly the same; "546e5d97-c234-46dc-9439-b23aafc02198" I wonder why that is? Edited August 16, 2021 by Svartypops
Kvellen Posted August 17, 2021 Posted August 17, 2021 Sure, this is working on my end: { "GameDataObjects": [ { "$type": "Game.GameData.ItemGameData, Assembly-CSharp", "DebugName": "INN_ANYWHERE_Test", "ID": "d62bc9d4-6e6c-4ecf-8770-a9a7675b0439", "Components": [ { "$type": "Game.GameData.ItemComponent, Assembly-CSharp", "DisplayName": 25124, "DescriptionText": 25125, "DescriptionTextTactical": -1, "FilterType": "Quest", "InventoryAudioEventListID": "32023afc-c1c3-4b6a-bcfd-77bde56ee6c3", "IsQuestItem": "true", "IsIngredient": "false", "IsCurrency": "false", "IsAdventuringItem": "false", "IsJunk": "false", "CanSellForFullValue": "false", "MaxStackSize": 1, "NeverDropAsLoot": "false", "CanBePickpocketed": "true", "IsUnique": "false", "Value": 10, "IconTextureSmall": "gui/icons/items/misc/book_paper_s.png", "IconTextureLarge": "gui/icons/items/misc/book_paper_l.png", "PencilSketchTexture": "", "InspectOnUseButton": [ { "DisplayConditional": { "Operator": 0, "Components": [] }, "DisplayString": 465, "Script": { "Conditional": { "Operator": 0, "Components": [] }, "Scripts": [ { "Data": { "FullName": "Void OpenInn(Guid)", "Parameters": ["6f88c8c2-e6b7-4429-9407-5ae6c011d4fd"], "Flags": "", "UnrealCall": "", "FunctionHash": 0, "ParameterHash": 0 }, "Conditional": { "Operator": 0, "Components": [] } } ] } } ], "IsPlaceholder": "false" } ] }, { "$type": "Game.GameData.ModScriptHookGameData, Assembly-CSharp", "DebugName": "Grant_Inn_Item_ScriptHook", "ID": "41b4ebb8-13a4-4bc4-81bf-366e8175d49e", "Components": [ { "$type": "Game.GameData.ModScriptHookComponent, Assembly-CSharp", "RunOnlyOnce": "false", "SucceedOnlyOnce": "true", "Script": { "Conditional": { "Operator": 0, "Components": [ { "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats", "Data": { "FullName": "Boolean IsInActiveScene(Guid)", "Parameters": [ "546e5d97-c234-46dc-9439-b23aafc02198" ], "Flags": "", "UnrealCall": "", "FunctionHash": 0, "ParameterHash": 0 }, "Not": true, "Operator": 0 } ] }, "Scripts": [ { "Data": { "FullName": "Void GiveItems(Guid, Int32)", "Parameters": [ "d62bc9d4-6e6c-4ecf-8770-a9a7675b0439", "1" ] }, "Conditional": { "Operator": 0, "Components": [] } } ] } } ] } ] } 20 hours ago, Svartypops said: This is a bit off-topic but the script hook you use there is really curious because when I check for the PC in a scene I use this GUID: "546e5d97-c2fe-42dd-a22e-e8cbd7888131" but yours is only partly the same; "546e5d97-c234-46dc-9439-b23aafc02198" I wonder why that is? I dunno, possibly just something as simple as those GUID were among a number of others generated as a batch?
Svartypops Posted August 17, 2021 Author Posted August 17, 2021 That's amazing. I gave it an icon and some text: 2
Svartypops Posted August 18, 2021 Author Posted August 18, 2021 (edited) Ooh! Maybe I should change the name to Linked Inn ...? Edited August 18, 2021 by Svartypops 2
Svartypops Posted August 18, 2021 Author Posted August 18, 2021 (edited) That looks like it's a copyright problem inn the making. How about this one...? An age-of-sail, piraty-style parody. The text needs another rewrite. Edited August 18, 2021 by Svartypops 1
Svartypops Posted August 18, 2021 Author Posted August 18, 2021 (edited) I've uploaded it, but I'm struggling to share the credit with Noqn nexusmods, for some reason. https://www.nexusmods.com/pillarsofeternity2/mods/546 Edited August 18, 2021 by Svartypops 1
Constentin Lévine Posted December 17, 2021 Posted December 17, 2021 I have many very specialized characters, this mod is the only thing I needed! Thank you
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now