"influence" of radio station?

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 857
Joined: 16 Dec 2016, 02:38
Location: Germany
Plugins: Showcase Store

Platform

"influence" of radio station?

#1

Post by mdk_813 »

Hi guys,
I'd like to make a plugin that has the same type of influence as the radio station, just with a wider radius (and also it would be a different building, obviously).
I noticed that the radio station has roughly a radius of 12, so the dimensions I want, are pretty clear. I don't know, however, what to call that type of influence of a radio station in the json-file.
I tried "influence public" and "influence radio" and neither seemed to work as the green radius was not displayed when building it in the game.
Maybe anyone can help me out here, please?

By the way, it would be great if the tutorial section could be updated with all possible types of influence and all possible buildings types. I noticed that several of the latter are missing (for example "tree", "public" etc). It would be great to have one central point of reference that shows you all possible tags for plugins, as it would spare plugin builders from having to search for each information separately in the forums and would also probably render most threads like this one unnecessary.

User avatar
actemendes
Metropolitan
Reactions:
Posts: 131
Joined: 20 Jan 2017, 16:53
Location: Russia
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#2

Post by actemendes »

But is not "effect" is not a park, etc. After all, you upgrafe the radio station and then there is an effect
Upd:
There is no effect of the radio itself. There is management, improving which effects appear. Maybe I misunderstood the question?
Last edited by actemendes on 04 Aug 2017, 23:16, edited 1 time in total.

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

Plugin Creator

Platform

Re: "influence" of radio station?

#3

Post by CommanderABab »

The influence shown when placing the default radio station is "influence management".
The upgrade influences are:

fun radiopark
newseducation high
religiousreligion
sportssport

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 857
Joined: 16 Dec 2016, 02:38
Location: Germany
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#4

Post by mdk_813 »

Oh ok, thanks.
So, if I want to increase the influence of public administration (hereby I mean the same influence which a city hall has), I would want to set "influence management", correct?

Just out of interest, because I don't intend to do it like that, but what would I have to write into the json then, if I intended to make the building upgradeable and have differing influence like the radio station?

The more I think about it, the more ideas come to mind...
Would it also be possible to set all five influences (management, park, education, religion, sports) at once, thereby making my building to something like a super radio station?
And would it be possible to let it only be built, if you have upgraded your radio station before? (I already know about the possibilty to set a "requirement" like "RANK" and I want to use it here anyways, so this other requirement could make sense as well)

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

Plugin Creator

Platform

Re: "influence" of radio station?

#5

Post by CommanderABab »

mdk_813 wrote:
05 Aug 2017, 00:29
Oh ok, thanks.
So, if I want to increase the influence of public administration (hereby I mean the same influence which a city hall has), I would want to set "influence management", correct? ...yes

Just out of interest, because I don't intend to do it like that, but what would I have to write into the json then, if I intended to make the building upgradeable and have differing influence like the radio station? ...yes, that you would have to do.

The more I think about it, the more ideas come to mind...
Would it also be possible to set all five influences (management, park, education, religion, sports) at once, thereby making my building to something like a super radio station? ...yes
And would it be possible to let it only be built, if you have upgraded your radio station before? (I already know about the possibilty to set a "requirement" like "RANK" and I want to use it here anyways, so this other requirement could make sense as well) ... I don't know. You may be able to check if an upgrade id exists.?
Press the secrets in red.

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 857
Joined: 16 Dec 2016, 02:38
Location: Germany
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#6

Post by mdk_813 »

CommanderABab wrote:
05 Aug 2017, 01:20
Press the secrets in red.
Hm, yes, I did that before writing that posting.
Sorry, I'm not sure how that answers all of my questions.
I mean, I think I understand that I can set a number of influences in one plugin. But how would I set the different requirements for example?

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 857
Joined: 16 Dec 2016, 02:38
Location: Germany
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#7

Post by mdk_813 »

actemendes wrote:
04 Aug 2017, 23:04
But is not "effect" is not a park, etc. After all, you upgrafe the radio station and then there is an effect
Upd:
There is no effect of the radio itself. There is management, improving which effects appear. Maybe I misunderstood the question?
When you place the radio station for the very first time (that is before making any upgrade), it definetly shows a green influence radius. From what I gathererd, I think that this is "influence managment" and I assume that this is the same influence a city hall would have.
If you upgrade the radio station, I think, you change that influence to park, or education, or religion or sport.
I'm really not sure, but that is how I've understood it so far.

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

Plugin Creator

Platform

Re: "influence" of radio station?

#8

Post by CommanderABab »

It always shows influence management when you choose it.

The other influences it may have are only shown using the eye icon views.

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 857
Joined: 16 Dec 2016, 02:38
Location: Germany
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#9

Post by mdk_813 »

Thanks for the clarification.
But there are still some things, I don't fully understand:
- Is "influence management" the same influence that a city hall would have? Or is it merely like a placeholder for the other (upgraded) influences you mentioned above?
- What would I need to write into the json as "requirement", if I want players to have built (and upgraded) all four radio stations in their city, before being allowed to place my building?

User avatar
HoRizon
Townsman
Reactions:
Posts: 78
Joined: 29 Jul 2017, 08:20

Platform

Re: "influence" of radio station?

#10

Post by HoRizon »

CommanderABab wrote:
04 Aug 2017, 23:11
The influence shown when placing the default radio station is "influence management".
The upgrade influences are:

fun radiopark
newseducation high
religiousreligion
sportssport
News is not Education High. It is Low Education.

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

Plugin Creator

Platform

Re: "influence" of radio station?

#11

Post by CommanderABab »

Ok

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

Plugin Creator

Platform

Re: "influence" of radio station?

#12

Post by CommanderABab »

The management influence is 20. The other that is chosen is 80.

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 857
Joined: 16 Dec 2016, 02:38
Location: Germany
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#13

Post by mdk_813 »

So, I played around with the json and tried a number of configurations with different requirements.
I discovered that the requirement "BUILDING" causes some problems. The only version I could get to work, was one that only had the requirement "RANK".
Here is one version that Theotown deems faulty (The json itself is valid, at least according to jsonlint.com):

Code: Select all

[
   {
      "id":"TV_Tower_2x2.mdk_813",
	  "type":"public",
	  "author":"mdk_813",
      "width":2,
	  "height":2,
	  "frames":[{"bmp":"Funkturm_2x2.png"}],
	  "requirement":{"requirements":[{"type":"RANK","data":{"id":"$rnk_city_big"}},{"type":"BUILDING","data":{"id":"$radio00_news"}},{"type":"BUILDING","data":{"id":"$radio00_sport"}},{"type":"BUILDING","data":{"id":"$radio00_fun"}},{"type":"BUILDING","data":{"id":"$radio00_faith"}}]},
	  "max count":1,
	  "influence management":500,
	  "influence education low":500,
	  "influence park":500,
	  "influence religion":500,
	  "influence sport":500,
	  "title":"TV Broadcasting Tower",
	  "text":"Expand the reach of your Broadcasts!"
   }
]
Any ideas?

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

Plugin Creator

Platform

Re: "influence" of radio station?

#14

Post by CommanderABab »

What does the error log say?, or if it is red in the tab, you would need one of each of those radio stations.

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 857
Joined: 16 Dec 2016, 02:38
Location: Germany
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#15

Post by mdk_813 »

The error log says:
In /storage/emulated/0/TheoTown/plugins/TV_Tower_2x2_mdk_813/TV_Tower_2x2_mdk_813.json:

java.lang.ClassCastException: info.flowersoft.theotown.theotown.draft.UpgradeDraft cannot be cast to info.flowersoft.theotown.theotown.draft.BuildingDraft

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 857
Joined: 16 Dec 2016, 02:38
Location: Germany
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#16

Post by mdk_813 »

CommanderABab wrote:
05 Aug 2017, 14:20
you would need one of each of those radio stations.
Yes, that is precisely what I want. All four types of upgraded radio stations should be built in the city, plus the requirement of rank "big city".

User avatar
MXD77
Inhabitant of a Megacity
Reactions:
Posts: 255
Joined: 15 May 2017, 00:05
Location: Gdańsk
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#17

Post by MXD77 »

Umm I have a project named TV Tower which have all this influences without upgrade
If you want that tell me :bc
Maybe you would be repaint it :bc :bq
Last edited by MXD77 on 05 Aug 2017, 14:58, edited 1 time in total.

User avatar
mdk_813
Inhabitant of a Country
Reactions:
Posts: 857
Joined: 16 Dec 2016, 02:38
Location: Germany
Plugins: Showcase Store

Platform

Re: "influence" of radio station?

#18

Post by mdk_813 »

MXD77 wrote:
05 Aug 2017, 14:50
Umm I have a project named TV Tower which have all this influences without upgrade
If you want that tell me :bc
Thanks, but I don't think this will be necessary, because the influences work by now.
The remaining problem is getting all the requirements to work.

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

Plugin Creator

Platform

Re: "influence" of radio station?

#19

Post by CommanderABab »

mdk_813 wrote:
05 Aug 2017, 14:33
The error log says:
In /storage/emulated/0/TheoTown/plugins/TV_Tower_2x2_mdk_813/TV_Tower_2x2_mdk_813.json:

java.lang.ClassCastException: info.flowersoft.theotown.theotown.draft.UpgradeDraft cannot be cast to info.flowersoft.theotown.theotown.draft.BuildingDraft

I don't know if you could use UPGRADE in the requirements statement or not, but that is what you would have to do to get your desired functionality. The error statement says upgrade ids cannot be used in the building requirements statement.

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

Plugin Creator

Platform

Re: "influence" of radio station?

#20

Post by CommanderABab »

mdk_813 wrote:
05 Aug 2017, 13:51
So, I played around with the json and tried a number of configurations with different requirements.
I discovered that the requirement "BUILDING" causes some problems. The only version I could get to work, was one that only had the requirement "RANK".
Here is one version that Theotown deems faulty (The json itself is valid, at least according to jsonlint.com):

Code: Select all

[
   {
      "id":"TV_Tower_2x2.mdk_813",
	  "type":"public",
	  "author":"mdk_813",
      "width":2,
	  "height":2,
	  "frames":[{"bmp":"Funkturm_2x2.png"}],
	  "requirement":{"requirements":[{"type":"RANK","data":{"id":"$rnk_city_big"}},{"type":"BUILDING","data":{"id":"$radio00_news"}},{"type":"BUILDING","data":{"id":"$radio00_sport"}},{"type":"BUILDING","data":{"id":"$radio00_fun"}},{"type":"BUILDING","data":{"id":"$radio00_faith"}}]},
	  "max count":1,
	  "influence management":500,
	  "influence education low":500,
	  "influence park":500,
	  "influence religion":500,
	  "influence sport":500,
	  "title":"TV Broadcasting Tower",
	  "text":"Expand the reach of your Broadcasts!"
   }
]
Any ideas?
Try replacing BUILDING with UPGRADE in the requirements statement.

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”