Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

mdk_813
Inhabitant of a Country
Reactions:
Posts: 860
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

#### Platform

Hey there,
I got another question. Probably a complicated one:
Is there a way to add an entry to the landscape menu that works like the trees (ideally with a randomizer and options to choose certain models)?
I'm currently working on a modular park set and this includes palmtrees, of which I also made versions without ground texture. But, these transparent versions don't really need to be in the park menu, instead it would be nice to be able to use them like the in-game trees (also it would avoid crowding the park menu too much)
Is there a way to do that?
If not, is there a way to add a randomizer and an area-tool to "normal" plugins?

Update Sep 12, 2020:
As I am not really active here anymore, I am not able to answer any PMs in time.
So, as long as you mention me in the plugin and the description, feel free to use or modify my plugins for your own creations.

CommanderABab
AB
Reactions:
Posts: 8969
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

#### Plugin Creator

Type tree:

Code: Select all

{

// this is for example, you must provide your own images and id!
"id":"$tree.ab.unq.00", "type":"tree", "title":"trees for terrain", "text":"4", "author":"CommanderABab", "frames":[ //you could use {"bmp":"image.png","count":4} here instead {"steal":"$loadtreeshere","frame":0,"move y":1,"count":4}
],
"influence pollution":-1,
"influence noise":-1,
"influence nature":1,
"frames per tree":4,
},
Actually, I'm stealing frames from a park .

Note the "frames per tree" tag. This means the "bmp" image should have 4 images of the same tree 32 pixels wide. You can load 4 bmp images separately within the frames statement or four versions in one image 128 pixels wide. You can have as many trees as you like which will be chosen randomly at terrain generation by providing multiple sets of images each containing "frames per tree" images.

If you don't provide enough frames, you will get an error.

You can place these trees manually randomly or one particular tree just like the in game trees.

mdk_813
Inhabitant of a Country
Reactions:
Posts: 860
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

#### Platform

Holy, I expected it would be complicated and I really can't' quite follow.
I get that I must provide my own ID and images, that's alright.
And I mostly get that I can provide 4 images of 32px (with different tree-models each?) or one large 128px image.
But, what I don't get is, what you mean by "You can have as many trees as you like which will be chosen randomly at terrain generation by providing multiple sets of images each containing "frames per tree" images".
Do you mean, I can put several 128px-images into "frames" or do I have to make multiple complete entries (from "id" to "influence radioactive" like in your example)?

The thing is, I currently have four different single palms plus two groups of palms all on 1x1 tiles. I would like to have them all in one entry with randomizer and single-choose option.
And I really don't understand how to get that.

Thanks for your efforts and patience, CommanderABab!

Update Sep 12, 2020:
As I am not really active here anymore, I am not able to answer any PMs in time.
So, as long as you mention me in the plugin and the description, feel free to use or modify my plugins for your own creations.

CommanderABab
AB
Reactions:
Posts: 8969
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

#### Plugin Creator

Then your frames statement would look like:

Code: Select all

"frames":[
{"bmp": "palm1.png"},
{"bmp":"palm2.png"},
{"bmp": "palm3.png"},
{"bmp":"palm4.png"},
{"bmp": "twopalm1.png"},
{"bmp":"twopalm2.png"}

],
"frames per tree":1,

Or you could use

"frames per tree":2, for 3 groups of 2

Or

"frames per tree":3, for 2 groups of 3

and the game would cycle through the images on the same tile continually.

mdk_813
Inhabitant of a Country
Reactions:
Posts: 860
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

#### Platform

So, I've tried it, and at least I was partially successful.
The palms appear as an entry in the terrain menu, BUT, it does not randomize or give me any options to choose. Instead, it just shows the last bmp that I put into "frames".

Here is the code I've used:

Code: Select all

[
{
"id":"Palmtrees.mdk_813",
"type":"tree",
"author":"mdk_813",
"frames":[{"bmp":"Palmtree_A_transp_1x1.png","bmp":"Palmtree_B_transp_1x1.png","bmp":"Palmtree_C_transp_1x1.png","bmp":"Palmtree_D_transp_1x1.png","bmp":"Palmtree_group_A_transp_1x1.png","bmp":"Palmtree_group_B_transp_1x1.png"}],
"title":"Palmtrees",
"influence pollution":-1,
"influence noise":-1,
"influence nature":1,
"frames per tree":1,
}
]

Update Sep 12, 2020:
As I am not really active here anymore, I am not able to answer any PMs in time.
So, as long as you mention me in the plugin and the description, feel free to use or modify my plugins for your own creations.

mdk_813
Inhabitant of a Country
Reactions:
Posts: 860
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

#### Platform

Also, "Palmtree_group_A_transp_1x1.png" and "bmp":"Palmtree_group_B_transp_1x1.png" consist of three palms each in one png. I don't now if this needs to be taken into account or not...
Last edited by mdk_813 on Sat Jul 22, 2017 2:06, edited 1 time in total.

Update Sep 12, 2020:
As I am not really active here anymore, I am not able to answer any PMs in time.
So, as long as you mention me in the plugin and the description, feel free to use or modify my plugins for your own creations.

KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2069
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

#### Plugin Creator

With multiple frames per tree you can animate it without much effort.

mdk_813
Inhabitant of a Country
Reactions:
Posts: 860
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

#### Platform

KINGTUT10101 wrote:
Sat Jul 22, 2017 2:05
With multiple frames per tree you can animate it without much effort.
Hm, I don't get it.

I want one entry in the menu, which allows me to choose between these 7 options:

1) a randomizer that cycles through all 6 pngs below automatically
2) Palmtree_A_transp_1x1.png
3) Palmtree_B_transp_1x1.png
4) Palmtree_C_transp_1x1.png
5) Palmtree_D_transp_1x1.png
6) Palmtree_group_A_transp_1x1.png
7) Palmtree_group_B_transp_1x1.png

Update Sep 12, 2020:
As I am not really active here anymore, I am not able to answer any PMs in time.
So, as long as you mention me in the plugin and the description, feel free to use or modify my plugins for your own creations.

CommanderABab
AB
Reactions:
Posts: 8969
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

#### Plugin Creator

mdk_813 wrote:
Sat Jul 22, 2017 2:01
So, I've tried it, and at least I was partially successful.
The palms appear as an entry in the terrain menu, BUT, it does not randomize or give me any options to choose. Instead, it just shows the last bmp that I put into "frames".

Here is the code I've used:

Code: Select all

[
{
"id":"Palmtrees.mdk_813",
"type":"tree",
"author":"mdk_813",
"frames":[{"bmp":"Palmtree_A_transp_1x1.png","bmp":"Palmtree_B_transp_1x1.png","bmp":"Palmtree_C_transp_1x1.png","bmp":"Palmtree_D_transp_1x1.png","bmp":"Palmtree_group_A_transp_1x1.png","bmp":"Palmtree_group_B_transp_1x1.png"}],
"title":"Palmtrees",
"influence pollution":-1,
"influence noise":-1,
"influence nature":1,
"frames per tree":1,
}
]
You have to cycle through until you get the dice image again.

The in game trees use four frames for each tree which are used for wind animation effects.

mdk_813
Inhabitant of a Country
Reactions:
Posts: 860
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show

#### Platform

CommanderABab wrote:
Sat Jul 22, 2017 2:17
You have to cycle through until you get the dice image again.

The in game trees use four frames for each tree which are used for wind animation effects.
No, in the menu there is no option to cycle through. No blue arrows and no dice. Just the one preview of the last png. And that is what is build exclusively.

Update Sep 12, 2020:
As I am not really active here anymore, I am not able to answer any PMs in time.
So, as long as you mention me in the plugin and the description, feel free to use or modify my plugins for your own creations.

CommanderABab
AB
Reactions:
Posts: 8969
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

#### Plugin Creator

CommanderABab wrote:
Sat Jul 22, 2017 1:27
Then your frames statement would look like:

Code: Select all

"frames":[
{"bmp": "palm1.png"},
{"bmp":"palm2.png"},
{"bmp": "palm3.png"},
{"bmp":"palm4.png"},
{"bmp": "twopalm1.png"},
{"bmp":"twopalm2.png"}

],
"frames per tree":1,

Or you could use

"frames per tree":2, for 3 groups of 2

Or

"frames per tree":3, for 2 groups of 3

and the game would cycle through the images on the same tile continually.
Try it with this code.

mdk_813
Inhabitant of a Country
Reactions:
Posts: 860
Joined: Fri Dec 16, 2016 2:38
Location: Germany
Plugins: Show