Adding an entry to the landscape menu?
Moderator: Plugin Moderators
- mdk_813
- Inhabitant of a Country
- Reactions:
- Posts: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Adding an entry to the landscape menu?
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?
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?
- CommanderABab
- AB
- Reactions:
- Posts: 11107
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Adding an entry to the landscape menu?
Type tree:
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.
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,
"influence radioactive":-1
},
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: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Adding an entry to the landscape menu?
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!
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!
- CommanderABab
- AB
- Reactions:
- Posts: 11107
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Adding an entry to the landscape menu?
Then your frames statement would look like:
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.
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,
"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: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Adding an entry to the landscape menu?
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:
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,
"influence radioactive":-1
}
]
- mdk_813
- Inhabitant of a Country
- Reactions:
- Posts: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Adding an entry to the landscape menu?
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 22 Jul 2017, 02:06, edited 1 time in total.
- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2220
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Adding an entry to the landscape menu?
With multiple frames per tree you can animate it without much effort.
- mdk_813
- Inhabitant of a Country
- Reactions:
- Posts: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Adding an entry to the landscape menu?
Hm, I don't get it.KINGTUT10101 wrote: ↑22 Jul 2017, 02:05With multiple frames per tree you can animate it without much effort.
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
- CommanderABab
- AB
- Reactions:
- Posts: 11107
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Adding an entry to the landscape menu?
You have to cycle through until you get the dice image again.mdk_813 wrote: ↑22 Jul 2017, 02:01So, 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, "influence radioactive":-1 } ]
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: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Adding an entry to the landscape menu?
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.CommanderABab wrote: ↑22 Jul 2017, 02:17You 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.
- CommanderABab
- AB
- Reactions:
- Posts: 11107
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Adding an entry to the landscape menu?
Try it with this code.CommanderABab wrote: ↑22 Jul 2017, 01:27Then your frames statement would look like:
Or you could useCode: 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,
"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.