wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Tools
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 07-16-2009, 07:14 AM   #61
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Quote:
Originally Posted by D.V.D
Could you use wc3 functions in this code or do you have to make another trigger to do the wc3 functions?
What WC3 functions do you want to run? This program doesn't run at runtime but rather as a preprocessor. So no, you can't use wc3 functions. However, which functions would you like to use in a preprocessor?

Quote:
You think wrong, how can i say to GMSI run a particular script and not just be open ?
By just specifying the name of the script to run behind GMSI. It can be called with arguments. The first argument is the script or map to run. You can add more arguments, these will be handed to your script and be available in the @args array.

If you specify a map instead of a script, GMSI will search in that map for a Trigger Comment named script.ini and will treat the comment in this trigger as gsl code and execute it. So you could just call GMSI with your map as argument (how it is done if you press "execute this map's script.ini") and write an appropriate script.ini. Since you can only pack a small amount of code in a trigger comment, the best way would be just to include an external script file there.
__________________
My stuff can be found at www.eeve.org

Check out latest GMSI !
gekko is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 07-16-2009, 10:21 PM   #62
D.V.D
User
 
Join Date: Jun 2008
Posts: 60

Submissions (2)

D.V.D has little to show at this moment (8)

Default

THen I understood the program wrong. I thought it runs as the Jass or vJass. Atleast it will save time making all object editor stuff.
D.V.D is offline   Reply With Quote
Old 07-18-2009, 09:40 PM   #63
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

@gekko :
I'm lost.
Ok i will try to make the code in gsl, and when i think it would be finished could you make it able to run when i save a map with newgen plz ?

Last edited by Troll-Brain : 07-18-2009 at 09:40 PM.
Troll-Brain is offline   Reply With Quote
Old 07-29-2009, 07:19 PM   #64
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Quote:
Originally Posted by Troll-Brain
@gekko :
I'm lost.
Ok i will try to make the code in gsl, and when i think it would be finished could you make it able to run when i save a map with newgen plz ?
I dunno. I can try it. However I dunno how that works exactly, too.
__________________
My stuff can be found at www.eeve.org

Check out latest GMSI !
gekko is offline   Reply With Quote
Old 08-01-2009, 11:03 PM   #65
Antinoid
User
 
Join Date: Feb 2006
Posts: 38

Antinoid has little to show at this moment (5)

Default

How to access Map in files included in script.ini?
loadMap in every included script?
Tryed different things but dont get it to work :(

btw great tool
__________________
~ empty ~
Antinoid is offline   Reply With Quote
Old 08-02-2009, 01:33 AM   #66
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

I downloaded recently this intersting tool. I have one problem, tho.

Every script i have tried to run that involves Map I/O makes the thing to I guess crash. I mean no visible error, but it seems script execution just halts and it is finished. I can't even run the showfunctions.gsl example for some reason. Do I need something in particular to make this work?

Standard IO seems to work fine.

EDIT: Java Console outputs errors similar to this:
Quote:
Exception in thread "Thread-6" java.lang.Error: WTF UnitsDOO!-1
typeID => sloc
x => 5376.0
y => -2112.0
z => 420.5
owner => 1
rotation => 4.7123895
scaleX => 1.0
scaleY => 1.0
scaleZ => 1.0
hitPoints => -1
manaPoints => -1
mapItemTablePointer => -1
droppedItemSets => null
itemsInInventory => null
goldAmount => 0
targetAquisition => -1.0
heroLevel => 1
STR => 0
AGI => 0
INT => 0
abilityModifications => null
customColor => -1
waygateDestination => -1
randUnitFlag => -1
level => 1
itemClass => 0
rndUnitGrpNum => 0
rndUnitGrpPos => 0
availableUnits => null
flags => 2
unknownBytes => 0
variation => 0

at wcData.UnitDOO_File.fromFile(UnitDOO_File.java:132)
at wcData.MapHandle.loadPlacedObjects(MapHandle.java:207)
at systemCalls.Trap_LoadPlacedObjects.apply(Trap_LoadPlacedObjects.java:
27)
at script.LRfinalTokens.NativeFunctionDefinition.call(NativeFunctionDefi
nition.java:53)
at script.LRfinalTokens.FunctionCall.eval(FunctionCall.java:75)
at script.LRfinalTokens.SemicolonStatement.eval(SemicolonStatement.java:
30)
at script.LRfinalTokens.IfStatement.eval(IfStatement.java:42)
at script.LRfinalTokens.ScriptBracketStatement.eval(ScriptBracketStateme
nt.java:67)
at script.LRfinalTokens.FunctionDefinition.call(FunctionDefinition.java:
128)
at script.LRfinalTokens.FunctionCall.eval(FunctionCall.java:75)
at script.LRfinalTokens.ReturnStatement.eval(ReturnStatement.java:41)
at script.LRfinalTokens.ScriptBracketStatement.eval(ScriptBracketStateme
nt.java:67)
at script.LRfinalTokens.FunctionDefinition.call(FunctionDefinition.java:
128)
at script.LRfinalTokens.FunctionCall.eval(FunctionCall.java:75)
at script.LRfinalTokens.ReturnStatement.eval(ReturnStatement.java:41)
at script.LRfinalTokens.ScriptBracketStatement.eval(ScriptBracketStateme
nt.java:67)
at script.LRfinalTokens.FunctionDefinition.call(FunctionDefinition.java:
128)
at script.LRfinalTokens.FunctionCall.eval(FunctionCall.java:75)
at script.LRfinalTokens.ModifiedAssignDefStatement.eval(ModifiedAssignDe
fStatement.java:41)
at script.LRhighTokens.StatementList.eval(StatementList.java:49)
at script.ParsedCode.eval(ParsedCode.java:35)
at script.Script.execFile(Script.java:133)
at program.JobExecFile.execute(JobExecFile.java:49)
at program.WorkerThread.run(WorkerThread.java:24)
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.

Last edited by Alevice : 08-02-2009 at 01:54 AM.
Alevice is offline   Reply With Quote
Old 08-05-2009, 08:39 PM   #67
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Quote:
Originally Posted by Antinoid
How to access Map in files included in script.ini?
loadMap in every included script?
Tryed different things but dont get it to work :(

btw great tool
You can access the map you execute with map. Just map, this is the name of the executed map, just like if you had loaded it manually, like this

Map map = loadMap(...)

To get the total path of the executed map you can use @map.

@Alevice:
A WTF error means something got very wrong while reading your map. I will check this one to see what wen wrong.

edit: Looked it up: That error means an object is placed on your map that has an unknown random type. (-1). That either means your map is broken or blizzard added a new random category since i wrote this tool or the information about the wc3 file format was not complete.
__________________
My stuff can be found at www.eeve.org

Check out latest GMSI !

Last edited by gekko : 08-05-2009 at 08:43 PM.
gekko is offline   Reply With Quote
Old 08-05-2009, 09:28 PM   #68
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

I determined the error happens in Turtle Rock and derivatives I used for custom races and shit. It seems it bugs out with its preplaced units. I recreated a few, but some of the creep camps keep bugging out no matter whta I do :/

Every otehr map I have tested seems to work fine now.


Also, any chnace you get to document your xml.gsl script you have on YouTD? I want to use GMSI to export object data in xml format and then being able to reimport it semwhere else. I want to do this so I can inject custom races within maps easily.
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.

Last edited by Alevice : 08-05-2009 at 09:31 PM.
Alevice is offline   Reply With Quote
Old 08-10-2009, 01:06 PM   #69
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Quote:
Originally Posted by Alevice
I determined the error happens in Turtle Rock and derivatives I used for custom races and shit. It seems it bugs out with its preplaced units. I recreated a few, but some of the creep camps keep bugging out no matter whta I do :/

Every otehr map I have tested seems to work fine now.


Also, any chnace you get to document your xml.gsl script you have on YouTD? I want to use GMSI to export object data in xml format and then being able to reimport it semwhere else. I want to do this so I can inject custom races within maps easily.

If you need to edit that map with gmsi and you don't have to edit preplaced objects, you can use the advanced load function and just turn off loading preplaced objects. Then the error wont happen:
Code:
Map loadMap(string mapName,	bool loadObjects, bool loadPlacedObjects,
			bool loadPlacedDoodads,	bool loadTriggers, bool loadRects,
			bool loadSounds, bool loadImports, bool loadEnvironment,bool loadUnchangedObjects)

about the xml.gsl: It doesn't read all valid xml files, just the stuff i need for YouTD (no attributes for example). So it is rather a small hack then a fully featured xml library. That's why its not commented yet and not in the normal release of GMSI. If there is some need i can comment it.
__________________
My stuff can be found at www.eeve.org

Check out latest GMSI !
gekko is offline   Reply With Quote
Old 08-13-2009, 02:11 AM   #70
Antinoid
User
 
Join Date: Feb 2006
Posts: 38

Antinoid has little to show at this moment (5)

Default

Is the map var in script.ini global? Dont get it to work with script.ini.
Anyway got another approach (common gsl script) working :)
love this tool (probably took me more time than clicking OE stuff but the dynamic object creation/balance is great)
__________________
~ empty ~
Antinoid is offline   Reply With Quote
Old 08-13-2009, 08:22 PM   #71
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Quote:
Originally Posted by Antinoid
Is the map var in script.ini global? Dont get it to work with script.ini.
Anyway got another approach (common gsl script) working :)
love this tool (probably took me more time than clicking OE stuff but the dynamic object creation/balance is great)

Yes, its global. To be precise: Executing a map just exuctes the script executeMap.gsl in the folder /misc with the external parameter "@map" set to the path of your map. Here is its source:

Code:
global Map map = loadMap(@map); //Loads the map which was executed


//Search the trigger named script.ini
array a = map.script.triggers;
Trigger scriptIni = null;
for(int i: a){
	if(a[i].name=="script.ini"){
		scriptIni = a[i];
		break;
	}
}

//No script.ini found? ERROR!
if(scriptIni==null) fail("No trigger named \"script.ini\" found in the map " + map.fileName);

//Script.ini is no trigger comment? ERROR!
if(!scriptIni.isComment) fail("The trigger named \"script.ini\" must be a comment, but in this map, it is no comment!");

//sets the script path to this map's path that it can call libraries that are stored in the same folder as the map
setScriptPath(@map);

//Execute script.ini's comment as GSL code
eval(scriptIni.comment,"script.ini");
__________________
My stuff can be found at www.eeve.org

Check out latest GMSI !
gekko is offline   Reply With Quote
Old 08-14-2009, 03:22 PM   #72
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

does eval provide access to the current executing block? or it is exacutyed as if it were a different script altogheter?
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.
Alevice is offline   Reply With Quote
Old 08-14-2009, 08:10 PM   #73
Antinoid
User
 
Join Date: Feb 2006
Posts: 38

Antinoid has little to show at this moment (5)

Default

i had 2 vars with same name so i guess its a private block
__________________
~ empty ~
Antinoid is offline   Reply With Quote
Old 08-14-2009, 09:21 PM   #74
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Quote:
Originally Posted by Alevice
does eval provide access to the current executing block? or it is exacutyed as if it were a different script altogheter?
Er good question ;) I dunno. I wouldn't say it grants access, it is more like a function call iirc (and function calls also have no access to the variables of the calling block).

However, you can always assign variables as global, then you can access them, in every include/eval/call that you might execute.
__________________
My stuff can be found at www.eeve.org

Check out latest GMSI !
gekko is offline   Reply With Quote
Old 08-15-2009, 01:45 AM   #75
Dr.Willy
User
 
Join Date: Nov 2003
Posts: 37

Dr.Willy has little to show at this moment (4)

Default

Two questions:
1. Does GMSI support editing for all the data accessible via the WordEdit's object editor?
2. Does GMSI support "reverse engeneering"? As in take a map and create GMSI code that would result in the same data as in the map right now?
__________________
7-Zip | OpenOffice | Jabber | MLDonkey | Mumble
Quote:
<Aoi-chan> everyone's first vi session.
^C^C^X^X^X^XquitqQ!qdammit[esc]qwertyuiopasdfghjkl;:xwhat
Dr.Willy is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 04:22 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services