the online-help shoud be enhanced

Bug #336021 reported by SirVer
4
Affects Status Importance Assigned to Milestone
Widelands Website
Won't Fix
Low
kaputtnik

Bug Description

Currently, the autogenerated online help is next to useless. Work on this. The corresponding django app is wl-help.

Tags: encyclopedia

Related branches

SirVer (sirver)
Changed in widelands-website:
status: New → Confirmed
importance: Undecided → Low
Changed in widelands-website:
assignee: nobody → soeb
status: Confirmed → In Progress
Revision history for this message
SirVer (sirver) wrote :

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:

http://wl.widelands.org/help/empire/buildings/toolsmithy/

SirVer (sirver)
Changed in widelands-website:
status: In Progress → Confirmed
Revision history for this message
ptruax (philiptruax) wrote :

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.

Revision history for this message
Fake Name (fakeuserxxxx-deactivatedaccount) wrote :

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.

Revision history for this message
SirVer (sirver) wrote :

looking forward to seeing this advanced, soeb ;)

Revision history for this message
Fake Name (fakeuserxxxx-deactivatedaccount) wrote :

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.

Changed in widelands-website:
status: Confirmed → In Progress
Revision history for this message
SirVer (sirver) wrote :

please inform us when you think your work is ready for merger. I probably want have time to track all your changes over time. :(

Revision history for this message
Fake Name (fakeuserxxxx-deactivatedaccount) wrote :

I'll suggest a merge and eventually write about it here once I'm done.

Changed in widelands-website:
assignee: Stanisław Gackowski (soeb) → nobody
kaputtnik (franku)
tags: added: encyclopedia
Revision history for this message
kaputtnik (franku) wrote :

No assignee -> no "In progress" status...

Changed in widelands-website:
status: In Progress → Confirmed
Revision history for this message
kaputtnik (franku) wrote :

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?

Revision history for this message
SirVer (sirver) wrote :
Revision history for this message
kaputtnik (franku) wrote :

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.

Revision history for this message
kaputtnik (franku) wrote :

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?

Revision history for this message
GunChleoc (gunchleoc) wrote :

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.

kaputtnik (franku)
description: updated
Revision history for this message
kaputtnik (franku) wrote :

First attempt of a rework of the front page of https://wl.widelands.org/encyclopedia/

kaputtnik (franku)
Changed in widelands-website:
assignee: nobody → kaputtnik (franku)
Revision history for this message
GunChleoc (gunchleoc) wrote :

Screenshot LGTM :)

Revision history for this message
kaputtnik (franku) wrote :

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: <link>" 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'.

Revision history for this message
GunChleoc (gunchleoc) wrote :

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.

Revision history for this message
kaputtnik (franku) wrote :

I think it would good to have as much information as possible in the json files. There are some more things missing, e.g.
- Helptext for Gold/Iron Ore: https://wl.widelands.org/encyclopedia/empire/wares/
- Icons for 'Attack', 'Evade', 'Defense' and so on to get proper displaying of Trainingssites (currently a trainingsite "produce" Soldiers :-D )
- Information which building of which tribe do what kind of soldier upgrading
- Information which is mentioned in the other bug: What weapon/armor is used to get which upgrade of a soldier

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 ;) )

Revision history for this message
GunChleoc (gunchleoc) wrote :

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.

Revision history for this message
kaputtnik (franku) wrote :

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.

Revision history for this message
SirVer (sirver) wrote :

> 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

Revision history for this message
GunChleoc (gunchleoc) wrote :

Ah, so a Python interface like we have a Lua interface? Sounds like a good idea.

Revision history for this message
kaputtnik (franku) wrote :

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" :-)

Revision history for this message
GunChleoc (gunchleoc) wrote :

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.

Revision history for this message
kaputtnik (franku) wrote :

Fixed the things you mentioned, merged the branch and deployed it.

Let's wait until the font renderer is finished then :-)

Revision history for this message
kaputtnik (franku) wrote :

Similar to the buildings where we have "Can be enhanced to:" if have implemented the same thing for the workers.

Revision history for this message
GunChleoc (gunchleoc) wrote :

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.

Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands-website:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.