HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Offline players  (Read 1390 times)

zarmin

  • World Owners
  • ****
  • Posts: 22
    • View Profile
[Resolved] Offline players
« on: Jul 26, 13, 06:03:25 AM »

We're developing some tools for the game masters. In many cases we need to reach offline players, eg. checking their items , giving an item to them, and so on.

What is the simplest/best way to load a player node by its player name, even the player's offline?

Thanks!
« Last Edit: Nov 27, 13, 03:28:26 PM by HE-Cooper »
Logged

Voarsh

  • General Accounts
  • *
  • Posts: 56
    • View Profile
Re: Offline players
« Reply #1 on: Nov 20, 13, 02:28:17 PM »

Hello,

I am facing the same issue here.... Unfortunately HeroCloud isn't "setup" for that... :\
Logged

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: Offline players
« Reply #2 on: Nov 20, 13, 02:45:46 PM »

I haven't tried them out yet, but you might want to play with these external functions:

// Find all root nodes which have Character names
// Uses the same filter as QueryRootNodeChildren and calls the same method _rootNodeQueryFailure on failure
// Calls method _GotRootNodeCharacters( requestID as ID, characters as List of ID ) on success
external function QueryRootNodeCharacters(requestID as ID, callbackNode as NodeRef, queryFilter as Class _nodeQueryFilter)

// Find all root nodes which have Account entries
// Uses the same filter as QueryRootNodeChildren and calls the same method _rootNodeQueryFailure on failure
// Calls method _GotRootNodeAccounts( requestID as ID, accounts as List of ID ) on success
external function QueryRootNodeAccounts(requestID as ID, callbackNode as NodeRef, queryFilter as Class _nodeQueryFilter)

Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Offline players
« Reply #3 on: Nov 20, 13, 06:41:34 PM »

You could maintain a lookuplist mapping name to node ID in a persistent node in a system area, which would allow you to at any time look up the player ID of a given name.  If that area is registered for player info, then you can tell whether they are currently online or not, otherwise querying for that remotely on the world server.  If not online, load the player's root node.

Granted, I have never tried manually loading a player like this, so I don't know if there are ramifications, particularly if they try to log in during this.
« Last Edit: Nov 20, 13, 06:43:15 PM by ScottZarnke »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Offline players
« Reply #4 on: Nov 21, 13, 10:54:19 PM »

I would try and build out an asynchrons system. Instead of trying to deal with offline player nodes.

For example, you capture the player node ID in your helpdesk request interface and store it and any information you might need in a system area under a node. So basically build a "case" node and that node keeps a copy of the important data you would need. So depending on what you are looking for make a copy. Let the GMs review and deal with that copy. So lets say they think an item was lost in a transaction or such. The player puts the case in, it creates the case node with the important information / snapshot of the player, (I highly suggest some type of transaction or inventory log checking) aka verification they didn't lie about the item going rogue, when really their friend did get it after all. As your GM works it they could create something like give item to player. That data goes into your GM give method and waits for player logon, when it see's the player logon, it then gives them the item. Or depending on how your mail system is built out if you have one, just have it mail the player the item(s) along with a message.

This takes the players status out of the equation completely. Keeps you from having confusing information to look at. IE I just gave my friend 1000 gold but it screwed up and took 3000 gold. Yet it's 2 days before your team gets to the request, well since then you lost all of the important data the guy now has, a ton of gold, from his friends helping him out. His friend has spent 2 days earning money etc, and you are stuck with spending hours digging through 2 days worth of logs to figure out what happened if a bug did happen, and why it happened.

best to capture a snapshot of all nodes involved and how things went wrong, and make a copy for your GMs to review, will make their life much easier.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Voarsh

  • General Accounts
  • *
  • Posts: 56
    • View Profile
Re: Offline players
« Reply #5 on: Nov 22, 13, 03:25:28 PM »

I would try and build out an asynchrons system. Instead of trying to deal with offline player nodes.

For example, you capture the player node ID in your helpdesk request interface and store it and any information you might need in a system area under a node. So basically build a "case" node and that node keeps a copy of the important data you would need. So depending on what you are looking for make a copy. Let the GMs review and deal with that copy. So lets say they think an item was lost in a transaction or such. The player puts the case in, it creates the case node with the important information / snapshot of the player, (I highly suggest some type of transaction or inventory log checking) aka verification they didn't lie about the item going rogue, when really their friend did get it after all. As your GM works it they could create something like give item to player. That data goes into your GM give method and waits for player logon, when it see's the player logon, it then gives them the item. Or depending on how your mail system is built out if you have one, just have it mail the player the item(s) along with a message.

This takes the players status out of the equation completely. Keeps you from having confusing information to look at. IE I just gave my friend 1000 gold but it screwed up and took 3000 gold. Yet it's 2 days before your team gets to the request, well since then you lost all of the important data the guy now has, a ton of gold, from his friends helping him out. His friend has spent 2 days earning money etc, and you are stuck with spending hours digging through 2 days worth of logs to figure out what happened if a bug did happen, and why it happened.

best to capture a snapshot of all nodes involved and how things went wrong, and make a copy for your GMs to review, will make their life much easier.

Thank you for your interesting reply. I will look into it.
Logged