Page 3 of 4

Re: Building requirements

Posted: 07 Feb 2019, 07:58
by Madbro
CommanderABab wrote:
07 Feb 2019, 03:52

Code: Select all

...,
  "requirements":[
      {
        "type":"BUILDING",
        "id":"$exbuildingid"
      }
    ],...
Where $exbuildingid is the id of the building you require.
Sorry sir, I mean, requiring upgraded version of buildings.

Re: Building requirements

Posted: 07 Feb 2019, 16:37
by JustAnyone
The building which should be required, should check for upgrade with lua/fun and set some variable to 1 which then can be put in conditional requirement on other building.

Re: Building requirements

Posted: 10 Jun 2019, 15:39
by yusuf8a684
How can I make requirement for city levels?

Re: Building requirements

Posted: 10 Jun 2019, 16:02
by CommanderABab

Re: Building requirements

Posted: 10 Jun 2019, 16:08
by CommanderABab
https://theotown.com/forum/viewtopic.ph ... 51#p138951

The level goes to 66 with the latest version.

Re: Building requirements

Posted: 10 Jun 2019, 18:46
by JustAnyone
It won't. That's fake news

Re: Building requirements

Posted: 22 Jun 2019, 08:27
by soniroy
Great post.Helpful :)

Re: Building requirements

Posted: 29 Nov 2019, 11:40
by hihihihi
umm is there way to make requirement for zone?

Re: Building requirements

Posted: 29 Nov 2019, 12:14
by Lobby
The requirements shown in this topic also work for zones. The in-game high density zones make use of that :)

Re: Building requirements

Posted: 29 Nov 2019, 21:36
by Imran M
Lobby wrote:
29 Nov 2019, 12:14
The requirements shown in this topic also work for zones. The in-game high density zones make use of that :)
Nani!?
Was it time for a new profile picture?

Re: Building requirements

Posted: 29 Nov 2019, 23:13
by Wekabu city
I know it is offtopic, BUT
Imran M wrote:
29 Nov 2019, 21:36
Lobby wrote:
29 Nov 2019, 12:14
The requirements shown in this topic also work for zones. The in-game high density zones make use of that :)
Nani!?
Was it time for a new profile picture?
Lobby wrote:
28 Nov 2019, 14:58
Pickle forced me to replace it
From viewtopic.php?f=45&t=1106&start=9480
 ! Message from: CommanderABab
quote from post: viewtopic.php?p=154730#p154730

Re: Building requirements

Posted: 01 Feb 2020, 01:25
by Kamikazi
How do you make so you can only build a building in a specific game mode, for example, i can only build a building in sandbox. ...I know CommanderAB, you already told me one way, but i prefer to be locked in other gamemodes that to pop out of existence

Re: Building requirements

Posted: 01 Feb 2020, 04:06
by CommanderABab

Code: Select all

"requirements":[ 
  {
    "type":"CONDITION",
    "sandbox":true
  }
]
Might work.

I'll test it on something.

Nope. Not as is.

Re: Building requirements

Posted: 28 Mar 2020, 14:32
by Bevise
How many types in the building requirements?

Re: Building requirements

Posted: 28 Mar 2020, 16:03
by Bevise
So, to build A, it requires building B to be built first. How do we write commands? :bq :json

Re: Building requirements

Posted: 28 Mar 2020, 16:18
by Lobby
This is the answer to your question :)
CommanderABab wrote:
07 Feb 2019, 03:52

Code: Select all

...,
  "requirements":[
      {
        "type":"BUILDING",
        "id":"$exbuildingid"
      }
    ],...
Where $exbuildingid is the id of the building you require.

Re: Building requirements

Posted: 29 Mar 2020, 06:18
by Bevise
So, I want to show notification A. It requires building B to be built first. Because I'm making a news plugin, but I want news to show only when the headquarters is built.

Re: Building requirements

Posted: 04 Apr 2020, 02:34
by KINGTUT10101
How could I make a requirement for two items? I want to make a building require both a rank and the presence of another building.

Re: Building requirements

Posted: 04 Apr 2020, 13:30
by CommanderABab
KINGTUT10101 wrote:
04 Apr 2020, 02:34
How could I make a requirement for two items? I want to make a building require both a rank and the presence of another building.
Thinking out loud...

Code: Select all

"requirements":[ 
  {
    "type":"CONDITION",
    "sandbox":true
   },
   {
     "type":"BUILDING",
     "id":"$exbuildingid"
    }
],...
Where $exbuildingid is the id of the building you require.

Re: Building requirements

Posted: 11 Oct 2021, 08:57
by Yakka
I want to make upgrade requirements, something like dsa,But ended up same problems,can someone tell me or just put source code with it,you can edit it if there's an API,i had no problems with lua (just need some time to figured it out),hmm maybe i should use simpler way.