• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Using jasshelper to import libraries?

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
I can't find any information on how to compile vjass libraries to a map. When I run jasshelper it errors saying missing common.j blizzard.j and mappath.

Could anyone give me some information on this?
 
Level 12
Joined
Dec 2, 2016
Messages
733
Install WEX from here:SharpCraft World Editor Extended Bundle

After that you may need to replace addresses.xml file in the plugins folder.
SharpCraft World Editor Extended Bundle

After that you cam simply use vJASS code in your map. It will be automatically compiled when you save or test the map.

I did that, perhaps my directory is wrong.

I have this in the map header
Code:
//! import "./Scripts/imports.j"

Screenshot - e6baafc778da21c8ae7dd51725a89087 - Gyazo

Screenshot - e6bb04e58e111bf673a180fda8d53ffc - Gyazo


I can run the map but the scripts don't run and I get no error message.
There is a few zinc files that are imported in the imports.j file. That wouldn't matter would it?
Thanks.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
According to the manual it should look like this: //! import "subfolder\f.j" So no ./ and a backslash instead of the normal one.

If you test a map that is not saved, the map is copied to another location and the relative path might no longer work. It is recommended to always save the map before testing.

I have no personal experience with the import command or zinc, so my information is only based on the jasshelper manual.
 
Level 12
Joined
Dec 2, 2016
Messages
733
According to the manual it should look like this: //! import "subfolder\f.j" So no ./ and a backslash instead of the normal one.

If you test a map that is not saved, the map is copied to another location and the relative path might no longer work. It is recommended to always save the map before testing.

I have no personal experience with the import command or zinc, so my information is only based on the jasshelper manual.

I changed the file path and it's correct now, but now it's erroring and saying there is syntax errors.
Basically to sum this up, the game I'm working on. Our old developer passed away and didn't share the source with anyone. So a user took it upon himself to crack open the map and get the source files. The map was protected quite heavily. He succeed, he shares the files but didn't explain much of anything of how to properly use them. I'm currently remaking the game from scratch and am going to continue to do so since I'm quite close to finishing, but in the mean time our clan would love to host the cracked version with a few small changes until my version is ready.



All he said was this in his readme:

Code:
## Requirements:
- Cohadar jasshelper

## Building:
```
copy "%path_to_repo%\map.w3x" "%path_to_output%\vf.w3x"
cd "%path_to_cohadar_jasshelper%\jasshelper\cohadar"
"jasshelper.exe" --debug common.j Blizzard.j "%path_to_output%\vf.w3x"
```

I have the folder for codhar's jasshelper. But I have no clue what to do with it, do you understand his instructions?
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
The instruction explains what commands you need in the console.
1. You copy your map from one point to another. The map you are currently developing is copied to another place, so jasshelper does not change the base map.
You can do that manually in windows explorer if you prefer it that way.

2.You navigate to the location of cohadars jasshelper: cd "%path_to_cohadar_jasshelper%\jasshelper\cohadar"

3.you use hasshelper with the parameters on your copied map.

In this instruction the base map is named map.w3x and the map that will be compiled with jasshelper will be named vf.w3x
 
Level 12
Joined
Dec 2, 2016
Messages
733
The instruction explains what commands you need in the console.
1. You copy your map from one point to another. The map you are currently developing is copied to another place, so jasshelper does not change the base map.
You can do that manually in windows explorer if you prefer it that way.

2.You navigate to the location of cohadars jasshelper: cd "%path_to_cohadar_jasshelper%\jasshelper\cohadar"

3.you use hasshelper with the parameters on your copied map.

In this instruction the base map is named map.w3x and the map that will be compiled with jasshelper will be named vf.w3x
When I run jasshelper.exe I get this error message though: Screenshot - 4702d796646b900222c149375ed6f406 - Gyazo
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
You should be running the jasshelper with the command line (steps 2 and 3). Step 1 can be done with the windows explorer though.

In step 3 when you run jasshelper, you can specify the arguments:
"jasshelper.exe" --debug common.j Blizzard.j "%path_to_output%\vf.w3x"

I will try to explain in more detail.

You have one map you are actively developing. When you want to test, play or release the map you have to use jasshelper so all the scripts work.
In order not to break your original map, you first copy your map to different location and only use jasshelper on the copy.


1. navigate in windows explorer to your map
2. copy the map to a different location
3. copy the path of the copied map (map path) to a text file, so you can later use it again
4. navigate in windows explorer to jasshelper
5. copy the path of jasshelper (jasshelper path) to a text file, so you can later use it again

6. Start the command line: Hit the windows buttons and then R. Type cmd and hit enter. This will bring up the command line.
7. Copy the jasshelper path from the text file
8. Enter cd <jasshelper path> in the command line, where<jasshelper path> is the copied jasshelper path
9. Copy the map path from the text file
10. Enter "jasshelper.exe" --debug common.j Blizzard.j <map path>, where <map path> is the copied map path

Now jasshelper should do its magic and the map at map path should run.
 
Status
Not open for further replies.
Top