Building requirements

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Madbro
Small-town resident
Reactions:
Posts: 38
Joined: Wed Jan 23, 2019 10:33
Plugins: Showcase Store

Platform

Re: Building requirements

#41

Post by Madbro »

CommanderABab wrote:
Thu Feb 07, 2019 3: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.
Madbro the Madman B)
From ideas :mine To artworks :img Then JSON :json And Plugin :plugin And finally.. bugs. :calc

User avatar
JustAnyone
Developer
Reactions:
Posts: 3242
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Building requirements

#42

Post 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.
:pickle:

User avatar
yusuf8a684
Inhabitant of a Planet
Reactions:
Posts: 1556
Joined: Sun Dec 10, 2017 22:09
Location: Turkiye
Plugins: Showcase Store

Plugin Creator

Platform

Re: Building requirements

#43

Post by yusuf8a684 »

How can I make requirement for city levels?
The Internet Addict

don't expect me to finish something

LOL

User avatar
CommanderABab
AB
Reactions:
Posts: 9673
Joined: Tue Jun 07, 2016 21:12
Plugins: Showcase Store
Version: Beta

Platform

Plugin Creator

Re: Building requirements

#44

Post by CommanderABab »


User avatar
CommanderABab
AB
Reactions:
Posts: 9673
Joined: Tue Jun 07, 2016 21:12
Plugins: Showcase Store
Version: Beta

Platform

Plugin Creator

Re: Building requirements

#45

Post by CommanderABab »

https://theotown.com/forum/viewtopic.ph ... 51#p138951

The level goes to 66 with the latest version.

User avatar
JustAnyone
Developer
Reactions:
Posts: 3242
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Building requirements

#46

Post by JustAnyone »

It won't. That's fake news
:pickle:

soniroy
Settler
Reactions:
Posts: 1
Joined: Sat Jun 22, 2019 8:19
Plugins: Showcase Store

Re: Building requirements

#47

Post by soniroy »

Great post.Helpful :)

hihihihi
Metropolitan
Reactions:
Posts: 112
Joined: Tue Jul 30, 2019 6:05
Location: south korea
Plugins: Showcase Store

Platform

Re: Building requirements

#48

Post by hihihihi »

umm is there way to make requirement for zone?
Actually, I'm alive. :bc

User avatar
Lobby
Developer
Reactions:
Posts: 3645
Joined: Sun Oct 26, 2008 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: Building requirements

#49

Post by Lobby »

The requirements shown in this topic also work for zones. The in-game high density zones make use of that :)
=^._.^= ∫

User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 823
Joined: Wed Oct 24, 2018 13:41
Plugins: Showcase Store

Platform

Plugin Creator

Re: Building requirements

#50

Post by Imran M »

Lobby wrote:
Fri Nov 29, 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?
I just love the DOPE-amine you get after completing a plugin!

User avatar
Wekabu city
Inhabitant of a Megalopolis
Reactions:
Posts: 560
Joined: Tue Aug 29, 2017 21:07
Location: Germany, Hessia
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Building requirements

#51

Post by Wekabu city »

I know it is offtopic, BUT
Imran M wrote:
Fri Nov 29, 2019 21:36
Lobby wrote:
Fri Nov 29, 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:
Thu Nov 28, 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
Last edited by CommanderABab on Sat Nov 30, 2019 3:20, edited 1 time in total.
Reason: Added a pointer to quote at correct place in forum
Free & Open Source Software Advocate.
One day, one day, I'll write a fully fledged Mod loader for Theotown. One day, ...
---
ps4ev1hp

User avatar
Kamikazi
Inhabitant of a Conurbation
Reactions:
Posts: 455
Joined: Sat Jan 27, 2018 0:58
Location: Zaragoza, ESPAÑA
Plugins: Showcase Store
Version: Beta
Contact:

Platform

Plugin Creator

Re: Building requirements

#52

Post 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
🇪🇸Soy un spanish🇪🇸
...¡ARRIBA VIVA ESPAÑA!
:space✈️Aviation enthusiast✈️ :space
:76: A proud TT76 Tester :76:

User avatar
CommanderABab
AB
Reactions:
Posts: 9673
Joined: Tue Jun 07, 2016 21:12
Plugins: Showcase Store
Version: Beta

Platform

Plugin Creator

Re: Building requirements

#53

Post by CommanderABab »

Code: Select all

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

I'll test it on something.

Nope. Not as is.

Online
User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 230
Joined: Thu Feb 27, 2020 15:39
Location: Lousyin capital, Sladily.
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Building requirements

#54

Post by Bevise »

How many types in the building requirements?
#include <stdio.h>
#include <conio.h>
void main(){
printf("ゴゴ Bevise ゴゴ");
getch();
}

Online
User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 230
Joined: Thu Feb 27, 2020 15:39
Location: Lousyin capital, Sladily.
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Building requirements

#55

Post by Bevise »

So, to build A, it requires building B to be built first. How do we write commands? :bq :json
#include <stdio.h>
#include <conio.h>
void main(){
printf("ゴゴ Bevise ゴゴ");
getch();
}

User avatar
Lobby
Developer
Reactions:
Posts: 3645
Joined: Sun Oct 26, 2008 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: Building requirements

#56

Post by Lobby »

This is the answer to your question :)
CommanderABab wrote:
Thu Feb 07, 2019 3:52

Code: Select all

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

Online
User avatar
Bevise
Micy's Assistant
Reactions:
Posts: 230
Joined: Thu Feb 27, 2020 15:39
Location: Lousyin capital, Sladily.
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Building requirements

#57

Post 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.
#include <stdio.h>
#include <conio.h>
void main(){
printf("ゴゴ Bevise ゴゴ");
getch();
}

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2166
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Platform

Plugin Creator

Re: Building requirements

#58

Post 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.

User avatar
CommanderABab
AB
Reactions:
Posts: 9673
Joined: Tue Jun 07, 2016 21:12
Plugins: Showcase Store
Version: Beta

Platform

Plugin Creator

Re: Building requirements

#59

Post by CommanderABab »

KINGTUT10101 wrote:
Sat Apr 04, 2020 2: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.

User avatar
Kiki012
Inhabitant of a Megacity
Reactions:
Posts: 327
Joined: Mon Jan 06, 2020 9:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Building requirements

#60

Post by Kiki012 »

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.
2 Website Link because sometimes one/both wont update the new one.
My Website (Github)

My Website (drv.tw)

Now Supporting LGBT movement (Yes Really)

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”