Will there be some more actor-spawning traits?

Subject description: such like warheads that spawn actors, unit deploying to transform into another actor, etc

Information and discussion for custom maps and mods.
Post Reply
User avatar
DirtyChicken
Posts: 2
Joined: Fri Oct 12, 2018 6:54 am
Location: China

Will there be some more actor-spawning traits?

Post by DirtyChicken » Fri Oct 12, 2018 1:56 pm

I have read the OpenRA modding manual and has done some testing on what it can achieve , and i found it very interesting, offering limitless potential. And I'm now seriously preparing to move onto the OpenRA platform and create mods. In spite of this, some modding techniques existing in ARES and Hares are seemingly no longer supported in OpenRA (like anim spawning invisible infantries to do magic for you). For example, if I wish to create a lightning storm superweapon, I'll go for this route:
1.SpawnActorPower creating an invisible actor

2.the actor self-destructs via KillSelf trait, giving out debris weapons at random direction with controllable debris number and radius via ThrowsShrapnel

3.the shrapnel weapon each create an invisible actor on impact

4.the second invisible actor KillSelf after set duration, with cloud anim as death animations, and SpawnActorOnDeath creating yet another invisible actor

5.the third invisible actor KillSelf after set duration to sync with the cloud anim, Explodes, and delivers the true lightning bolt anim and the lightning strike damage

The only problem is that there is no way for a weapon to create actors, unlike in ARES where weapons using their anims, could be used to create suiciding infantry attached with suicide-anim-attached AttachEffect.

Maybe feature like spawning a conscript when the cannonball lands the ground is ridiculous and useless to you, but to us experienced modders they can be definitely put to good use. To put it frankly, we need such bridging traits to connect actors, superweapons, weapons and such. In this way lots of intricate designs could be achieved without having to modify the OpenRA itself (like a hardcoded lightning storm Power), saving time for both you developers and us modders.

For example, original YR, Ares, or Chinese modified HAres has bridging tags enabling modders to: generate a superweapon strike by playing an anim; generate a unit by playing an anim; AttachEffect attaching a unit onto another unit, sharing the mother unit's location, possibly sharing its attacking targets, facing, and experience, but independent otherwise; completely converting a unit into another unit when deploying; converting a unit into another unit when said unit is killed by a weapon, etc. Such features enable experienced YR modders like Kenosis to do many seemingly impossible stuff with the game, and we are planning to do much more on OpenRA platform.

So we are sincerely hoping some developers will help us fulfill our wishes, or tell us how to do, because we don't know programming whatsoever and are unable to develop those features ourselves.(we are willing to try though, as long as someone told us how to do this)
Aka Trans_C. Have some experience in RA2YR modding and creating SHP assets. Now trying to make brand new OpenRA mods.

User avatar
Sleipnir
Posts: 712
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Re: Will there be some more actor-spawning traits?

Post by Sleipnir » Fri Oct 12, 2018 2:24 pm

Breaking the habit of using invisible actors and other workarounds is one of the biggest changes to get used to when moving from RA2/Ares to OpenRA.

If you need a support power that creates a lightning storm, then you can create one directly! Open/Create the C# project for your mod, define a new trait subclassing SupportPower (or perhaps copy and rename IonCannonPower as a template), and then directly create the animations and weapon impacts using the engine and common-mod APIs.

The same applies to nearly everything else: OpenRA makes it very easy for mods to define their own traits, projectiles, warheads, file format loaders, and more. In most cases this will be much simpler and more robust than stringing together a series of dummy actors and animations in yaml :)

The C# APIs to do all this are not that much harder than learning the arbitrary ini tags defined by Ares, etc. You just need to overcome the psychological barrier of writing "real code", and be willing to learn and make mistakes.

User avatar
DirtyChicken
Posts: 2
Joined: Fri Oct 12, 2018 6:54 am
Location: China

Re: Will there be some more actor-spawning traits?

Post by DirtyChicken » Fri Oct 12, 2018 2:43 pm

Sleipnir wrote:
Fri Oct 12, 2018 2:24 pm
then you can create one directly!
Well, that's an far too attractive proposal to be ignored, seems it's time for us to learn how to C# then. Although i'd rather stick with our old invisible little unit stuff, I'm definitely willing to spend time and effort trying making whatever new features i need myself.
So, could you provide some more information on how to start developing new features? It's somewhat hard for people who don't know programming to seek information on github, and some little bit more help could be useful. Many many thanks.
Aka Trans_C. Have some experience in RA2YR modding and creating SHP assets. Now trying to make brand new OpenRA mods.

lawANDorder
Posts: 54
Joined: Tue Oct 24, 2017 3:20 pm

Re: Will there be some more actor-spawning traits?

Post by lawANDorder » Fri Oct 12, 2018 4:54 pm

I just started the C# Fundamentals for Absolute Beginners course to get a better understanding of C#.

User avatar
Sleipnir
Posts: 712
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Re: Will there be some more actor-spawning traits?

Post by Sleipnir » Fri Oct 12, 2018 5:43 pm

https://github.com/OpenRA/OpenRAModSDK/ ... ng-Started describes how to get started with the Mod SDK
https://www.youtube.com/watch?v=l-I-ueg ... kyDUKNjmnP demonstrates how to create a mod that builds on top of RA and adds custom code on top (this first one shows a custom asset loader, which is one of the more complicated bits of custom code you can write)
https://www.youtube.com/watch?v=IvZzuNE ... kyDUKNjmnP demonstrates how to build custom traits to make the custom artwork from the previous video work ingame.

The videos are fairly intense, but don't let that put you off!

User avatar
MustaphaTR
Posts: 195
Joined: Mon Aug 04, 2014 6:38 am
Location: Kastamonu, Turkey

Re: Will there be some more actor-spawning traits?

Post by MustaphaTR » Fri Oct 12, 2018 5:46 pm

Also while in the topic of warheads creating actors, AS Engine has CreateActorWarhead, it could be a nice idea to try to get it to upstream.

Post Reply