# Programmatically Set Default Values

**URL:** <https://forums.unrealengine.com/t/programmatically-set-default-values/390903>\
**Category:** Modding\
**Tags:** default-value, mod, unreal-engine, UE4, Blueprint, question\
**Created:** [April 14, 2017, 8:41am UTC](https://forums.unrealengine.com/t/programmatically-set-default-values/390903 "2017-04-14T08:41:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Covert\_Owl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Covert\_Owl](https://forums.unrealengine.com/u/Covert_Owl)\
**Post date:** [April 14, 2017, 8:41am UTC](https://forums.unrealengine.com/t/programmatically-set-default-values/390903/1 "2017-04-14T08:41:00Z")

</div>

Modding for Ark Survival.

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 I have a blueprint called “MyBlueprintA” with a default value field “ValueA”.  
I’d like to call  
MyBlueprintA.Value = 5;

Can this be achieved?

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

Should be able to save the file as well after.

---

<div class="post-metadata">

**Author:** ![vanlacke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vanlacke](https://forums.unrealengine.com/u/vanlacke)\
**Post date:** [April 14, 2017, 3:40pm UTC](https://forums.unrealengine.com/t/programmatically-set-default-values/390903/2 "2017-04-14T15:40:09Z")

</div>

Set your values in the construction script

---

<div class="post-metadata">

**Author:** ![Covert\_Owl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Covert\_Owl](https://forums.unrealengine.com/u/Covert_Owl)\
**Post date:** [April 14, 2017, 10:57pm UTC](https://forums.unrealengine.com/t/programmatically-set-default-values/390903/3 "2017-04-14T22:57:32Z")

</div>

Thanks for your answer.  
Although, if the entire blue print file is overwritten when the dev kit updates, aren’t the default constructor script changes also lost?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a6687b37](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a6687b37](https://forums.unrealengine.com/u/anonymous_user_a6687b37)\
**Post date:** [January 3, 2019, 8:04am UTC](https://forums.unrealengine.com/t/programmatically-set-default-values/390903/4 "2019-01-03T08:04:02Z")

</div>

i have same question  
plz answer it!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a6687b37](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a6687b37](https://forums.unrealengine.com/u/anonymous_user_a6687b37)\
**Post date:** [January 4, 2019, 10:49pm UTC](https://forums.unrealengine.com/t/programmatically-set-default-values/390903/5 "2019-01-04T22:49:27Z")

</div>

**plz answer it**
