Jump to content
Eternal Lands Official Forums
frazierj

Global Encyclopedia Links

Recommended Posts

Everywhere an item occurs (in storage/inventory, in the map), there should be a direct way to see appropriate encyclopedia article. How does that sound? Would it be too hard to implement?

 

Thanks, I love the game,

frazierj

Share this post


Link to post
Share on other sites

It doesn't sound like such a bad idea. IMO the encyclopedia can be more organised visually and since it isn't, a link would be quite helpful (for the newbs mostly). But links tend to get out of hand, and when half a sentence is filled with underlined-links, it doesn't look very appealing. :D

Share this post


Link to post
Share on other sites

If the encyclopedia was even reasonably nifty XML, this would be a lot more appealing than it sounds currently. (Current state: supported tags are <text>, <Text>, <color>, and <link>. That's it.) It'd be possible to do, but manual effort would be required.

Share this post


Link to post
Share on other sites

I could see a hotkey+click on an item in your inventory or storage open up the encyc page for it, or the idea of underlining item names and having them clickable

Share this post


Link to post
Share on other sites

Here is a possible way to do it:

http://developer.berlios.de/patch/index.ph...p;group_id=1256

 

Use shift-left click on item to open ency window for it.

It should work in inventory, storage, bag and trade windows (trade window was not tested at all).

 

Unfortunately many items cannot be found because I use name for item, that is obtained by

"look" command, and search in ency by page name. They differ often.

 

There are three possible ways to fix it:

1. Name pages in ency same way as they are called in "look" descriptions

(it would require change of many links in ency, and I think that's too hard)

 

2. Add another tag to ency, that can be used for search. (seems optimal way for me)

 

3. Write matching table (lookup name -> ency page name).

Share this post


Link to post
Share on other sites

Question is what do you expect to see in that excerpt.

Placing there recipes would make floating window too big.

 

If only name and weight - then we have "look" command for that.

Share this post


Link to post
Share on other sites

Question is what do you expect to see in that excerpt.

Placing there recipes would make floating window too big.

 

If only name and weight - then we have "look" command for that.

 

Floating window can also be with fixed position, showing on right side of inventory, store.. Could be convenient.. Was just an idea.. "Look" is imo too awkwardly done atm..

Share this post


Link to post
Share on other sites

There is space at the bottom of inventory and storage windows, where

"look" information is displayed.

Perhaps, it would be better to show it, when you just move mouse over object.

(easier than make 3-4 clicks for "look").

 

But that would require a file with information, not to overload traffic by constant lookups.

Or make a server request once and save info in a table for later use.

 

However there is problem with non-uniqueness of item image_ids.

Share this post


Link to post
Share on other sites

Nice patch :D I have a few suggestions though :blush:

 

1) Like you said, many items have a miss-match between their page name and their look up string. I did notice however, that the encyclopaedia title strings (in red) match many, many more lookup strings. So, I hacked your patch a bit and build a lookup table of page names against page titles. I search this table (by title) for matching look up strings and open the resulting page. To capture the title, the hack was to notice a red colour tag and grab the next string; which is the title.

 

2) I also wondered if a better way to open the encyclopaedia entry was to make the item name string (displayed in the window when you right click an item) a link to the encyclopaedia page. i.e. if a matching page is found, underline the string and make it open the encyclopaedia if clicked. If no page is found, don't underline the link. That way, there is no need for the error message. If you keep the error message, you really ought to make it translatable using the methods in translate.c.

 

3) I noticed the encyclopaedia closes if already open, rather than opening the new page. This can be fixed by calling display_tab_help() before setting the tab page. The open_encyclopedia_window() code could actually be moved into the find_encyclopedia_page(); as could the duplicated code in multiplayer.c (I must admit to hating duplicate code). The find_encyclopedia_page() function name ought to change if you do this. Lastly, ency_lookup should not go into global.h, rather encyclopedia.h - global.h is being abolished slowly :D

Share this post


Link to post
Share on other sites

1) Like you said, many items have a miss-match between their page name and their look up string. I did notice however, that the encyclopaedia title strings (in red) match many, many more lookup strings. So, I hacked your patch a bit and build a lookup table of page names against page titles. I search this table (by title) for matching look up strings and open the resulting page. To capture the title, the hack was to notice a red colour tag and grab the next string; which is the title.

 

This is a trick. And I believe such tricks should be avoided whenever it's possible.

However this observation can be used to make a script to modify ency, e.g. add new tag

as I've mentioned before.

Actually I think encyclopedia maintainers already have set of useful scripts and they can

easily do it (so I won't have to make a new one just for this case).

 

2) I also wondered if a better way to open the encyclopaedia entry was to make the item name string (displayed in the window when you right click an item) a link to the encyclopaedia page. i.e. if a matching page is found, underline the string and make it open the encyclopaedia if clicked. If no page is found, don't underline the link. That way, there is no need for the error message. If you keep the error message, you really ought to make it translatable using the methods in translate.c.

 

Presently by right-clicking you change type of cursor, not show any strings :D

Anyway, what you suggesting is "click - move mouse - click" to open ency vs. my one-click way.

Hence, I don't think I wish to implement this :blush:

 

3) <useful suggestions>

 

That was just a first draft :D Thank you for these remarks.

Share this post


Link to post
Share on other sites

This is a trick. And I believe such tricks should be avoided whenever it's possible.

Trick! I prefer hack, some hacks are OK, this one is dubious I admit :blush:

 

Anyway, what you suggesting is "click - move mouse - click" to open ency vs. my one-click way.

Hence, I don't think I wish to implement this :)

Using a clickable link, you avoid having to moved your hand and hold the shift key. Also, you avoid having to display an error message if no link is found (OK, eventually that will would be rare). Anyhow, it's your patch :happy:

Share this post


Link to post
Share on other sites

Well, I've updated patch:

http://developer.berlios.de/patch/index.ph...p;group_id=1256

 

1. Error message is not displayed anymore (still don't know whether it should be displayed or not).

2, When you shift-click on 3d_object or animal in the game corresponding ency page is displayed.

3. When you look or shift-click (or right-click in storage) an item and page is found, item name is

colored, underlined and can be clicked to open ency window.

 

Problems:

 

1. Item name separators currently are:

'-' for inventory lookups

'.' for gamewin lookups

tradewin doesn't use '-' and '.', so it doesn't work in trade window yet.

 

2. As '-' is separator, this code will not work for long named extracts.

3. (Unrelated to this patch) Long named extract names do not fit in trade/storage window.

Share this post


Link to post
Share on other sites

What would be nice, is if eventually, an extra icon on the bottom of the screen could be added, a question mark. You could click it on any item in sto, inv, bag, or even on the map you're on to see an appropriate encyclopedia article, if there is one.

 

Perhaps later more uses for the help tidbit could be implemented. Like, clicking it on the clock on the side shows encyc article about time or something.

 

A lot of questions newbies ask on @@1 could easily be answered by a simple click this way, clearing the channel up for more complex questions like "How do I get into alchemy?" or "Can I fight this" etc.

 

While on the topic, it would be nice if there was a way to type a "link" to an encyclopedia article, like "encyc://alchemy/fire_essence.xml". Just the way F2 goes to last http link seen, pressing F3 could now open encyclopedia to the last encyc link seen. Which makes it WAY easier to help newbies.

 

Just some ideas, I know there are tons more priorities for the devs right now, but I do think these things are in the long term good of the game.

 

Lum

Share this post


Link to post
Share on other sites

I have for a long time wanted something similar to this but moderator driven. The ability to make an encyclopedia page pop up on a player's screen, just as we can send a rule window with a specific rule to pop up.

However looking at the issues with this suggestion (which I would like in any form it could be accomplished in), I am thinking that would end up with the same difficulties with page names. :confused:

Share this post


Link to post
Share on other sites

There could be a simple text file with key<->data content.

 

For the inventory, there are the picture ID's to identify an item, except books.

 

For in game stuff there are object ID's iirc to identify objects when you click on them with the eye icon.

 

Shift-left click on something, take the corresponding picture/object ID and read that text file

 

[items}
0=<ency-link-to-coins>
1=<ency-link-to-bread>
2=<ency-link-to-that flower>
...
[objects}
101=<ency-link-to-whatever-this-object-is>
...

 

Since you know if you have a picture or an object ID, its no problem to go to the right section and search for that ID and then start the ency with the given link.

 

Ppl can even customize that text file to their needs.

 

Or make it an XML file if you prefer that. So we can have links to the ency to item/object descriptions, HOWTO's (for example, when you shift-left click on a camp fire to the HOWTO how to make fire) and so on.

 

Cool idea btw :confused:

 

Piper

Share this post


Link to post
Share on other sites

Yeah, it wouldnt be hard to implement. I see where you're coming from Aislinn, as I too have had to try to refer newbies to the encyclopedia--having them press F3 would improve things greatly.

 

And yes Piper what you said is exactly as I envision it. Simply adding a new argument to the dictionary (or map or whatever they're called in C :confused: dictionary in python..lol) would solve it. It could be shift-left click, or the question mark icon I suggested, not sure which I'd prefer, really...

 

Still this is something that should seriously be considered. It would be immensely helpful.

Share this post


Link to post
Share on other sites

@Aislinn & Lumino

Choosing between your two variants I would prefer Lumino's, because of 2 reasons:

1. Rules pop-ups have server support, adding same thing for encyclopedia will require

Entropy's work.

 

2. In general, I don't like when something can pop-up on my screen without my control.

 

About link names: as nobody posted here as ency maintainer I guess there is no such people,

therefore I'll do something about it myself.

 

I see this kind of scenario:

1. Newbie asks question.

2. Aislinn open ency on a certain page, copies link (that will be displayed in ency window) and sends

it to Newbie.

3. If Newbie wants, he/she can press F3 and open ency on that page.

 

@The_Piper

As you said yourself image_ids are not unique, so I can't understand how are you going to use them?

object_id are id of the object on a map, not it's type (e.g. different sapphires have different object_ids).

 

There is also filename for 3d_object that tells how does it look...

However I don't like the idea of adding another file at all, we can include it in ency files.

Share this post


Link to post
Share on other sites

2. In general, I don't like when something can pop-up on my screen without my control.

Which is why it would be for moderators only. That way the only reason a page would pop up on somebody's screen is if they asked for the information in the first place. The idea for my suggestion is not to take the place of this current suggestion but in addition to, since either way the page ID's would have to be reworked.

 

About link names: as nobody posted here as ency maintainer I guess there is no such people,

therefore I'll do something about it myself.

That would be Theryndan, he may not have seen this thread.

 

I see this kind of scenario:

1. Newbie asks question.

2. Aislinn open ency on a certain page, copies link (that will be displayed in ency window) and sends

it to Newbie.

3. If Newbie wants, he/she can press F3 and open ency on that page.

I would be happy with this choice, but I would prefer mods be able to force the screen to show in addition to this. Again, this would not be for the random user or unless it was necessary. And it would be "in addition to" not instead of.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×