making Technical Center Buildable

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

making Technical Center Buildable

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

abcdefg30
Posts: 641
Joined: Mon Aug 18, 2014 6:00 pm

Post 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

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

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

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

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

User avatar
Blackened
Posts: 347
Joined: Sat May 21, 2016 6:27 pm

Post by Blackened »

the exception indicates you've got a bad indent somewhere when you changed the code in the ships yaml.

Post Reply