Page 1 of 1

ExternalCondition how does it work? Junk Value

Posted: Sat Mar 10, 2018 1:54 pm
by bodomalo
Hi

I try to let a unit only "Transform" if it is close enough to a base-provider
Trait Transform has RequiresCondition

On my building (tent) I tried with this code

Code: Select all

Rules: 

    TENT: 
        ConditionManager: 
        ProximityExternalCondition@PROVBASE: 
            Condition: provbase 
            Range: 8c0 
            
    TRUCK:          
        ExternalCondition@PROVBASE: 
            Condition: provbase 
	Transforms:
		IntoActor: tibfarm
		Offset: -1,-1
		Facing: 108
                RequiresCondition: provbase
		TransformSounds: buildhouse.aud, hvydoor1.aud
		NoTransformNotification: BuildingCannotPlaceAudio	

I always receive this Error when starting the game:
Actor type proximityexternalcondition@PROVBASE: Junk value `provbase` on trait node Condition

Why is it Junk value?

Posted: Sat Mar 10, 2018 5:14 pm
by Sleipnir
The indentation is incorrect, so OpenRA doesn't know how to interpret it. Notice how most of the lines in your Transforms definition don't match up with the other actor traits.

Posted: Sat Mar 10, 2018 6:45 pm
by bodomalo
Sleipnir wrote: The indentation is incorrect, so OpenRA doesn't know how to interpret it. Notice how most of the lines in your Transforms definition don't match up with the other actor traits.
You are right, I was not aware that I can not use a simple PSPad Editor for editing yaml files. There are unknown blank chars / tabs sometimes :-(

Posted: Wed Mar 14, 2018 10:25 pm
by zypres
Sleipnir wrote: The indentation is incorrect, so OpenRA doesn't know how to interpret it. Notice how most of the lines in your Transforms definition don't match up with the other actor traits.
Any way to make non-indentation readable in later versions.
Like the engine works like now, but if you say yaml=-indentation in first line, the engine would replace your "-" with one indentation, and -- as two, etc?

This is really a pain for mappers. Alternatively we could have a script or resources doing it for us, but engine support for alternatives to indentation would be welcome... Its like its made for machines, not humans...

Posted: Wed Mar 14, 2018 11:01 pm
by Sleipnir
All reasonable code editors should have options for showing whitespace (which lets you distinguish between tabs and spaces) and most should have configuration option to automatically indent with tabs or spaces as appropriate.

Posted: Thu Mar 15, 2018 9:24 am
by CatGirls420
Sleip is right, also, use Notepad++ for editing yaml files :P

Posted: Sat Mar 17, 2018 10:46 am
by zypres
what online editors can we use that support this?