JSON

Resources from the game that you might use in your game can be found here

Moderator: Plugin Moderators

hihihihi
Metropolitan
Reactions:
Posts: 120
Joined: Tue Jul 30, 2019 6:05
Location: south korea
Plugins: Show

Platform

Re: JSON

#61

Post by hihihihi »

HELP!

I'm making ambulance and alert light coordinate is not right...

My ambulance texture is for car v2

How can I define 'pos' code??
Actually, I'm alive. :bc

User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 125
Joined: Thu Mar 28, 2019 9:34
Location: Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: JSON

#62

Post by Lakan Haraya »

Hi :') ... Where can I find the json for the road decorations :/ I can't find it on animation.json, decoration.json, nor road.json ...
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors

“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”

Pinoy? Sali na :jb:
https://discord.gg/9n7PFy

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

Platform

Plugin Creator

Re: JSON road deco sample

#63

Post by CommanderABab »

Code: Select all

[
  {"id":"$anim_roaddeco_sample00_00","type":"animation","frames":[{"bmp":"frames.png","x":0,"w":32,"handle y":8}]},
  {"id":"$anim_roaddeco_sample00_01","type":"animation","frames":[{"bmp":"frames.png","x":32,"w":32,"handle y":8}]},
  {"id":"$anim_roaddeco_sample00_02","type":"animation","frames":[{"bmp":"frames.png","x":64,"w":32,"handle y":8}]},
  {"id":"$anim_roaddeco_sample00_03","type":"animation","frames":[{"bmp":"frames.png","x":92,"w":32,"handle y":8}]},
  {
    "id":"$roaddeco_sample00",
    "type":"road decoration",
    "title":"Sample deco",
    "text":"I am a road decoration.",
    "price":100,
    "animation":[
      {"id":"$anim_roaddeco_sample00_00"},
      {"id":"$anim_roaddeco_sample00_02"}
    ],
    "frame animation indices":[
      [0,1],[0,1],[1],[1],
      [0],[0],[],[],
      [0,1],[0,1],[1],[1],
      [0],[0],[],[]
    ],
    "animation fg":[
      {"id":"$anim_roaddeco_sample00_01"},
      {"id":"$anim_roaddeco_sample00_03"}
    ],
    "frame animation fg indices":[
      [0,1],[0],[0,1],[0],
      [0,1],[0],[0,1],[0],
      [1],[],[1],[],
      [1],[],[1],[]
    ]
  }
]
Actual frames used in sample.
Actual frames used in sample.
frames.png (535 Bytes) Viewed 1539 times
main.json
File with the sample code.
(1.12 KiB) Downloaded 38 times
Illustration of order frames are used by the four animations.
Illustration of order frames are used by the four animations.
frames_usage.png (3.97 KiB) Viewed 1539 times
The plugin in use on a dirt road.
The plugin in use on a dirt road.
Image

User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 125
Joined: Thu Mar 28, 2019 9:34
Location: Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: JSON

#64

Post by Lakan Haraya »

:/ But how can I put road deco on level bridges? I mean, on json... Because I can't put my road deco plugin into my road (bridge) plugin :/
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors

“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”

Pinoy? Sali na :jb:
https://discord.gg/9n7PFy

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

Platform

Plugin Creator

Re: JSON

#65

Post by CommanderABab »

The road deco always goes on the top level of road. If you did it in the plugin, you would

Code: Select all

"actions": [
				    {
						"type": "build",
						"id": "$roadid"
				    },
				    {
						"type": "build",
						"id": "$roaddecoid"
					}
				],
Image

User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 125
Joined: Thu Mar 28, 2019 9:34
Location: Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: JSON

#66

Post by Lakan Haraya »

Hmmm... Gonna try that...
Thanks Commander... :D
"ᜀᜃᜓ ᜀᜅ᜔ ᜁᜌᜓᜅ᜔ ᜑᜇᜌ"
CEO of Haráya Motors

“TheoTown Philippines Council”
“Kapulungan Ng Mga Nagkakaisang Lungsod”

Pinoy? Sali na :jb:
https://discord.gg/9n7PFy

User avatar
rjroldan1
Inhabitant of a Megalopolis
Reactions:
Posts: 647
Joined: Mon Jul 17, 2017 16:16
Location: Philippines
Plugins: Show
Contact:

Platform

Plugin Creator

Re: JSON

#67

Post by rjroldan1 »

Lakan Haraya wrote:
Sun Apr 19, 2020 17:50
:/ But how can I put road deco on level bridges? I mean, on json... Because I can't put my road deco plugin into my road (bridge) plugin :/
Maybe your road decoration flags aren't the same as your road flags

.╔═╗─────────────╔╗────────
║╬║─╔╗╔╦╗╔═╗╔╗─╔╝║╔═╗─╔═╦╗
║╗╣─╠╣║╔╝║╬║║╚╗║╬║║╬╚╗║║║║
╚╩╝╔╝║╚╝─╚═╝╚═╝╚═╝╚══╝╚╩═╝
───╚═╝────────────────────
T.P.C.
Theotown Philippine Corporation
Plugin creator Doesn't had Cities

User avatar
rjroldan1
Inhabitant of a Megalopolis
Reactions:
Posts: 647
Joined: Mon Jul 17, 2017 16:16
Location: Philippines
Plugins: Show
Contact:

Platform

Plugin Creator

Re: JSON

#68

Post by rjroldan1 »

Where's the firebrigades?

.╔═╗─────────────╔╗────────
║╬║─╔╗╔╦╗╔═╗╔╗─╔╝║╔═╗─╔═╦╗
║╗╣─╠╣║╔╝║╬║║╚╗║╬║║╬╚╗║║║║
╚╩╝╔╝║╚╝─╚═╝╚═╝╚═╝╚══╝╚╩═╝
───╚═╝────────────────────
T.P.C.
Theotown Philippine Corporation
Plugin creator Doesn't had Cities

User avatar
Lobby
Developer
Reactions:
Posts: 3637
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta

Platform

Re: JSON

#69

Post by Lobby »

It's not included because it also contains a premium building, however, here's the rest of it:

Code: Select all

  {
    "id":"$firedepartment01",
    "type":"fire brigade",
    "width":1,
    "height":1,
    "frames":[{"x":1888,"y":1296,"w":32,"h":35}],
    "animation":[
      {"id":"1x3l", "x":7, "y":-7}, {"id":"1x3l", "x":19, "y":-6},
      {"id":"$animalertred00","x":18,"y":-2,"on fire":true},
      {"id":"$animalertred01","x":13,"y":-13,"on fire":true}
    ],
    "price":2000,
    "monthly price":20,
    "influence fire department":200,
    "requirements":[{"type":"RANK","lvl":1}],
    "performance":true
  },

   {
      "id":"$firedepartment00",
	  "type":"fire brigade",
	  "width":2,
	  "height":2,
	  "frames":[{"x":1632,"y":1024,"w":64,"h":48,"count":1}],
     "frames winter":[{"x":896,"y":810,"w":64,"h":48,"offset x":1024,"offset y":2048}],
     "animation":[
       {"id":"3x3_ltr", "x":39, "y":-11}, {"id":"3x3_ltr", "x":45, "y":-1},
       {"id":"$animalertblue00","x":10,"y":-10,"shift":0,"on fire":true},
       {"id":"$animalertred00","x":18,"y":-6,"shift":4,"on fire":true},
       {"id":"$animalertblue00","x":24,"y":-3,"shift":0,"on fire":true},
       {"id":"$animalertred00","x":32,"y":1,"shift":4,"on fire":true}
     ],
	  "price":12000,
	  "monthly price":30,
	  "influence fire department":100,
     "requirements":[{"type":"RANK","lvl":4}],
     "performance":true
   }
=^._.^= ∫

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2456
Joined: Thu Aug 24, 2017 11:17
Location: Wants to be in Tokyo
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: JSON

#70

Post by TheFennekin »

Just a thought, is it possible to add capacity liken in schools and hospitals to a prison plugin?
🍚知りません🍚

User avatar
rjroldan1
Inhabitant of a Megalopolis
Reactions:
Posts: 647
Joined: Mon Jul 17, 2017 16:16
Location: Philippines
Plugins: Show
Contact:

Platform

Plugin Creator

Re: JSON

#71

Post by rjroldan1 »

TheFennekin wrote:
Wed Jun 24, 2020 14:22
Just a thought, is it possible to add capacity liken in schools and hospitals to a prison plugin?

Yes via lua :)

.╔═╗─────────────╔╗────────
║╬║─╔╗╔╦╗╔═╗╔╗─╔╝║╔═╗─╔═╦╗
║╗╣─╠╣║╔╝║╬║║╚╗║╬║║╬╚╗║║║║
╚╩╝╔╝║╚╝─╚═╝╚═╝╚═╝╚══╝╚╩═╝
───╚═╝────────────────────
T.P.C.
Theotown Philippine Corporation
Plugin creator Doesn't had Cities

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2456
Joined: Thu Aug 24, 2017 11:17
Location: Wants to be in Tokyo
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: JSON

#72

Post by TheFennekin »

rjroldan1 wrote:
Wed Jun 24, 2020 14:32
TheFennekin wrote:
Wed Jun 24, 2020 14:22
Just a thought, is it possible to add capacity liken in schools and hospitals to a prison plugin?

Yes via lua :)
I'll try that :bc
🍚知りません🍚

User avatar
Uncle Koala
Metropolitan
Reactions:
Posts: 136
Joined: Sun Apr 05, 2020 14:53
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: JSON

#73

Post by Uncle Koala »

Can you please update content_car.json :bq

EDIT: Thanks! :space
Lua is easy! :lua:

Code: Select all

if Car.GoingToCrashIntoEachOther()
   then Car.DontCrash
end

User avatar
TheoKier[YT]
Villager
Reactions:
Posts: 11
Joined: Fri Sep 11, 2020 4:58

Re: JSON

#74

Post by TheoKier[YT] »

How about for waste disposal is there a json for it id like to make one hope you reply thanks :)

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

Platform

Plugin Creator

Re: JSON

#75

Post by CommanderABab »

TheFennekin wrote:
Wed Jun 24, 2020 14:22
Just a thought, is it possible to add capacity liken in schools and hospitals to a prison plugin?
Why not a prison library (school) and a prison infirmary (hospital)? :)
Image

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2456
Joined: Thu Aug 24, 2017 11:17
Location: Wants to be in Tokyo
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: JSON

#76

Post by TheFennekin »

I'm actually trying a modulable prison right now but details soon 😉
🍚知りません🍚

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2456
Joined: Thu Aug 24, 2017 11:17
Location: Wants to be in Tokyo
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: JSON

#77

Post by TheFennekin »

Textures will be based on my country's prisons btw
🍚知りません🍚

User avatar
rjroldan1
Inhabitant of a Megalopolis
Reactions:
Posts: 647
Joined: Mon Jul 17, 2017 16:16
Location: Philippines
Plugins: Show
Contact:

Platform

Plugin Creator

Re: JSON

#78

Post by rjroldan1 »

Are all those are updated?

.╔═╗─────────────╔╗────────
║╬║─╔╗╔╦╗╔═╗╔╗─╔╝║╔═╗─╔═╦╗
║╗╣─╠╣║╔╝║╬║║╚╗║╬║║╬╚╗║║║║
╚╩╝╔╝║╚╝─╚═╝╚═╝╚═╝╚══╝╚╩═╝
───╚═╝────────────────────
T.P.C.
Theotown Philippine Corporation
Plugin creator Doesn't had Cities

User avatar
Lobby
Developer
Reactions:
Posts: 3637
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta

Platform

Re: JSON

#79

Post by Lobby »

Probably not, but I updated now most of them.
=^._.^= ∫

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2456
Joined: Thu Aug 24, 2017 11:17
Location: Wants to be in Tokyo
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: JSON

#80

Post by TheFennekin »

How to make a sloped fence plugin?
🍚知りません🍚

Post Reply Previous topicNext topic

Return to “Resources”