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

Author Topic: [Resolved] Script Revision History  (Read 1608 times)

shadowfire

  • General Accounts
  • *
  • Posts: 107
    • View Profile
[Resolved] Script Revision History
« on: Nov 15, 11, 08:05:46 AM »

Ok so i plan to do a bunch of experimental programming that will likely break my world if I do something dumb... so is there a way to create a backup point for the if and WHEN i do break the world?
« Last Edit: Nov 01, 12, 09:50:11 AM by HE-Cooper »
Logged

JMurdick

  • General Accounts
  • *
  • Posts: 54
    • View Profile
Re: intending to break my world...
« Reply #1 on: Nov 15, 11, 09:16:18 AM »

Look into Area Checkpoints for world building.  And there is a history maintained of all scripts that you can view and restore to.
Logged

Jrome90

  • General Accounts
  • *
  • Posts: 330
    • View Profile
Re: Area Checkpoints and Script Revision History
« Reply #2 on: Nov 16, 11, 03:16:17 AM »

I would submit the current working script, then add some sort of comment in the "comment" box. That way if you need to revert back to the working version, you can filter out the revisions that weren't commented on.

Or you could just remember/write down which revision it is..
Logged

Tythin4

  • General Accounts
  • *
  • Posts: 39
    • View Profile
Re: Area Checkpoints and Script Revision History
« Reply #3 on: Nov 18, 11, 01:39:37 AM »

How do you you access the older script versions? I accidentally broke the level and experience bar while I was trying to reverse engineer it to figure out about raiseeventlisteners and stuff.
Logged

JMurdick

  • General Accounts
  • *
  • Posts: 54
    • View Profile
Re: Area Checkpoints and Script Revision History
« Reply #4 on: Nov 18, 11, 05:24:04 AM »

Open a script in the script editor and then press Ctrl-H or open the history from the Window menu.

To access versions (diff) of your older scripts you will need a merge/diff tool installed.  By default HeroEngine wants Perforce, but most people probably don't have P4 installed and it can be very expensive to license.  I'd recommend a free tool, such as WinMerge or SourceGear's DiffMerge.  Once installed just go to Options, select the path to the executable and away you go!
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Area Checkpoints and Script Revision History
« Reply #5 on: Nov 18, 11, 06:47:43 AM »

As per the P4Merge page, you can get the P4Merge client and use that for free.  I and most of my team uses that.

Go to this product page, click "Browse by Platform", choose your platform and under Clients there is a section for P4Merge: Visual Merge Tool.  Beside it you will see a green "Download" button. That gives you p4vinst64.exe (or something similar), which can actually install a few things. When you install, uncheck everything but p4merge.

"C:\Program Files\Perforce\p4merge.exe" is the default path that the Script Editor has set for the program, so update that if you install somewhere else.

For diffing, I use the History listing and double click a version.  That will compare that version to the latest one, or the current edit if you have saved changes that are not yet submitted.  I find p4merge's merging a little wonky, but the file comparison is pretty good, and allows you to view the text of old versions that can be copied from there to paste in the editor if so desired.
« Last Edit: Nov 18, 11, 07:00:56 AM by ScottZarnke »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

JMurdick

  • General Accounts
  • *
  • Posts: 54
    • View Profile
Re: Area Checkpoints and Script Revision History
« Reply #6 on: Nov 18, 11, 08:34:15 AM »

Cool, thanks.  I didn't know it was free now.  Been years since I used perforce and back then it wasn't free at all and was quite expensive.
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Area Checkpoints and Script Revision History
« Reply #7 on: Nov 18, 11, 09:24:21 AM »

Well, I don't know, maybe for the whole suite of things it costs a bit.  But on the page describing the merge and diff tools, it says
Quote
Download your free, non-expiring, two-user copy of Perforce now, or request a 45-day evaluation license for your team.

Granted, I haven't read through all of the EULA; I just know I installed it, did not have to register it, and have been using it since last year.

The wiki page on the editor mentions paths to use for some other programs, and I added some directions for using TortoiseSVN's diff here.  However, since Tortoise stores its files for server scripts in a different location from client scripts, you need to manually change the paths in the editor's settings anytime you want to switch, so I ended up not using that.  Which is too bad, as I really like their diff program.
« Last Edit: Nov 18, 11, 09:31:48 AM by ScottZarnke »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

JoshHalls

  • Founding Professional
  • *****
  • Posts: 335
    • View Profile
    • The Repopulation
Re: Area Checkpoints and Script Revision History
« Reply #8 on: Nov 18, 11, 10:23:24 AM »

Same thing here as well, just installed that and you can view diffs. 
Logged
Co-Owner/Programmer - The Repopulation