Open gunchleoc opened 5 years ago
(by sirver) I added some new stuff. Please check it out and comment. Look for example here:
http://wl.widelands.org/help/empire/buildings/
or an explicit example:
(by philiptruax) I like the main page with all the buildings , but I am not sure of a need for a more detailed page from a user perspective. Maybe some anchors to jump to sections from the top, but a page for each item is a lot of work for what could be a little usage.
Are descriptions going to be automatically loaded or will they need to be manually entered one this is set up? I can do the grunt work if it is going to need to be manually entered.
(by fakeuserxxxx-deactivatedaccount) I am planning to start working on this once again in a few weeks, so I'll try to explain: Since it's all automatically generated, no, nothing will be entered manually. Thus everything is obtained from the bzr repositories (so it's always the latest information, not from builds). The page for each ware/building/worker is a graph, linking to dependencies and uses of the object. I've got a few things regarding this on my todo list, and I'll try to keep track of it (once I start the work) on the blueprints whiteboard.
(by sirver) looking forward to seeing this advanced, soeb ;)
(by fakeuserxxxx-deactivatedaccount) I finally got around working on this. You can see the progress in the branch, though I might not push things as soon as I have them done.
(by sirver) please inform us when you think your work is ready for merger. I probably want have time to track all your changes over time. :(
(by fakeuserxxxx-deactivatedaccount) I'll suggest a merge and eventually write about it here once I'm done.
(by franku) No assignee -> no "In progress" status...
(by franku) What especially is missing here? Except https://bugs.launchpad.net/widelands-website/+bug/672286 ?
I think the encyclopedia is fine right now, isn't it?
(by sirver) All images are broken it seems: https://wl.widelands.org/encyclopedia/barbarians/ https://wl.widelands.org/encyclopedia/barbarians/buildings/
Economy network yields 404 on here: https://wl.widelands.org/encyclopedia/barbarians/
That is all I could find for now.
(by franku) Yes, sorry i have noticed the broken images and economy network also. This is fixed and should be fine tomorrow, or when the django_regular_commands cron script went over it.
I mentioned this also on IRC so i thought this get noticed.
(by franku) I think what's missing are the changes reflecting 'one Tribe'. E.g. on the index page should be a link to 'wares', maybe sorted like we have in the in game inventory window.
Instead having only the three tribes in the index, there could be a indented list and omit the intermediate pages for each tribe (e.g. https://wl.widelands.org/encyclopedia/atlanteans/) The index page looks then like this:
Atlanteans, This tribe is known from the oldest tales. The sons and daughters of Atlantis. Buildings Wares Workers Economy Network as PDF Economy Network as GIF
Barbarians Buildings Wares Workers Economy Network as PDF Economy Network as GIF
Empire ....
Wares Food (equal for all tribes), Atlantean specific, Barbarian specific, Empire specific Building materials (equal for all tribes), Atlantean specific, Barbarian specific, Empire specific Metal (equal for all tribes) Tools (equal for all tribes) Warefare (equal for all tribes), Atlantean specific, Barbarian specific, Empire specific
What do you think?
(by gunchleoc) Sounds good to me - the extra wares big on the bottom might become interesting once we have trading, I don't know how much info it will add at this point - if we want to categorize, the wares lists might be the better place for it. Expanding the index will save players a couple of mouse clicks though.
(by franku) First attempt of a rework of the front page of https://wl.widelands.org/encyclopedia/
(by gunchleoc) Screenshot LGTM :)
(by franku) I have implemented some links/anchors related to buildings which could be enhanced. In the screenshot shown with red arrows: Clicking on one of the Links "Could be enhanced to/from: " moves the view to the corresponding Building.
The yellow marks show one missing feature: Buildcost of enhanced buildings aren't there. They are also missing in the corresponding json files.
I am thinking of a possibility to sort/filter the buildings by type (Military, Production, Warehouse and so on). But sorting by 'Military' may lead into confusion, because some buildings of type 'production' could also be seen as 'military'. E.g. the Axfactory or the Barracks which are both of type 'production'.
(by gunchleoc) I could add the enhancement costs to the JSON files without much trouble. Do you also want dismantle returns?
The categorization doesn't have engine support at all yet. We would need a new "category" entry in the Lua files.
(by franku) I think it would good to have as much information as possible in the json files. There are some more things missing, e.g.
Those information is already partly used in the in game help, so may it is probably better to retrieve them from there?
All in all this is double work... once for the in game help and on time for the website. I am not sure if it is worth the work for the website though (beside the fun of implementing ;) )
(by gunchleoc) Yes, it is double work, because the representation is completely different. We could change the Widelands engine format from Lua to JSON, but the Lua is easier to read and much more forgiving than JSON, so I'm not a fan for that - it would make Widelands harder to mod.
(by franku) I have added now a filter to buildings, so one could filter by size and type. May this helps for a decision if double work is worth the work.
(by sirver)
Yes, it is double work, because the representation is completely different. We could change the Widelands engine format from Lua to JSON, but the Lua is easier to read and much more forgiving than JSON, so I'm not a fan for that - it would make Widelands harder to mod.
Another solution could be boost.python[1]. It would allow us to add Python wrappers for the Engine data classes (probably mostly the *Descr classes) and build them into a shared library that can be loaded from Python directly. This would mean that the website and the engine use the same code to parse the data files, which is obviously ideal.
Coding wise this is pretty easy and little work, the tricky part would be to explain add the changes to the cMake files I think.
[1] http://www.boost.org/doc/libs/1_63_0/libs/python/doc/html/index.html
(by gunchleoc) Ah, so a Python interface like we have a Lua interface? Sounds like a good idea.
(by franku) So the python library give access to the same data as we have in game... sounds good to me. Currently i don't know where the python library would live, but i guess this is what SirVer had meant with the cMake thing.
Till then, i would like to merge the linked branch. I think it is a really nice feature.
The branch is merged on alpha, so you could test it. Go to
http://alpha.widelands.org/encyclopedia/
open the buildings of a tribe and try to set some filters. Note that there are also some links to/from enhanced buildings in the column "Description" :-)
(by gunchleoc) Very nice indeed :)
Some nits:
Could be enhanced -> Can be enhanced
If you filter yourself an empty list, the dark background doesn't drop below the "Update" button, leaving the second line of filter with white text on a light background.
I have been thinking about the Python thing some more - at the moment, the added benefit we would get is the pre-parsed help windows. Our richtext isn't compatible with HTML though, so I guess this will make more sense once the switchover to the new font renderer is finished, because we can make our rt syntax look like HTML then. For anything else, it doesn't matter if the work is to add it to the JSON files or to a Python interface - properties will still need to be added. So, IMO not worth the extra coding effort yet.
(by franku) Fixed the things you mentioned, merged the branch and deployed it.
Let's wait until the font renderer is finished then :-)
(by franku) Similar to the buildings where we have "Can be enhanced to:" if have implemented the same thing for the workers.
(by gunchleoc) Looks good! :)
"Became of" doesn't sound right though, let's just stick to "enhanced from"? That's our terminology that we use everywhere, so I see no need to try to come up with some world-immersing phrase here.
Currently, the autogenerated online help is next to useless. Work on this. The corresponding django app is wl-help.
Imported from Launchpad using lp2gh.