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 » Thu Feb 22, 2018 11:28 am

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: 345
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 » Thu Feb 22, 2018 1:54 pm

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 » Thu Feb 22, 2018 8:03 pm

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 » Sat Feb 24, 2018 9:23 am

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

Blackened
Posts: 308
Joined: Sat May 21, 2016 6:27 pm

Post by Blackened » Sat Feb 24, 2018 11:03 pm

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

Post Reply