[Solved] - OpenRA - GameEngine - Looking for the Actor Overview

topic deleted

Discussion about the game and its default mods.
Post Reply
Ronald
Posts: 166
Joined: Fri Aug 30, 2019 9:05 pm

[Solved] - OpenRA - GameEngine - Looking for the Actor Overview

Post by Ronald »

.
Last edited by Ronald on Mon Oct 11, 2021 7:54 pm, edited 3 times in total.

SirCake
Posts: 393
Joined: Thu Feb 04, 2016 5:40 pm

Re: OpenRA - GameEngine - Looking for the Actor Overview

Post by SirCake »

If you are looking for the entities placeable in a map, then the map editor (main menu > extras > map editor) shows you a complete list of those in the side bar.

If you are looking for a text-based definition of those, you can find them in the respective mod folder openra > mods > ra/td/d2k > rules. The definitions are contained in several files and can be derived from one another. i.e. "combat_tank_a" inherits all properties of "combat_tank" which inherits all properties from "tank" which inherits from ExistsInWorld etc.. Each Inheriting layer usually adds more specific properties to the actor.

All properties will then be combined into one placeable entitiy when the game loads. This means the properties defined in the yaml files have a respective logic("trait") in the c# source code which determines which property values are valid for a property and what the property actually does in the game.
i.e. Health: Hp: 200 property determines the max hitpoints an actor has (200) and c# logic behind it actually kill and removes the unit from the game if health is lower than 0. (simplified example)
90% of the time you don't have to touch the c# logic to implement whatever you want, and it is very hard to do if you have to. (because then you need you own project, compile that etc etc. )

Ronald
Posts: 166
Joined: Fri Aug 30, 2019 9:05 pm

Re: OpenRA - GameEngine - Looking for the Actor Overview

Post by Ronald »

.
Last edited by Ronald on Mon Oct 11, 2021 7:20 pm, edited 1 time in total.

SirCake
Posts: 393
Joined: Thu Feb 04, 2016 5:40 pm

Re: OpenRA - GameEngine - Looking for the Actor Overview

Post by SirCake »

I think dynamic is the wrong word. But yes once loaded into openRA (by executing the program) the actors are static and cannot change their abilities or their behaviour. You can turn off some of their abilities with RequiresCondition: and GrantCondition*:(or similar) properties which are truly dynamic (evaluated real-time).
And yes you can change the actor however you like before starting openRA (including as many mistakes as you please ;) ).
OpenRA utility helps with finding some of those mistakes before starting the program (see Openra.Utility.exe <mod> --check-yaml).

Yes Inheritance is often included in OOP, but the rules what you can do differ from language to language. MiniYaml has multiple inheritance.

I'm not too familiar with c# traits, I still haven't managed to write a custom trait but what I know is that (most?) traits have a trait"Info" Class which is used for parsing MiniYaml and for the Documentation generation and a Trait class which is instanciated and attached to each actor using the trait.
Any dev who might want to correct me, you are welcome.

Ronald
Posts: 166
Joined: Fri Aug 30, 2019 9:05 pm

Re: OpenRA - GameEngine - Looking for the Actor Overview

Post by Ronald »

.
Attachments
1.jpg
1.jpg (40.86 KiB) Viewed 15625 times
Last edited by Ronald on Mon Oct 11, 2021 7:21 pm, edited 1 time in total.

Post Reply