Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to override GainsExperience Conditions thresholds #16753

Open
netnazgul opened this issue Jul 5, 2019 · 6 comments

Comments

Projects
None yet
4 participants
@netnazgul
Copy link
Contributor

commented Jul 5, 2019

This supposed to change rank-up condition thresholds.

^Infantry:
    GainsExperience:
        -Conditions:
        Conditions:
            400: rank-veteran
            800: rank-veteran
            1600: rank-veteran

Instead it crashes yaml with the following exception:

OpenRA.YamlException: Actor type dog: Trait name GainsExperience: Required property missing: Conditions

@abcdefg30 abcdefg30 added the Bug label Jul 5, 2019

@abcdefg30

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

Imho just

^Infantry:
    GainsExperience:
        Conditions:
            400: rank-veteran
            800: rank-veteran
            1600: rank-veteran

not overriding the value for Conditions would already be a bug.

@abcdefg30

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

From the discussion on IRC:
Overwriting Conditions would be inconsistent on a yaml (syntax) level. I suggested to put a placeholder value to let the merger know it has to treat the following as value and not simply as another set of nodes, but there might be a better solution.

@abcdefg30

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

@pchote

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

As for the original issue, i'm pretty sure this is #16278 - see #16208 (comment) for further investigation.

@netnazgul

This comment has been minimized.

Copy link
Contributor Author

commented Jul 6, 2019

defaults.yaml has this:

^GainsExperience:
	GainsExperience:
		LevelUpNotification: LevelUp
		Conditions:
			200: rank-veteran
			400: rank-veteran
			800: rank-veteran
			1600: rank-veteran
		LevelUpImage: crate-effects

Then in a mod map I had:

^GainsExperience:
    GainsExperience:
        Conditions:
            200: rank-veteran
            400: rank-veteran
            800: rank-veteran
...
^Infantry:
    GainsExperience:
        Conditions:
            100: rank-veteran
            200: rank-veteran
            1000: rank-veteran

also Infantry inheriting ^GainsExperience (through defaults). Result test showed that second (or maybe first) set was active, but not the third one (rifleman didn't get the vet rank on $100 kill). I'll try to check whether the second set actually works or it's only the initial default one that does.

@GraionDilach

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2019

OpenRA.Utility ra --resolved-rules E1 yourmap

TBH I'd expect something like below working:

 ^Infantry:
     GainsExperience:
         Conditions:
             100: rank-veteran
             200: rank-veteran
             -400:
             1000: rank-veteran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.