Page 1 of 1

making Technical Center Buildable

Posted: Thu Feb 22, 2018 11:28 am
by bodomalo
Hi

I am a beginner..

I tried to make the Technical Center (MISS) buildable.

If I just put it into rules/structures.yaml, naming it MISS - it does not appear in the buildings options

If I copy the same MISS and name it XTEC(for example), I am able to build this new building, but as soon as I want to place it the game crashes telling me it could not find "xtec.shp"

How do I make MISS structure buildable for players?
Or how do I copy MISS.SHP to a new xtec.shp file? (I could not find any miss.shp)



MISS:
Inherits: ^BaseBuilding
Inherits@shape: ^3x2Shape
Valued:
Cost: 5000
Tooltip:
Name: Technik Center 2
Buildable:
BuildPaletteOrder: 80
Queue: Building.Nod, Building.GDI
Description: Gives extra crates
Building:
Footprint: xxx xxx
Dimensions: 3,2
LocalCenterOffset: 0,-512,0
Health:
HP: 600000
RevealsShroud:
Range: 5c0
WithBuildingBib:
Power:
Amount: -200
ProvidesPrerequisite@buildingname:

Posted: Thu Feb 22, 2018 1:54 pm
by abcdefg30
Hm, actually you should be fine by just redefining "Prerequisites:" on "Buildable:"... Not sure why that doesn't work for you. Anyway, you shouldn't need to copy the definition around, you just need to edit it in "tech.yaml".

For the crash after renaming: You need to redefine "Image:" on "RenderSprites:" (the game looks for the unit name as shp name by default).
E.g.

Code: Select all

RenderSprites:
	Image: MISS

Posted: Thu Feb 22, 2018 8:03 pm
by bodomalo
abcdefg30 wrote: Hm, actually you should be fine by just redefining "Prerequisites:" on "Buildable:"... Not sure why that doesn't work for you. Anyway, you shouldn't need to copy the definition around, you just need to edit it in "tech.yaml".

For the crash after renaming: You need to redefine "Image:" on "RenderSprites:" (the game looks for the unit name as shp name by default).
E.g.

Code: Select all

RenderSprites:
	Image: MISS
Thanks. Yeah, I found that out now. I've put a new MISS building into structure.yaml but did not know it already existed in tech.yaml. So it was ignored...

Posted: Sat Feb 24, 2018 9:23 am
by bodomalo
abcdefg30 wrote: E.g.

Code: Select all

RenderSprites:
	Image: MISS
I tried to clone a ship doing this way with RenderSprites

The game always crashes at start, exception is:
OpenRA.YamlException: Bad indent in miniyaml at cnc|rules/ships.yaml

I tried

Code: Select all

RenderSprites:
	Image: LST
I also tried

Code: Select all

RenderSprites:
	Image: lstnew
Nothing helps. :-(

Posted: Sat Feb 24, 2018 11:03 pm
by Blackened
the exception indicates you've got a bad indent somewhere when you changed the code in the ships yaml.