Loading text based rules for "game objects"


Let’s say I have a game where each game object can store some rules about itself.
Take for example: Biped_Creature and Hand_Weapon.
The Hand_Weapon stores in its object somewhere, that it can mounted to any of the following (Hand, Tentacle)

However, I want that information to be text based and read from a file.

Does SkookumScript have these types of helper classes or should I be using Unreal for that?


Hi Macktek - :sk: does not have the ability to read from a file as it was designed with a fully asset-based engine in mind (all resources managed by the engine).

You can of course add Blueprint variables to your Blueprints (e.g. Strength, use UE4Editor (e.g. the Property Matrix) to edit them, and use them in :sk: as data members (bad_guy.@strength). This would not store your data in text files though.

You can also use :sk: class data members to store a set of values for each :sk: class, e.g. Enemy.@@strength. Each :sk: class would then initialize those in its class constructor method (which is stored in a text file named !()C.sk). You could then also modify such class data members while the game is running, by setting them from the console via Enemy.@@strength := 42.

In case of a weapon that can be mounted to a set of bones, you could use a list of strings HandWeapon.@can_be_mounted_to := {"Hand" "Tentacle"}.

Let me know if you have any more questions!