• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

JNPG / Newgen: Any interface for version control?

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

Is there an interface for using version control?

Ideally I'd like to use SVN (subversion) and put my JASS code up on googlecode (it's where I manage all my other projects).

Then I'd like the JNPG to automatically (given a pathname) look up where my JASS code is on my computer and insert it into the map everytime I load it. This would make collaboration 100% easier and tons of version control (you can rollback with a simple command).

Anyway to do this out of the box or do I need some specialized home-brewed script (if so can someone help me)?
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
SVN does all those things automatically.

The only problem is getting those text files to be imported to WC3 editor automatically each time.

I think I understand the //! import command,

but how do I let it re-build the hierarchy I had organized without hardcoding it?

e.g. suppose my directory structure of the code is exactly like this, when I re-import all my files from some directory on my computer, the structure/order is the same.

s31xkg.png
 
See:
http://www.wc3c.net/vexorian/jasshelpermanual.html#import

When you use //! import, it won't actually import the script into a trigger. So if you write:
JASS:
//! import "file.j"
In a blank trigger, it will compile "file.j" and put it in your war3map.j, but the trigger will still just read "//! import "file.j". All editing from that point should be done externally (there are a couple of options for that: check the tools section. I prefer sublime with Ruke's JASS add-on, but you might opt for something with auto-complete).

So it won't affect the directories. If by hierarchy, you meant that you have some hierarchy where one script requires another, which requires another, etc. you can use //! import within that subclass/sub-script to allow it to compile properly.

The only problem is getting those text files to be imported to WC3 editor automatically each time.
If you expect it to display updated code in the trigger editor, it may be more difficult than it seems. Most changes to the map's MPQ require you to reopen the map, because the editor doesn't refresh to check for changes in the map's code. In your case, if you would want to sync the triggers and directories with another person, you'd probably send him the map's wtg file and then replace your current one.

But perhaps I didn't understand you properly. If you clarify a bit, maybe there'll be a more feasible way.
 
Status
Not open for further replies.
Top