Jump to content

Welcome to Obsidian Forum Community
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

[Tutorial] Adding New Abilities to a Class (v4.1.0+)

tutorial

  • Please log in to reply
22 replies to this topic

#1
BMac

BMac

    Programmer

  • Developers
  • 410 posts
  • Lords of the Eastern Reach Backer

You should be familiar with the Modding Basic Concepts tutorial before following this one.
 
In this tutorial, I'm going to show you how to use a BaseProgressionTableAppendGameData object to add a new ability to a class progression table (ClassProgressionTableGameData) in the game.  You can also use this object to modify character progression tables (CharacterProgressionTableGameData).
 
BaseProgressionTableAppendGameData is a new game data type that was added in v4.1.0.  It simply contains a list of abilities that can be unlocked (along with the requirements needed to unlock them), and a reference to an existing progression table where you want to insert those abilities.
 
Here's an example game data object I created for this tutorial. This object adds the talent Fast Runner as an eligible talent for Priests at Power Level 1.

{
	"GameDataObjects": [
		{
			"$type": "Game.GameData.BaseProgressionTableAppendGameData, Assembly-CSharp",
			"DebugName": "Priest_FastRunner",
			"ID": "5ec6e46a-4e3f-4f78-affe-0d7477d3b97f",
			"Components": [
				{
					"$type": "Game.GameData.BaseProgressionTableAppendComponent, Assembly-CSharp",
					"BaseTableID": "a52e8b61-9343-4716-8a55-3168be143cc4",
					"AbilityUnlocks": [
						{
							"Note": "",
							"Category": "General",
							"UnlockStyle": "Unlock",
							"ActivationObject": "Self",
							"AddAbilityID": "935b1a37-6f38-4ccc-bbc7-296f0f76790f",
							"RemoveAbilityID": "00000000-0000-0000-0000-000000000000",
							"Prerequisites": {
								"MinimumCharacterLevel": 1,
								"PowerLevelRequirement": {
									"ClassID": "f7cb46af-a719-41c0-9a53-107eefdbce2b",
									"MinimumPowerLevel": 1
								},
								"RequiresAbilityID": "00000000-0000-0000-0000-000000000000",
								"Conditional": {
									"Operator": 0,
									"Components": []
								},
								"VisibilityConditional": {
									"Operator": 0,
									"Components": []
								},
								"IsMutuallyExclusiveUpgrade": "true"
							}
						}
					]
				}
			]
		}
	]
}

Attached File  priest_table_modded.png   487.01KB   0 downloads
 
This object only has two properties:

  • BaseTableID - the GUID of the existing table to modify. For example, "a52e8b61-9343-4716-8a55-3168be143cc4" represents the PT_Priest table.
  • AbilityUnlocks - a list of UnlockableAbility entries to add to the specified table.

You can find detailed information about the various properties of UnlockableAbility by clicking the link.
 
By adding abilities to progression tables this way, you will avoid conflicts with other mods and compatibility problems with updated versions of the game.


  • dam, Zap Gun For Hire, SiliconMage and 2 others like this

#2
GravitonGamer

GravitonGamer

    (1) Prestidigitator

  • Members
  • 27 posts
  • Steam:jacetheace

Wow, finally! Now maybe I can go back to my subclass mods. Progression table updating has been a major drag that's why I've been lazy updating them. Thanks for this update!

 

Now if there is a way for us to override existing progression table entries (for example, I have a subclass that disables soul whip so I have to modify the conditions of soul whip) that would be even more awesome.



#3
Harpagornis

Harpagornis

    (5) Thaumaturgist

  • Members
  • 528 posts

Am i right that the old progression tables we are using for our mods so far will still work with 4.1.0? I am just a lazy guy in that aspect... :biggrin:



#4
BMac

BMac

    Programmer

  • Developers
  • 410 posts
  • Lords of the Eastern Reach Backer


Now if there is a way for us to override existing progression table entries (for example, I have a subclass that disables soul whip so I have to modify the conditions of soul whip) that would be even more awesome.

 

Yeah, it would be good to support that as well. If there is time I'll take another look at that.

 


Am i right that the old progression tables we are using for our mods so far will still work with 4.1.0? I am just a lazy guy in that aspect... :biggrin:

 

Yes, you can still override the tables the old way, and they will continue to "work" as they did before (i.e. they won't contain any changes we made to them in 4.1 and won't work with other mods on the same table).



#5
Zap Gun For Hire

Zap Gun For Hire

    (5) Thaumaturgist

  • Members
  • 417 posts
  • Pillars of Eternity Backer
  • Kickstarter Backer
  • Deadfire Silver Backer
  • Fig Backer
  • Black Isle Bastard!

Huzzah on this addition!  Makes my home modding of PTs so much easier.

 

I do have one question though.  If I wanted to add an ability to ALL progression tables, could I put in a "0000" UUID into the BaseTableID field?  I ask because I have a couple of talents I'm adding to all of the base classes of the game and I didn't want to have to create 11 separate entries if I didn't have to (Yes, I'm lazy  :lol: ).

 

No big deal if I can't, and truth be told I expect I have to manually create an additional Append for each table I want changed.  But I thought I'd ask, if only for future reference. 

 

Thanks again for this addition!

 

edited

 

As a related question, if the standard null 0 UUID can't be put in a BaseTableID, can multiple UUIDs be put in it?  And if so, is there a limit.  Might be interesting to do something like BaseTableID [UUID1, UUID2, ..., UUIDX].

 

Probably a long shot, but no harm in asking, I reckon. :)


Edited by Zap Gun For Hire, 25 January 2019 - 12:45 AM.

  • peardox likes this

#6
BMac

BMac

    Programmer

  • Developers
  • 410 posts
  • Lords of the Eastern Reach Backer

No, that won't work unfortunately, you can only put one GUID in there.  I could potentially add support for it if I have time.


  • Zap Gun For Hire likes this

#7
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 564 posts
  • Location:Manchester, UK
  • Deadfire Backer

Wotcha @zapgunforhire

 

Are you only after modifying the "$type": "Game.GameData.CharacterProgressionTableGameData, Assembly-CSharp", ones?

 

I can automate this

 

I simply need an example and the specific $type to mess with

 

Did this for @Spherikal a few months ago for his enhanced UI

 

Our Slack is still alive so PM me there with specifics and I'll write it for you - it's only an hour or so's work (beats doing it manually)

 

This is simply a conversion job and I have the base code from Spherikal's on my system


  • Zap Gun For Hire likes this

#8
Zap Gun For Hire

Zap Gun For Hire

    (5) Thaumaturgist

  • Members
  • 417 posts
  • Pillars of Eternity Backer
  • Kickstarter Backer
  • Deadfire Silver Backer
  • Fig Backer
  • Black Isle Bastard!

No, that won't work unfortunately, you can only put one GUID in there.  I could potentially add support for it if I have time.

 

Figured as much, but I thought I'd ask.  Not so much for the base classes, but all of the companion PT's out there which I'm also doing.

Wotcha @zapgunforhire

 

Are you only after modifying the "$type": "Game.GameData.CharacterProgressionTableGameData, Assembly-CSharp", ones?

 

I can automate this

 

I simply need an example and the specific $type to mess with

 

Did this for @Spherikal a few months ago for his enhanced UI

 

Our Slack is still alive so PM me there with specifics and I'll write it for you - it's only an hour or so's work (beats doing it manually)

 

This is simply a conversion job and I have the base code from Spherikal's on my system

 

Thanks for the offer, but no worries. :) I can do it pretty quickly on my own end as well.  Was more curious about the idea than anything else. 



#9
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 564 posts
  • Location:Manchester, UK
  • Deadfire Backer

Just looked at my code

 

150 lines of PHP with expected directories

 

I'll upload it if you like with the assumptions I make if you want

 

Warning - you'll need about 25G on a Linux server or a VM running Ubuntu

 

Sod it - I'll write a howto to generealize the method



#10
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 564 posts
  • Location:Manchester, UK
  • Deadfire Backer

NP Zappy

 

If you've got it covered that's good enough for me

 

Your friend (always) Simon (well just about everyone knows my name <g>)

 

Note I didn't use your real name...


Edited by peardox, 25 January 2019 - 04:33 PM.


#11
Zap Gun For Hire

Zap Gun For Hire

    (5) Thaumaturgist

  • Members
  • 417 posts
  • Pillars of Eternity Backer
  • Kickstarter Backer
  • Deadfire Silver Backer
  • Fig Backer
  • Black Isle Bastard!

Huzzah on this addition!  Makes my home modding of PTs so much easier.

 

I do have one question though.  If I wanted to add an ability to ALL progression tables, could I put in a "0000" UUID into the BaseTableID field?  I ask because I have a couple of talents I'm adding to all of the base classes of the game and I didn't want to have to create 11 separate entries if I didn't have to (Yes, I'm lazy  :lol: ).

 

No big deal if I can't, and truth be told I expect I have to manually create an additional Append for each table I want changed.  But I thought I'd ask, if only for future reference. 

 

Thanks again for this addition!

 

edited

 

As a related question, if the standard null 0 UUID can't be put in a BaseTableID, can multiple UUIDs be put in it?  And if so, is there a limit.  Might be interesting to do something like BaseTableID [UUID1, UUID2, ..., UUIDX].

 

Probably a long shot, but no harm in asking, I reckon. :)

 

 

No, that won't work unfortunately, you can only put one GUID in there.  I could potentially add support for it if I have time.

 

After a lot of trial and error, I actually figured out a way to have it so something can go into all classes at one time.  :thumbsup:   Instead of pointing the "BaseTableID": to a CLASS or COMPANION PT, I pointed it to  the RACIAL PT that defines what races get what  ("b2afaada-c140-42c3-9f02-2f919e45b49d") and followed the template of "Weapon Proficiency: Unarmed" (with a couple of further modifications).

 

Worked like a charm.   :dancing:

 

In fact, if I had thought of this before, I would have saved myself a ton of hassle (not to mention around a couple dozen UUIDs).  :facepalm:

 

Now the ability I am adding IS an Auto-Granted one, so I don't know what would happen if someone tried to use this back-door trick for a user selected one on level up.  But at least I'm happy.  :lol:

 

====

 

Fun fact though.  Only reason I even hit upon this is I was getting VERY annoyed trying to figure out how to stop the multi-class hired adventurers I was creating as an edge case from getting duplicate copies of my auto-granted ability.  I tried every last thing I could think of and kept seeing duplication.

 

Then I finally thought, "Hey... Wait a second.  Racial traits don't get duped on character creation.  Maybe I should figure out how they're put into characters."

 

Little while latter: SUCCESS!!  Even works for Imported Characters on hiring, which is even better than inserting into the class PTs, as they weren't getting the new Auto Generated trait until they leveled up.

 

Still need to clean up my code a little, but it seems to be working as I want now. :)


Edited by Zap Gun For Hire, 27 January 2019 - 01:49 AM.

  • Armakoir likes this

#12
house2fly

house2fly

    (8) Warlock

  • Members
  • 1166 posts
You know how recipes have a line to add an itemmod and a line to remove one? Would it be possible to have something similar with this? RemoveAbilitiesFromProgressionTable or something? Or maybe make them invisible rather than removing them? If that could be done then in addition to adding abilities to progression tables we could also replace abilities, which would be very exciting

#13
Zap Gun For Hire

Zap Gun For Hire

    (5) Thaumaturgist

  • Members
  • 417 posts
  • Pillars of Eternity Backer
  • Kickstarter Backer
  • Deadfire Silver Backer
  • Fig Backer
  • Black Isle Bastard!

You know how recipes have a line to add an itemmod and a line to remove one? Would it be possible to have something similar with this? RemoveAbilitiesFromProgressionTable or something? Or maybe make them invisible rather than removing them? If that could be done then in addition to adding abilities to progression tables we could also replace abilities, which would be very exciting

{
							"Note": "PL 5 Unlock - Weapon Training",
							"Category": "General",
							"UnlockStyle": "Unlock",
							"ActivationObject": "Self",
							"AddAbilityID": "c6649642-7729-4386-ae1c-6980351fe8c6",
							"RemoveAbilityID": "00000000-0000-0000-0000-000000000000",
							"Prerequisites": {
								"MinimumCharacterLevel": 1,
								"PowerLevelRequirement": {
									"ClassID": "ccdc9675-e2a7-46fa-83e9-7a5368b56265",
									"MinimumPowerLevel": 5
								},
								"RequiresAbilityID": "00000000-0000-0000-0000-000000000000",
								"Conditional": {
									"Operator": 0,
									"Components": []
								},
								"VisibilityConditional": {
									"Operator": 0,
									"Components": []
								},
								"IsMutuallyExclusiveUpgrade": "true"
							}
						}

This is one of the custom abilities I have on my home mods (it lets a class select an additional Weapon Set at level up starting at Power Level 5) that is part of a larger set of abilities I am adding to a PT (so I'm not posting the entire code block here). I know for a fact that VisibilityConditional can remove something from view on a PT, in both standard and append.  I haven't played around with RemoveAbilityID or RequiresAbilityID, but just at a glance it looks like it should be able to remove an ability and replace it with a different one.

 

Or have you tried that and it didn't do what you wanted?


Edited by Zap Gun For Hire, 27 January 2019 - 11:15 AM.


#14
Armakoir

Armakoir

    (3) Conjurer

  • Members
  • 115 posts
  • Steam:Armakoir

It looks to me like removing an ability from a progression table is actually just making it invisible via the VisibilityConditional. I've started using the conditional "Boolean AlwaysFalse()" as a means for making something invisible.

 

When you upgrade an ability you're actually training a new ability and removing the old, hence the RemoveAbilityID. This would not function to remove an ability from the PT completely though. Interestingly (in previous version; untested in 4.1), I could RemoveAbilityID while having a "0000-" in the AddAbilityID without causing problems.

 

RequiresAbilityID is mostly, but not entirely, the aesthetic for connecting two abilities with a line. I say not entirely because it does have some functionality beyond the connecting line but I've never tried to track down exactly what that functionality is.


  • Zap Gun For Hire likes this

#15
Armakoir

Armakoir

    (3) Conjurer

  • Members
  • 115 posts
  • Steam:Armakoir

So, it looks like this new capability does not allow us to modify existing entries on a class progression table (ClassProgressionTableGameData). I have not researched the "modify" potential of the CharacterProgressionTableGameData but I'm assuming it is the same.

 

I guess I just misread and assumed that that was the new capability. So, if we want to remove, rearrange, or reconnect existing abilities we have to still override the entire progression table.

 

Can anyone else confirm?



#16
Exomis

Exomis

    (0) Nub

  • Initiates
  • 3 posts

BMac,can you use this method to add multiple abilities to the same table?  If so could you show another example?  Thanks.



#17
BMac

BMac

    Programmer

  • Developers
  • 410 posts
  • Lords of the Eastern Reach Backer

So, it looks like this new capability does not allow us to modify existing entries on a class progression table (ClassProgressionTableGameData). I have not researched the "modify" potential of the CharacterProgressionTableGameData but I'm assuming it is the same.
 
I guess I just misread and assumed that that was the new capability. So, if we want to remove, rearrange, or reconnect existing abilities we have to still override the entire progression table.
 
Can anyone else confirm?

Unfortunately, yes, that's correct.
 

BMac,can you use this method to add multiple abilities to the same table?  If so could you show another example?  Thanks.

Yes, you just need to duplicate the object in the AbilityUnlocks array. This example redundantly adds the same ability twice, just to show the syntax:
 

{
	"GameDataObjects": [
		{
			"$type": "Game.GameData.BaseProgressionTableAppendGameData, Assembly-CSharp",
			"DebugName": "Priest_FastRunner",
			"ID": "5ec6e46a-4e3f-4f78-affe-0d7477d3b97f",
			"Components": [
				{
					"$type": "Game.GameData.BaseProgressionTableAppendComponent, Assembly-CSharp",
					"BaseTableID": "a52e8b61-9343-4716-8a55-3168be143cc4",
					"AbilityUnlocks": [
						{
							"Note": "",
							"Category": "General",
							"UnlockStyle": "Unlock",
							"ActivationObject": "Self",
							"AddAbilityID": "935b1a37-6f38-4ccc-bbc7-296f0f76790f",
							"RemoveAbilityID": "00000000-0000-0000-0000-000000000000",
							"Prerequisites": {
								"MinimumCharacterLevel": 1,
								"PowerLevelRequirement": {
									"ClassID": "f7cb46af-a719-41c0-9a53-107eefdbce2b",
									"MinimumPowerLevel": 1
								},
								"RequiresAbilityID": "00000000-0000-0000-0000-000000000000",
								"Conditional": {
									"Operator": 0,
									"Components": []
								},
								"VisibilityConditional": {
									"Operator": 0,
									"Components": []
								},
								"IsMutuallyExclusiveUpgrade": "true"
							}
						},
						{
							"Note": "",
							"Category": "General",
							"UnlockStyle": "Unlock",
							"ActivationObject": "Self",
							"AddAbilityID": "935b1a37-6f38-4ccc-bbc7-296f0f76790f",
							"RemoveAbilityID": "00000000-0000-0000-0000-000000000000",
							"Prerequisites": {
								"MinimumCharacterLevel": 1,
								"PowerLevelRequirement": {
									"ClassID": "f7cb46af-a719-41c0-9a53-107eefdbce2b",
									"MinimumPowerLevel": 1
								},
								"RequiresAbilityID": "00000000-0000-0000-0000-000000000000",
								"Conditional": {
									"Operator": 0,
									"Components": []
								},
								"VisibilityConditional": {
									"Operator": 0,
									"Components": []
								},
								"IsMutuallyExclusiveUpgrade": "true"
							}
						}
					]
				}
			]
		}
	]
}


#18
Harpagornis

Harpagornis

    (5) Thaumaturgist

  • Members
  • 528 posts

@BMac: Do you have any idea why our modded abilities are completly broken in turn-based-mode so there is "shaken" everywhere in the decriptions?

 

Would be really cool if we could fix this! :)



#19
house2fly

house2fly

    (8) Warlock

  • Members
  • 1166 posts
Presumably that bug is why there's the new "tactical override" line. Now to fill that in I just need to remember what all my items do!

#20
protopersona

protopersona

    (4) Theurgist

  • Members
  • 214 posts

@BMac: Do you have any idea why our modded abilities are completly broken in turn-based-mode so there is "shaken" everywhere in the decriptions?

 

Would be really cool if we could fix this! :)

 

https://forums.obsid...ject/?p=2136867

 

I think I know what's up there. You can probably fix it by adding "OverrideDescriptionStringTactical": -1 to your status effects. Unfortunately it sounds like that's defaulting to 0 when omitted, which indicates string ID 0, whereas -1 indicates "don't use this".  I'll see if I can do something about that on my end for 4.1.1. 






Also tagged with one or more of these keywords: tutorial

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users