Re: Custom zones (RCI only tutorial)

Learn here how to create and use plugins.

Moderator: Plugin Moderators

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

Custom zones (RCI only tutorial)

Post by CommanderABab » Sat Dec 09, 2017 15:11

These are my zones:

If you have the commanderAbab.plugin, you already have these.

Some additional zoning tags are used:
These are:

Code: Select all

    "base":"$zonecommercial",
You saw above.

Code: Select all

    "persistent":true 
zone stays even if you build a road and then remove it. Only roads to build in the embassy zone are military and airport roads.
I believe the airport and military zones use the

Code: Select all

  "superior to all":true
tag.

Code: Select all

    "superior to base":true,
This along with

Code: Select all

"rci":true
allows the base buildings to build here automatically.

Code: Select all

[
  {
    "id": "$zoneembassy",
    "title":"Embassy Zone",
    "text":"hopefully get this working!",
    "type": "zone",
    "rci":true,
    "separator":true,
    "base":"$zonecommercial",
    "requirement":{"requirements":[{"type":"RANK", "data":{"lvl":5}}]},
    
    "frames":[{"bmp":"zones510.png","w":32,"h":16,"x":96,"count":1}],
    "preview frames":[{"bmp":"zones510.png","w":32,"h":16,"x":96,"target w":64,"target h":32,"count":1} ],
    "price":400,
    "map color":{"r":77,"g":206,"b":76},
    "superior to base":true,
    "placeable":true,
    "persistent":true 
  },
  {
    "id": "$zonedeltares",
    "title":"Delta Residential Zone",
    "text":"hopefully get this working!",
    "type": "zone",
    "rci":true,
    "separator":true,
    "base":"$zoneresidential",
    "frames":[{"bmp":"zones511.png","w":32,"h":16,"x":0,"count":1}],
    "preview frames":[{"bmp":"zones511.png","w":32,"h":16,"x":0,"target w":64,"target h":32,"count":1} ],
    "price":200,
    "superior to base":true,
    "placeable":true
    
  },
  {
    "id": "$zonedeltacom",
    "title":"Delta Commercial Zone",
    "text":"hopefully get this working!",
    "type": "zone",
    "rci":true,
    "separator":true,
    "base":"$zonecommercial",
    "frames":[{"bmp":"zones511.png","w":32,"h":16,"x":32,"count":1}],
    "preview frames":[{"bmp":"zones511.png","w":32,"h":16,"x":32,"target w":64,"target h":32,"count":1} ],
    "price":200,
    "superior to base":true,
    "placeable":true
    
  },
  {
    "id": "$zonedeltaind",
    "title":"Delta Industrial Zone",
    "text":"hopefully get this working!",
    "type": "zone",
    "rci":true,
    "separator":true,
    "base":"$zoneindustrial",
    "frames":[{"bmp":"zones511.png","w":32,"h":16,"x":64,"count":1}],
    "preview frames":[{"bmp":"zones511.png","w":32,"h":16,"x":64,"target w":64,"target h":32,"count":1} ],
    "price":200,
    "superior to base":true,
    "placeable":true
    
  },
  

   {
      "id": "ab.version.mexico.embassy",
      "type": "commercial",
      "author": "CommanderABab, Mg3094066",
      "width": 4,
      "height": 4,
      
      "frames": [
         {
            "bmp": "Mexico embassy.png"
         }
      ],
      "zone":"$zoneembassy",
      "power": -20,
      "water": -13,
      "level":3,
      "radius":3,
      "zone radius":3
      
      
   },
   {
      "id": "ab.version.mexico.embassy.delta",
      "type": "commercial",
      "author": "CommanderABab, Mg3094066",
      "width": 4,
      "height": 4,
      
      "frames": [
         {
            "bmp": "Mexico embassy.png"
         }
      ],
      "zone":"$zonedeltacom",
      "power": -20,
      "water": -13,
      "level":3,
      "radius":3,
      "zone radius":3
      
      
   }
]

zones510.png
zones510.png (1.39 KiB) Viewed 2414 times
zones511.png
zones511.png (1.37 KiB) Viewed 2414 times
Mexico embassy.png
By Mg3094066
Mexico embassy.png (2.58 KiB) Viewed 2414 times
10 zones.json
(2.84 KiB) Downloaded 21 times
Screenshot_20171210-132746.jpg
Embassy to right, delta zone to left
Screenshot_20171210-132847.png
Deleted two of each. Embassy zone prevents most things from building in it. Normal roads, parks, RCI, etc. Airport and military road can be built there. As will decorations. You can also rezone or remove the zone.
587587Currently using beta 587. 587 What's new? :)
bus routes are supposed to be fixed!!
:cry:

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

User avatar
cesareborgia94
Inhabitant of a Continent
Reactions:
Posts: 1077
Joined: Sun Nov 12, 2017 9:23
Location: The Kingdom of Babilandia
Plugins: Show
Version: Beta
Phone model: Samsung Galaxy 360H

Re: Custom zones (RCI only tutorial)

Post by cesareborgia94 » Sat Dec 09, 2017 18:16

I love this tutorial! Now I can create a custom zone for my plugins in the future. Thanks to the author for this awaited tutorial :)
I rarely make plugins now, but I still make them in spare time.
Disclaimer Please no request, I'm busy with real life stuff, I hope you understand ;)
You can find me here only. Discord is sh**, sorry JA :(

User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 438
Joined: Sat Sep 23, 2017 14:29

Re: Custom zones (RCI only tutorial)

Post by 22Alpha » Sat Dec 09, 2017 18:33

Well.. I did learn it by discovering and trials and questions, but not given by direct patent. No wonder why he does not want you to make one.

I made one. For the energy. I'll show you if you guys want. The energy sector became an industrial that produce energy. The problem is, monthly costs does not do the math for zoneables. Of course it won't, it is not yet part of the coding language.
:mine

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

Re: Custom zones (RCI only tutorial)

Post by CommanderABab » Sat Dec 09, 2017 18:40

"placeable":true, means that you can place the zone with the zoning tool.

Without it, another plugin would have to build the zone.
587587Currently using beta 587. 587 What's new? :)
bus routes are supposed to be fixed!!
:cry:

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

User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 438
Joined: Sat Sep 23, 2017 14:29

Re: Custom zones (RCI only tutorial)

Post by 22Alpha » Sat Dec 09, 2017 18:45

Here. You can move your current New Supply System if you have one. You guys can try it. But I won't stop here. I'll continue to develop this plugin on its purpose. Zoneable.
Attachments
New Supply System.plugin
(88.3 KiB) Downloaded 22 times
:mine

User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 772
Joined: Sun May 28, 2017 0:07
Location: Retrophrenology
Plugins: Show
Version: Beta

Re: Custom zones (RCI only tutorial)

Post by FranchuFranchu » Fri Feb 16, 2018 17:35

Isn't there a way to make non-rci zones like the military one?
Currently Conlanging

......Affirmative=Positive=True=Yeah=Yes=OK=K=Potassium=K=0°K=-237°C

User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 772
Joined: Sun May 28, 2017 0:07
Location: Retrophrenology
Plugins: Show
Version: Beta

Re: Custom zones (RCI only tutorial)

Post by FranchuFranchu » Fri Feb 16, 2018 20:36

I mean like the airport, where the zone has functionality
Currently Conlanging

......Affirmative=Positive=True=Yeah=Yes=OK=K=Potassium=K=0°K=-237°C

User avatar
Lobby
Developer
Reactions:
Posts: 3217
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Re: Custom zones (RCI only tutorial)

Post by Lobby » Sat Feb 17, 2018 2:35

Feel free to study the zone and airport JSON files that can be found in the JSON-resources thread.

These zones aren't really special by any means :)
...Have a nice stay

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: Telki and 1 guest