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

Author Topic: What do I do if....(technical question)  (Read 2223 times)

Aelinthali

  • General Accounts
  • *
  • Posts: 5
    • View Profile
What do I do if....(technical question)
« on: Apr 07, 14, 10:04:06 PM »

I am learning a lot about the engine and am to the point where the tutorials are recommending I process "Adapting Clean Engine".

I have started changing some of the system nodes to the new names for my application when it occurred to me that it would be easier to do a global search and replace to change all instances of HE_ with my game's precursor.

My worry is what if there is some obscure "HE_***" that is NOT a part of the pre-generated scripts that causes my game base client to become unuseable?  Can I contact customer service and have them restore to the default install at your end?  For that matter, say I am programming along and realise that I've made a complete mess of things and just need a reboot? 

Would there be a charge for this service?  I understand that this should not be something that becomes a habit.

Basically I need to know if I jump in and find myself over my head, is there a lifeline?  Please let me know.
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: What do I do if....(technical question)
« Reply #1 on: Apr 07, 14, 10:35:52 PM »

There is little reason, early on, to replace clean engine scripts. Implement game systems and UI, wait until you need to really hammer the engine into a specific shake to start overriding default functionality. After that, everything in the engine is version controlled...except the DOM. I won't go into why the DOM isn't version controlled. But for now, if you decide to start gutting things, then just make note of what you change in the DOM.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: What do I do if....(technical question)
« Reply #2 on: Apr 08, 14, 12:45:50 AM »

There are some scripts in the clean engine that depend on the names of your functions starting with "HE_". These are some of the override functions. When updates come they will overwrite changes made in clean engine scripts. These are the ones marked on the bottom with grayed words stating "This script is part of Heroengine and should not be modified ...".

There is also a chat channel in Skype with many devs that also ask basic questions of curiosity, and many How to do things in the engine.

The scripts are version controlled using Pmerge to see the versions, a free download from Microsoft, if you needed to reset any.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: What do I do if....(technical question)
« Reply #3 on: Apr 08, 14, 08:21:35 PM »

I feel extending what the HE_ provides and then slowly removing what isn't needed or even just leaving it in but never referencing it is a better approach.

Much of what the clean engine provides is exactly what you will need anyways so instead of trying to replace namespaces you should just extend your own classes and slowly remove the old ones.

For Example:

I copied over the Combatant class methods from HJRef and now use it in place for E_CommonCharacter. While I bring it over I just initialized the Combatant through E_CommonCharacter's until I feel comfortable with the code. Then I will take out all the calls to E_CommonCharacter class methods and put what ever Combatant class methods I need in replace.

I no longer call to any E_CommonCharacter methods in any of my scripts that I am dealing with now. Going forth I will know to watch for any reference to it as well as search for it.

I know this can cause a lot of head ache in debugging later but I think that is far easier to hunt down than a problem from OP's approach.







« Last Edit: Apr 08, 14, 11:06:53 PM by nocake »
Logged

Aelinthali

  • General Accounts
  • *
  • Posts: 5
    • View Profile
Re: What do I do if....(technical question)
« Reply #4 on: Apr 08, 14, 09:43:20 PM »

Ok, great advice, thank you very much everyone!  My usual method of starting out is to make a complete backup of all the game files and store them so I can recover if I break something beyond repair.

Maybe I got a little lost in following along on the tutorials.  I kept running across references to the "Adapting clean engine" tutorial and I thought it was an expect part of the natural progression.  I see now that I was getting way ahead of myself.

I'll dial it back a notch or three and undo all the changes I have made up until now.  I'll modify the "HE_" scripts and add comments about where and how I modified them (Thanks, HE-Cooper and Thazager!).  Furthermore, I'll stop trying to re-invent the wheel and take a look at some of the scripts for the reference games as nocake suggests.

Again, thanks for the great advice all of you!
Logged

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: What do I do if....(technical question)
« Reply #5 on: Apr 08, 14, 11:08:58 PM »

Hit clt+shift+h in a script window and you can open a history of your commits.

You might need to set up a file diff application in the HeroScript editor.

Once you do you can click an old commit and it will show you the difference between that commit and your current file.
« Last Edit: Apr 08, 14, 11:51:45 PM by nocake »
Logged