OpenRA / OpenRA

Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.
https://www.openra.net
GNU General Public License v3.0
14.7k stars 2.68k forks source link

Allow experience to be supressed with garrisoned units. #13113

Closed SoScared closed 6 years ago

SoScared commented 7 years ago

This is also aimed towards the RA pillboxes as a way to have them be a less of a threat and perhaps function more consistently. Personally I had no idea up until a few months ago that the garrisoned unit gained experience, quickly increasing the pillbox-efficiency when in action.

Quoting related comment by Frame Limiter:

Unfortunately I wasn't able to do it because the GainsExperience trait doesn't have Conditions that can enable or disable the trait. 

I think if GainsExperience had conditions you could simply do this:

^GainsExperience:
+GainsExperience:
++RequiresCondition: !Garrisoned

PBOX:
+Cargo:
++PassengerConditions:
+++e1: Garrisoned

https://github.com/OpenRA/OpenRA/blob/bleed/OpenRA.Mods.Common/Traits/GainsExperience.cs

AFAIK the only way it's possible right now is if you made the pillbox initial actor a technician and then removed GainsExperience from the technicians.

I also tried making the pillbox AttackTurreted instead of AttackGarrisoned but it doesn't work with "initial actors" so you need to exit and re-enter to get them to shoot. 

Perhaps there are uses beyond the pillbox but regardless it would allow for more options around RA balancing around its hottest topic.

GraionDilach commented 7 years ago

AttackGarrisoned also ignores range and firepower modifiers of the garrison. Which is, I believe, related and also an issue.

MartinCurwen commented 7 years ago

Not sure if PassengerConditions actually gives conditions to the passenger? seems it might have been intended to act as the IFV from later red alert games, granting conditions to the cargo holder itself (to change turret based on who is inside)?

about the GainsExperience i have that working as you wanted with required condition but just need to test it out and then you need an actual way to set a condition to a passenger so i might look into that first

right now I'm using a modified Radar jammer to give an area effect to grant the condition necessary for earning experience as a stand in and seems to work fine on units out in the field but I'm lacking a way to grant conditions guys inside cargos or each unit grants its own condition while being a passenger.

ghost commented 7 years ago

Ah, @MartinCurwen, yeah it looks like you're correct and my example above was wrong -- PassengerConditions grants conditions to the cargo holder, not the cargo itself.

MartinCurwen commented 7 years ago

13110 accidently added the GainsExperience.cs with the changes needed to use conditions to this pull request in progress. I'm completely new to GitHub and the desktop interface is mind blowing 🤕

pchote commented 7 years ago

The simplest fix here is to grant a condition on the passenger, and use that condition to disable or adjust the exp-gained modifier on GainsExperience.

CH4Code commented 6 years ago

Just a few numbers on this. A star decorated pillbox kills buildings with the ~same speed as a flame tower which is supposed to be better at that! Since one shot of a pb kills any infantry, after two shots (or one rocket soldier) the PB is already killing 10% faster basicaly from the start. A star decorated PB (needs to kill 1600$) kills 50-60% faster. I think for fairness's sake bunkered infantry should earn reduced exp or no exp...

MustaphaTR commented 6 years ago

Another idea, i already have a code that has Type: support on Firepower and Reload Multipliers on my Generals Alpha mod, we can make Garrison weapons (maybe just Vulcan?) not effected by veterancy, so a unranked unit or 1-star unit do the same damage in a PBox.

https://github.com/MustaphaTR/OpenRA/commit/c32b759920cff6f1197e83ce5b8eb80e27583058

GraionDilach commented 6 years ago

@MustaphaTR Please, no. That implementation breaks the Mammoth Tank.

A condition to the passenger when inside a transport solution would be better, that would allow modders to recreate YR's OpenToppedRangeBomus and OpenToppedDamageMultiplier tags. We already have experience multiplers afterall, I think.

MustaphaTR commented 6 years ago

I don't see how that breaks mammoth tank?

I agree that Condition to passenger is better. I brought that up just because it is easier.

GraionDilach commented 6 years ago

Pretty sure Mammoth Tank is using the secondary name for the missiles and i don't really like the idea when all weapon names would need their own batch of modifier traits.

GraionDilach commented 6 years ago

Another option to fix this (without even requiring engine changes!) would be to use IFV setup with a dummy turret with custom facing amounts for accurate firing positions. A reference for such is here: https://gist.github.com/GraionDilach/ca4c4297f3c63759f1d4899593d4fca0

MustaphaTR commented 6 years ago

Pretty sure Mammoth Tank is using the secondary name for the missiles and i don't really like the idea when all weapon names would need their own batch of modifier traits.

I can just change the Type to Types, iirc, i didn't know about .Overlaps() back then.

pchote commented 6 years ago

The "Allow" part was fixed by #15066. Actually enabling this is a reverse-duplicate of #14086.