scrotalreceptor Posted September 11 Share Posted September 11 Hi all, This is the first time I've attempted to do this, partly inspired by not seeing the exact manifestation of what I was after "in the wild" yet, and having downloaded a few broken mods today. (One completely crashes the system, and the other doesn't do what it's meant to). So, I thought I'd have a go at it myself. Always wanted to do this. (Fwiw, I'm reasonably proficient at python and BASIC). I've borrowed some code from both this forum, and two of the mods I downloaded earlier, to get the exact IDs for the two figurines my party happens to have in their possession right now. Right now, I've got this. I've tried a few iterations including the obvious changing UsageType to "perencounter" and UsageValue to 1, but I'm always stuck with the "1 use per rest" field at the top, and even though the code is as below, there are completely different values for the "per encounter" part. { "GameDataObjects": [{ "$type": "Game.GameData.GenericAbilityGameData, Assembly-CSharp", "DebugName": "Figurine_Ivory_Wurm_Ability", "ID": "d98a8643-5ebb-4da4-91bb-5cbe7d3090b1", "Components": [{ "$type": "Game.GameData.GenericAbilityComponent, Assembly-CSharp", "UsageType": "None", "UsageValue": 0 }] }, { "$type": "Game.GameData.GenericAbilityGameData, Assembly-CSharp", "DebugName": "Figurine_Obsidian_Lamp_Ability", "ID": "b26b209e-f7e3-4b88-a9e1-af13f7328d8d", "Components": [{ "$type": "Game.GameData.GenericAbilityComponent, Assembly-CSharp", "UsageType": "None", "UsageValue": 0 }] } ] } I'm pleased to say that it loads into the game perfectly, but I'm still stuck with the "1 use per rest part", and as you can see below, there are completely different values for the "per encounter" part. I've been trying everything in these threads and copying code from these mods, but I can't get it to work. I'm missing something. What I'm after is a simple 1 use per encounter for the summoning figurines. As much as anything as a proof of concept. For some reason, the "per encounter abilities" part of this mod here works fine, but the "per encounter items" counterpart, also included, crashes my system. https://www.nexusmods.com/pillarsofeternity2/mods/93?tab=description As an example from it, this is an attempt to make a single reusable stack of five potions which refreshes after each encounter. That reads like sense to me, but for some reason it crashes my computer. { "$type": "Game.GameData.ConsumableGameData, Assembly-CSharp", "DebugName": "L1_Potion_of_minor_healing", "ID": "a2ed8ea3-34a3-4e8f-8ac0-652a9ffd3ccb", "Components": [ { "$type": "Game.GameData.ItemComponent, Assembly-CSharp", "MaxStackSize": 1 }, { "$type": "Game.GameData.ConsumableComponent, Assembly-CSharp", "UsageType": "PerEncounter", "UsageCount": 5 } ] } https://www.nexusmods.com/pillarsofeternity2/mods/137?tab=posts If anybody could point me in the right direction, I would be eternally grateful. As an aside, besides full-blown "programming games" like PCROBOTS about 20-odd years ago, I have literally never seen anything even approaching this level of scripting in a game and it's frankly amazing. I can and do spend hours just trying to tweak the encounters so that I can ideally get a fight to go my way completely hands-free. Thank you very much to the authors. Regards, Michael 1 Link to comment Share on other sites More sharing options...
scrotalreceptor Posted September 11 Author Share Posted September 11 And after firing it off once in combat, we get this, which looks at first like it's on two separate timers. Link to comment Share on other sites More sharing options...
Kvellen Posted September 20 Share Posted September 20 Hey, sorry for the late response! Don't know if you've already figured this out but there are 2 pieces of gamedata for each item you'll need to edit. You've already got the first, the data for the ability the items casts when consumed. And the second is the consumable item data for the item itself. Which is where the "per rest" is coming from. { "GameDataObjects": [ { "$type": "Game.GameData.ConsumableGameData, Assembly-CSharp", "DebugName": "Figurine_Obsidian_Lamp", "ID": "e3beb251-1cb5-42e2-a531-5df8d8bbb657", "Components": [ { "$type": "Game.GameData.ConsumableComponent, Assembly-CSharp", "UsageType": "PerEncounter" } ] } ] } Keep in mind that if there is an issue with something in your mod the game will not load it. In such cases opening up the "output_log.txt" file in the "PillarsOfEternityII_Data" folder and searching for "Error" or "gamedatabundle" and see if any debug lines about either. It often will give you a technical explanation for the issue and sometimes coordinates position of the issue in the file. What I'd recommend doing is taking a look at pinned tutorial that goes over the basics of Deadfire modding. and looking into the Apotheosis mod tool. It arranges all the data into a navigable UI and saves out just what is modified. It also has the ability to execute C# scripts to bulk edit data if that takes your fancy. Otherwise it'sworth bookmarking the official modding documentation as a handy reference: https://eternity.obsidian.net/game-data-formats/concepts On 9/11/2024 at 8:13 PM, scrotalreceptor said: For some reason, the "per encounter abilities" part of this mod here works fine, but the "per encounter items" counterpart, also included, crashes my system. https://www.nexusmods.com/pillarsofeternity2/mods/93?tab=description Looks like this mod was created before the last patch for Deadfire. If it isn't functioning correctly it could be that some of the data might not be compatible with the current version of the game. That said I seemed to be able to load into the game with it enabled when I tried it. Do you have all the DLC's including all the free content packs? Link to comment Share on other sites More sharing options...
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