Pathfinder: Kingmaker (Steam)

Upload your cheat tables here (No requests)
User avatar
Niedzielan
Expert Cheater
Expert Cheater
Posts: 122
Joined: Fri Aug 31, 2018 1:28 pm
Reputation: 169

Re: Pathfinder: Kingmaker (Steam)

Post by Niedzielan »

fireundubh wrote:
Wed Oct 03, 2018 1:30 pm
dnSpy doesn't get that switch statement right. With dotPeek, I see this:

Code: Select all

        case TargetType.Enemy:
          source = source.Where<UnitEntityData>(new Func<UnitEntityData, bool>(context.MaybeCaster.IsEnemy));
          goto case TargetType.Any;
        case TargetType.Ally:
          source = source.Where<UnitEntityData>(new Func<UnitEntityData, bool>(context.MaybeCaster.IsAlly));
          goto case TargetType.Any;
        case TargetType.Any:
          if (this.m_Condition.HasConditions)
            source = (IEnumerable<UnitEntityData>) source.Where<UnitEntityData>((Func<UnitEntityData, bool>) (u =>
            {
              using (context.GetDataScope((TargetWrapper) u))
                return this.m_Condition.Check((BlueprintScriptableObject) null);
            })).ToList<UnitEntityData>();
          return source.Select<UnitEntityData, TargetWrapper>((Func<UnitEntityData, TargetWrapper>) (u => new TargetWrapper(u)));
You'll note that instead of breaking out of the switch, the Enemy and Ally cases just go to the Any case. This explains why m_TargetType gets set to 2. This also means that your CE patch might mean non-hostile area-of-effect spells/abilities won't work on party members.
The dnSpy code is functionally identical. Break just means "go to the end of the switch statement". Since the Any type does nothing, the end of the switch statement is immediately after Any. It's basically replacing the first two breaks with a jmp to the third break. Which is still a break. The code you posted is technically truer to the ASM structure, but they have the same meaning.

You're welcome to view the ASM at any point. It first checks that the value isn't 3 or above (since there's no TargetType for that), then it shifts the targettype right three times (multiplying by 8), adds it to a "static" value (which is just after the function), then jumps to where that points, which is back inside the function. Essentially three pointers for each case. Me changing the value from 2 to 0 just means that it reduces the selection to just enemies of the caster, and then I add an extra check to make sure enemies can still friendly-fire eachother.

m_TargetType does not get changed anywhere in the code. There are different GetTargetType functions, but nothing modifies m_TargetType. Certainly nothing in this function's ASM does.

Code: Select all

code:
movsxd  r14,dword ptr [r15+2C]	// ORIGINAL CODE, r15 is the AbilityTargetsAround instance, [r15+2C] is this.m_TargetType
pushfq	// Since we're gonna compare stuff, push flags to stack
push rbx	// Same with our temp register (I like using rax and rbx for stuff)
cmp rcx,#0	// rcx is a pointer to context.MaybeCaster (presumably whoever cast the spell...)
je skip	// null pointer check, just in case
mov rbx,[rcx+38]	// context.MaybeCaster.m_Group
cmp [rbx+40],#1	// context.MaybeCaster.m_Group.IsPlayerParty
jne skip	// If the player hasn't cast the spell, let it do it's normal thing
cmp [r15+2C],#2	// If m_TargetType is Any
//jne skip	// I forgot to put this line in because I'm an idiot
mov r14,#0	// If the party has cast something, and it targets Any, make it target Enemies
skip:
pop rbx	//Restore temp register
popfq	// Restore flags
cmp r14d,03 //ORIGINAL CODE, checks if switch statement is out of bounds
jmp return
With your patchwork code, how does it remove friendly fire if the spell is Any, like Fireball (or the bombs, since it specifically says "all creatures", and uses the Any part of the code)? Those would never touch the Enemy case, which is the only place your script modifies.
Wouldn't your script just doing "if the players are enemies of the caster, don't select them"? Which isn't anything to do with friendly fire. Friendly fire would be if players are allies of the caster, don't select them. And there's also no differentiating here between positive and negative abilities (i.e. heal and damage), so if you make a change for one it will make a chance for the other too.

How to use this cheat table?
  1. Install Cheat Engine
  2. Double-click the .CT file in order to open it.
  3. Click the PC icon in Cheat Engine in order to select the game process.
  4. Keep the list.
  5. Activate the trainer options by checking boxes or setting values from 0 to 1

User avatar
hheellppmm
Noobzor
Noobzor
Posts: 9
Joined: Sat Sep 29, 2018 4:21 pm
Reputation: 0

Re: Pathfinder: Kingmaker (Steam)

Post by hheellppmm »

gunbalde60 wrote:
Wed Oct 03, 2018 3:22 am
hheellppmm wrote:
Wed Oct 03, 2018 2:47 am
ShyTwig16 wrote:
Sun Sep 30, 2018 2:47 am


Did you attach to the process?
viewtopic.php?f=11&t=6508
hey thanks but yes
some days ago i finally can add all to 18 and gold but i make a new game and cant doit again
idk which table i need i have alot of them and none work...

Download the most recent one, for niedzilian it would be 130. You dont need any other tables, he's table has everything you would need in the game. For drummer download 3.5. Though I dont know if it still works with today's update.
thanks time to try again

User avatar
gunbalde60
Expert Cheater
Expert Cheater
Posts: 370
Joined: Tue Jan 09, 2018 3:53 am
Reputation: 32

Re: Pathfinder: Kingmaker (Steam)

Post by gunbalde60 »

Niedzielan wrote:
Wed Oct 03, 2018 3:33 am
gunbalde60 wrote:
Wed Oct 03, 2018 3:25 am
fireundubh wrote:
Mon Oct 01, 2018 6:28 pm
Working on making my Patchwork mod framework (a la IEMod) configurable via INI. Here's a few of the options: [Link].
Can you actually edit the ini? or how would I be able to do this in game? I'm mostly interested in the no friendly fire, since using the CE table also prevents aoe healing.
I didn't have an AOE heal skill to test with :(
I'd have thought they'd just affect allies not everyone in the radius though (since my patch essentially does "if target = ALL then target = ENEMY"). Interesting.
Unless I coded the script wrong, which is also possible.
If you make a cleric companion they get an AOE heal at level 2, might even be lv 1. But yes AOE heals don't work when you turn on Disable Friendly Fire.

Nheyx
What is cheating?
What is cheating?
Posts: 3
Joined: Wed Oct 03, 2018 5:48 am
Reputation: 0

Re: Pathfinder: Kingmaker (Steam)

Post by Nheyx »

Laxard wrote:
Wed Oct 03, 2018 2:42 pm
Nheyx wrote:
Wed Oct 03, 2018 1:47 pm
Hello,

I'm looking to add spell slots to memory (wizard or magus), did you find out how to do it please?

:)
Just increase related stat. In tooltips for stats you can see which one related to your class, but keep in mind that there is 2 exceptions regarding sub-classes.
Yes, but I'm looking for a solution without getting the "Intelligence" of the character :)

For now, I found this in party.json :

=> "m_MemorizedSpells"

It's an empty slot but even copying it and changing the $id and "Index:4" does not add a new slot.
{
"$id": "3386",
"SpellLevel": 1,
"Type": "Common",
"Index": 3,
"Spell": null,
"Available": true,
"LinkedSlots": null,
"IsOpposition": false
}
"m_SpecialSpells": [[], [], [], [], [], [], [], [], [], []],
"m_SpecialLists": [],
"m_CustomSpells": [[], [], [], [], [], [], [], [], [], []],
"OppositionSchools": [],
"m_MemorizedSpells": [[], [{
"$id": "3380",
"SpellLevel": 1,
"Type": "Common",
"Index": 0,
"Spell": {
"$id": "3381",
"Blueprint": "4ac47ddb9fa1eaf43a1b6809980cfbd2",
"Caster": {
"$ref": "5"
},
"Fact": null,
"m_ConvertedFrom": null,
"DecorationColorNumber": -1,
"DecorationBorderNumber": -1,
"m_SpellbookBlueprint": "5d8d04e76dff6c5439de99af0d57be63",
"IsSpellCopy": false,
"MetamagicData": null
},
"Available": false,
"LinkedSlots": [{
"$ref": "3380"
}
],
"IsOpposition": false
}, {
"$id": "3382",
"SpellLevel": 1,
"Type": "Common",
"Index": 1,
"Spell": {
"$id": "3383",
"Blueprint": "ef768022b0785eb43a18969903c537c4",
"Caster": {
"$ref": "5"
},
"Fact": null,
"m_ConvertedFrom": null,
"DecorationColorNumber": -1,
"DecorationBorderNumber": -1,
"m_SpellbookBlueprint": "5d8d04e76dff6c5439de99af0d57be63",
"IsSpellCopy": false,
"MetamagicData": null
},
"Available": true,
"LinkedSlots": [{
"$ref": "3382"
}
],
"IsOpposition": false
}, {
"$id": "3384",
"SpellLevel": 1,
"Type": "Common",
"Index": 2,
"Spell": {
"$id": "3385",
"Blueprint": "ab395d2335d3f384e99dddee8562978f",
"Caster": {
"$ref": "5"
},
"Fact": null,
"m_ConvertedFrom": null,
"DecorationColorNumber": -1,
"DecorationBorderNumber": -1,
"m_SpellbookBlueprint": "5d8d04e76dff6c5439de99af0d57be63",
"IsSpellCopy": false,
"MetamagicData": null
},
"Available": false,
"LinkedSlots": [{
"$ref": "3384"
}
],
"IsOpposition": false
}, {
"$id": "3386",
"SpellLevel": 1,
"Type": "Common",
"Index": 3,
"Spell": null,
"Available": true,
"LinkedSlots": null,
"IsOpposition": false
}
], [], [], [], [], [], [], [], []],
"m_SpontaneousSlots": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"m_SpellConversionLists": []
}
}

User avatar
hheellppmm
Noobzor
Noobzor
Posts: 9
Joined: Sat Sep 29, 2018 4:21 pm
Reputation: 0

Re: Pathfinder: Kingmaker (Steam)

Post by hheellppmm »

im sick so many hours and cant add stats poitns to my character

AnalysisFailed
What is cheating?
What is cheating?
Posts: 1
Joined: Wed Oct 03, 2018 6:33 pm
Reputation: 0

Re: Pathfinder: Kingmaker (Steam)

Post by AnalysisFailed »

So, I made the terrible mistake of attempting to use the experimental multiply feats button. Now I can't level up the class I tried to use it with at all. I've reinstalled the game via steam and deleted the offending saves and I can't even level those classes on new games. Any hints for troubleshooting?

fireundubh
Expert Cheater
Expert Cheater
Posts: 141
Joined: Sun Sep 24, 2017 1:53 am
Reputation: 31

Re: Pathfinder: Kingmaker (Steam)

Post by fireundubh »

Niedzielan wrote:
Wed Oct 03, 2018 2:44 pm
The dnSpy code is functionally identical. Break just means "go to the end of the switch statement". Since the Any type does nothing, the end of the switch statement is immediately after Any. It's basically replacing the first two breaks with a jmp to the third break. Which is still a break. The code you posted is technically truer to the ASM structure, but they have the same meaning.

[...]

m_TargetType does not get changed anywhere in the code. There are different GetTargetType functions, but nothing modifies m_TargetType. Certainly nothing in this function's ASM does.
I know how to read switch statements. I'm just not sure if m_TargetType is being modified somehow by some weird .NET or Unity oddity, or if you have the wrong pointer, or... I mean, you can clearly see that m_TargetType is set to 0 in the blueprint, and as you said, there are no setters for m_TargetType. Maybe you're casting a different spell/ability? /shrug
Niedzielan wrote:
Wed Oct 03, 2018 2:44 pm
With your patchwork code, how does it remove friendly fire if the spell is Any, like Fireball (or the bombs, since it specifically says "all creatures", and uses the Any part of the code)? Those would never touch the Enemy case, which is the only place your script modifies.
My patch, or at least the one on GitHub, affects only TargetType=0 spells/abilities.
Niedzielan wrote:
Wed Oct 03, 2018 2:44 pm
Wouldn't your script just doing "if the players are enemies of the caster, don't select them"? Which isn't anything to do with friendly fire. Friendly fire would be if players are allies of the caster, don't select them. And there's also no differentiating here between positive and negative abilities (i.e. heal and damage), so if you make a change for one it will make a chance for the other too.
No. For the AbilityTargetsAround component, the m_TargetType value is not used to select targets.

AbilityTargetsAround uses the GetTargetsAround method, which selects all units who are alive, within a radius, and within line of sight. This method doesn't care about who's an enemy and who's not. When the m_TargetType value is evaluated and, for the AlchemistsFireAbility, that value is TargetType.Enemy (0), this query runs:

Code: Select all

targets.Where(context.MaybeCaster.IsEnemy).Where(u => !u.IsPlayerFaction)
That says find all targets who are enemies of the caster, then limit those targets to those not assigned the PlayerFaction.
Niedzielan wrote:
Wed Oct 03, 2018 2:44 pm
And there's also no differentiating here between positive and negative abilities (i.e. heal and damage), so if you make a change for one it will make a chance for the other too.
Generally, spells and abilities that primarily target the enemy of the caster are hostile, but the EffectOnAlly and EffectOnEnemy properties correspond to the AbilityEffectOnUnit enum. In the case of the AlchemistsFireAbility, EffectOnEnemy=AbilityEffectOnUnit.Harmful. So, you can distinguish between positive and negative abilities.

This is what my untested patch (not on GitHub) looks like now:

Code: Select all

if (this.m_TargetTypeNew == TargetType.Enemy)
{
	targets = targets.Where(caster.IsEnemy);

	if (_useMod && caster.IsPlayerFaction && context.AbilityBlueprint.EffectOnEnemy == AbilityEffectOnUnit.Harmful)
	{
		targets = targets.Where(target => !target.IsPlayerFaction);
	}
}
Given this component is used by mobs and not just the player, I wanted to make sure that mobs were unaffected.

Khalyus
What is cheating?
What is cheating?
Posts: 3
Joined: Mon Feb 12, 2018 1:04 am
Reputation: 0

Re: Pathfinder: Kingmaker (Steam)

Post by Khalyus »

Is there any way to improve critical range ??? have any of u guys tried that before?

User avatar
Niedzielan
Expert Cheater
Expert Cheater
Posts: 122
Joined: Fri Aug 31, 2018 1:28 pm
Reputation: 169

Re: Pathfinder: Kingmaker (Steam)

Post by Niedzielan »

fireundubh wrote:
Wed Oct 03, 2018 7:08 pm
Niedzielan wrote:
Wed Oct 03, 2018 2:44 pm
The dnSpy code is functionally identical. Break just means "go to the end of the switch statement". Since the Any type does nothing, the end of the switch statement is immediately after Any. It's basically replacing the first two breaks with a jmp to the third break. Which is still a break. The code you posted is technically truer to the ASM structure, but they have the same meaning.

[...]

m_TargetType does not get changed anywhere in the code. There are different GetTargetType functions, but nothing modifies m_TargetType. Certainly nothing in this function's ASM does.
I know how to read switch statements. I'm just not sure if m_TargetType is being modified somehow by some weird .NET or Unity oddity, or if you have the wrong pointer, or... I mean, you can clearly see that m_TargetType is set to 0 in the blueprint, and as you said, there are no setters for m_TargetType. Maybe you're casting a different spell/ability? /shrug
I'm casting Alchemist Bomb, the ability you get from the first level of alchemist. Are you sure the blueprint you found is the right one? The ability is definitely an Any type, since it says "any creature", affects both allies and enemies, and has targettype 2. The code only gets run once, so I know 100% I have the right ability.

Image
fireundubh wrote:
Wed Oct 03, 2018 7:08 pm
Niedzielan wrote:
Wed Oct 03, 2018 2:44 pm
Wouldn't your script just doing "if the players are enemies of the caster, don't select them"? Which isn't anything to do with friendly fire. Friendly fire would be if players are allies of the caster, don't select them. And there's also no differentiating here between positive and negative abilities (i.e. heal and damage), so if you make a change for one it will make a chance for the other too.
No. For the AbilityTargetsAround component, the m_TargetType value is not used to select targets.
The function finds all the targets, and then filters based on m_TargetType (since that's what's in the switch statement). If it's Enemy, it reduces the targets to those who are enemies of the caster, and if it's Ally it reduces the targets to those who are allies of the caster. If it's All, it doesn't filter the results. It's directly used to select targets.
fireundubh wrote:
Wed Oct 03, 2018 7:08 pm
Niedzielan wrote:
Wed Oct 03, 2018 2:44 pm
With your patchwork code, how does it remove friendly fire if the spell is Any, like Fireball (or the bombs, since it specifically says "all creatures", and uses the Any part of the code)? Those would never touch the Enemy case, which is the only place your script modifies.
My patch, or at least the one on GitHub, affects only TargetType=0 spells/abilities.
So it's not a friendly fire script, surely? [Link]. You're just not making players targetable by enemy AOE attacks. Still useful, but a completely different purpose.
fireundubh wrote:
Wed Oct 03, 2018 7:08 pm

Code: Select all

targets.Where(context.MaybeCaster.IsEnemy).Where(u => !u.IsPlayerFaction)
That says find all targets who are enemies of the caster, then limit those targets to those not assigned the PlayerFaction.
Again, if the player is the caster the allies are never enemies, so it has nothing to do with friendly fire
fireundubh wrote:
Wed Oct 03, 2018 7:08 pm
Niedzielan wrote:
Wed Oct 03, 2018 2:44 pm
And there's also no differentiating here between positive and negative abilities (i.e. heal and damage), so if you make a change for one it will make a chance for the other too.
Generally, spells and abilities that primarily target the enemy of the caster are hostile, but the EffectOnAlly and EffectOnEnemy properties correspond to the AbilityEffectOnUnit enum. In the case of the AlchemistsFireAbility, EffectOnEnemy=AbilityEffectOnUnit.Harmful. So, you can distinguish between positive and negative abilities.

This is what my untested patch (not on GitHub) looks like now:

Code: Select all

if (this.m_TargetTypeNew == TargetType.Enemy)
{
	targets = targets.Where(caster.IsEnemy);

	if (_useMod && caster.IsPlayerFaction && context.AbilityBlueprint.EffectOnEnemy == AbilityEffectOnUnit.Harmful)
	{
		targets = targets.Where(target => !target.IsPlayerFaction);
	}
}
Given this component is used by mobs and not just the player, I wanted to make sure that mobs were unaffected.
Thanks, I think I should be able to add that check to the asm, which would fix the healing issue.

Edit: Both Alchemist Bomb and Channel Positive Energy (aoe heal) both have EffectOnAlly = None, EffectOnEnemy = Harmful. Fireball too. Maybe a check on CanTargetEnemies/CanTargetFriends?

Edit2:
Fireball, Alchemist Bomb, Cure Moderate Wouinds (Mass), Flame Strike, Channel Positive, Circle of Death all have EffectOnEnemy as 1 (1=Harmful)
Of those, only Cure Moderate Wounds has EffectOnAlly = Helpful

I've modified the script so that it checks the EffectOnAlly==Helpful, otherwise it goes on what the spell can select. So far that works for most of the abilities I've tried (i.e. friendly fireballs don't hit the party, but friendly heals still do)

krul
Expert Cheater
Expert Cheater
Posts: 101
Joined: Tue Jan 30, 2018 7:11 pm
Reputation: 7

Re: Pathfinder: Kingmaker (Steam)

Post by krul »

Could you create a script for throwing spells rapidly fast ?

And a script: if you cast fireball once, it throws 2 fireballs (double spell effect).

kyiori
Cheater
Cheater
Posts: 26
Joined: Mon Mar 27, 2017 2:31 pm
Reputation: 0

Re: Pathfinder: Kingmaker (Steam)

Post by kyiori »

Nheyx wrote:
Wed Oct 03, 2018 1:47 pm
Hello,

I'm looking to add spell slots to memory (wizard or magus), did you find out how to do it please?

:)
I second this. Need more spell slots without increasing int or wis for spell casters.

SLEETS
Noobzor
Noobzor
Posts: 13
Joined: Wed Sep 26, 2018 1:28 am
Reputation: 0

Re: Pathfinder: Kingmaker (Steam)

Post by SLEETS »

New patch last night for windows broke the game script.

DrummerIX
ViP
ViP
Posts: 2997
Joined: Wed Mar 22, 2017 6:15 pm
Reputation: 3304

Re: Pathfinder: Kingmaker (Steam)

Post by DrummerIX »

I fixed my table for patch 1.04, but feel free to use Niedzielan's table for more options.

User avatar
Lord Blade
Expert Cheater
Expert Cheater
Posts: 1348
Joined: Thu Mar 09, 2017 7:52 am
Reputation: 132

Re: Pathfinder: Kingmaker (Steam)

Post by Lord Blade »

I'm confused with the new kingdom events options.

So, now if I use the "Change Duration Tasks" it FORCES a day to pass (and the event to complete). Whereas with the older table, I could start a bunch of different tasks, and then just skip a day to have them all finish. Which was vastly better.

Using the modifier option to make 0 day events doesn't seem to work properly, as the events just go away, and it doesn't look like you're getting the results. If you do a "support the X" quest that would normally rank you up... nothing happens. You don't rank up, and when you go back to the throne room, the person's not there to talk to you.

Can we get an option that worked like the instant finish for all this stuff that you had before? It worked far better.
Yes, there was a few quests that didn't work well with it, but you could always just turn it off when you needed to finish those.

EDIT:

So I've somewhat figured out how to get stuff working. I think.

Use the modifier and set it to -1, which gives you 0 day events. Select a bunch of stuff to get done. It should all vanish.
Now turn that off, and go out and back into the map. All those events that were "done" should be showing as in progress now. Now turn on the 1 day cheat, and skip a day. This seems to get things to progress properly.
Last edited by Lord Blade on Thu Oct 04, 2018 4:05 am, edited 1 time in total.

SlipperyEel
Expert Cheater
Expert Cheater
Posts: 71
Joined: Wed Aug 30, 2017 3:42 am
Reputation: 37

Re: Pathfinder: Kingmaker (Steam)

Post by SlipperyEel »

Use the "Change Duration Tasks" script for Tasks. That will set the duration to 1 day and let you manually advance time. Only use the "Change Duration Events" scripts when the player character will be away.

Post Reply