Fandom

Anno 2070 Wiki

JSON Building Properties

421pages on
this wiki
Add New Page
Comments0 Share

Dev Page | < Development Pages

continued from User_talk:Grilse

Dec 14-15

Dec 17 - 18Edit

Multi Files: If you deserialize the JSON to variable called JSON, the buildings array will be accessible throught "buildings" key and so on (e.g. in Python objects become dictionaries and arrays become lists, see example).

for building in JSON["buildings"]:
   ...
for rule in JSON["balance"]:
   ...

Named Icons: Dear God,, definitelly not something like that !!! I meant like a simple 2-column table and script below... But you just inspired me that an image comparison might do the job as well...

Name Wikia Icon File
rice_farm_field

Rice.png

def parse_WikiaIcons():
   WikiaIcons = {}
   with open("map.csv") as f:
       f.readline() # first line contain headers
       for line in f:
           (key, value) = line.strip().split(";")[0:2]
           WikiaIcons[key] = value
   return WikiaIcons

v0.3: Not "today" after all, sunday looks more realistic :(

--deathApril 03:05, December 17, 2011 (UTC)

Indeed. That makes more sense. My brain fart on my part. I was just thinking now "You idiot, just put them in a freaking dictionary." You beat me to it. :-p
--Cphoenix (talk) 03:26, December 17, 2011 (UTC)
Named Icons: Someone contributed to the anno-designer project by uploading an archive with all icons renamed and grouped (e.g. "Building Icons", "Product Icons", etc.). I don't know if this is of any help for you here, but I definately wanted to honor his work. See the attachment here: https://code.google.com/p/anno-designer/issues/detail?id=1
--ZackSchneider 03:28, December 17, 2011 (UTC)
That looks handy. The list more than the icons. Hmmmmmm. *goes away to play with Python* I take that back. That's a list of duplicates, not a list of the new icon names and the old ones (plus those numbers are based on the numbers of the previous +1 error ).
--Cphoenix (talk) 03:33, December 17, 2011 (UTC)
Hm.. yea. I originally renamed some of the icons for the first release of the anno-designer which included icons. He then partially re-renamed some of those and removed duplicates which I introduced later (see my comment on the issue). The information is there, but messed up badly xD
--ZackSchneider 03:42, December 17, 2011 (UTC)

Named Icons: If any naming convention of icons will be based on any of the Name, Eng1, .ifo, IconFileName, IconWikiaFile or whatever properties, you don't need any change in the data, simply use the property of your choise. If you tried to use any other naming convention that needs to be mapped manually, please ditch it and choose one of the automatic ones.The only manual names i'll support will be the wikia icons, because they are already used in so many pages... After some python woodoo this is the wikia_icons_map. Please check and repair bad entries if you find any,, thanks :)

--deathApril 14:40, December 17, 2011 (UTC)

v0.3: live on Development_Pages#Resources, icluding csv version - all changes should be documented in the model - some testing is needed, but i hope i got it right (especially maintenance costs are calculated with some woodoo algorithms)

--deathApril 21:07, December 17, 2011 (UTC)

I suggest we split the conversation of icon naming to here: Icon Naming Convention
We can leave this page for specific talk about the structure of these JSON files.
--Cphoenix (talk) 03:08, December 18, 2011 (UTC)

Dec 20 - 22Edit

Factions: Oh,, what about Fishery and other buildings used by both Eco and Tyco? They are under "others" faction,, is this ok for creating building trees??

Localizations: I should switch from Eng1 to Eng3 in v0.4,, but there will be other patches and expansions, shold i rename the property simply to Eng? Shoul i add other localization strings? --deathApril 15:01, December 20, 2011 (UTC)

Meep. I'd say go for what you think will be less headachey for all concerned. --Cphoenix (talk) 02:36, December 21, 2011 (UTC)

GitHub: i haven't had much time lately, i'll push my source files after v0.4, i want to change my programming style so it matches the project + reuse some functions... --deathApril 13:15, December 22, 2011 (UTC)

Eng1 vs. eng3: specify which version of the game you've used (e.g. v1.01 or v1.02), and then take everything from that game version: data and localization strings. A specific game version has only english localization, so you should then call it simply 'eng' instead of 'eng1' or 'eng3'.
Holding back commits: you don't have to do that. Committing is not the same as releasing. Committing is simply "yes I want to keep this, and here's a summary of what I just did". Nothing more. --Grilse (talk) 23:16, December 22, 2011 (UTC)

Dec 28 - 30Edit

Credits: The next version of the anno designer will contain an "about"-window with some credits. Currently I added myself for the program and deathapril for the building presets but I don't want to leave someone out. What about Grilse and Cphoenix - do you want to be mentioned as well? ;)

Factions: Putting buildings which are used by all factions under "others" is ok, but maybe call it "all" instead of "others"?

Missing building ranges?: I noticed that e.g. the coffee plantation has no influence radius set. Wtf? :)

Hierarchy: For me it would be much easier if BuildCosts and MaintenanceCosts would be grouped, i.e. "BuildCosts": { "Wood": 4, "Tools": 6 }. I haven't built in a cost summation so far but with grouped data it would be much easier. The grouping was avoided to support csv support, right? Would it be possible to generate different versions: one with grouping and one without? That would be great.

ZackSchneider (talk) 21:44, December 28, 2011 (UTC)

Factions: "others" is the name used in game files, i want to stick with it in data,, but you can rename it in your code ...
Missing data: i have no clue, default data issue probably, if i figure it out, i'll add it in v0.4
Hierarchy: would it be ok, if everything possible would be in a hierarchy? e.g.:{"buildings": {"tycoon": {"public": {"casino": {"GUID": 12345, "BuildCosts": {"Iron": 10, ..}, ..}, ..}, ..}, ..}}
GitHub: i am home after family visits, i'll commit v0.3 later today ;)
v0.4: i just installed Skyrim, so next versions might come later than expected..
--deathApril 15:08, December 30, 2011 (UTC)

Factions: Ok, if thats from the game data keep it.

Hierarchy: No, please don't do that, because there are multiple ways the data may be grouped. Currently I can decide by which properties I want to group. If you group it I must read it that way and re-group it if I want to change it. I played around with groupings by faction, group and template. Maybe I'll even want to add an option for that later.. The maintenance and build costs are different, there is only one way to group them which totally makes sense to do ;)

Have fun playing Skyrim :D

ZackSchneider (talk) 15:40, December 30, 2011 (UTC)

Icon Map: Amazingly, Second Cup's wireless seems to have borked my perfectly good installation of git on my laptop. Without internet I haven't had a chance to fix it. (When I am connected, I'm busy administrating a family business system. BAH!) I'll get that completed icon map out soon, I hope. Maybe when I'm back home. Assuming it doesn't explode in my face...
--Cphoenix (talk) 22:01, December 30, 2011 (UTC)

Dec 31 - Jan 03Edit

GitHub: ok, v0.3 upload to github won't work correctly for BuildBlocker.* because i need to figure out how to upload all the iso files to rda folder (without all the other big graphics files that are in the same folders) {C --deathApril 02:42, December 31, 2011 (UTC)

.ifo: i'll try to extract all ifo files to 1 directory "ifo_files" and save it in rda on github - anyone against this approach?
--deathApril (talk) 13:42, December 31, 2011 (UTC)

I'm against you doing something for the wiki and 2070 community on new year's instead of using it as an excuse to drink heavily. That's all. --Cphoenix (talk) 20:16, January 2, 2012 (UTC)
word. ZackSchneider (talk) 14:08, January 3, 2012 (UTC)

Jan 19 - 26Edit

Wishlist: what features for v0.4 would you like to see? > I'll put build and maintenance costs into hierarchy (for easier listing) + try some debugging for missing data (probably default values) ... --deathApril (talk) 14:26, January 19, 2012 (UTC)

I won't be able to work on the anno designer for a while, but building and maintenance cost summation would definately be the next thing I would go for. ZackSchneider (talk) 17:29, January 23, 2012 (UTC)

Searchable buildings: I just created searchable.html - a jquery prototype for searchable building lists. Later versions should display / search by building properties (size, unlock level, ...). I suggest to use something like this in layout tools + if it could be implemented on wiki it would be superb for production chains, layouts, academy research, ... --deathApril (talk) 18:00, January 25, 2012 (UTC)

Discussion at: Forum:Wiki_-_JQuery_Searchable_Buildings --Cphoenix (talk) 05:36, January 26, 2012 (UTC)

Mar 28 - xxEdit

v0.4: list_of_buildings_v0.4.json (model_v0.4.json, list_of_buildings.py) - multilingual support, game version 1.04 (Patch 5, 26.3.2012), hierarchical structure (["Production"]["Product"]["Localisation"]["eng"] instead of ["Production.Product.Eng"]), ...

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.