Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Roja

Making knowledge books readable

Recommended Posts

I would like to make the knowledge books readable, like the 3d obj. books in the libraries.

The reason is because i'd like to offer real life knowledge on as much of the skills as possible.

 

This can also lead to making some skill tests in the game, where you'd have to asnwer a series of multiple choice questions(all info would be in the books particular to that subject), if you get them all right, you get a big prize (lots of exp or a cool weapon or item).

 

knowledgebooks.jpg

 

We'd write book .xml files and place them in the books folder.

In the game, you'd just click on that book icon or text as shown in the shot above, and you'd get the open book graphic with the book's text on it.

Share this post


Link to post
Share on other sites

What should be done about the not so real life items (like Potion of Body restoration)?

 

Maybe we should highlight the real life knowledge books with a symbol or something (like: *).

Share this post


Link to post
Share on other sites

Good idea Derin, in fact, we can just make a disclaimer at the bottom, or note at the top or something:

 

"Described here is a factual real life process. The actions for it have been shortened in the game to speed up gameplay however."

 

Because what is in the books is real, but what you do in the game most likely never will be.

Share this post


Link to post
Share on other sites

Note: All information with a (*) denotes real information about real _____.

Any information that does not contain a (*) is fantasy based.

Share this post


Link to post
Share on other sites

Is there a client programmer who can work on this? I'd like to have it done soon as we have some plans for the books :icon13:

Share this post


Link to post
Share on other sites

Is there a client programmer who can work on this? I'd like to have it done soon as we have some plans for the books :)

I can put my hand up for this. I have a fair amount of prorgamming experience, but I'm not a C guru and I haven't looked at the client code much yet so it might take me a little while to get started.

 

(I really hope I'm not doing too much, between working on Trin, the Encyc and now the Client... *shrug*)

Share this post


Link to post
Share on other sites

I think this is a good idea and certainly an interesting one. Personally I think real-life and fantasy should not be seperated in the game. There is always Wikipedia or any other enzyclopedia where players can check if it's really possible to summon a fluffy rabbit the way it is described in the EL book. After all it's a game, and that's why we play it :blink:

Share this post


Link to post
Share on other sites

I can put my hand up for this. I have a fair amount of prorgamming experience, but I'm not a C guru and I haven't looked at the client code much yet so it might take me a little while to get started.

if you're not sure where to look, check out how the knowledge list toggles grey/white to see if the book is read; and the new-character stuff for how to open books

and if you get stuck, then find someone to ask for help :blink:

Share this post


Link to post
Share on other sites

if you're not sure where to look, check out how the knowledge list toggles grey/white to see if the book is read; and the new-character stuff for how to open books

and if you get stuck, then find someone to ask for help ;)

Thanks mate.

 

It has taken me a little while to sort things out, but I'm started. I do have a question about the books however. Where will I be getting the ID's for them from? I'm guessing this will need to come from either Ent or Roja (Learner doesn't know), but if anyone else has any info, please fill me in. :-)

Share this post


Link to post
Share on other sites
Where will I be getting the ID's for them from?
AFAIK, the book IDs are only needed when the server tells the client to open a book. if you copy the book-opening code from new_character.c then you should be able to avoid all that (since you already have the book locally, people can read it anyway. actually doing the tests would require the server-side checks that people can't get around so easily)

Share this post


Link to post
Share on other sites
Where will I be getting the ID's for them from?
AFAIK, the book IDs are only needed when the server tells the client to open a book. if you copy the book-opening code from new_character.c then you should be able to avoid all that (since you already have the book locally, people can read it anyway. actually doing the tests would require the server-side checks that people can't get around so easily)

I was just calling "book_open" which is what new_character.c calls. Book_open requires the ID of the book. When new_character.c calls it, it has a list of variables declared for each book, so should I do the same, or is there a defined list of ID"s that I should follow?

 

Also, which books in the CVS are the Knowledge books (so I can build a list of ID's).

Share this post


Link to post
Share on other sites
I was just calling "book_open" which is what new_character.c calls. Book_open requires the ID of the book. When new_character.c calls it, it has a list of variables declared for each book, so should I do the same, or is there a defined list of ID"s that I should follow?

 

Also, which books in the CVS are the Knowledge books (so I can build a list of ID's).

I don't think that any of them are in yet, but Roja manages the books before they get added to the data files (and also assigns book IDs) so you should probably talk to her about that

if the books are given IDs, then it's probably simpler to use them. if they aren't, then you'd have to make them up same as in new_character.c

Share this post


Link to post
Share on other sites

I would like to make the knowledge books readable, like the 3d obj. books in the libraries.

Ok, hopefully you will be pleased to know this is mostly done.

 

The only part that hasn't been completed is the retrival of the ID for the book selected. I don't know how you plan on doing this, so if a server dev could let me know I can finish it off.

 

For the moment, the book id being used is that of the book at the fireplace at beam ("I have your bag at the beam my friend"). In order to test it successfully you need to be close to it.

 

The only known issue at the moment, is that the second time you open a book, the window appears behind the Knowledge window. Unfortunatly, this is a pre-existing error (check your "accept buddy" dialog) and I haven't attempted to work around it.

 

On the other hand, I have patch the image_add_extended function to support alpha blending of image widgets. This means the Encyc code should probably be updated.

 

The patch is available here: https://developer.berlios.de/patch/?func=de...6&group_id=1256

Feel free to check it out and let me know any feedback. :-)

Share this post


Link to post
Share on other sites

Ok, the book ID's I will have to supply to you.

So far, we only have 1 knowledge book xml file finished and in the client package.

It is book ID 59-however this is not loaded with the server yet so you will have to wait for a server update to test it, but since it works with other books I see no reason why it won't work with this one :P

Share this post


Link to post
Share on other sites

Ok, the book ID's I will have to supply to you.

How are you wanting to implement it? Would I match the ID's locally in the client, or send the selected knowledge id to the server, and then get the knowledge book id as the response.

 

It's currently set up to match them locally, but including server support is trivial.

Share this post


Link to post
Share on other sites

Well, maybe I forgot something, but where are the ID's locally stored? The book ID's I have are only stored on the server, and they define what type of book it is(book or notepaper-gets a different picture), plus what .xml file is linked to it.

Share this post


Link to post
Share on other sites

Well, maybe I forgot something, but where are the ID's locally stored? The book ID's I have are only stored on the server, and they define what type of book it is(book or notepaper-gets a different picture), plus what .xml file is linked to it.

The only Book ID's stored in the client are those of the "New Character" books. They are defined in the code in new_character.c lines 662-667.

 

I would suggest rather than storing the ID's locally, that they be stored server side, and I make a request to the server with the knowledge ID. This could either be with the existing SEND_BOOK command, or a new command. It's probably easiest with the SEND_BOOK command as the code exists, as long as the knowledge ID's don't conflict with any existing book ID's (haven't checked yet).

 

If we are going to store the ID's locally, I could either create a new XML file which assosiates the knowledge ID and the knowledge book ID's, or convert the knowledge.lst file to XML and assosiate the Book ID with each knowledge string (would mean converting it for every language). I would suggest a new file to assosiate them is the cleaner method as it means less problems if things get updated. Keeping the ID's server side is however the best method in my opinion.

Share this post


Link to post
Share on other sites

Ok. This patch I believe is complete. After discussions with Ent there will be a new file added to the client (not in CVS as it belongs with the client support files). For this reason that file can be obtained here: http://geocities.com/grugrocks/knowledge.xml. It belongs in the root directory of your install (or the data directory under Linux/OSX.

Also, due to the number of books, the knowledge ones will be moved to languages/<lang>/books/knowledge/. You will need to move the book_of_botanics.xml file into this new directory.

 

The actual patch is here: https://developer.berlios.de/patch/?func=de...6&group_id=1256

 

/edit: Clarification

Edited by Torg

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×