You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to reimplement the attack move order generator as part of QoL mods for the various games, namely line moves/a-moves like spring engine has. I immediately ran into an issue, attack move's trait can't be referenced outside the Common mod. If I replace AttackMove with a duplicate in my mod with a new name that will break many related traits. This leaves me with no apparent option to do this as an overlay mod. Also being sealed seems excessive to me, in addition to being private it is hostile for any sort of reuse.
It was likely sealed due to style choice of having private classes sealed. In general it's a performance boost.
As for extendability, it doesn't have any virtual fields so there's not much point in inheriting it
A handful of classes directly use the type and search for it. AttackMoveOrderGenerator, AttackWander and its associated activity. Thinking about it more, seems like a case for an IAttackMove similar to IMove. Overriding attack move per se is not my problem, though, and I probably shouldn't have even brought it up in the same issue as my actual problem with the file.
I just imagine this would be a nightmare if someone wanted to add more brains to the units above what a-move already does. A standalone game would be less squeamish about modifying the Common mod but adding other forms of attack move in another binary would require a new order generator, and a new command bar logic class.
Anyway, if the class is private nothing outside Common can even reference the trait. This would also not be an issue if I could filter for an interface.
In my mod I now have working line commands for attack move, but you would need my fork of Common that literally just adds 'public' to the start of AttackMove and AttackMoveInfo, in order to run it. I was hoping to let people just drop my binary into their projects to get the Order Generators the mod provides.
I have otherwise been very impressed by the codebase and was pleasantly surprised by how quickly I got my mod to work.
Hi, I am trying to reimplement the attack move order generator as part of QoL mods for the various games, namely line moves/a-moves like spring engine has. I immediately ran into an issue, attack move's trait can't be referenced outside the Common mod. If I replace AttackMove with a duplicate in my mod with a new name that will break many related traits. This leaves me with no apparent option to do this as an overlay mod. Also being sealed seems excessive to me, in addition to being private it is hostile for any sort of reuse.
OpenRA/OpenRA.Mods.Common/Traits/AttackMove.cs
Line 56 in 7859b91
Reimplementing the default unit order generator was a breeze by comparison.
The text was updated successfully, but these errors were encountered: