Platform

Hi everyone, in this thread I present you some advanced properties that you may be set for your plugins. For basic information how to write a plugin, please have a look at the basics tutorial.

Attention: Do not use these information to reconstruct addons whose contents you found somewhere else. That's not how we want you to use the plugin system. Please use it only for your own graphics/graphics others explicitly provided you for usage in the game.

So here we present (almost) all tags which can be used in your plugin description file, and to which object you can put them in:

Plugins

Show

active

(optional)
If not set, plugin won't be loaded. Default is true.

Show

id

Unique identifier for each plugin.

Show

type

States the type of the plugin. Possible values are:

residential

commercial

industrial

farm

harbor ind

harbor pier

park

sport

public

religion

award

energy

water

medic

police

swat

fire brigade

education

bus depot

destroyed

decoration

buoy

railway station

waste disposal

body disposal

military

building

category

notification

ground

terrain

Show

title

(optional)
Title for the building. Should be English if distributed. Default is null.

Show

text

(optional)
Description for the building. Should be English if distributed. Default is null. If type is notification, it will set the notification text

Show

author

(optional)
Author name of the plugin.

Show

category

The ID of the category the plugin is in

Show

ordinal

Plugins with a lower ordinal will be listed first

Show

width

Tile width of the base of the building.

Show

height

Has to be the same as width.

Show

frames

Graphic frames definition of the plugin. Is an array of frames. Each frame has the form

Sets the upgrades the building can have
Value is an array of plugins.
Some additional notes:

price, monthly price, water, power and influences will be added to corresponding values of the building when the upgrade is applied

You can also provide animations as for regular buildings, but no smoke

You can set "only one":true in an upgrade to state that no other upgrade may be active at the same time. We use this for example for the radio station were you can have selected only one program at the same time.

Frames

Show

bmp

Sets the file to get the image from.The file has to be in the same folder as your code
Default is the world texture

Platform

Since version 296 you may let buildings (e.g. decorations) automatically spawn in map creation. To do so, we added an object called "spawn" which contains probability p, main spawn height height and max deviation from it radius.

to position a 3x3 pixel sized blinking red light at the specified relative position.

Hi Lobby,
I would like to make my own blinking light, that is an animated version of the red lights which you can see on my TV tower for example. Could you please provide the png of "$animationblinkingredlight3x3" here, so that I can see what it looks like?
Thanks!

Cool, thank you!
One more question, though, would it be possible to add animation and make the building rotation aware at the same time? I assume, I would have to define the coordinates of the animation for every frame then?

Platform

Yes, you can do that by using animation indices. With them you can say which animations should be visible for which frames (in this case different frames represent different rotations, but that's just a special case of having multiple frames).

Here an example to outline how it works for a simple animation like the blinking red light:

Platform

Plugin Creator

Since version 296 you may let buildings (e.g. decorations) automatically spawn in map creation. To do so, we added an object called "spawn" which contains probability p, main spawn height height and max deviation from it radius.

Is it possible to make a decoration spawn past a certain height. Ex: I want my decoration to spawn at heights lower than -350. A few examples of heights that would work for this could be -360, -477, -2234, etc. Heights that wouldn't work could be -220, 300, etc.

Platform

Plugin Creator

Press to uncollapse...Since version 296 you may let buildings (e.g. decorations) automatically spawn in map creation. To do so, we added an object called "spawn" which contains probability p, main spawn height height and max deviation from it radius.

To give you some intuition about what height means I measured some height values in this map:...

@Lobby

Is it possible to make a decoration spawn past a certain height. Ex: I want my decoration to spawn at heights lower than -350. A few examples of heights that would work for this could be -360, -477, -2234, etc. Heights that wouldn't work could be -220, 300, etc.

Platform

Plugin Creator

Yes, but that's not exactly what I was asking about. Those numbers I provided in the example were heights that a decoration could spawn at if I wanted heights below -350. I didn't want it to spawn at those specific heights, they were just examples of where they could spawn.