Discussion about Fun condition and action index

Any information about the fun attribute is given here.

Moderator: Plugin Moderators

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

Re: Fun condition and action index

Post by Lobby » Sun Oct 22, 2017 0:24

What exactly should this action do?
...Have a nice stay

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

Re: Fun condition and action index

Post by Lobby » Sun Oct 22, 2017 12:58

No, such functionality doesn't exist in the game itself. I would instead use different buildings and switch between them.
...Have a nice stay

Online
User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6704
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Fun condition and action index

Post by CommanderABab » Mon Oct 23, 2017 18:51

It's possible to find out.
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

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

Re: Fun condition and action index

Post by Lobby » Wed Nov 01, 2017 21:48

@former member not yet...
...Have a nice stay

Online
User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6704
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Fun condition and action index

Post by CommanderABab » Fri Nov 03, 2017 6:04

Code: Select all

[  { "id": "$popreqid","type":"decoration","frames":[{"bmp":"Umayupgrade.png"}],"draw ground":true,
      "hidden":true,"width":4,"height":4,
      "requirement":{ "requirements":[  { 
            "type":"HABITANT_COUNT", 
            "data":{ 
              "count":100000
      }}]},
      "upgrades":[{
        "id":"$popreqid.up1",
        "title":" ","frames":[],
        "price":100000,
        "text":"press upgrade for some great \nbuilding here when available",
        "requirement":{ "requirements":[  { 
            "type":"HABITANT_COUNT", 
            "data":{ 
              "count":100000
        }}]}}]
      ,
      "fun":[
        {
           "condition":{
             "type":"upgrade","id":"$popreqid.up1"
           },
           "actions":[
             {"type":"remove"},
             {"type":"build","id":"$somegreatbuilding"}
           ]
         }
       ]
    },
    { "id":"$buildmanager","type":"decoration",
       "draw ground":true,"width":4,"height":4,
       "frames":[{"bmp":"testtheory.png"}],
        "fun":[
          {
            "condition":
            { 
              "type":"and","inner":[
                {"type": "date","frame":3590, "min": 3588,"max":3589 },
                {"type":"buildable","id":"$popreqid"}
              ]
            },
            "actions":[
              {"type":"remove"},
              {"type":"build","id":"$popreqid"}
           ],
           "p":1
         }
       ]
   },
   { "id":"$somegreatbuilding","type":"decoration",
       "draw ground":true,"width":4,"height":4,
       "frames":[],
       "hidden":true,
       "text":"replace with somegreatbuilding :)",
       "fun":[{"actions":[{"type":"remove"},{"type":"build","id":"$bigschool00"}]}]
   }
]
This set will every 10 game years check to see if the population is over 100,000.
If it is, it will build the big elementary school once the player has paid 100,000T.

Added a couple of 4x4 images.
Now debugged: id became Id in a couple of places :)

Please comment or discuss on this thread!

:json :teach :bf
Attachments
testtheory.json
(1.7 KiB) Downloaded 23 times
Umayupgrade.png
Umayupgrade.png (1.85 KiB) Viewed 1208 times
testtheory.png
testtheory.png (1.04 KiB) Viewed 1208 times
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

User avatar
Josh
Graphic designer
Reactions:
Posts: 2199
Joined: Sat Mar 11, 2017 19:20
Location: The Netherlands
Plugins: Show
Version: Beta

Re: Fun condition and action index

Post by Josh » Wed Nov 08, 2017 4:01

Lobby wrote: โ†‘
Wed Nov 01, 2017 21:48
@former member not yet...
When is it going to be there?...
Proud TheoTown player sinds update 1.1.50

Creator of Aldorria, Covinton Empire, West Country, Sunnydale

Save nature, before it kills you๐ŸŒฒ

Online
User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6704
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Fun condition and action index

Post by CommanderABab » Wed Nov 08, 2017 8:06

Screenshot_20171108-003428.jpg
B)
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

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

Re: Discussion about Fun condition and action index

Post by Lobby » Wed Nov 08, 2017 14:15

@Josh @former member
You can actually do that now by using the "value" condition. It evaluates an expression given as id and checks then whether min<=result<=max.

Such a conditions may look like that:

Code: Select all

"condition":{"type":"value","id":"res","min":1000,"max":10000},
This condition is true if you have more or exactly 1000, but less or exactly 10000 inhabitants. "res" is here the expression that just contains a single variable called res. res is the number of current inhabitants. You can actually get more detailed numbers as well. The expression "res0+res1+res2" would also result in the number of inhabitants with res0 being the number of poorest inhabitants and so on. The same can be done for com and ind (these are the number of jobs provided by commercial/industrial buildings).
...Have a nice stay

User avatar
Josh
Graphic designer
Reactions:
Posts: 2199
Joined: Sat Mar 11, 2017 19:20
Location: The Netherlands
Plugins: Show
Version: Beta

Re: Discussion about Fun condition and action index

Post by Josh » Wed Nov 08, 2017 17:08

Wow thanks :)
Proud TheoTown player sinds update 1.1.50

Creator of Aldorria, Covinton Empire, West Country, Sunnydale

Save nature, before it kills you๐ŸŒฒ

Online
User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 6704
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: Discussion about Fun condition and action index

Post by CommanderABab » Wed Nov 08, 2017 18:31

Looks great!
547547Currently using alpha 547. 547 What's new? :)
settings.json!
:)

Telegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

Post Reply Previous topicNext topic

Return to โ€œFun attributeโ€

Who is online

Users browsing this forum: No registered users and 1 guest

๏ปฟ