patchFreeciv - Patches: patch #3361, Support web-links in helptexts

Show feedback again

patch #3361: Support web-links in helptexts

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Tue Jul 3 22:32:31 2012  
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Mon May 26 15:04:22 2014, comment #6:

One of the things I want to do with this is to improve the situation for ruleset entities who have a relationship linked by unit flags, tech flags or similar -- potentially a many-to-many relationship.

Currently, if some building enables units with a particular flag or property, when autogenerating help we've an unsatisfactory choice:

  • list all units with the flag (potentially an unreadably long list)
  • a cop-out like "Settlers and similar units" leaving the player to guess what 'similar' means
  • explicitly saying "units with the 'AirUnit' flag"; the flag name may not be intended for human eyes or translateable, and players have to scrub through all the units to find out which ones have the 'AirUnit' flag.

We currently use a mix of these.

If we had hyperlinks, the unit flag name could be a hyperlink taking you to a report which lists all the units which have flag, and possibly other entities to which it's relevant. Same goes for anything that divides entities into sets (unit classes, tech flags, etc).

Jacob Nevins <jtn>
Project Administrator
Thu Jul 18 17:50:20 2013, comment #5:

I've found: and

J. M. Gorbach <gorb>
Sun Jul 15 13:39:52 2012, comment #4:

Yes, BBcode or similar is about the level of markup we need.

I doubt we'd import code to do it (especially not .NET/C#/C++ code), I'm mostly looking for ideas.

Of course we already have our own minilanguage, the "featured text" used in the chatline. But the emphasis is slightly different from what we need for the help (we won't need colour or links to specific units, for instance).

Another requirement I forgot:

  • bulletted lists
Jacob Nevins <jtn>
Project Administrator
Fri Jul 6 19:06:10 2012, comment #3:

Maybe this library is useful:

J. M. Gorbach <gorb>
Fri Jul 6 16:46:11 2012, comment #2:

Perhaps there could be a backport of bbcode to C99? Looking at I see that there are .NET and C# implementations one of those could possibly be ported quite easily. As I read though, it seems that it functions by transforming to html. It's more of a security feature to avoid arbitrary code. Implementing a reasonable subset for our own purposes should pretty straightforward. Also, many people already know it that aren't programmers.

Zakri Kneebone <i1abnrk>
Thu Jul 5 21:30:10 2012, comment #1:

I've been thinking for a while that I'd like some sort of markup language for the help system. It's a big project, though.

My initial thoughts on requirements:

  • Deliberately simple. Not HTML+CSS, I don't want Freeciv dependent on something that heavyweight, and it's overkill for us.
    • If there's an existing deliberately-simple markup that's about the right shape, we can use it, but I suspect we'll end up inventing our own.
  • Supports simple formatting (bold, italic, headings)
  • Supports hyperlinks
    • Both within the help system ("see the section on Terrain") and external. Latter is easier.
  • Some way of including some kinds of images
    • For instance, the help on cities could really use a city map. Ideally it would be rendered on the fly with the current tileset, but it's hard to see how to do that in a ruleset-independent way, so it'll probably have to be a screenshot.
  • (Simple) tables
  • GUI-independent (drives simplicity requirement -- capabilities need to be subset of intersection of what's easily achievable with all current and likely GUIs)
    • Should be renderable to cheesy ASCII fallback, giving output not too far from what we have now, so we don't have to upgrade every client at once (or ever, so we're not restricted by for example what's easy to implement in Xaw or SDL)
Jacob Nevins <jtn>
Project Administrator
Tue Jul 3 22:32:31 2012, original submission:

In recent discussion it was proposed that nation legends should have links to relevant wiki pages. Now it's also requested that helptexts (of techs) could contain links.

Another place where I'd want to see clickable links supported is server connectmsg dialog. Back when I run public server on, my connectmsg had URL to usage instructions (of modpack in use - most importantly where to get compatible tileset for your client), but one had to copypaste it manually to web browser.

Marko Lindqvist <cazfi>
Project Administrator


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by gorb (Posted a comment)
  • -unavailable- added by i1abnrk (Posted a comment)
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup