Fandom

Anno 2070 Wiki

Icon Naming Convention

421pages on
this wiki
Add New Page
Comments0 Share

Dev Page | < Development Pages

split from JSON_Building_Properties

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)

18-Dec-2011Edit

First off, I suggest we forget about supporting the current icon names on the wiki. CPhoenix-bot is up and running. Wikia Staff gave it the bot and admin flags today. (Yay!) With this, I can (more or less) easily replace all of the references to files wiki-wide. (Of course new images will have to be uploaded and the old ones deleted. Most of that can be automated with pywikipedia too.)

Your naming looks pretty good so far DeathApril. Once we have a complete set correctly renamed images, I can update the wiki.

I'd suggest going with IconWikiaFile= 'Eng1' + '.png' , and then dealing with the incorrect addition of extra filenames that should all equate to only one IconFileName. Here are some snippets from the JSON to try to illustrate:

{
  "Eng1": "Destroyed Pirate Cannon",
  "IconFileName": "icon_27_199.png",
},
{
  "Eng1": "Destroyed Pirate Base",
  "IconFileName": "icon_27_199.png",
}

For these, what to do?

Name, and .ifo are not suitable since they have even more duplicates. (Depots and Warehouses all have three entries, but each one uses the same icon file. While Eng1 stays constant, Name and .ifo change for each level of depot or warehouse.)

In simpler terms, for any object with "IconFileName": "x" , it must have "IconWikiaName": "x" . Period.


Anywho, as long as these wacky duplicates are handled right, we should be good. I suspect that in the end some manual tweaking of values will be required regardless, to make the icon names on the wiki intelligible. Whatever the end result here is, the icon names used on the wiki need to be easily understandable by anyone editing it. e.g. the current "Wood.png" shouldn't get changed to "Sawmill.png", or worse, "Sawmill.png" and "Wood.png".

--Cphoenix (talk) 03:53, December 18, 2011 (UTC)

19-Dec-2011Edit

The duplication/redundancy problem is even worse and more annoying at JSON academy research projects. Maybe we can just upload the user-unfriendly icons, and use them for now. It'd let us turn this data into wiki template calls with less pain for now. (Adding nice human-friendly names can be done later at our leisure.) --Cphoenix (talk) 03:41, December 19, 2011 (UTC)

Hm, I don't like the idea of having 700 icons with non-descriptive names on this wiki. That would mean that it'd be practically impossible for humans to maintain them.
I'd rather create and maintain a mapping from numbered filenames to (descriptive) Wikia filenames. I think we can come up with a meaningful filename (and only one filename) for each icon. Example:
 icon_27_4.png   -> Fish.png
 icon_27_133.png -> Rice.png
 icon_27_12.png  -> Coal-power-stn-icon.png
 icon_30_0.png   -> Coal-power-stn-monochrome.png
This mapping need not be complete. Icons that aren't used on the wiki don't have to be named.
This way scripts can automatically generate template calls by using this mapping. It also remains feasible for humans to use the icons. --Grilse 04:00, December 19, 2011 (UTC)

I agree. That's easily the best solution to the issue. I'm still doubtful that such a map can be generated completely by a script, given what data is there so far, as DealthApril seems to want to do. But hey, what do I know? :-p --Cphoenix (talk) 04:11, December 19, 2011 (UTC)

I have created a stub of this mapping at https://github.com/odegroot/Anno-2070-data-extraction/blob/master/src/json/icon_name_map.json --Grilse 19:24, December 19, 2011 (UTC)

That's along the lines of what I was thinking as well. A single dict like that would work quite well. I'm flying home in a couple days, and since it's not like I'll have much else better to do on the plane, I can start adding to it. That you nested the data as it's own key/value is nice too. --Cphoenix (talk) 21:41, December 19, 2011 (UTC)

So, I'll try to outline how I envision this happening in these scribblings, relative to the wiki:

  1. Complete icon_name_map.json so that it has a value for all icon_xx_x.png files.
  2. Use icon_name_map.json to rename all files.
  3. Upload all files to the wiki (CPhoenix-bot).

--Cphoenix (talk) 22:55, December 19, 2011 (UTC)

20-Dec-2011Edit

Oh, I've actually done quite a bit a of work using a slightly different approach.
  1. Use the incomplete icon_name_map.json to automatically generate wikitext.
  2. When I encounter an icon that I'd like to use, but isn't listed, I add an entry to the JSON. If required, I also upload it to the wiki manually and add it to Icons.
The JSON is useful even if it isn't complete. In fact, it doesn't have to ever be complete. (Should I start a new day-section for this?) --Grilse 22:13, December 20, 2011 (UTC)

Well I'm offering to do it because I'll have the time. I fly out soon, and I can work on adding entries (wrote a short function to help me with the task last night :) ). If the file is complete, that's one less thing that everyone needs to think about when using these icons. Still new to git, but I'm guessing it might be smart to fork this to a new branch for me to work on while I'm incognito. --Cphoenix (talk) 23:00, December 20, 2011 (UTC)

Very true. It would be very helpful if you did that. --Grilse 23:13, December 20, 2011 (UTC)

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.