ExternalCondition how does it work? Junk Value

Information and discussion for custom maps and mods.
Post Reply
bodomalo
Posts: 37
Joined: Tue Feb 20, 2018 7:35 pm

ExternalCondition how does it work? Junk Value

Post 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?

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

Post 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.

bodomalo
Posts: 37
Joined: Tue Feb 20, 2018 7:35 pm

Post 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 :-(

zypres
Posts: 42
Joined: Mon Oct 17, 2011 12:50 am
Location: Bergen

Post 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...

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

Post 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.

CatGirls420
Posts: 77
Joined: Wed Mar 14, 2018 2:59 am
Location: Catia

Post by CatGirls420 »

Sleip is right, also, use Notepad++ for editing yaml files :P

zypres
Posts: 42
Joined: Mon Oct 17, 2011 12:50 am
Location: Bergen

Post by zypres »

what online editors can we use that support this?

Post Reply