Jump to content

0 A.D's Built-in Encyclopedia


Lion.Kanzen
 Share

Recommended Posts

  • 2 weeks later...

Big news regarding the encyclopedia page!

New features:
- the ability to put images in the article header. I decided to place the images to the top right and the title to the top left. This saves a lot of space compared to other possibilities and it looks good with images of most aspect ratios. But I will talk more in depth about the implementation in a future post.
- the ability to add subtitles. They are fully optional, but really enhance the header's visual appeal (in my opinion).
- a button below the title that opens up the the template viewer showing the unit's in-game stats. Its portrait is embedded into the button, so players can visually recognise the unit from in-game as well.
- buttons to directly switch to the next or previous article in the same subcategory (to the suggestion of @nifa)
They currently do not include any text as I think the arrow sprites are enough of a hint as to what the buttons do.

Here is a quick showcase:

 


Other improvements:
- fixed GUI scaling on lower screen resolutions (down to 1024x768). This turned out as quite a hassle, but it had to be done eventually. I haven't tested it on large screens (yet), mainly because they usually don't cause problems. If you notice any problem with the GUI scaling, let me know.

 

As always I packed it into a mod, please try it out, any feedback is welcome!

encyclopedia.zipFetching info...

 

(unfortunately I have not yet managed to resolve the issue with the crashes, I recommend trying to open it multiple times and supressing the error, if you notice any patterns or have any idea on how to resolve it, please let me know)

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

  On 02/07/2024 at 9:51 PM, Vantha said:

Big news regarding the encyclopedia page!

New features:
- the ability to put images in the article header. I decided to place the images to the top right and the title to the top left. This saves a lot of space compared to other possibilities and it looks good with images of most aspect ratios. But I will talk more in depth about the implementation in a future post.
- the ability to add subtitles. They are fully optional, but really enhance the header's visual appeal (in my opinion).
- a button below the title that opens up the the template viewer showing the unit's in-game stats. Its portrait is embedded into the button, so players can visually recognise the unit from in-game as well.
- buttons to directly switch to the next or previous article in the same subcategory (to the suggestion of @nifa)
They currently do not include any text as I think the arrow sprites are enough of a hint as to what the buttons do.

Here is a quick showcase:

 


Other improvements:
- fixed GUI scaling on lower screen resolutions (down to 1024x768). This turned out as quite a hassle, but it had to be done eventually. I haven't tested it on large screens (yet), mainly because they usually don't cause problems. If you notice any problem with the GUI scaling, let me know.

 

As always I packed it into a mod, please try it out, any feedback is welcome!

encyclopedia.zip 14.5 MB · 1 download

 

(unfortunately I have not yet managed to resolve the issue with the crashes, I recommend trying to open it multiple times and supressing the error, if you notice any patterns or have any idea on how to resolve it, please let me know)

Expand  

It. Looks. AMAZING!!!

So what are the next steps? Fix the bug then convert previous articles, then merge? Or should we do a hybrid. Fix bug, merge, work converting articles and add them directly to game?

On one hand, we might not want to ship something uncompleted.

 

On the other hand, this is an open source project. (Joke, don't hit me!)

Also, it might be easier to figure out where all the files go in the main game with only a few articles than a billion.

  • Like 1
Link to comment
Share on other sites

  On 02/07/2024 at 10:50 PM, ShadowOfHassen said:

It. Looks. AMAZING!!!

So what are the next steps? Fix the bug then convert previous articles, then merge? Or should we do a hybrid. Fix bug, merge, work converting articles and add them directly to game?

On one hand, we might not want to ship something uncompleted.

 

On the other hand, this is an open source project. (Joke, don't hit me!)

Also, it might be easier to figure out where all the files go in the main game with only a few articles than a billion.

Expand  

That's phantastic! Although yet no fully completed,  I'd vote for including it into the mod.io or even SVN as part of vanilla version so everyone can get inspired.. Excellent job! Well done!

  • Like 1
Link to comment
Share on other sites

  On 02/07/2024 at 10:50 PM, ShadowOfHassen said:

It. Looks. AMAZING!!!

So what are the next steps? Fix the bug then convert previous articles, then merge? Or should we do a hybrid. Fix bug, merge, work converting articles and add them directly to game?

On one hand, we might not want to ship something uncompleted.

 

On the other hand, this is an open source project. (Joke, don't hit me!)

Also, it might be easier to figure out where all the files go in the main game with only a few articles than a billion.

Expand  
  On 03/07/2024 at 7:16 AM, Grautvornix said:

That's phantastic! Although yet no fully completed,  I'd vote for including it into the mod.io or even SVN as part of vanilla version so everyone can get inspired.. Excellent job! Well done!

Expand  

I suggest we add the page to the game now (after fixing the bug), but only with selected articles for testing. The review process will take a lot of time anyway and in parallel we can already "customize" the rest of the articles (adding images, subtitles, links to other articles, etc.). And as soon as the page framework is merged we can add the bulk of articles to the game too. I don't think incompletion is be something to worry about in this case, since the page framework is indeed complete and we can simply remove the button from the main menu as long as it doesn't contain all the articles to prevent players from finding a (seemingly) incomplete and empty page in a full release. And the existence of temporarily unused files in 0ad's code wouldn't be anything new either. Howevere, I will talk to some developers and adapt to what they deem best.

 

  On 03/07/2024 at 12:22 AM, guerringuerrin said:

This is awesome! Is this actually working? I tried installing it on my a26 version but the button didnt appear at the main menu

Expand  

I made the mod for the latest version, but it should be working with A26 (except the unit portraits) as well. Have you verified the mod is installed properly? Does anyone else face the same issue?

You can try opening the javascript console with the assigned hotkey (per default '^' and F9) and entering the following command:

Engine.SwitchGuiPage("page_encyclopedia.xml");
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  On 03/07/2024 at 11:10 AM, Vantha said:

I suggest we add the page to the game now (after fixing the bug), but only with selected articles for testing. The review process will take a lot of time anyway and in parallel we can already "customize" the rest of the articles (adding images, subtitles, links to other articles, etc.). And as soon as the page framework is merged we can add the bulk of articles to the game too. I don't think incompletion is be something to worry about in this case, since the page framework is indeed complete and we can simply remove the button from the main menu as long as it doesn't contain all the articles to prevent players from finding a (seemingly) incomplete and empty page in a full release. And the existence of temporarily unused files in 0ad's code wouldn't be anything new either. Howevere, I will talk to some developers and adapt to what they deem best.

 

I made the mod for the latest version, but it should be working with A26 (except the unit portraits) as well. Have you verified the mod is installed properly? Does anyone else face the same issue?

You can try opening the javascript console with the assigned hotkey (per default '^' and F9) and entering the following command:

Engine.SwitchGuiPage("page_encyclopedia.xml");
Expand  

So the way I see it we should proceed like this 

 

1. Fix bug 

2. add engine code (with minimal articles to mainline 

3 add the rest of the articles  directly to svn

4 finish writing articles and adding them to svn (or git if it shows up first 

  • Like 1
Link to comment
Share on other sites

  On 03/07/2024 at 1:12 PM, wowgetoffyourcellphone said:

Looks nice. Make sure that hoplite image is CC0 or CC-BY-SA or equivalent. :)

Expand  

I figured we could start with images from Wikipedia . I'm pretty sure their pictures are in CC in some way.

 

  On 03/07/2024 at 1:12 PM, wowgetoffyourcellphone said:

I would quibble with the organization of the articles, but I'm not going to criticize too hard given the good amount of progress shown here. Carry on my wayward sons!

Expand  

If you have a suggestion, tell us! The only way we can get better is if people tell us what we do wrong (or even what they disagree with)

  • Like 1
Link to comment
Share on other sites

  On 03/07/2024 at 12:53 PM, ShadowOfHassen said:

So the way I see it we should proceed like this 

 

1. Fix bug 

2. add engine code (with minimal articles to mainline 

3 add the rest of the articles  directly to svn

4 finish writing articles and adding them to svn (or git if it shows up first 

Expand  

Yes, exactly.

 

  On 03/07/2024 at 1:12 PM, wowgetoffyourcellphone said:

I would quibble with the organization of the articles, but I'm not going to criticize too hard given the good amount of progress shown here. Carry on my wayward sons!

Expand  

The structure of the encyclopedia is not very hard change codewise. And as ShadowOfHassen said, we're more than open to suggestions!

Edited by Vantha
  • Like 2
Link to comment
Share on other sites

  On 03/07/2024 at 1:44 PM, Vantha said:

The structure of the encyclopedia is not very hard change codewise. And as ShadowOfHassen said, we're more than open to suggestions!

Expand  

Well, not to beat a dead horse, but my suggestions have already been made with crafted mockups. Whether you heed them or not is up to you. :)

 

I do like the unit stats popup instead of putting it all in the encyclopedia page as in my mockup. Nice. We'll just need to improve that popup sometime in the future too (and of course I have a mockup for that too).

  • Like 1
Link to comment
Share on other sites

  On 03/07/2024 at 3:40 PM, wowgetoffyourcellphone said:

Well, not to beat a dead horse, but my suggestions have already been made with crafted mockups. Whether you heed them or not is up to you. :)

Expand  

Well, it's not too different from the current system, is it? What is it in particular that's bothering you?

 

  On 03/07/2024 at 3:40 PM, wowgetoffyourcellphone said:

We'll just need to improve that popup sometime in the future too (and of course I have a mockup for that too).

Expand  

Yes, I know! That has been on my radar for quite some time. It is way better structured and more visually appealing than what we currently have. And I plan to implement it sooner or later.

  • Like 2
Link to comment
Share on other sites

I will submit a diff for the encyclopedia page soon. And while it's getting reviewed, we will start with the process of "customizing" the articles - adding titles, subtitles, images, related articles, references to xml templates, and some formatting to the text contents itself. There is a ton to say about the features' implementation and what to pay attention to. I tried my best to lay out the information as logically as possible and I'm open to explaining it further, if anything is unclear:

  Reveal hidden contents

 

  • Like 1
Link to comment
Share on other sites

  On 02/07/2024 at 9:51 PM, Vantha said:

- buttons to directly switch to the next or previous article in the same subcategory (to the suggestion of @nifa)
They currently do not include any text as I think the arrow sprites are enough of a hint as to what the buttons do.

Expand  

Great work! That's exactly how I imagined it, thanks for your effort:) It looks really nice. cherry on top would be the possibility to use the keyboard for navigation:D

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  On 05/07/2024 at 3:08 PM, nifa said:

Great work! That's exactly how I imagined it, thanks for your effort:) It looks really nice. cherry on top would be the possibility to use the keyboard for navigation:D

Expand  

Thanks.

Yeah, adding hotkeys for certain actions is definitely something I should (and will) be looking into in the future.

  • Like 3
Link to comment
Share on other sites

So because we're going to start adding articles to mainline, (as soon as @Vantha gets the amazing new UI) there are a few things I'd like to discuss/ask.

First translating. I'm assuming it is just the community translates it? , will the new places we're putting the articles be able to be translated, and second how is translation done, and is there a set of guidelines because I think for anything not American English we can get rid of the US customary measurements, and I'd like the translators to know that.

Second. I know for a project like this, we have reviewers for code, art and even music, and I think we should have the same thing for large portions of text in game. Between @Vanthaand I we've put a lot of work into the encyclopedia so far, and I'd like to try and get the same quality of writing in the rest of the game. It would be great if whenever there's a patch with anything bigger than a tooltip, the devs could let me know, so I can give it a look and wait until we can get the text right before merging. Editing and in game text might not sound that important compared to art, code, or gameplay, but I'd still like to get it the best we can.

Besides, with rumblings of new tutorials, campaigns, and the like; someone to coordinate the narrative/writing side of things will help the devs time to be focused on things they are more interested in.

Edited by ShadowOfHassen
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...