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 » Wed Apr 01, 2020 6:37

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??
hi.

User avatar
Lakan Haraya
Townsman
Reactions:
Posts: 99
Joined: Thu Mar 28, 2019 9:34
Location: Taytay, Rizal, Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: JSON

#62

Post by Lakan Haraya » Sun Apr 19, 2020 16:42

Hi :') ... Where can I find the json for the road decorations :/ I can't find it on animation.json, decoration.json, nor road.json ...
Ako ang iyong Haráya
Founder of the first rebuilder-manufacturer of passenger-type jeepneys in TheoTown history.

Member of
“TheoTown Philippines Council”
and
“Baláy ng Nagkakaisang Lungsod”

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

Platform

Plugin Creator

Re: JSON road deco sample

#63

Post by CommanderABab » Sun Apr 19, 2020 17:29

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 164 times
main.json
File with the sample code.
(1.12 KiB) Downloaded 3 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 164 times
The plugin in use on a dirt road.
The plugin in use on a dirt road.
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Lakan Haraya
Townsman
Reactions:
Posts: 99
Joined: Thu Mar 28, 2019 9:34
Location: Taytay, Rizal, Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: JSON

#64

Post by Lakan Haraya » 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 :/
Ako ang iyong Haráya
Founder of the first rebuilder-manufacturer of passenger-type jeepneys in TheoTown history.

Member of
“TheoTown Philippines Council”
and
“Baláy ng Nagkakaisang Lungsod”

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

Platform

Plugin Creator

Re: JSON

#65

Post by CommanderABab » Sun Apr 19, 2020 18:08

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"
					}
				],
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
Lakan Haraya
Townsman
Reactions:
Posts: 99
Joined: Thu Mar 28, 2019 9:34
Location: Taytay, Rizal, Philippines
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: JSON

#66

Post by Lakan Haraya » Sun Apr 19, 2020 19:00

Hmmm... Gonna try that...
Thanks Commander... :D
Ako ang iyong Haráya
Founder of the first rebuilder-manufacturer of passenger-type jeepneys in TheoTown history.

Member of
“TheoTown Philippines Council”
and
“Baláy ng Nagkakaisang Lungsod”

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

Platform

Plugin Creator

Re: JSON

#67

Post by rjroldan1 » Mon Apr 20, 2020 7:52

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

PHILIPPINES :linux

Post Reply Previous topicNext topic

Return to “Resources”

Who is online

Users browsing this forum: No registered users and 1 guest