Age of Kings Heaven 139
Welcome
Downloads Home
Best Files
Review Guidelines
Main site
Forums
Code of Conduct
Search

Advanced Search
Utilities
Home
New Releases
New Reviews
New Comments
Top-Rated

Submit File
Browse Categories
New Files
Recent Updates

Downloads Home » Utilities » Trigger Script Editor

Trigger Script Editor

Download File Post Review Post Comment
(Updated on 04/26/11)
Author File Description
Sword_of_STORM
File Details
Version: The Conquerors
Trigger Script Editor

v. 2.0

This version does not use XML format. Instead it uses a simple text format.

You need to have java installed for this program to work. Download whichever version you like ( and fits your operating system ) from

http://java.sun.com/javase /downloads/index.jsp

For those who are not programmers, it is better to install only the runtime environment ( JRE) because it is only 15 mb compared to the full development kit which is like 70 mb.

The best way to find out if java is installed or not it to go to the command prompt and type java
If it gives some options, usage etc. then you do have it. If it gives bad command or filename then you don't.


Options

1. Load scenario
2. Export triggers to a script file ( txt )
3. Import triggers from a script
4. Write the imported triggers to a scenario

Steps 1, 2, 3 are necessary for 4

Eg. Open atlantis.scx, export to atlantis.txt, make changes to atlantis.txt, import triggers from atlantis.txt ( or another file ) and write to new scx file.

The script used is pretty straightforward. Just make sure that each line is in the form
Variable:value

Lines beginning with # will be ignored as comments.

Look at the script generated to get an idea

Best way is to copy triggers and just change the values

TODO:
Fix a problem with texts that contain a newline character
Add unit constants, resource constants, building type constants, etc.
Add support for other languages like Win-1252
Pages: [1] 2 » Last »
AuthorComments & Reviews   ( All | Comments Only | Reviews Only )
The_Biz The ability to edit triggers as text is an extremely useful utility. Not only does it assist with the ease of management of large scenarios, but combined with some basic programming skills, you can create effects that are just too tedious using traditional means.

Imagine you want the ability to lay a landmine at a specific location. You know how to do that with triggers. Now imagine if you want to allow this for every tile on the map. This utility is one piece of a solution that will allow you to do it in 5 minutes instead of 5 hours. Changing the behavior of each one of those thousand triggers is another 5 minute change instead of a 5 hour one.

Another example is if you want to modify the terrain after the game starts by spawning forests and stuff. Extremely tedious to do in the AoC editor, but far easier in script.
labrax Amazing, now it feels easier to edit my map.

I had to change the "script editor.bat".
It's now like this:
--
cd Sources
"C:\Program Files (x86)\Java\jre6\bin\java.exe" -Xmx200m scripteditor
pause
cd ..
--
aagfire you are really great
danielpereira Great tool! :D It helped me a lot!
Also, I have a question: will you patch it, so it can use the new UserPatch triggers ?(Change armour, Change range, Change speed, etc..)
Sword_of_STORM
Official Reviewer
File Author
No plans for making userpatch updates right now. Sorry.
Azzzru It don't work for me plz help me !

Error message when i try save scenario:
==============================================================================
1 Load scx file 3 Import triggers to scenario
2 Export triggers to script 4 Save scenario 5 Quit
==============================================================================
4
Enter the name of the output file ( stored in ../scenario, eg output.scx )
output.scx

Triggerstart :343083
Parsing ../scripts\RTDmicro.txt
Number of triggers: 6529
Error reading trigger java.lang.StringIndexOutOfBoundsException: String index out of range: 0
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Unknown Source)
at scriptreader.read(scriptreader.java:32)
at scenario.write(scenario.java:147)
at scripteditor.main(scripteditor.java:100)
error in writing file java.io.FileNotFoundException: triggers.hex (The specified file is not found)
java.io.FileNotFoundException: triggers.hex (The specified file is not found)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at scenario.write(scenario.java:153)
at scripteditor.main(scripteditor.java:100)

Thanks

[Edited on 09/08/13 @ 03:08 PM]

Sword_of_STORM
Official Reviewer
File Author
Send me the scenario and triggers file and I'll have a look at it. Email in profile.
Azzzru It's ok i found the bug:

It's because in my scenario there was a display instruction using many new line after my text (\r \n), and your java application didn't like this. (StringIndexOutOfBoundsException: String index out of range: 0)

You should fix it i think.

Thanks

[Edited on 09/13/13 @ 06:46 AM]

lunascii I tried to copy and replace a word in multiple names in my scenario and when I loaded it back in trigger studio the order of all my triggers (2000 triggers) was out of whack, and on top of that my triggers didn't seem to be renamed. Is it somehow saving the names of the triggers? Is there some reason that it changes the order of my triggers?
sonic114 can i make map smaller than 120x120?
Pages: [1] 2 » Last »

Post Review Post Comment

HGDL v0.7.1

Login
Forum Username:


Password:




Create a new account
Forgot password?
Statistics
Downloads:1,014
Favorites: [Who?]3
Size:391.13 KB
Added:04/17/10
Updated:04/26/11