Fun help

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

User avatar
sairam
Inhabitant of a Conurbation
Reactions:
Posts: 537
Joined: 31 Dec 2017, 13:35
Location: India Pudukkottai
Plugins: Showcase Store
Version: Beta

Platform

Fun help

#1

Post by sairam »

I have the problem with fun
Here is my code!

Code: Select all

[
	{
		"id":"$coal.anim.sairam00",
		"type":"animation",
		"author":"sairam",
		"frames":[
			{"bmp":"coal1.png"},
			{"bmp":"coal2.png"},
			{"bmp":"coal3.png"},
			{"bmp":"coal4.png"}
			],
		"speed":0.005
	},
	{
       
		"id":"$coaltruck00",
		"type":"car",
		"v2":true,
		"frames":[
			{"bmp":"coaltruck.png","w":17,"h":13,"count":4}
	         ]
  
	},
	{
		"draw ground":true,
		"frames":[],
		"animation":[
		{"id":"$coal.anim.sairam00","x":0,"y":-6}],
		"fun":[
			{
			"actions":[
			{
				"type":"remove"
			},
			{
				"id":"$blank.coalmine.sairam00",
				"type":"build"
			}
		],
			"condition":{
				"id":"upgrade",
				"type":"upgrade"
			}
		}
		],
		"height":1,
		"hidden":false,
		"id":"$coalore00",
		"text ":"An unmined coal ore, maybe you can turn it into a coal mine?",
		"title":"Coal Ore",
		"type":"decoration",
		"upgrades":[
			{
				"frames":[null],
				"id":"upgrade",
				"price":0,
				"text":"Upgrades to coal mine",
				"title":"Coal Mine"
			}
		],
		"width":1
	},
	{
		"id": "$coalmine00",
		"type": "industrial",
		"width": 4,
		"height": 4,
		"frames": [{"steal":"$coalmine00"}],
		"level": 2,
		"car spawner": [ 
		{
			"cars":["$coaltruck00"],
			"count":10,
			"radius":290,
			"targets":["$coalplant00"]
		}
	              ],
		"override":true

	},
	{
		"id":"$blank.coalmine.sairam00",
		"type":"decoration",
		"width":4,
		"height":4,
		"hidden":true,
		"frames":[
		{"bmp":"blank.png"}
		],
		"fun": [
		{ 
				"actions": [
				{
					"type":"remove"
				},
				{
					"type":"build",
					"id":"$zoneindustrial_lvl2"
				},
				{
					"type":"build",
					"id":"$coalmine00"
				}
			]
		}
	]	
  }
]

User avatar
malsa
Inhabitant of a Multiverse
Reactions:
Posts: 5085
Joined: 10 Feb 2017, 17:40
Location: Malaysia
Plugins: Showcase Store
Version: Beta

Platform

Re: Fun help

#2

Post by malsa »

Well here my answer:










...Do it yourself

User avatar
cesareborgia94
Reactions:

Re: Fun help

#3

Post by cesareborgia94 »

Use jsonlint, I helped. Find the problem yourself.

User avatar
sairam
Inhabitant of a Conurbation
Reactions:
Posts: 537
Joined: 31 Dec 2017, 13:35
Location: India Pudukkottai
Plugins: Showcase Store
Version: Beta

Platform

Re: Fun help

#4

Post by sairam »

But it doesn't build the coal mine.

User avatar
sairam
Inhabitant of a Conurbation
Reactions:
Posts: 537
Joined: 31 Dec 2017, 13:35
Location: India Pudukkottai
Plugins: Showcase Store
Version: Beta

Platform

Re: Fun help

#5

Post by sairam »

cesareborgia94 wrote:
29 Aug 2018, 17:56
Use jsonlint, I helped. Find the problem yourself.
It is a valid json.

User avatar
cesareborgia94
Reactions:

Re: Fun help

#6

Post by cesareborgia94 »

Delete your json and start all over again.

User avatar
CommanderABab
AB
Reactions:
Posts: 11106
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Fun help

#7

Post by CommanderABab »

"remove" just removes one tile at x,y.

Coal mine is 4x4 so you must remove, (zone? Is it a zoned building?) 16 tiles in a 4x4 rectangle before coal mine will build.

User avatar
CommanderABab
AB
Reactions:
Posts: 11106
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Fun help

#8

Post by CommanderABab »

So how do you clear and zone a rectangle of 16 tiles in a 4x4 square?

User avatar
CommanderABab
AB
Reactions:
Posts: 11106
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Rect condition and action

#9

Post by CommanderABab »

Show
Introduced in 473:
🛠Line action
🛠Rect condition and action
🛠Fix palm trees and cacti had auto build set to true
Show
condition

Code: Select all

{"type":"rect","w":10,"h":4,"min":1,"max":9999,"inner":[{...}]}
checks if the inner condition occurs ≥ min times and ≤ max times.
Show
action
similar, it executes the inner actions for each of the specified tiles:

Code: Select all

"actions":[{"type":"rect","w":4,"h":3,"inner":[{...},...]}]
Show
example action

Code: Select all

  "actions":
    [
      {"type":"rect","w":4,"h":4,"inner":
        [
          {"type":"remove"},
          {"type":"build","id":"$zoneindustrial_lvl2"}
        ]
      }
    ]
Does it work? Does it need more?
Try it and see.
Credits: Lobby

User avatar
sairam
Inhabitant of a Conurbation
Reactions:
Posts: 537
Joined: 31 Dec 2017, 13:35
Location: India Pudukkottai
Plugins: Showcase Store
Version: Beta

Platform

Re: Fun help

#10

Post by sairam »

It doesn't works I'll give my zip file.
Last edited by CommanderABab on 30 Aug 2018, 09:00, edited 1 time in total.
Reason: Zip removal

User avatar
cesareborgia94
Reactions:

Re: Fun help

#11

Post by cesareborgia94 »

sairam wrote:
30 Aug 2018, 04:12
It doesn't works I'll give my zip file.Coal_induatry_sairam.zip
You just stole the texture from a former member. Shameful. Make the coal mine texture yourself.

User avatar
cesareborgia94
Reactions:

Re: Fun help

#12

Post by cesareborgia94 »

Nobody will lend a help to someone who steals plugin textures from plugin creators, even from former members. Make the textures yourself first.

User avatar
soumya-8974
TheoTown Veteran in Pension
Reactions:
Posts: 834
Joined: 30 Apr 2018, 06:53
Location: India
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Fun help

#13

Post by soumya-8974 »

cesareborgia94 wrote:
30 Aug 2018, 04:46
Nobody will lend a help to someone who steals plugin textures from plugin creators, even from former members. Make the textures yourself first.

I am very sad to hear. =(

User avatar
malsa
Inhabitant of a Multiverse
Reactions:
Posts: 5085
Joined: 10 Feb 2017, 17:40
Location: Malaysia
Plugins: Showcase Store
Version: Beta

Platform

Re: Fun help

#14

Post by malsa »

sairam wrote:
30 Aug 2018, 04:12
It doesn't works I'll give my zip file.
You can't do that, have you read the rules

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”