Akira Maruni wrote: 16 Apr 2019, 14:04
I have an inspiration to make a zone that a bit similar with "Primitive Zone" plugin, but I try to make it with modern building. The purpose is to make the game looks more real with various RCI building in a zone rather than to build the same type building in a zone.
So, rather than I create the new buildings, I choose to create a code spawn some buildings from the game itself. Is it legal if I use in-game building ? What code should I use ?
CommanderABab wrote: 16 Apr 2019, 15:31
Can be done, but it's complicated and the code is long.
First step: collect the ids and sizes of the in-game buildings you wish built in your zone. Remember it's not a good idea to mix polluting industries with residential buildings.
Lobby wrote: 30 May 2017, 22:37
Since version 296 you may let buildings (e.g. decorations) automatically spawn in map creation. To do so, we added an object called "spawn" which contains probability p, main spawn height height and max deviation from it radius.
A small sample plugin that spawns grass in the ocean:
MsgmSgmsG wrote: 09 Dec 2019, 13:33
Can i use "frame alignment" in RIC?? I try this tag in my 1×1 house plugin but I have to place residential zone before i place this house...
You could also use a frame aligned 1x1 park type that when built removes itself, builds the residential zone, then the frame aligned 1x1 house.
"requirements":[
{
"type":"RANK", // Requires a specific city rank
"lvl":2
},
{
"type":"BUILDING", // Requires a specific building
"id":"$theidofarequiredbuilding"
},
{
"type":"HABITANT_COUNT", // Requires a population of at least 1000
"count":1000
}
]
I want to build Building A, it requires Building B to be upgraded. How to write codes? Please help me.
//building B
[{
"id":"buildingB",
other stuff...
"upgrades":[
{
"id":"buildingB_upgrade", //upgraded building B id
other stuff...
}]
},
//building A
{
"id":"buildingA",
other stuff...
"requirements":[
{
"type":"BUILDING",
"id":"buildingB_upgrade" //can only upgrade when B is upgraded
}]
}]
//building B
[{
"id":"buildingB",
other stuff...
"upgrades":[
{
"id":"buildingB_upgrade", //upgraded building B id
other stuff...
}]
},
//building A
{
"id":"buildingA",
other stuff...
"requirements":[
{
"type":"BUILDING",
"id":"buildingB_upgrade" //can only upgrade when B is upgraded
}]
}]
//building B
[{
"id":"buildingB",
other stuff...
"upgrades":[
{
"id":"buildingB_upgrade", //upgraded building B id
other stuff...
}]
},//*** add this code to buildingB:
"fun":[
{
"condition": {
"type": "upgrade",
"id": "buildingB_upgrade"
},
"actions": [{
"type": "remove"
},
//*** builds what you are checking for in place. :)
{"type": "build","id": "upgradedbuildingB","x":0,"y":0}
],"p":100
}
]
//building A
{
"id":"buildingA",
other stuff...
"requirements":[
{
"type":"BUILDING",
//*** change "buildingB_upgrade" below to "upgradedbuildingB"
"id":"buildingB_upgrade" //can only upgrade when B is upgraded
}]
}]