Re: Upgrades

Learn here how to create and use plugins.

Moderator: Plugin Moderators

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

Platform

Plugin Creator

Re: Upgrades (for buildings)

#26

Post by cesareborgia94 » Sun Jan 28, 2018 17:47

Hello,
Update on gold ore ----> gold mine

I have tried the fun attribute to change the building. But upon clicking the gold ore, it only removes the texture of gold ore ("type": "decoration") but did not build a gold mine ("type":"industrial"). Also tested "type": "residential" and "type": "commercial" but did not work.

But other building types such as "park" or "sport" will work, it will remove gold ore and build gold mine with that type. (You cannot imagine a gold mine to be a sport or park)

The fun attribute just doesn't apply to RCIs. Its just remove it and leave an empty space behind. :(
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
Lobby
Developer
Reactions:
Posts: 3327
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Upgrades (for buildings)

#27

Post by Lobby » Sun Jan 28, 2018 17:52

I assume you have to build the needed zone first.
...Have a nice stay

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

Platform

Plugin Creator

Re: Upgrades (for buildings)

#28

Post by cesareborgia94 » Sun Jan 28, 2018 17:56

Goldspawntest.zip
Here is the zip file.
My plan here is that the gold ore spawn randomly in a world map as decoration, and then you can upgrade it into a small gold mine as industrial. It is simple idea really. I have plans for copper mines and silver mines but this cannot come to fruition :(

Please move discussion if this is a little off-topic. You can see the code and texture in zip file provided above.
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
Lobby
Developer
Reactions:
Posts: 3327
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Upgrades (for buildings)

#29

Post by Lobby » Sun Jan 28, 2018 18:17

It works if you add an action to build the needed zone and set "needs road":false in the industrial building.

Complete code :json

Code: Select all

[
  {
    "draw ground":true,
    "frames":[
      {
        "bmp":"goldorespawn.png"
      }
    ],
    "fun":[
      {
        "actions":[
          {
            "type":"remove"
          },
          {
            "type":"build",
            "id":"$zoneindustrial"
          },
          {
            "id":"goldmine",
            "type":"build"
          }
        ],
        "condition":{
          "id":"upgrade",
          "type":"upgrade"
        }
      }
    ],
    "height":1,
    "hidden":false,
    "id":"goldore",
    "text ":"An unmined gold ore, maybe you can turn it into a gold mine?",
    "title":"gold ore",
    "type":"decoration",
    "upgrades":[
      {
        "frames":[

        ],
        "id":"upgrade",
        "price":0,
        "text":"Upgrades to goldmine",
        "title":"Mine gold"
      }
    ],
    "width":1
  },
  {
    "needs road":false,
    "draw ground":true,
    "frames":[
      {
        "bmp":"goldminei.png"
      }
    ],
    "height":1,
    "hidden":false,
    "id":"goldmine",
    "influence noise":0,
    "influence pollution":0,
    "people":3,
    "power":0,
    "text":"Goldmine",
    "type":"industrial",
    "water":0,
    "width":1
  }
]
...Have a nice stay

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

Platform

Plugin Creator

Re: Upgrades (for buildings)

#30

Post by cesareborgia94 » Sun Jan 28, 2018 18:22

Thanks Lobby for all the help. I'll be testing it first. If it does well, I'll probably release my gold ore plugin today.
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
TheCrazyRobloxian
Villager
Reactions:
Posts: 19
Joined: Mon Nov 13, 2017 22:21

Platform

Re: Upgrades (for buildings)

#31

Post by TheCrazyRobloxian » Wed Feb 28, 2018 21:33

Hello!,
I have a question to ask:
¿Can upgrade frames have rotation aware?
Hi, wait, did anyone else wrote the same thing here?, meh, i dont care.
Plugin maker! - Plugins once every 10 years" :json B)
You can use my plugins and modify them as long as you provide credit to me ;)

User avatar
CommanderABab
AB says 735 is broken!
Reactions:
Posts: 7478
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Upgrades (for buildings)

#32

Post by CommanderABab » Wed Feb 28, 2018 22:05

I believe so.
736!736Currently using beta 736. 736 What's new? :)
Ambient sounds!!
:)

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

User avatar
TheCrazyRobloxian
Villager
Reactions:
Posts: 19
Joined: Mon Nov 13, 2017 22:21

Platform

Re: Upgrades (for buildings)

#33

Post by TheCrazyRobloxian » Thu Mar 01, 2018 3:17

Now that i think about it, it would consume plugin space... :lol:
Hi, wait, did anyone else wrote the same thing here?, meh, i dont care.
Plugin maker! - Plugins once every 10 years" :json B)
You can use my plugins and modify them as long as you provide credit to me ;)

User avatar
Kulche
Inhabitant of a Country
Reactions:
Posts: 913
Joined: Wed Jun 07, 2017 20:28
Location: In da house
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Upgrades (for buildings)

#34

Post by Kulche » Wed May 02, 2018 7:53

former member, there is no "," after id in tutorial! :fire
I'm not lazy, I'm on battery saving mode!

User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 781
Joined: Sun May 28, 2017 0:07
Location: In the blogosphere
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Re: Upgrades

#35

Post by FranchuFranchu » Mon Jun 18, 2018 1:52

Thanks to Lobby this tutorial survived!
Doing nothing productive, at all
......Affirmative=Positive=True=Yeah=Yes=OK=K=Potassium=K=0°K=-237°C

User avatar
Between3Characters
Metropolitan
Reactions:
Posts: 127
Joined: Thu Oct 04, 2018 13:31
Plugins: Show
Version: Beta
Phone model: 082155558223 redmi4a

Platform

Re: Re: Upgrades

#36

Post by Between3Characters » Sat Jan 19, 2019 2:50

What about the namea of the upgrade? Can we add descriptions...?
Moderators, dont delete our plugins please

User avatar
CommanderABab
AB says 735 is broken!
Reactions:
Posts: 7478
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Re: Upgrades

#37

Post by CommanderABab » Sat Jan 19, 2019 3:56

Between3Characters wrote:
Sat Jan 19, 2019 2:50
What about the namea of the upgrade? Can we add descriptions...?
You can provide "text" and "title" for each upgrade. They will be shown when that particular upgrade is selected to be chosen. They do not affect the text and title of the building however.
736!736Currently using beta 736. 736 What's new? :)
Ambient sounds!!
:)

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

User avatar
Between3Characters
Metropolitan
Reactions:
Posts: 127
Joined: Thu Oct 04, 2018 13:31
Plugins: Show
Version: Beta
Phone model: 082155558223 redmi4a

Platform

Re: Re: Upgrades

#38

Post by Between3Characters » Sat Jan 19, 2019 6:21

Thanks...
Moderators, dont delete our plugins please

dysprositos
Settler
Reactions:
Posts: 1
Joined: Fri Apr 27, 2018 15:12
Location: Italy
Plugins: Show
Version: Beta
Phone model: Huawei P8 Lite

Plugin Creator

Platform

Re: Upgrades

#39

Post by dysprositos » Tue May 07, 2019 13:16

I have a problem, when I write the code for upgrade, even if I insert all 4 frames and the rotation function, the frames always remain the same, while the same building, while when it is not upgrade it changes the image for each side.
Here is the code:
(Sorry for my English)

Code: Select all

[{
"id":  "PiazzaMoroSpoglia",
"type": "park",
"title": "Piazza Aldo Moro Coccaglio (Bs)",
"text": "Piazza",
"width": 4,
"height": 4,
"rotation aware": true,
	"frames": [{
		"bmp": "PiazzaMoroL4.png"},
{"bmp": "PiazzaMoroL3.png"},
{"bmp": "PiazzaMoroL2.png"},
{"bmp": "PiazzaMoroL1.png"
	}],
	"upgrades": [{
"id":  "PiazzaMoroPiante",
	"title": "Piazza Aldo Moro Coccaglio (Bs)",
	"text": "L'aggiunta delle piante è l'ideale per tenere al fresco i tuoi cittadini durante la calura estiva",
	"width": 4,
	"height": 4,
"rotation aware": true,
	"frames": [{
		"bmp": "PiazzaMoroL5.png"},
{"bmp": "PiazzaMoroL6.png"},
{"bmp": "PiazzaMoroL7.png"},
{"bmp": "PiazzaMoroL8.png"}],


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

Platform

Re: Re: Upgrades

#40

Post by Lobby » Tue May 07, 2019 16:16

Upgrades aren't rotation aware on their own. You have to use a rotation aware animation in an upgrade in order to support rotation awareness in it. This may look like that:

Code: Select all

[
{
  "id":"PiazzaMoroSpoglia_upgrade00",
  "type":"animation",
  "frames":[{
		"bmp": "PiazzaMoroL5.png"},
{"bmp": "PiazzaMoroL6.png"},
{"bmp": "PiazzaMoroL7.png"},
{"bmp": "PiazzaMoroL8.png"}],
"rotation aware":true
},

{
"id":  "PiazzaMoroSpoglia",
"type": "park",
"title": "Piazza Aldo Moro Coccaglio (Bs)",
"text": "Piazza",
"width": 4,
"height": 4,
"rotation aware": true,
	"frames": [{
		"bmp": "PiazzaMoroL4.png"},
{"bmp": "PiazzaMoroL3.png"},
{"bmp": "PiazzaMoroL2.png"},
{"bmp": "PiazzaMoroL1.png"
	}],
	"upgrades": [{
"id":  "PiazzaMoroPiante",
	"title": "Piazza Aldo Moro Coccaglio (Bs)",
	"text": "L'aggiunta delle piante è l'ideale per tenere al fresco i tuoi cittadini durante la calura estiva",
	"frames": [null],
	"animation":[{"id":"PiazzaMoroSpoglia_upgrade00","x":0,"y":0}]
    }]
}]
...Have a nice stay

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: No registered users and 1 guest