Page 1 of 2

How to combine json code with a plugin picture?

Posted: 03 Aug 2018, 03:58
by malsa
As the title said, how?
My plugin:
Shireport Broadcast Channel.png
Shireport Broadcast Channel.png (2.58 KiB) Viewed 3424 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"
 }
]

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

Posted: 03 Aug 2018, 04:18
by anh
add "frame" to the code
example : "frames": [
{
"bmp": "Thap4x4.png"
}
],

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

Posted: 03 Aug 2018, 04:22
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

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

Posted: 03 Aug 2018, 04:29
by malsa
PLEASE REPLY OR NOT I WILL EAT YOUR TACO
*jk*

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

Posted: 03 Aug 2018, 06:33
by Bearbear76
What do you exactly mean?

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

Posted: 03 Aug 2018, 06:41
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.

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

Posted: 03 Aug 2018, 06:56
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 : )

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

Posted: 03 Aug 2018, 07:01
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)

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

Posted: 03 Aug 2018, 08:29
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: ).

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

Posted: 03 Aug 2018, 15:30
by malsa
Okay let me try

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

Posted: 03 Aug 2018, 15:35
by malsa
Like this?
Like this.png

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

Posted: 03 Aug 2018, 16:11
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.

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

Posted: 03 Aug 2018, 18:19
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

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

Posted: 03 Aug 2018, 18:45
by Kulche
:roll: I've said, that folder IS compressed. It will not work with compressed folders.

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

Posted: 03 Aug 2018, 18:46
by malsa
AHHHHHHHHHH!!! I confused right now maybe next time

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

Posted: 03 Aug 2018, 18:50
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. ;)

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

Posted: 03 Aug 2018, 19:06
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?

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

Posted: 03 Aug 2018, 19:14
by Kulche
:roll:
You could say that before

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

Posted: 03 Aug 2018, 20:36
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 :)

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

Posted: 03 Aug 2018, 20:49
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