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

Author Topic: [Resolved] Changing Archetype  (Read 1973 times)

jcsmith562

  • General Accounts
  • *
  • Posts: 190
    • View Profile
[Resolved] Changing Archetype
« on: Jul 18, 10, 12:45:46 AM »

I was looking for a way to switch a classes Archetype. I entered in a number of classes as data where they should have been guicontrols. I don't see any way to change the archetype though once its been set other than deleting the class. However, once the class is referenced by other fields, and other classes, all referencing one another this becomes a headache of needing to go through and change many other areas (any other class that referred to a field that referenced that class, or any other class that was a child of that class).

Is there a way to switch an archetype currently? If not this is something I'd recommend adding the ability to do this (either from CLI or the DOM Editor) in the future.

************************************
SOLVED: The documentation for MCD on the wiki does not mention this, but you can modify the DOM by using the mcd command.

example: |mcd <classname>; archetype="guicontrol"
*************************************
« Last Edit: Nov 01, 12, 10:25:03 AM by HE-Cooper »
Logged

HE-CHRISTOPHER

  • HeroEngine
  • *****
  • Posts: 424
    • View Profile
Re: Changing Archetype
« Reply #1 on: Jul 20, 10, 02:49:12 PM »

I was looking for a way to switch a classes Archetype. I entered in a number of classes as data where they should have been guicontrols. I don't see any way to change the archetype though once its been set other than deleting the class. However, once the class is referenced by other fields, and other classes, all referencing one another this becomes a headache of needing to go through and change many other areas (any other class that referred to a field that referenced that class, or any other class that was a child of that class).

Is there a way to switch an archetype currently? If not this is something I'd recommend adding the ability to do this (either from CLI or the DOM Editor) in the future.

************************************
SOLVED: The documentation for MCD on the wiki does not mention this, but you can modify the DOM by using the mcd command.

example: |mcd <classname>; archetype="guicontrol"
*************************************

Technically, this worked but it only works for client definitions because the are not used in the serialization of objects to the database.  Any client issues it might cause are resolved by simply logging out.  Changing the archetype of a server class in this fashion is NOT recommended for anyone but an expert (and even we generally do not do so without first checking the database directly).

The recommended method is indeed the more laborious route of deleting the definition and recreating it which is safe in all circumstances (though any data stored in the field/class will of course be lost).

Logged
Christopher Larsen
CTO
HeroEngine

jcsmith562

  • General Accounts
  • *
  • Posts: 190
    • View Profile
Re: Changing Archetype
« Reply #2 on: Jul 25, 10, 11:04:42 AM »

Okay, thanks a bunch.
Logged