Poster une réponse 
 
Note de cette discussion :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
How does Total RP 2 store data and communicate ?
05-13-2011, 03:13 PM (Ce message a été modifié le : 05-13-2011 03:13 PM par Telkostrasz.)
Message : #1
How does Total RP 2 store data and communicate ?
This is a question sometimes asked. I think this is really interesting to understand how your TRP2 communicate with others TRP.

Characters data storage :

How are fields stored ?

By "field" I mean one data, your character's first name or his age for example. In TRP2 fields are managed in field groups. Each field group possess its own version number ("VerNum"). When you modify one field, its group VerNum is incremented.

Why using field groups instead of having one VerNum by field, like other Flags-Addons (like MRP) ? It's a question of optimisation : it's less probable that you change only one field alone. for example, when people modify their character's age, or tall, it's generally because they create their character. Having fields grouped is a gain of memory!

It's the same for all creation. Item, document, state and quest have one VerNum, not one by field.

Characters data exchange :

When you cross another character, more exactly on "mouseovering" the character, TRP2 send a message to him with a double purpose :

1) "Hello, do you use TRP2 ? If this is the case, can you send me the list of all your character's VerNum ?"
If the receiver use Total RP, he will answer by sending you his VerNum list. When you receive it, TRP compare it whith the latest version you had. If a vernum has changed, your TRP send then all the necessary request to obtain updates.

2) "Here you can find my own VerNum list."
In order to gain time, when you ask the character for his list you already send yours, so the target can already send you requests if updates needed. With this method, you receive information even without have "mouseovering" a character.

It's very simple !

Creation exchange :

General :
Information about creations included in the TRP2 database are never sent, as others are supposed to have the latest version of TRP and so the latests version on all these creations. Clin

By "custom creation" I mean creation created by players.

Custom items :
When you have a TRP transaction whith another character, you will send him all the information about the items you place on the transaction window. You also receive information about his items either. Of course like for any data, this information exchange take place only if needed (according to the VerNums).
So in fact you will possessed all the information needed even before clicking the "confirm" button ! So even if the transaction is cancelled, you will keep the other's item information.

In the next TRP version (1011) item will be linkable to the chat. Of course, any player clicking the link in their chat will receive all the item needed information.

Custom states :
States exchange has been "limited" due to several abuses in the firsts versions of TRP2. At the time, when you crossed a character having custom states, you received all the states informations.
But people "abuse" of the system, and created a lot of crapish states (OOC states, private jokes ...etc). Because that all these custom states appears afterward in your state list, I decided to add a "receiving filter". By default, you will receive state information from people with the maximum "trust" level. You can change this filter in the TRP2 parameters ! But you'll expect to receive what in french we called "Tout et n'importe quoi, mais surtout n'importe quoi !" ("everything and rubbish, but especially rubbish!").

Manual sending :
All creation can be manualy sent via the creation lists. You can ctrl+click on a creation : if you have a target, the target will receive the creation information (if needed, according to the vernum), otherwise a dialogbox will promp asking you for the target's name.

Automatic chain sending :

This is a very important mechanism in TRP2 data exchange.
When you send information to another player, he will parse these and search for creation ID he doen't possessed. If he finds one, he will request the information about it.

So imagine you have a item, a book, which begin a quest when you read it. This quest contains several other creations liaisons : showing a document, adding states to your character, adding or removing items ..etc.
Well, when you will give the book to another character, he will receive the entire chain of creations (the book, then the quest, then the document/states/items ...etc).

Important : Note that the "Automatic chain sending" will stop on the first known "node". Only the first level on chaining compares VerNums. It's difficult to explain so I will use examples :

You have a book (so, the first level on chaining), which is linked to a quest (the second level), which in linked to a state (third level).

Case 1 : the other player doesn't possess any creation. You give him the book.
Mechanism : He don't possess the book information, so he requests it from you. Then he parse it and see the quest ID. As he doesn't have it, he request it from you ...etc.

Case 2 : The other player possess all the three creations, but in an anterior version (for all the three). You give him the book.
Mechanism : He sees that your book version is superior than his. So he requests the book information. Parse it, find the quest ID but ... He already has the quest, and can't compare VerNum as it isn't placed in creation link. So the chaining will stop.

As you can see the automatic chain sending is a powerful feature, but still not perfect. I'm still working on it. Sourire

Important too : TRP2 uses ChatThrottleLib in order to avoid deconnection when sending a lot of data. But be aware that sending huge creation chain take time!

Créateur de Total RP 2.
\(^_^)/
Total RP 2 creator.
Trouver tous les messages de cet utilisateur
Citer ce message dans une réponse Firefox Windows 9x/NT/2000
05-13-2011, 03:20 PM
Message : #2
RE: How does Total RP 2 store data and communicate ?
Of course, when a player have all the information he needs about a creation chain, it is not required that you remain connected while using.

If we use the same example ( the book->quest->document example), when you give the book to someone, he will be able to complete the quest without the need of your presence.
He could even give the book to another character, all the information chain will be sent along with the item !

Créateur de Total RP 2.
\(^_^)/
Total RP 2 creator.
Trouver tous les messages de cet utilisateur
Citer ce message dans une réponse Firefox Windows 9x/NT/2000
12-14-2011, 01:54 PM
Message : #3
RE: How does Total RP 2 store data and communicate ?
How does TRP2 check for new versions of the addon? It seems like it must query a website to check for new versions, but I was told that you can't currently perform HTTP requests.
Trouver tous les messages de cet utilisateur
Citer ce message dans une réponse Safari Windows 9x/NT/2000
12-14-2011, 07:42 PM
Message : #4
RE: How does Total RP 2 store data and communicate ?
When you enter the game, your TRP simply gives his version in the broadcast channel (xtensionxtooltip2). Other people see this version and compare to their own. If their version is older, a message is shown for them.

Créateur de Total RP 2.
\(^_^)/
Total RP 2 creator.
Trouver tous les messages de cet utilisateur
Citer ce message dans une réponse Firefox Windows 9x/NT/2000
Poster une réponse 


Aller à :


Utilisateur(s) paracourant cette discussion : 1 Guest(s)