You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Text Trigger Editor from Scenarios
« Previous Page  1 2  Next Page »
posted 04 January 2010 10:55 PM EDT (US)   
AOMed don't work with .scx files so there has been an uprise in tools to make up for it. However the one thing I expected would be made first, but hasn't, is a plain-text editor that opens up an scx and lets you edit the triggers; copy and paste entire groups or just specific triggers, change group names (AOM doesn't let you change the name of Ungrouped, but if you change it in an scn with AOMed it still works fine, so this would be nice to have) ect, because it would all be text based, preferably XML syntax if possible. Or at least be able to edit .trg files that you can save with Nottud's ultimate editor superpack.

If people are too lazy to make it [which is OK] then I might be able to make it if somewhere to help me decode the scx format. I heard mentioned somwhere in the download section that AOM uses the l33t compression format, and sure enough, the first four letters of a scenario are "l33t". After I figure that out I would (hopefully) easily be able to make this program, and make it with no extra stuff required, like .net framework and dlls and all that.

If this has been done already PLEASE PLEASE link me because I have been looking for something like this for ages!

Thanks for all help and programming,
-Green_Turtle.

AOM Scenario Trigger Editor Official Thread!

Chat Contains without OOS for online!
Want to know what happens when you mess with water and elevation in a random map script? Well, you'll want to see this, then.

[This message has been edited by Green_Turtle (edited 13-32-2011 @ 13:60 AM).]
Replies:
posted 04 January 2010 11:22 PM EDT (US)     1 / 45  
invent00r is working on a SCN editor, and a scx if he can get to it.

Maybe you two can work together?

☭ Long live the Turk ☭
"Xzy is the worst parts of kman and legion combined, only with proper spelling so you know he's smart enough to act otherwise if he wasn't such an idiot." - theferret
"Xzy is like all of the terrible Guardian contributors rolled into one person. Proof that you can genetically engineer a humanoid abomination." - Fiindil
posted 05 January 2010 07:52 PM EDT (US)     2 / 45  
Well, I wouldn't mind that, but I really just want to be able to edit the triggers themselves from the scenario. I know that the trigger setup from the XML is saved with the scenario, along with the parameters the user filled in, but I'm not sure how to decompress and re-compress the scx scenario files because of the l33t thing.

I could probably do .trg files, I'll try for that first. This is gonna be a lot of trial and error. At least I don't have to labor on the user interface!

BTW if you want to know what software tool I program with just ask

AOM Scenario Trigger Editor Official Thread!

Chat Contains without OOS for online!
Want to know what happens when you mess with water and elevation in a random map script? Well, you'll want to see this, then.

[This message has been edited by Green_Turtle (edited 13-32-2011 @ 13:60 AM).]
posted 05 January 2010 09:49 PM EDT (US)     3 / 45  
I actually looked into this about two years ago and actually managed to email the creator of AOMED for tips. He actually gave me a clue as to the compression technique used on the SCX files. I believe it was a standard compression routine that is a common library used in c/c++ in the older days. I didn't take it far though.

In all your science of the mind, seeking blind through flesh and bone
Find the blood inside this stone
Well, I know I've never shown what I feel, I've always known
I plan my vengeance on my own - and I was always alone
posted 05 January 2010 10:09 PM EDT (US)     4 / 45  
Invent00r had something that turned them into readable files.

Triggers would be the easiest thing to parse.
posted 06 January 2010 01:49 AM EDT (US)     5 / 45  
I actually looked into this about two years ago and actually managed to email the creator of AOMED for tips. He actually gave me a clue as to the compression technique used on the SCX files.
do you still happen to have one of the email? If so, it would be very helpful if you post it here or email me.
posted 06 January 2010 05:08 AM EDT (US)     6 / 45  
I have like a an old debug version that does work and converts the scenario into one file with the whole lot in.

It alsomsot certainly uses a DLL file though but if that files in not internal to the exe it will be provided with the program.

The boy with the mad imagination
Prepare for the ultimate duel!
Learn to use all my triggers and what you can do with them. Visit here.
Find out and download the transform trigger here.
Play some minigames I have created outside AOM including some 3D games here.

[This message has been edited by nottud (edited 01-06-2010 @ 05:09 AM).]

posted 06 January 2010 07:52 AM EDT (US)     7 / 45  
Hmm, ok. Well, I wil start out with .trg files first since they aren't in some compression format. After that I'll se then if doing a scx comvter would be neccissary. (If somone has made one for the public by then or not)

Thanks guys. I'll keep you up on the progress.

AOM Scenario Trigger Editor Official Thread!

Chat Contains without OOS for online!
Want to know what happens when you mess with water and elevation in a random map script? Well, you'll want to see this, then.

[This message has been edited by Green_Turtle (edited 13-32-2011 @ 13:60 AM).]
posted 07 January 2010 11:18 AM EDT (US)     8 / 45  
Here is my conversation from two years ago with the author of AOMED:

Good afternoon,
do you have a Titans version that can open SCX files?



As far as I can remember, I never tried updating AOMEd to handle SCX
files. (The latest released version should have the latest code that I
wrote - I haven't worked on it more recently.)

and if not, is it possible to see your source code for AOMED, that I can
try to learn and update the editor


AOMEd has some button like "Advanced options" which then lets you
extract the source code. Or ctrl+alt+shift+triple-click (I think) on the
main AOMEd window and it should do the same. I expect the code wouldn't
be particularly easy to run (since it relies on old versions of various
Perl libraries that probably don't work any more), but maybe it'll work
or at least give some useful information.

do you know of any
websites that explain the format of the SCX file so I can help this person?


I'm not aware of anything that describes the format, other than AOMEd's
source code (which doesn't try to describe it in a useful or readable way).

Fortunately it's a fairly uniform format - the whole file is compressed
(with zlib), and then it's split into lots of independent sections - so
it's possible to change some small parts without having to understand
all the rest of the file. But I can't remember much of the detail now,
so I don't know whether what you want to do would be relatively
straightforward or impossible, and I've lost interest in working on
AOMEd ever again, so I can't be particularly helpful. But I'll wish you
good luck if you do want to try this, and I'd be interested in seeing
any results :-)


The most important part is the ZLIB mention, I believe. As a programmer, I believe this is a module you can add to your project so that you can add the functionality of zip/unzipping files at will to your project. I never took the time to look it up, but theoretically, if the ZLib library is available somewhere, it could be included into a project and a SCX might be able to be unzipped into its parts, the parts edited and rezipped back into a SCX.


In all your science of the mind, seeking blind through flesh and bone
Find the blood inside this stone
Well, I know I've never shown what I feel, I've always known
I plan my vengeance on my own - and I was always alone
posted 08 January 2010 06:00 PM EDT (US)     9 / 45  
Hmm, I think I've heard that mentioned before on the forums for the software I use. I'll look into it.

So far I have discovered that in .trg file the triggers aren't grouped at all... -_- but instead somehow have a sort of ID thing that at the very end of the file is in a list next to the name of the Group. This makes it very difficult to parse the file correctly, it requires several itterations on different aspects of the file.

I have, however, succeeded in editing a .trg file with Notepad++ without it damging the file in any way in terms of the null characters and whatnot. So if you're desparate for something like this (like me), then get Notepad++ in the mean time.

Thanks, still working hard on this. I haven't much free time with our school exams next week and all this reveiaw, though.

-Green_Turtle.

AOM Scenario Trigger Editor Official Thread!

Chat Contains without OOS for online!
Want to know what happens when you mess with water and elevation in a random map script? Well, you'll want to see this, then.

[This message has been edited by Green_Turtle (edited 13-32-2011 @ 13:60 AM).]
posted 09 January 2010 07:13 AM EDT (US)     10 / 45  
Yep. There's the first few bytes that say l33t and the rest of the files ES made are usually zlib encoded, except bar files. They're not compressed at all.

Also, I managed to pick up the aoe3ed source somewhere, it's written in c++ so much better understandable . It only does bar, ddt/bmp and xml/xmb though, but I think xmb uses a very similar technique anyway. If you're interested, contact me somehow.

If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak
posted 09 January 2010 03:31 PM EDT (US)     11 / 45  
OK, major breakthrough. I just found out that the program I use has support for ZLIB! I don't excatly understand what I will have to do in order for it to work with scx files, but this will make things alot easier! I might be able to do scx files after all and not ever have to worry about the trg files until later!

-Green_Turtle

AOM Scenario Trigger Editor Official Thread!

Chat Contains without OOS for online!
Want to know what happens when you mess with water and elevation in a random map script? Well, you'll want to see this, then.

[This message has been edited by Green_Turtle (edited 13-32-2011 @ 13:60 AM).]
posted 10 January 2010 06:30 AM EDT (US)     12 / 45  
You better find a programming library that can handle zlib .

If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak
posted 10 January 2010 07:55 AM EDT (US)     13 / 45  
I managed to pick up the aoe3ed source somewhere
It's now available here (since I wrote it as part of 0 A.D.'s editing tools). Don't know if it even compiles, though.

In reply to Green_Turtle's email (I've mostly stopped using that email account): As far as I'm aware, SCN files are just a single zlib-compressed piece of data (preceded by "l33t" and the 4-byte uncompressed length of the file), not several compressed pieces put together. I'd be surprised if SCX files were significantly different. After decompression, the SCN data does consist of several chunks - it looks like I thought there were 12, each with a two-letter header ("Z1" for units, "TR" for triggers, etc) and then a four-byte length value, and then that many bytes of data before the next chunk. If you have the AOMEd code, default.fmt is where the format is described (look for "scn_aom") - it's not extremely easy to understand, but it's probably better than the Perl, and it at least shows roughly what data the file contains.
posted 10 January 2010 08:06 AM EDT (US)     14 / 45  

~Guard of Olympus ~
_______________________________________
Jag ser mot solen och tankarna de för mig hem till AomH SD igen
Learn how to create a website from scratch!
_______________________________________
Dark Times|My work (4.6)|Teaser #2
posted 10 January 2010 08:42 AM EDT (US)     15 / 45  
I think that's a typical multifile data compression scheme:

[how many bytes next file is][that many bytes][how many bytes next file is][that many bytes] (repeat)

I had worked with a library where it reads http request objects and parses them into their various pieces. i.e. if it is a multiple file upload page, etc..

I downloaded a ZLIB.DLL as well as a VB wrapper project and roughly tried to decompress the file, but it couldn't citing error -3 which I had no information about :S

Perhaps what it needed then, is to skip the 'l33t' bytes at the front of the file and try to guess how many bytes long the segment length value is, get that byte count after skipping over that, then load that many bytes from the file and decompress that using zlib, then get the next byte count. That would be great if it uses the same multi-file segmenting like with a SCN file.

In all your science of the mind, seeking blind through flesh and bone
Find the blood inside this stone
Well, I know I've never shown what I feel, I've always known
I plan my vengeance on my own - and I was always alone
posted 10 January 2010 02:18 PM EDT (US)     16 / 45  
Omg ykkrosh? AHAHA

____________
+|||SwordOfValor|||+
A Proud Member Of
0==[==========>
ValorStudios
<==========]==0
posted 10 January 2010 04:12 PM EDT (US)     17 / 45  
YKKROSH I LOVE YOU THANKS FOR THE .BAR PROGRAMS

Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
Automaton Metals Textures, New Custom Triggers
Upcoming Projects: Legacy - The Uprising, Destiny
6/12/1997, a day that will live in infamy.
posted 10 January 2010 05:03 PM EDT (US)     18 / 45  
I am very surprised by your presence, Ykkrosh, after finding out why the hell people are using your name now.

You might not know this, but your programs for this game is what kept AoM's community from dying. Because of this, I am forever grateful of you and your program.

I kinda knew that you were not using that email address because I sent you several email last year or two, and never got them back yet.

Oh well, Ykkrosh, just wanted to say this before you head out to the door and be gone for a while.

[This message has been edited by rjs23 (edited 01-10-2010 @ 06:29 PM).]

posted 10 January 2010 05:47 PM EDT (US)     19 / 45  
Right Elrich. I think you must enjoy to ignore my work. Or you just hate it ¬¬'.

Either way, as none of you recall, I did a Unit Editor\Mother Nature program that worked on both AoM and AoT. With this in mind, one can assume I've handled the .scx format. I could say a lot from it but I'd be wasting my time probably..

The source code is in one of those programs (or both) and it can help you extract it.
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 10 January 2010 07:11 PM EDT (US)     20 / 45  
Well, yeah, but which file deals with the format of scn and scx files? If it's all of them, then that's ok, I just don't want to waste my time. So far all I can find on the format is jibberish code that doesn't make sense to me, and I'd love to see some code that isn't uncommented pearl, like AOMed is.

AOM Scenario Trigger Editor Official Thread!

Chat Contains without OOS for online!
Want to know what happens when you mess with water and elevation in a random map script? Well, you'll want to see this, then.

[This message has been edited by Green_Turtle (edited 13-32-2011 @ 13:60 AM).]
posted 11 January 2010 08:58 AM EDT (US)     21 / 45  
Hmm, last time I checked there wasn't a source folder in that download!

@Green_Turtle
Look at Form1.cs.

If we knew what it was we were doing, it would not be called research, would it? - Einstein, A.
Master XS - AoM Code Reference - Trigger Loader - Trigger Requests - Chess

Wow, I never thought that I would actually know something before nottud did... it's actually not all that satisfying ~ Steak
posted 11 January 2010 08:47 PM EDT (US)     22 / 45  
OK, so when I skipped the first 8 bytes, decompressed it, and opened it with Notepad++, I found that for some reason it writes down every single unit, godpower, tech, ect that there is in the game... which is, odd... Because all it is I am testing with is a 64 by 64 map with no triggers and a single tower in the middle. What is the point of the game documenting everything that there is?

Well, I am definantly getting somewhere, and it's definantly working.

Thanks, everyone!

AOM Scenario Trigger Editor Official Thread!

Chat Contains without OOS for online!
Want to know what happens when you mess with water and elevation in a random map script? Well, you'll want to see this, then.

[This message has been edited by Green_Turtle (edited 13-32-2011 @ 13:60 AM).]
posted 12 January 2010 02:40 PM EDT (US)     23 / 45  
(Um, there's no reason for anyone to get so excited...)
I kinda knew that you were not using that email address because I sent you several email last year or two, and never got them back yet.
Yeah, I do check it occasionally but not very carefully and things get lost easily, and if I see something but don't reply immediately then I forget it . Better to use excors@gmail.com to contact me - I still might not get around to replying but at least I won't lose the message
What is the point of the game documenting everything that there is?
I don't remember any details but I don't think it struck me as a well-designed efficient file format. Lots of the files even had weird chunks of data at the end that looked very much like uninitialised memory, containing random bits from elsewhere in the process, which is a careless implementation bug. AOM's engine isn't the most consistently technically impressive design or implementation I can conceive of; you just have to accept its quirks.
posted 12 January 2010 10:34 PM EDT (US)     24 / 45  
@Invent00r: geez, dude. The only ignorance on my part is not intentional but due to being a do it yourself kind of guy (i.e. the hard way) and sporadically reading threads that I must have missed yours. I'll look it up now.

edit:
Oh that Gaia thing. Not interested in Gaia really, but I do see that it mentions breaking an SCX apart, but kcuFin' A for giving me a hard time. I'm getting really done with this place these days..


In all your science of the mind, seeking blind through flesh and bone
Find the blood inside this stone
Well, I know I've never shown what I feel, I've always known
I plan my vengeance on my own - and I was always alone

[This message has been edited by Elrich (edited 01-12-2010 @ 10:53 PM).]

posted 13 January 2010 11:57 AM EDT (US)     25 / 45  
Well I'm very sorry. I wasn't being that serious to be honest.. Don't take it the wrong way. I get frustrated sometimes, and we all do. It's nothing personal so don't take it the wrong way.
I admire and enjoy reading your posts so don't mind this little annoyance of myself impose anything on your devotion to this community .

Anyways, on subject, if AoMEd reads the .TRG part inside a scenario correctly and outputs correct xml, and the .TRG files saved on AoT are the same as those saved in AoM it should be possible to port it with some ease.
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
« Previous Page  1 2  Next Page »
Age of Mythology Heaven » Forums » Scenario Design » Text Trigger Editor from Scenarios
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames