As I experienced it, and not without some difficulties, I thought it could be useful for others, so I try to share a short description on how to build a new BaseScape Facility sprite
A) 1x1 FACILITY
Assuming that we will not build facilities of shape different from square, octogonal or cross !To Do :
- SpriteFacility has to be designed, referenced under section "extraSprites:", then assigned to "spriteFacility:" attribute under section "facilities:"
- SpriteShape has only to be selected/chosen between vanilla shapes (see below), then assigned to "spriteShape:" attribute under section "facilities:"
1) SpriteFacility
1.1) Design it
-
without borders
- of dimensions 24x24 (could be eventually a little bigger, depending if you want to fully cover the wall, but better to make a first version 24x24)
- in a 32x40 sheet
- to be positioned in (4,3), given that first is (0,0) !
1.2) Declare it under "extraSprites:" section, let's say from 100
100: MyPath/MyFacility_SpriteFacility.PNG
1.3) Assign it to "facilitySprite:" attribute
spriteFacility: 100
2) SpriteShape 2.1) Select the adequate shape in vanilla [1,2,3]
Also :
- 1 for square, or
- 2 for octogonal, or
- 3 for cross
2.2) Assign it to "facilityShape:" attribute
spriteShape: 1
How it works in gameWhen placing it on BaseScape, engine will use [4 or 5 or 6] for the green shape + new SpriteFacility for the inside
When built, engine will use back [1 or 2 or 3] for the Shape + SpriteFacility for the inside
ExampleSecurity Room (1x1-square)
A) 2x2 FACILITY
Assuming that we will build only facilities whose square-shaped !
To Do :
- SpriteFacility has to be designed, referenced under section "extraSprites:", then assigned to "spriteFacility:" attribute under section "facilities:"
- SpriteShape has to be designed, referenced under section "extraSprites:", then assigned to "spriteShape:" attribute under section "facilities:"
1) SpriteFacility
1.1) Design it in 4 files
Perhaps should it be done in one big, then split, but I did not experienced it yet ; anyway, I guess it should be easier to work first with a unique big file in order to avoid linking issues
I tried also to create a unique 128X40 sheet, but it causes a crash, so I assume 4 files are mandatory
1.1.1) NW corner
-
with borders
- of dimensions 31x31 (could be eventually a little bigger, depending if you want to fully cover the wall, but better to make a first version 31x31)
- in a 32x40 sheet
- to be positioned in (1,1), given that first is (0,0) !
1.1.2) NE corner
Same but to be positioned in (0,1), also have to let a 1-sized border line on external shape
1.1.3) SW corner
Same but to be positioned in (1,0), also have to let a 1-sized border line on external shape
1.1.4) SE corner
Same but to be positioned in (0,0), also have to let a 1-sized border line on external shape
1.2) Declare them under "extraSprites:" section (let's say from 101 to 104)
101: MyPath/MyFacility_SpriteFacility01.PNG
102: MyPath/MyFacility_SpriteFacility02.PNG
103: MyPath/MyFacility_SpriteFacility03.PNG
104: MyPath/MyFacility_SpriteFacility04.PNG
1.3) Assign it to "facilitySprite:" attribute
facilitySprite: 101
2) SpriteShape
2.1) Create "Building Queue" shapes
Design them as vanilla BaseBits sprites 13 to 16
2.2) Declare them under "extraSprites:" section as below
105: MyFacility_SpriteShape01.PNG
106: MyFacility_SpriteShape02.PNG
107: MyFacility_SpriteShape03.PNG
108: MyFacility_SpriteShape04.PNG
2.3) Assign it to "facilitySprite:" attribute as below
spriteShape: 101
It has to be 101 and not 105 !
How it works in gameWhen placing it on BaseScape, engine will use 105 to 108 ; it will also not display the inside, but only the green shape, as for vanilla hangars. In this, behaviour is different from 1x1 facilities
When built, engine will use back 101 to 104 (for shape and facility)
I think we could design SpriteShape to include SpriteFacility without its borders, so that it is displayed as for 1x1 facilities (green shape + the inside)
But the advantage to stay vanilla is that we will be able to reuse easily the 4 SpriteShape files for any other 2x2 facility, just copying and renaming files
ExampleSecurity Fortress (2x2-square)
Warning : Regarding 2x2 facilities, palette is not exactly the same for the first and for the three others