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

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

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

Post by Ronald »

Hello All,
So far i've done a file-level string search on the word "actor" on all files presents inside the OpenRA installation directory.
This is a summary of the search results where the word "actor" was found inside a file.

A - GENERIC LOCATIONS:
c:\Program Files\OpenRA\global mix database.dat
c:\Program Files\OpenRA\freetype6.dll
c:\Program Files\OpenRA\ICSharpCode.SharpZipLib.dll
c:\Program Files\OpenRA\mods\common\OpenRA.Mods.Cnc.dll
c:\Program Files\OpenRA\mods\common\OpenRA.Mods.Common.dll
c:\Program Files\OpenRA\mods\d2k\OpenRA.Mods.D2k.dll
c:\Program Files\OpenRA\Open.Nat.dll
c:\Program Files\OpenRA\OpenAL-CS.dll
c:\Program Files\OpenRA\OpenRA.Platforms.Default.dll
c:\Program Files\OpenRA\SDL2.dll
c:\Program Files\OpenRA\soft_oal.dll
c:\Program Files\OpenRA\OpenRA.Game.exe
c:\Program Files\OpenRA\CHANGELOG.html

B - MOD SPECIFIC LOCATIONS - CNC / D2K/ RA
c:\Program Files\OpenRA\mods\cnc\bits\scripts\campaign-global.lua
c:\Program Files\OpenRA\mods\cnc\maps\cnc64gdi01\cnc64gdi01.lua
c:\Program Files\OpenRA\mods\d2k\bits\scripts\campaign-global.lua
c:\Program Files\OpenRA\mods\d2k\maps\atreides-01a\atreides01a.lua
c:\Program Files\OpenRA\mods\ra\maps\allies-01\allies01.lua
c:\Program Files\OpenRA\mods\ra\maps\ant-01\ant-01.lua

C - MOD SPECIFIC LOCATIONS - COMMON
c:\Program Files\OpenRA\mods\common\OpenRA.Mods.Cnc.pdb
c:\Program Files\OpenRA\mods\common\OpenRA.Mods.Common.pdb

D - INSIDE THE VARIOUS TYPES OF YAML FILES:
c:\Program Files\OpenRA\mods\cnc\chrome\color-picker.yaml
c:\Program Files\OpenRA\mods\cnc\maps\blank-shellmap\map.yaml
c:\Program Files\OpenRA\mods\cnc\metrics.yaml
c:\Program Files\OpenRA\mods\cnc\weapons\ballistics.yaml
c:\Program Files\OpenRA\mods\common\chrome\color-picker.yaml

QUESTION: Is there an documented overview of all "Actors" which can be used by the OpenRA GameEngine?
With overview I mean just like the Traits and Weapons overview over here:
- https://docs.openra.net/en/latest/release/traits/ -Traits
- https://docs.openra.net/en/latest/release/weapons/ - Weapons

If this overview exists, where can I find it?
Last edited by Ronald on Fri Sep 25, 2020 2:01 pm, edited 1 time in total.

SirCake
Posts: 386
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: 193
Joined: Fri Aug 30, 2019 9:05 pm

Re: OpenRA - GameEngine - Looking for the Actor Overview

Post by Ronald »

SirCake wrote:
Wed Sep 23, 2020 6:29 am
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.
Thanks. I already noticed something like that, when working with the OpenRA Map Editor and hovering with the mouse over the various map-elements.
SirCake wrote:
Wed Sep 23, 2020 6:29 am
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.
Check!
SirCake wrote:
Wed Sep 23, 2020 6:29 am
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.
This seems to work in the same way as the Object Oriented Programming principle i've show at the top of this thread:
-viewtopic.php?f=83&t=21258
SirCake wrote:
Wed Sep 23, 2020 6:29 am
All properties will then be combined into one placeable entity when the game loads.
So can is say that:"Actors are dynamic and are assembled (once) in real-time, (only) when the Game-Engine loads the entire selected MOD?
SirCake wrote:
Wed Sep 23, 2020 6:29 am
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.
QUESTION:
Is this the correct location (in de source_code-tree) do dive deeper in - for example - all general/ common Traits use inside the RedAlert MOD?
In this source_code/subsection I've already found a lot of C# sources with filenames which are exactly the same as some Traits used in the RA MOD.
-https://github.com/OpenRA/OpenRA/tree/b ... mon/Traits
SirCake wrote:
Wed Sep 23, 2020 6:29 am
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)
[x] Check I get this, When healthpoint === zero, the selected unit then returns again to the enteral divine RedAlert battlefields.
SirCake wrote:
Wed Sep 23, 2020 6:29 am
90% of the time you don't have to touch the c# logic to implement whatever you want,
[x] Check! With over 520+ Traits (alone), one can a nice amount of Actor variations :-)
SirCake wrote:
Wed Sep 23, 2020 6:29 am
and it is very hard to do if you have to. (because then you need you own project, compile that etc etc. )
the_only_easy_day.jpg
the_only_easy_day.jpg (53.42 KiB) Viewed 201 times
Don't worry, I like a good constructive ICT-challenge which pushes the boundaries of my current skills envelope.
This task has already placed on my OpenRA bucket list - to at least once - be able to successfully compile and run it

Thanks for the waypointers SirCake, much appreciated.

SirCake
Posts: 386
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: 193
Joined: Fri Aug 30, 2019 9:05 pm

Re: OpenRA - GameEngine - Looking for the Actor Overview

Post by Ronald »

SirCake wrote:
Wed Sep 23, 2020 8:45 am
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 instantiated and attached to each actor using the trait.
@SirCake: Thanks for the confirmations, hint tips and tricks.
I've already downloaded the
- OpenRA sourcecode - from here : https://github.com/OpenRA/OpenRA
- OpenRA MOD SDK --- from here : https://github.com/OpenRA/OpenRAModSDK/
- Total Commander --- from here : https://www.ghisler.com/
And armed with a lot of free "C Sharp" tutorials from the Internet
- https://duckduckgo.com/?t=ffab&q=C+shar ... als&ia=web

I guess the time time has come to extend my"string_search" the OpenRA source_code and Mod SDK to find out myself ow stuff works under-the-hood.
SirCake wrote:
Wed Sep 23, 2020 8:45 am
Any dev who might want to correct me, you are welcome.
I would not wait too long if I where you, since I do not notice many devs hanging around on the forum lately.
So I guess it is up to yourselves, finding out how stuff really works by digging into the source_code.
Attachments
1.jpg
1.jpg (40.86 KiB) Viewed 162 times

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

Re: OpenRA - GameEngine - Looking for the Actor Overview

Post by Ronald »

Final update in OpenRA GameEngine Actor quest.
.
Straight from Phrohdoh in the Modding Room on the OpenRA Discord server.
OpenRA_GameEngine_Actors_mistery_solved_25_09_2020.jpg
OpenRA_GameEngine_Actors_mistery_solved_25_09_2020.jpg (47.36 KiB) Viewed 149 times
.
Thank you very much Phrohdoh for clarifying this matter.

Post Reply