Enabling and Disabling Your RCI Spawning

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2211
Joined: 07 Jul 2016, 20:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Enabling and Disabling Your RCI Spawning

Post by KINGTUT10101 »

In this post I'll be explaining how to enable or disable the spawning of your RCI plug-ins that have this code. The reason why it's useful is because it can be changed in-game. Unfortunately, it won't remove any buildings, it'll just prevent more from spawning. Anyways, here's what you will have to do. If you would like to see this trick in action before you attempt it, here's is my plug-in pack that uses this it:
https://sites.google.com/site/theotownm ... fects-pack

Step 1:
Create a building that will enable and disable the RCI buildings. This building doesn't need any special code or anything. It can be any building you want. Just make sure to remember the ID because it'll become useful in step 2.

Step 2:
Next you will need to add an unlock requirement to the RCI buildings you want to enable or disable. You'll need to add this to your plug-ins:

Code: Select all

      "requirement": {
         "requirements": [
            {
               "data": {
                  "id": "YOUR ID HERE"
               },
               "type": "BUILDING"
            }
         ]
      },
Make sure that "YOUR ID HERE" is the ID of your building from step 1. After adding that code you now have to ability to enable and disable the spawning of your RCI plug-ins in-game with the press of a button. To enable spawning, just place the building from step 1 and to disable spawning destroy it.
Last edited by KINGTUT10101 on 31 Aug 2017, 18:25, edited 1 time in total.
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Re: Enabling and Disabling Your RCI Spawning

Post by Lobby »

That's actually a really interesting idea :bc
User avatar
CommanderABab
AB
Reactions:
Posts: 11269
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Enabling and Disabling Your RCI Spawning

Post by CommanderABab »

You could use it to freeze a city. :)
my avatar:
Previous topicNext topic