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

Author Topic: [resolved]Change Account Root Node: e_playerAccount (Client)  (Read 1035 times)

amb3rl4nn

  • General Accounts
  • *
  • Posts: 6
    • View Profile

We have a custom root node we setup but cant figure out how to change an accounts active root node.  Does this only work for when the account was created?

1) created an A_Account class for root node ACCOUNT
2) changed the following and created the prototype from the new A_PlayerAccount using |CPFC

Code: [Select]
method HE_UsePrototypeForAccountRootNode( prototypeName references String ) as Boolean
  //prototypeName = "e_account_prototype"
  prototypeName = "A_PlayerAccount"
 
  return true
.


But we still get this on our node:
Code: [Select]
21:24:36: System:SN LISTBEGIN 9223372056941021593 : "Node ID: 9223372056941021593 Base Class ID: 4611686018428887920 Name: "E_playerAccount""
SN LISTELEMENT 9223372056941021593 : "Additional Class ID: 108475230034 Name: "_ACCControllerOwner" Description: "Intended to be inherited by characters/npcs that will be controlled via the Advanced Customizable Character Controller.""
SN LISTELEMENT 9223372056941021593 : "Additional Class ID: 3775000016 Name: "CharacterNode" Description: "graphic CharacterNode representation""
SN LISTELEMENT 9223372056941021593 : "Additional Class ID: 3775000003 Name: "HBNode" Description: "graphic Node representation""
SN LISTELEMENT 9223372056941021593 : "Field ID: 108475230035 Name: "_accControllerRef" Value: "9223372057445021615""
SN LISTELEMENT 9223372056941021593 : "Field ID: 184645453410 Name: "_characterAppearanceRef" Value: "9223372057360021558""
SN LISTELEMENT 9223372056941021593 : "Field ID: 185013453505 Name: "_characterRef" Value: "9223372057355021569""
SN LISTELEMENT 9223372056941021593 : "Field ID: 264692511301 Name: "_ReplicationGroupRehomedOffsetAreaID" Value: "0""
SN LISTELEMENT 9223372056941021593 : "Field ID: 3775000002 Name: "LW_FIELD_Script" Value: "*None*""
SN LISTEND 9223372056941021593 : "End of List."
« Last Edit: Aug 11, 14, 09:00:00 PM by amb3rl4nn »
Logged

Hiro_Protagonist

  • World Owners
  • ****
  • Posts: 30
    • View Profile
Re: Change Account Root Node: e_playerAccount (Client)
« Reply #1 on: Aug 06, 14, 02:07:39 PM »

Holy crap I was just going to post this question!

I created new versions of E_PlayerAccount and E_PlayerCharacter (MO_PlayerAccount and MO_PlayerCharacter), on both the client and server side. I copied the code from the E_ versions and updated the account and player prototypes (created the prototype as well). All good so far. I deleted my characters and created a new one, and it has the proper MO_PlayerCharacter class. However, my account node is not updated. I use the CLI and added my class (mnac) to the account, and then tried to remove the E_PlayerAccount class via mnrc. MNRC reported everything OK, but Show Node (SN) reports elsewise. I know this would clear up if my account was recreated but 1. I don't know how to do that and 2. All the devs would have to do the same, just seems like a major PITA.

To answer the OP, changing the prototype in HE_UsePrototypeForAccountRootNode only works when the account is created. My follow up questions are:

1. How would you change the root node?
2. Should you change the root node? As in, is this more trouble than it's worth, and should I instead just adopt E_Player[Character|Account] as my own and modify those for our game?
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Change Account Root Node: e_playerAccount (Client)
« Reply #2 on: Aug 06, 14, 07:04:00 PM »

You guys should have searched for "HE_UsePrototypeForAccountRootNode" on the forums.  That turns up this explanation from HE-Jay:
https://community.heroengine.com/forums/index.php/topic,195.msg677.html#msg677

In particular:
Quote
...accounts logging in for the first time acquire the new Ex_PlayerAccount and Ex_PlayerConnection classes...
fyi: you can 'reset' an account by destroying it via $ACCOUNT._DestroyAccountRootNode(...), logging out and then logging back in.
(My emphasis)
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

amb3rl4nn

  • General Accounts
  • *
  • Posts: 6
    • View Profile
Re: Change Account Root Node: e_playerAccount (Client)
« Reply #3 on: Aug 11, 14, 08:59:47 PM »

This was exactly what was needed! Pretty sure I tried to search that but guess I missed it! Thanks :)

Code: [Select]
$ACCOUNT._DestroyAccountRootNode(...)
Logged