How to combine json code with a plugin picture?

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

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

Platform

How to combine json code with a plugin picture?

#1

Post by malsa »

As the title said, how?
My plugin:
Shireport Broadcast Channel.png
Shireport Broadcast Channel.png (2.58 KiB) Viewed 3063 times
Json code, create by JustAnyone

Code: Select all

[
 {
  "id":"$commercial_house050",
  "type":"commercial",
  "width":4,
  "height":4,
  "frames":[{"bmp":"Shireport Broadcast Channel.png"}],
  "level":2,
  "people":450,
  "author":"JustAnyone & A guy from shireport"
 }
]

User avatar
anh
Villager
Reactions:
Posts: 8
Joined: 11 Mar 2018, 06:40
Plugins: Showcase Store

Re: How to combine json code with a plugin picture?

#2

Post by anh »

add "frame" to the code
example : "frames": [
{
"bmp": "Thap4x4.png"
}
],

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: How to combine json code with a plugin picture?

#3

Post by malsa »

anh wrote:
03 Aug 2018, 04:18
add "frame" to the code
example : "frames": [
{
"bmp": "Thap4x4.png"
}
],
Already put it before you reply this

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: How to combine json code with a plugin picture?

#4

Post by malsa »

PLEASE REPLY OR NOT I WILL EAT YOUR TACO
*jk*

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: How to combine json code with a plugin picture?

#5

Post by Bearbear76 »

What do you exactly mean?

User avatar
cesareborgia94
Reactions:

Re: How to combine json code with a plugin picture?

#6

Post by cesareborgia94 »

A guy from Shireport wrote:
03 Aug 2018, 03:58
As the title said, how?
My plugin:
Shireport Broadcast Channel.png

Json code, create by JustAnyone

Code: Select all

[
 {
  "id":"$commercial_house050",
  "type":"commercial",
  "width":4,
  "height":4,
  "frames":[{"bmp":"Shireport Broadcast Channel.png"}],
  "level":2,
  "people":450,
  "author":"JustAnyone & A guy from shireport"
 }
]
Make sure the picture name of the texture is the same as the picture name of "frames" code.

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: How to combine json code with a plugin picture?

#7

Post by malsa »

cesareborgia94 wrote:
03 Aug 2018, 06:41
A guy from Shireport wrote:
03 Aug 2018, 03:58
As the title said, how?
My plugin:
Shireport Broadcast Channel.png

Json code, create by JustAnyone

Code: Select all

[
 {
  "id":"$commercial_house050",
  "type":"commercial",
  "width":4,
  "height":4,
  "frames":[{"bmp":"Shireport Broadcast Channel.png"}],
  "level":2,
  "people":450,
  "author":"JustAnyone & A guy from shireport"
 }
]
Make sure the picture name of the texture is the same as the picture name of "frames" code.
Welp i already check that is already same : )

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: How to combine json code with a plugin picture?

#8

Post by malsa »

Bearbear65 wrote:
03 Aug 2018, 06:33
What do you exactly mean?
I mean that how they put a json to the plugin picture
(Sorry for my bad english, i very tired right now)

User avatar
Kulche
Pluche
Reactions:
Posts: 1141
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to combine json code with a plugin picture?

#9

Post by Kulche »

You can't combine JSON with image, they are two different files :)

If you want this building to be in TT, just put them in the same folder (folder in 'plugins' folder :lol: ).

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: How to combine json code with a plugin picture?

#10

Post by malsa »

Okay let me try

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: How to combine json code with a plugin picture?

#11

Post by malsa »

Like this?
Like this.png

User avatar
Kulche
Pluche
Reactions:
Posts: 1141
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to combine json code with a plugin picture?

#12

Post by Kulche »

No, you have compressed the file. Put both the JSON and PNG (picture) to folder (with name 'Test Building', for example) in 'plugins' folder.

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: How to combine json code with a plugin picture?

#13

Post by malsa »

Kulche wrote:
03 Aug 2018, 16:11
No, you have compressed the file. Put both the JSON and PNG (picture) to folder (with name 'Test Building', for example) in 'plugins' folder.
Compressed.png

User avatar
Kulche
Pluche
Reactions:
Posts: 1141
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to combine json code with a plugin picture?

#14

Post by Kulche »

:roll: I've said, that folder IS compressed. It will not work with compressed folders.

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: How to combine json code with a plugin picture?

#15

Post by malsa »

AHHHHHHHHHH!!! I confused right now maybe next time

User avatar
Kulche
Pluche
Reactions:
Posts: 1141
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to combine json code with a plugin picture?

#16

Post by Kulche »

Wait, create a folder with name of your plugin (maybe "Shireport BC"?) in "plugins" folder, which is in "TheoTown" folder. Put there JSON file and picture of your building. Launch TT, if error occurs, just ask. ;)

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: How to combine json code with a plugin picture?

#17

Post by malsa »

Kulche wrote:
03 Aug 2018, 18:50
Wait, create a folder with name of your plugin (maybe "Shireport BC"?) in "plugins" folder, which is in "TheoTown" folder. Put there JSON file and picture of your building. Launch TT, if error occurs, just ask. ;)
But the problem is that i don't have a phone anymore, so how?

User avatar
Kulche
Pluche
Reactions:
Posts: 1141
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to combine json code with a plugin picture?

#18

Post by Kulche »

:roll:
You could say that before

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: How to combine json code with a plugin picture?

#19

Post by Lobby »

So... your question is on how to distribute it to others?

Create a zip file out of the folder that contains the json and the image. The game can read most zip files :)

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: How to combine json code with a plugin picture?

#20

Post by malsa »

Lobby wrote:
03 Aug 2018, 20:36
So... your question is on how to distribute it to others?

Create a zip file out of the folder that contains the json and the image. The game can read most zip files :)
You mean this one, I need to click this to create a zip file? (If i got wrong again, i guess i need to research a bit)
Click this one.png

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”