Download

Programmatically Set Default Values

I have developed a Total Conversion mod. Seems like whenever source blueprint files are updated, I need to manually apply all the default variables again.

How can I set the default variables for blueprint assets programmatically. Lets say we have a blueprint called “MyBlueprintA” with a default value field “ValueA”. I’d like to execute MyBlueprintA.Value = 5 then save the blueprint;

Can this be achieved?

Furthermore, components are attached to the blueprints often and I want to be able to change the default values for those as well without having to do it manually.

You should be able to set default values inside the “constructor” which should be right next to your event tab. After you finish toying with the parent files though, you should change it back to using the default tab as it’s a little quicker to access and edit.

Thanks for the idea. Although I’m worried that when the blueprint is overwritten during dev kit updates, won’t my default constructor changes be lost?

Lets say I want to overwrite the compy dinostatuscharactercomponent default value for health. If I add to its constructor, when the dev kit updates and that file is overwritten my changes will still be lost?

Hopefully I’ve misunderstood your suggestion :smiley:

Oh no I completely misunderstood what you were asking. I thought you were referring to the UE4 bug that causes values in your default’s tab to be zero’d out sometimes when base (parent) blueprints are modified.

For your issue, I’m assuming the best way would be to save backups of your modified blueprints before updating. If you want an actual 100% factual answer, I would suggest you download the Discord app and join the Ark Modding Discord channels as a lot of experienced modders hang out there and are more than willing to help answer questions and the questions are usually answered instantly :slight_smile: