Best way to handle upgrading attributes to game objects?

game is similar to clash royale, but you aren’t playing cards during game play. You are selecting upgrades in-between rounds of mostly auto battler stuff.

Then some types of upgrades are offered and you need to pick one or more based on your current $.

I want to upgrade the the other objects in game. In unity I can easily upgrade the prefab attributes. What is the best way to handle this in defold?

Is setting public properties the best way to handle this or some kind of lua module?

Keep in mind the upgrades are selected in a different scene/collection. Then those choices have to pass to the other collection.

You can change the “prefab” of a factory in Defold:

It is a bit of an advanced feature but it could work in your case. But perhaps it is easier to do through some public script properties and use those values to determine both visuals and power of your game units.

1 Like