Page 1 of 1
Adding Custom building to map
Posted: Fri Jul 22, 2016 12:23 pm
by Concret
Hi, hope anyone can help me out with SHP questions. Want to add some TD buildings and units to a RA map.
Trying to add a GDI War Factory. I have looked into a few modded maps, but cannot seem to get any further.
I've got 4 .shp files that I renamed to GRGE (as in Garage)
GRGE.shp
GRGE2.shp (the door)
GRGEMAKE.shp
GRGEICON.shp
In the Rules.yaml:
Code: Select all
GRGE:
Inherits: ^Building
Buildable:
Queue: Building
BuildPaletteOrder: 80
Prerequisites: proc, ~techlevel.low
Valued:
Cost: 2000
Tooltip:
Name: War Garage
Description: Produces vehicles.
Building:
Footprint: xxx xxx
Dimensions: 3,2
Health:
HP: 1500
Armor:
Type: Wood
RevealsShroud:
Range: 4c0
RenderSprites:
Image: GRGE
Bib:
WithProductionDoorOverlay:
Sequence: build-top
RallyPoint:
Exit@1:
SpawnOffset: 213,-128,0
ExitCell: 1,2
Production:
Produces: Vehicle
PrimaryBuilding:
ProductionBar:
Power:
Amount: 0
ProvidesPrerequisite@buildingname:
Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure
Then in the sequences.yaml:
Code: Select all
grge:
idle:
Start: 0
Facings: 16
icon: grgeicon
Start: 0
The codes in sequences are mostly guesswork, but I am basically looking for the right code to implement all parts of the structure. I also want to add the TD Sam Site with the closed bay-door and I'm guessing that building will have a similar code.
Posted: Sun Jul 24, 2016 4:29 pm
by abcdefg30
You are missing a whole bunch of sequences:
- For the "Bib" for example (this is the advanced power plant bib):
Code: Select all
bib: bib2
Length: *
UseTilesetExtension: true
TilesetOverrides:
INTERIOR: TEMPERAT
- For the make animation:
- And for the door ("WithProductionDoorOverlay"):
Code: Select all
build-top: grge2
Length: 10 # or whatever length your shp has
In total, your sequence setup should look similiar to the following:
Code: Select all
grge:
idle:
Start: 0
Facings: 16
make: grgemake
Length: *
build-top: grge2
Length: 10 # or whatever length your shp has
bib: bib2
Length: *
UseTilesetExtension: true
TilesetOverrides:
INTERIOR: TEMPERAT
icon: grgeicon
Start: 0
I hope I didn't forget anything and could help.
![Smile :)](./images/smilies/smile.gif)
Posted: Sun Jul 24, 2016 4:43 pm
by abcdefg30
abcdefg30 wrote: ↑I hope I didn't forget anything and could help.
![Smile :)](./images/smilies/smile.gif)
Ah well, I just noticed that you also might want to add a "damaged-idle" and "damaged-build-top" sequence. You can duplicate those (copy and paste the ones without "damage-").
Posted: Sun Jul 24, 2016 8:35 pm
by Concret
Thanks a lot Abc !
Went to play with your code this evening. Got the building to appear in game, without crashing, but I had to add in the TD palette. I also had to do some fine-tuning on the idle and damaged idle, but that's looking good now.
So now the building is there, but it's not taking on the players color. Also the icon needs to take on the (td) palette, is that possible?
I've been working on this in a map; Calitz_Dorp, which I attached, incase you'd like to see what happens..
from map.yaml:
Code: Select all
Rules:
World:
PaletteFromFile@calitz:
Name: calitz
Filename: calitz.pal
Tileset: desert
ShadowIndex: 4
AllowModifiers: false
GRGE:
Inherits: ^Building
Buildable:
Queue: Building
BuildPaletteOrder: 20
Prerequisites: ~techlevel.low
Valued:
Cost: 250
Tooltip:
Name: War Garage
Description: Produces vehicles.
Building:
Footprint: ___ xxx ===
Dimensions: 3,3
Health:
HP: 1000
Armor:
Type: Wood
RevealsShroud:
Range: 4c0
RenderSprites:
Image: GRGE
Palette: calitz
Bib:
WithProductionDoorOverlay:
Sequence: build-top
RallyPoint:
Offset: 0,3
Exit@1:
SpawnOffset: -341,-341,0
ExitCell: 0,2
ExitDelay: 3
Production:
Produces: Vehicle
PrimaryBuilding:
ProductionBar:
Power:
Amount: 0
ProvidesPrerequisite@buildingname:
Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure
Sequences:
World:
PaletteFromFile@calitz:
Name: calitz
Filename: calitz.pal
Tileset: desert
ShadowIndex: 4
AllowModifiers: false
grge:
icon: grgeicon
Start: 0
Palette: calitz
idle:
Start: 0
Length: 1
make: grgemake
Length: *
build-top: grge2
Length: 9
bib: bib2
Length: *
UseTilesetExtension: true
TilesetOverrides:
INTERIOR: TEMPERAT
damaged-idle:
Start: 2
Length: 1
damaged-build-top: grge2
Length: 10
Posted: Sun Jul 24, 2016 8:47 pm
by Graion Dilach
Sequences-World is wrong and should be removed.
You need to add a PlayerColorPalette to Ruleset-World as well, then use RenderSprites-PlayerPalette instead of Palette.
Also see
http://www.sleipnirstuff.com/forum/view ... 304#297304 - the last post here before yours. >_>
Posted: Sat Aug 06, 2016 9:52 am
by Concret
Thank you Graion.
Based on your advice I've been playing around with PlayerColorPalette but with no luck at all. I either get an error that CalitzMulti0.pal is missing or all my buildings are drawn on the Calitz palette (the TD Temperat palette.)
I also looked at the post you referred to and been through most of the GitHub wiki. I've looked at the custom ConYardWars map (awesome map btw) but also with no luck.
Think what I really need is a template for a custom unit and a custom building with sequences and husks, so that I can see what I'm missing when I'm adding some TD units.
![Confused :?](./images/smilies/confused.gif)