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

Author Topic: Live game developer / GM tools  (Read 3572 times)

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Live game developer / GM tools
« on: Jan 21, 14, 12:36:22 AM »

I want to be able to create a set of in game admin tools that only GM and above accounts can use. so for example something like

/adminTools GivePlayerItem; MagicFlameSword, qty:1
/adminTools TeleportPlayer, etc.

doesn't have to be that syntax etc just a option for a GM to be able to make that kinda of call. Obviously we wouldn't want normal players to make those calls so would need to check the account type. I could develop some in game system, but it kinda needs to be more tied to the back end account system. Mainly in regards to any in game system has chance to be exploited by the game masters, lower level coders. I know coders with access could break any system / exploit it, but... you get the point.

I could build out a whole system to create an in game account type structure, then validate it against what type of account the player has. But also know we have account types built into HE already. Was wondering if there was a way to see that information in game. Something like PlayerAccount.accountPermissions. I'll assume it would be a list cause of option for multiple types of accounts and being able to give them in the account manager.

Hate to build a new system to do exactly something that is already built and managed via the account management, system.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

EitrGin

  • General Accounts
  • *
  • Posts: 14
    • View Profile
Re: Live game developer / GM tools
« Reply #1 on: Jan 21, 14, 12:21:48 PM »

There's this http://wiki.heroengine.com/wiki/HE_Admin, but I'm not sure if it's implemented in your game or not. That suggests the account type already has an admin structure.  As far as I know, HeroEngine handles the actual accounts, probably from the game project users list on the website. Although there is a method for checking if the client is being run in HeroEngine (if you only wanted your admin tools to be used there).

Creating an entirely new account system seems like too much work (unless you're going to have a ton of admin content that you want stored in its class scripts). A simpler way is to add a field to the base account class stating whether the account is an admin (boolean). Then have a command like "/adminSet 12345" that sets that account as admin to true if they entered the correct code or something. Then when the admin tools commands are called, just check for account.isAdmin() to see if they have permission.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: Live game developer / GM tools
« Reply #2 on: Jan 21, 14, 01:58:00 PM »

We made a kind of character admin for our characters. With it we can change the class, level, skills, abilities as needed. Currently this works on our own characters only. It does not yet effect others.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Live game developer / GM tools
« Reply #3 on: Jan 21, 14, 07:01:47 PM »

There's this http://wiki.heroengine.com/wiki/HE_Admin, but I'm not sure if it's implemented in your game or not. That suggests the account type already has an admin structure.  As far as I know, HeroEngine handles the actual accounts, probably from the game project users list on the website. Although there is a method for checking if the client is being run in HeroEngine (if you only wanted your admin tools to be used there).

Creating an entirely new account system seems like too much work (unless you're going to have a ton of admin content that you want stored in its class scripts). A simpler way is to add a field to the base account class stating whether the account is an admin (boolean). Then have a command like "/adminSet 12345" that sets that account as admin to true if they entered the correct code or something. Then when the admin tools commands are called, just check for account.isAdmin() to see if they have permission.

Yeah that is what I thought about doing, but have that one code end up leaked and your screwed, game over shut the servers down.
So was thinking of a different means to manage it that wasn't something in game that would potentially be packet hacked or such.

I know their is the Account Management System built already and it has exactly what I want, just a matter of getting to the data it has. I looked at the HE_Admin and it looks more like a way to just override / get into a world where character creation has been broke and the character data isn't working correctly. I'll dig around it a bit more though to see if there is some other way to get to the data.

I know the line for is heroblade, check but really want this to become a go live admin tool to allow GMs to deal with player issues. etc. So like the ability to teleport to a player or location, so the GM can see exploiting or such, etc etc. things the GMs need on live, but something I really need super tight control over.
Perferably in an out of game manner, i know it wouldn't stop abuse by an individual but I can at least better vet / control / clean up the damage. One person going rogue is managable, one person turn the keys over to the admin console to 10k players while i'm taking a nap, even if it's just 1 minute worth would be devastating.

But as I work to build out all the various systems I want to go ahead and code out their GM functions now. Instead of going back and adding them in later.

Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: Live game developer / GM tools
« Reply #4 on: Jan 21, 14, 10:07:16 PM »

Quote
So like the ability to teleport to a player or location, so the GM can see exploiting or such, etc etc. things the GMs need on live, but something I really need super tight control over.
One way to teleport is to get the players location -> a list from _WorldClassMethods:
method _WhereIsPlayer( accountID as ID ) as Class _AreaInstance.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Live game developer / GM tools
« Reply #5 on: Jan 22, 14, 11:45:15 AM »

Yeah it's not an issue of doing or coding what I want to do it's an issue of letting a certain client make the calls to preform said task while other clients can't. aka a admin / GM etc can have their client make the calls but normal players can't.

Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

EitrGin

  • General Accounts
  • *
  • Posts: 14
    • View Profile
Re: Live game developer / GM tools
« Reply #6 on: Jan 22, 14, 05:30:29 PM »

Make it so that you can only call the setAdmin method from HeroBlade. So the developers would have to have HeroBlade to make themselves admin, and then they can perform admin duties outside of HeroBlade. Or that another admin can make someone admin, in which case you can appoint certain players' accounts as admin without having to be in HeroBlade.
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Live game developer / GM tools
« Reply #7 on: Jan 22, 14, 08:50:36 PM »

The chat command system already has already built into it a separation of player-usable commands (player commands) versus commands not usable by players (developer commands).  You can see in the server script commandHQ that when you register a command you can specify it as a player command by adding "+player".  If that is not included, it defaults to NOT being a player command, i.e. a developer command.

Later, when processing a developer command it calls $PERMISSIONS._isAccountDeveloperCommandUser().  The default implementation is to allow every account to use developer commands.  You would create your own PERMISSIONS class to glom onto that system node and write a version of HE_isAccountDeveloperCommandUser() to override that.

Attached is a grid I made based on enumerating the permissions we can check for and shows which permissions the roles get.  So you can see that if you check for the "__IsAllowedToEditAreas" permission using _GetAuthorizationValue() inside of HE_isAccountDeveloperCommandUser() you can make is so only Developer and Admin accounts can use developer commands.  If you also check for "_IsGameMaster" in there then you could optionally assign the Game Master role to QA/Test accounts to allow them to use developer commands on an account-by-account basis.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Live game developer / GM tools
« Reply #8 on: Jan 22, 14, 09:02:34 PM »

Perfect Scott, exactly what I was looking for. :)

So can take my new system, and then make some override calls to the permissions node to validate the account. I know it's a bit different but that gives me the starting point i needed to build out what I want.

Many thanks my friend.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Live game developer / GM tools
« Reply #9 on: Jan 23, 14, 12:08:15 PM »

No problem.  By the way, you probably already noticed this, but HE_IsAccountDeveloperCommandUser() only sends the account name (unfortunately) while _GetAuthorizationValue() needs an account ID, so we previously used LookupAccountIDByAccountName().  However, the comments for that function say
Quote
Note:  This is a hit on the database and should generally be avoided in production code when possible.
Wanting to avoid having to use that function, I looked at how _isAccountDeveloperCommandUser gets called, and it is thusly:

_isAccountDeveloperCommandUser(player.GetAccountName()

That is likely a hold-over from when the account names were still readable and we would check by their name.  But since the names became encoded, they are not much use anymore.  So instead we just wrote our own query method which takes the actual account itself instead of the name.

This does mean editing the Clean Engine script commandHQ (and _CommandHandlerClassMethods if you do this also for _isAccountHeroEngineCommandUser), so if you do so make sure to make note of it in case a future engine update overwrites that.
« Last Edit: Jan 23, 14, 12:36:35 PM by ScottZarnke »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Voarsh

  • General Accounts
  • *
  • Posts: 56
    • View Profile
Re: Live game developer / GM tools
« Reply #10 on: Jan 24, 14, 04:16:51 PM »

Hi, keeperofstars.

I have the exact need you have for my project.

My developer and I recently started working on some GM commands/scripts.
The best way to deal with these issues is adding an account and setting it as a GM. Like what was said, check the account permissions within the code to help prevent abuse.

I am disappointed in the lack of tools HeroEngine has on this side, but every game/project is different.
Logged

MarlonB

  • General Accounts
  • *
  • Posts: 38
    • View Profile
Re: Live game developer / GM tools
« Reply #11 on: Feb 18, 14, 01:36:41 PM »

The /register command also uses "_isAccountDeveloperCommandUser".

What does that map to to the new permission system? What roles certify for "_isAccountDeveloperCommandUser"?
Is that "Dev", or does it also include "GM" ?


Logged
Cerberus of The Repopulation.