Upgrades

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Kulche
Pluche
Posts: 1181
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Upgrades

#41

Post by Kulche »

Can an upgrade have a preview frame? For example, I don't want to change the look of the building itself, but the upgrade should have a pic.
User avatar
Lobby
Developer
Posts: 3717
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: Re: Upgrades

#42

Post by Lobby »

Use

Code: Select all

"preview frames":[{"bmp":"icon.png"}]
for that :)
User avatar
Kulche
Pluche
Posts: 1181
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Upgrades

#43

Post by Kulche »

Thank you!
User avatar
Kulche
Pluche
Posts: 1181
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Upgrades

#44

Post by Kulche »

Another complicated question, can upgrades use separators? I'll go straight to explanation.
So, we have upgrades A, B, C and D. Only one is true, a separator is between C and D. Would we able to choose A/B and/or C/D?
Hope you understand what I meant.
User avatar
JustAnyone
Developer
Posts: 3548
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Upgrades

#45

Post by JustAnyone »

Probably not, but you can use condition requirements in upgrades
User avatar
A dutch Guy
Inhabitant of a Megacity
Posts: 175
Joined: 26 Dec 2017, 14:41
Location: The Netherlands
Plugins: Showcase Store

Plugin Creator

Platform

Re: Upgrades

#46

Post by A dutch Guy »

@Lobby Is it possible for an upgraded building to work as a car spawner?

I've tried it but it doesn't appear to be working (cars won't spawn when upgraded)

Code: Select all

[

 {
    "id":"$Bus_LA_by_A_Dutch_Guy",
    "type":"car",
    "frames":[
      {"bmp":"Bus_LA.png","w":20,"h":15,"count":4}
    ],
    "v2":true
  }
  ,
  {
    "id":"$Bus_NY_by_A_Dutch_Guy",
    "type":"car",
    "frames":[
      {"bmp":"Bus_NY.png","w":20,"h":16,"count":4}
    ],
    "v2":true
  }
  ,
   {
    "id":"$Bus_PA_by_A_Dutch_Guy",
    "type":"car",
    "frames":[
      {"bmp":"Bus_PA.png","w":20,"h":15,"count":4}
    ],
    "v2":true
  }
  ,
  {
    "id":"$Bus_BE_by_A_Dutch_Guy",
    "type":"car",
    "frames":[
      {"bmp":"Bus_BE.png","w":20,"h":15,"count":4}
    ],
    "v2":true
  }
  ,
  {
    "id":"$dealership1TEST",
    "type":"award",
    "author":"A Dutch Guy",
    "width":3,
    "height":3,
    "frames":[{"bmp":"dealership.png"}],
	"upgrades": [{
		"id": "$dealership1TEST_LA",
		"frames":[{"bmp":"dealership.png"}], 
		"price": 2000,
		"title": "Los Angeles",
		"text": "Busses from Los Angeles",
		"monthly price": 20,
			"only one":true,
   "car spawner":[
      {
        "cars":["$Bus_LA_by_A_Dutch_Guy"],
        "radius":100,
        "count":40
      }
	 ] 
	}
	,
	{
		"id": "$dealership1TEST_PA",
		"frames":[{"bmp":"dealership.png"}], 
		"price": 2000,
		"title": "Paris",
		"text": "Busses from Paris",
		
		"monthly price": 20,
			"only one":true,
   "car spawner":[
      {
        "cars":["$Bus_PA_by_A_Dutch_Guy"],
        "radius":100,
	
        "count":40
      }
	 ] 
	}
	,
	{
		"id": "$dealership1TEST_AM",
		"frames":[{"bmp":"dealership.png"}], 
		"price": 2000,
		"title": "Amsterdam",
		"text": "Busses from Amsterdam",
		"monthly price": 20,
			"only one":true,
   "car spawner":[
      {
        "cars":["$Bus_AM_by_A_Dutch_Guy"],
        "radius":100,
        "count":40
      }
	 ] 
	}
	,
	{
		"id": "$dealership1TEST_BE",
		"frames":[{"bmp":"dealership.png"}], 
		"price": 2000,
		"title": "Berlin",
		"text": "Busses from Berlin",
		"monthly price": 20,
			"only one":true,
   "car spawner":[
      {
        "cars":["$Bus_BE_by_A_Dutch_Guy"],
        "radius":100,
        "count":40
      }
	 ] 
	}
	]
		    
  }
]
User avatar
JustAnyone
Developer
Posts: 3548
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Upgrades

#47

Post by JustAnyone »

It can't.
User avatar
Lobby
Developer
Posts: 3717
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: Upgrades

#48

Post by Lobby »

What I would do is to replace the whole building with one that spawns cars once the upgrade was applied using Lua or Fun.
User avatar
JustAnyone
Developer
Posts: 3548
Joined: 23 Jul 2017, 12:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Upgrades

#49

Post by JustAnyone »

Lua > Fun

Change my mind
But anyways, that's how DSA rocket upgrades and other functions work.
User avatar
hihihihi
Metropolitan
Posts: 111
Joined: 30 Jul 2019, 06:05
Location: south korea
Plugins: Showcase Store

Platform

Re: Upgrades

#50

Post by hihihihi »

I have a question--
I made a plugin that have two upgrades, and when I upgrade both of upgrades, It says "2/2 upgrade(s)".(both of the upgrade code is same.)
But I want upgrades would not be overlapped, like middle park and radio station.
Help me...
User avatar
CommanderABab
AB
Posts: 11195
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Upgrades

#51

Post by CommanderABab »

hihihihi wrote: 13 Feb 2020, 12:03 I have a question--
I made a plugin that have two upgrades, and when I upgrade both of upgrades, It says "2/2 upgrade(s)".(both of the upgrade code is same.)
But I want upgrades would not be overlapped, like middle park and radio station.
Help me...
Put:

Code: Select all

"only one": true,
in the upgrade. :)
User avatar
hihihihi
Metropolitan
Posts: 111
Joined: 30 Jul 2019, 06:05
Location: south korea
Plugins: Showcase Store

Platform

Re: Upgrades

#52

Post by hihihihi »

CommanderABab wrote: 13 Feb 2020, 19:28
hihihihi wrote: 13 Feb 2020, 12:03 I have a question--
I made a plugin that have two upgrades, and when I upgrade both of upgrades, It says "2/2 upgrade(s)".(both of the upgrade code is same.)
But I want upgrades would not be overlapped, like middle park and radio station.
Help me...
Put:

Code: Select all

"only one": true,
in the upgrade. :)
:!: :idea: :D :bc thxs
User avatar
NSGSEI
Villager
Posts: 22
Joined: 29 Dec 2018, 07:36
Location: China
Plugins: Showcase Store
Version: Beta

Platform

Re: Upgrades

#53

Post by NSGSEI »

How to make a building control some specified building upgrades, similar to a main building click on the upgrade and let all the same type of sub-buildings use the same upgrade
User avatar
I_Support_Palestine
Townsman
Posts: 52
Joined: 09 Jun 2024, 11:53
Location: Johor
Plugins: Showcase Store

Platform

Re: Upgrades

#54

Post by I_Support_Palestine »

How to I code upgrades with rotation awareness?
Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”