pathfinder kingmaker save edit

Memory scanning, code injection, debugger internals and other gamemodding related discussion
neuronek
Cheater
Cheater
Posts: 25
Joined: Sun Mar 05, 2017 7:03 pm
Reputation: 12

Re: pathfinder kingmaker save edit

Post by neuronek » Sun Oct 07, 2018 7:29 am

tseblade wrote:
Sun Oct 07, 2018 5:17 am
PS. Do you have an updated file with your finds? If so can you upload it
So far I have my huge posts and a lot of files :) The thing is that for my personal java project I didn't separate these feats between the ones You found and I found.

Here You go, the list grew by 12% ... the number of feats in this game is huge
Feats_List_Updated.zip
Updated list of feats
(26.58 KiB) Downloaded 26 times
Feats_List_Updated_v2.zip
Added some magus feats
(27.3 KiB) Downloaded 21 times
Feats_List_Updated_v3.zip
Found: Spell specialization, Extra lay on hands, Extra rage, Inspire ferocity, Renewed vigor, Extra arcane pool, Arcane strike, Arcane accuracy, Wand wielder, added separate magus category
(27.59 KiB) Downloaded 97 times

Hmm about that:
tseblade wrote:
Sun Oct 07, 2018 5:17 am
1. Select save file
2. Open the party.json
3. Select party member (for now it could just be the mc, since he is always the first object in the array: ROOT.m_EntityData[0] )
4. Get the current list of feats from the feat array: ROOT.m_EntityData[0].Descriptor.Progression.Features.m_Facts[]
5. Get the last $id from the file to a variable
6. Select feats to add to user (start with feats which are standalone and dont come with abilities or other references .ie Power Attack)(also remove from list already existing blueprint Ids)
7. Add feat code to the previous array as the last element
8. Change any $id in the new feat to +1 from the previous selection
My process is longer and a bit more manual at the moment. I'm changing companions aswell.

1. I find the highest id in the file, let's say 7960
2. I find the guid representing a specific party member, let's say Regonar. (Notepad++ + JSTool -> Json Viewer, I use the prefab guid provided in the kingmaker editor on github, Regonar corresponds to b090918d7e9010a45b96465de7a104c3
3. I open up one of his feats, this time I found them at: (It's quite funny that our party members are our inventory items apparently :D )
ROOT.m_EntityData[0].Descriptor.m_Inventory.m_Items[259].m_Enchantments.m_Facts[0].m_CurrentContext.m_OwnerDescriptor.Progression.Features.m_Facts[*]
4. I read Regonar's UUID prefab -> ROOT.m_EntityData[0].Descriptor.m_Inventory.m_Items[259].m_Enchantments.m_Facts[0].m_CurrentContext.m_OwnerDescriptor.Progression.Features.m_Facts[32].m_Context.m_CasterReference.m_UniqueId
This does not seem to change in time, for me Regonar's spawned with the following UUID: 5dfa8214-7918-4653-a695-368d45e8caa6.
5.I save Regonar's UUID in an enum:

Code: Select all

    
    public enum PartyMembers {
        PROTAGONIST,VALERIE,AMIRI,LINZI,REGONAR
    }
            Map<PartyMembers, String> partyGUIDMap = new EnumMap<>(PartyMembers.class);
        partyGUIDMap.put(PartyMembers.VALERIE, "5b972eef-5eab-4947-98c5-65d448dc542d")
        partyGUIDMap.put(PartyMembers.AMIRI,"91345fb6-c3ed-40f9-9e90-cbc68f7a84cd")
        partyGUIDMap.put(PartyMembers.LINZI,"9d563860-8cfb-4d25-9d78-dc7121c1b446")
        partyGUIDMap.put(PartyMembers.PROTAGONIST,"f043e0f3-124e-49aa-82bb-3796247937f6")
        partyGUIDMap.put(PartyMembers.REGONAR,"5dfa8214-7918-4653-a695-368d45e8caa6")
 
6. Sadly it seems that the owner Id changes from save to save, this is a pain in the butt but I edit it anyway since I'm trying to add 20-30 feats at a time ;)
ROOT.m_EntityData[0].Descriptor.m_Inventory.m_Items[259].m_Enchantments.m_Facts[0].m_CurrentContext.m_OwnerDescriptor.Progression.Features.m_Facts[32].m_Context.m_OwnerDescriptor.$ref
For this save it seems to be "3594"
7. Knowing all of this I have the highest id, guid and owner descriptor reference, I iterate over all of the feats and increment id's, replacing all caster references with Regonar's UUID and all owner references with the one I found so that all the feats will show up in his character sheet.

... I try to do some magic to automatically link activatables/abilities to feats but that'd be another post ;)
Basically I work on a couple of premade json files, from a high level perspective it seems simple but I still keep finding special cases for these objects

Code: Select all

        int highestId = 7960
        int ownerIdentifier = 3594 //varies from save to save :(
        String ownerGUID = partyGUIDMap.get(PartyMembers.REGONAR)

        def level = "lv3"
        def featFile = "combat_feats_" + level + ".json"
        def activatableFile = "activatable_abilities_" + level + ".json"
        def abilityFile = "abilities_" + level + ".json"

        //update feats
        def ( updatedId, modifiedFeatText) = updateFeats(featFile, highestId, ownerIdentifier, ownerGUID)
        highestId = updatedId

        //update activatable abilities
        highestId = updateActivatables(activatableFile, highestId, ownerIdentifier)

        //update abilities
        highestId = updateAbilities(abilityFile, highestId, ownerIdentifier)

        //Link Abilities to feats
        modifiedFeatText = linkAbilitiesToFeats(ADJUSTED_FILE_PREFIX + abilityFile, modifiedFeatText)

        //Link Activatable Abilities to feats
        modifiedFeatText = linkActivatableAbilitiesToFeats(ADJUSTED_FILE_PREFIX + activatableFile,modifiedFeatText)

        def outputFile = ADJUSTED_FILE_PREFIX + featFile
        saveFile(RESOURCE_DIR+FEAT_DIR, outputFile, modifiedFeatText)

tseblade
Noobzor
Noobzor
Posts: 14
Joined: Sun Sep 30, 2018 4:25 pm
Reputation: 8

Re: pathfinder kingmaker save edit

Post by tseblade » Mon Oct 08, 2018 4:44 pm

Hey Neuronek,

An easier way to find the companions seems to be looking for "progression": as it is only available for characters. Though there seems to be 2 extra characters you dont have which have this field also.

Another thing i found out is after you find the companion, you can change the CustomName field to any name and it gets saved so you can look it up much easier in the future. However i dont know if it will affect anything in the future so probably better to keep the same name.

Also i found that you can use the TextPad software for windows which can do incremental regex find and replace. So you can copy paste all the feats you want into a new window then just use a regex find and replace to have all the $id changed.

tseblade
Noobzor
Noobzor
Posts: 14
Joined: Sun Sep 30, 2018 4:25 pm
Reputation: 8

Re: pathfinder kingmaker save edit

Post by tseblade » Tue Oct 09, 2018 11:22 am

Another update on the feats:
- Added the 4 new exotic weapon feats
- Added Tower Shield Specialist Fighter feats
- Added Aasimar Wings feat with ability
Attachments
Feats_List.zip
(27.04 KiB) Downloaded 32 times

neuronek
Cheater
Cheater
Posts: 25
Joined: Sun Mar 05, 2017 7:03 pm
Reputation: 12

Re: pathfinder kingmaker save edit

Post by neuronek » Tue Oct 09, 2018 7:21 pm

Merging both files.
Feats_List_Updated_v5.zip
Added Crane Wing, Extra Bane (Inquisitor)
(29.69 KiB) Downloaded 30 times
Another update:
Feats_List_Updated_v6.zip
Added Paladin Lv6 Mercies: Dazed, Diseased, Staggered
(29.85 KiB) Downloaded 108 times
2018-10-15, Yet another:
Feats_List_Updated_v7.zip
Added lots of Alchemist Feats, some Barbarian, Ranger and Monk feats aswell
(33.14 KiB) Downloaded 10 times
Yet another ;)
Feats_List_Updated_v8.zip
Added level 9 Paladin mercies
(33.69 KiB) Downloaded 28 times
Last edited by neuronek on Mon Oct 15, 2018 5:08 am, edited 2 times in total.

wannabecheater
Novice Cheater
Novice Cheater
Posts: 17
Joined: Fri Sep 28, 2018 1:23 pm
Reputation: 1

Re: pathfinder kingmaker save edit

Post by wannabecheater » Sat Oct 13, 2018 6:55 pm

any luck in transplanting abilities across classes? Like giving fighter channel postive energy?

On another note, i was able to swap/add spells in the spellbook, including meta magic spells (e.g. putting quickened cloudkill as a cantrip and casting it).
Swapping arcane spells into divine spellbooks seems to work ok too, game seem to treat it as a divine spell for rules (armor, failure %) if the m_SpellbookBlueprint is using the cleric's instead of wizard's.

Level scaling works ok even with cleric class casting a inserted spell (tested with Wail of the Banshee as cantrip). I can even convert lvl 1 and up wizard spells that i inserted into cure spells (normal cleric behavior).
But i just can't force edited /inserted cantrips to show up under the cantrip tab in spellbook hotbar. Lvl 1 spells and up shows up normally.
I am able to make the cantrip show up in abilities hotbar though, but any spells with the arrow pointing up to allow options (such as choosing which color dragon to transform to for Dragonkind III) will not work for cantrips...

Rebelicious
Cheater
Cheater
Posts: 31
Joined: Tue May 09, 2017 10:46 am
Reputation: 0

Re: pathfinder kingmaker save edit

Post by Rebelicious » Mon Oct 15, 2018 6:28 pm

Has anyone been able to move given abilities?

I've been trying to find a way to move and get Range Spellstrike and Ranged Spell Combat to work, from an Eldritch Archer to an Eldritch Scion. Still no dice. It's the weirdest thing, because I can remove a Feature section on the Eldritch Archer save, and the character will lose Ranged Spell Combat, but even though the section is added to the Eldritch Scion save, it doesn't show up.

I'm at my wit's end.

Post Reply

Who is online

Users browsing this forum: No registered users