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

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Would it be possible to draw map terrain with an external program?
posted 07-28-12 11:33 AM CT (US)   
Cossacks and American conquest have a tool where you can draw your terrain in a new window. Almost like paint. And in trigger studios you can change the terrain also in the same way but it's just not very user friendly. So I was wondering if it could be done by programming. I myself am familiar with programming(mostly java) but I'm afraid I lack the knowledge to extract and import the data into .scx format.

Such a program would be really helpful to replace the hours spend on filling the map with different kinds of terrain like water.
Replies:
posted 07-28-12 01:02 PM CT (US)     1 / 34  
Check this out:
https://github.com/apreiml/genieutils/tree/master/include/genie/script
Apre claims that "reading of scn/scx files (partly)" is done.

Here is apparently the structure of scn/scx files:
https://raw.github.com/apreiml/genieutils/master/doc/scx_format.txt

Advanced Genie Editor
Follow coding here and here.

[This message has been edited by Keisari Tapsa (edited 07-28-2012 @ 01:07 PM).]

posted 07-28-12 01:12 PM CT (US)     2 / 34  
I know someone made a program for aoe1 where you could add objects that you had "painted" in a program, to create nice terrain from rocks and such instead of the basic 2 terrains.

TS can read the scx and you can "paint" the map pixel by pixel, this takes way too much time though. So a program for this would be very nice!
posted 07-28-12 03:27 PM CT (US)     3 / 34  
Thanks, I noticed that Trigger studios is a free source program so when I got time I can dig into the code.

I think this is one of the most important paragraph in the structure file you gave a link too.
==== Map ====

The terrain data in the map is stored as a 2-D (square) array, even though, of
course, AOK displays it as a diamond. The origin (0,0) is in the upper-left of
the square which becomes the left corner of the diamond. It is stored in
row-major form.
So all the program will have to do is get this array out of the .scx file and replace it again once you are done editing.
posted 07-28-12 04:42 PM CT (US)     4 / 34  
I tried convincing Impeached to make a paint-like editor for terrain but he had too many projects already unfortunately. Things like a circle tool etc would be quite useful for the multi player scene, i'm sure there would be similar tools useful for Single player too.
posted 07-28-12 05:18 PM CT (US)     5 / 34  
Impeached would be good at this. Most of the data in the .scx file is compressed so that will need to be decompressed too. Maybe I'll try to contact Digit and see if he can help answer some questions.
posted 07-28-12 05:43 PM CT (US)     6 / 34  
Trigger studio has this sort of already, in the sense that you can do terrain in it. However, it does not have a 'paint' like interface with brushes and such. Should be easy to create though, for someone with knowledge of the scx inner workings. Jatayu could probably do it.

"And Matt is a prolific lurker, watching over the forum from afar in silence, like Batman. He's the president TC needs, and possibly also the one it deserves." - trebuchet king
posted 07-28-12 07:58 PM CT (US)     7 / 34  
Yeah it would be a good aokts add on, should be no need to make a separate program for it.
posted 07-28-12 08:15 PM CT (US)     8 / 34  
If Digit is still around and is prepared to implement this little add-on that would be great.
posted 07-28-12 10:39 PM CT (US)     9 / 34  
It is open source so anyone can do it.
posted 07-29-12 06:29 AM CT (US)     10 / 34  
Don't think I know c++ well enough to write such an add on.
posted 07-31-12 11:07 AM CT (US)     11 / 34  
Yeah, it would be good if you would have such tool, that could for example move terrain of your map. But if it would be possible to move also coordinates of locations and areas in effects and conditions of triggers. Usually you can use copy paste in AOK editor, but this way is very limited.

[This message has been edited by rumburak24 (edited 07-31-2012 @ 11:12 AM).]

posted 07-31-12 12:08 PM CT (US)     12 / 34  
I did think about this kind of thing when I made my trigger script editor but in the end I decided, why would I ever use such a thing? I draw every inch of my terrain in the map editor because that's how it'll look in the game and no external editor can ever do that.

If you really want to, though, feel free to go through the code of TSE ( it's in java btw ) and make your own modifications.

,
Jatayu O===|¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯/
`
Battle of Saraighat, 1671|Atlantis, the Lost Realm|AOE Roman Modpack|My profile
ि
StormWind Studios
posted 07-31-12 04:01 PM CT (US)     13 / 34  
Great, thanks Jatayu.
I'll check it out.

EDIT:
I've been looking at the classes and I think I get the general idea. Do you have any javadoc for the code or do you have an email where I can ask you questions?

Greets,
Jan

[This message has been edited by den cekke (edited 07-31-2012 @ 05:48 PM).]

posted 08-01-12 11:18 AM CT (US)     14 / 34  
You can ask me questions. Email in profile is fine.

,
Jatayu O===|¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯/
`
Battle of Saraighat, 1671|Atlantis, the Lost Realm|AOE Roman Modpack|My profile
ि
StormWind Studios
posted 08-02-12 03:16 PM CT (US)     15 / 34  
I've started on the program and progress is being made.
The paint program itself is already usable. This map I made with the program in a matter of seconds:

[This message has been edited by den cekke (edited 08-16-2012 @ 09:31 AM).]

posted 08-02-12 03:22 PM CT (US)     16 / 34  
I am having an eyegasm by looking at that picture, Den! I want it, and I want it now!

Looks really awesome!
posted 08-02-12 04:18 PM CT (US)     17 / 34  
I would have thought you would have made the same number of pixels as there is tiles. But if that method works well then that is cool.
posted 08-02-12 04:46 PM CT (US)     18 / 34  
Lol thanks, I still have a lot to do but I'll try to finish it before the end of the summer.

@Rambit This map actually has the same amount of pixels as a map(240x240) the numbers you see are the coordinates the mouse is at. I will consider making the pixels bigger because now one pixel is hardly visible.

As you can see I added a spray tool so you can mix terrain easier.

[This message has been edited by den cekke (edited 08-02-2012 @ 04:47 PM).]

posted 08-02-12 07:50 PM CT (US)     19 / 34  
Oh wow, it looks like like a regular paint picture with that amount of pixels. But yeah enlarging that would probably make the tiles more obvious.
posted 08-02-12 08:03 PM CT (US)     20 / 34  
Great! This will help me a lot on a thing....
posted 08-03-12 00:12 AM CT (US)     21 / 34  
Can you make it so that it's possible to draw the picture in an external program (like MS Paint) and then import it into your program?

Advanced Genie Editor
Follow coding here and here.

[This message has been edited by Keisari Tapsa (edited 08-03-2012 @ 02:34 AM).]

posted 08-03-12 03:08 AM CT (US)     22 / 34  
I think importing bitmaps should be possible if it has the same colors as the ones my program uses. Maybe I can make a palette for it so people can only use a limited set of colors for it.

New screenshot:


Version T1.1
-I added more terrains and upgraded the interface a bit.
-Can now load scenarios hard coded.

Version T1.2
-Zoom in and Zoom out function added(Still need to fix issues created by this feature).
-Possible to create a new map with the program(just in program , not yet implemented so it creates new .scx file).

Version T1.3
-Rotating map half implemented
-Can now load any scenario with a filechooser.

[This message has been edited by den cekke (edited 08-05-2012 @ 07:25 PM).]

posted 08-11-12 03:34 PM CT (US)     23 / 34  
Have you got a clue as to when this is to be uploaded into the Blacksmith?

Advanced Genie Editor
Follow coding here and here.
posted 08-11-12 03:47 PM CT (US)     24 / 34  
It looks so awesome! Keep it up
posted 08-12-12 08:03 AM CT (US)     25 / 34  
I won't have the time to continue to work on this project until september so the earliest release date would be October or November.
posted 08-12-12 09:55 AM CT (US)     26 / 34  
darn! this would have been great for the current survivor contest.

Proud owner of Splash Splash XLIV: Leave it there for someone to find, Which is on record for being the fastest thread to reach 2500 posts - which was completed in 28 hours and 17 minutes, from start to finish!
Yeah, the republican party is pretty much one big schizophrenic ball of contradictions nowadays. - Ax_man1
double post for milestone, then relentlessly bash on the community for the hell of it... stay classy thymole. - Lurker
posted 08-12-12 04:11 PM CT (US)     27 / 34  
If there are other people with sufficient knowledge of Java I can make it open source and they can help finish it(the code needs a big cleanup too though, it's a mvc nightmare right now).
posted 08-13-12 01:34 AM CT (US)     28 / 34  
I have enough work in AGE 2. Why don't you already make it open source?

Advanced Genie Editor
Follow coding here and here.
posted 08-15-12 09:37 AM CT (US)     29 / 34  
The code is a real mess and the javadoc and comments is a mix between Dutch and English so I doubt it would actually help to make it open source. I'll try to clean it up and put the code online somewhere next month.

[This message has been edited by den cekke (edited 08-15-2012 @ 09:45 AM).]

posted 08-15-12 12:32 PM CT (US)     30 / 34  
Making it open source would be cool, because then various AOKHers with sufficient Java knowlege (Jatayu, for example) could conribute every now and then. The whole thing could be a community-wide project shared over SourceForge or some other project-sharing upload/download site.

As for the program; I think it's a truely amazing thing already. I can see it being used to quickly map out something - though personally I would then go into the in-game editor to do the details.

If it's ever possible; Could there be a good zooming feature where it could go to a 1:1 or 4:1 scale and use the proper in-game textures, so we could get a rough idea of how it would look ingame?

Will all terrains eventually be implemented, with various brushes and tools?

Proud Member of Black Forest Studios
Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010
posted 08-15-12 06:23 PM CT (US)     31 / 34  
Making it open source would be cool,... upload/download site.
I got stuck because something goes wrong when I try to save the scenario. If I make it open source ppl might be able to help me out so I guess I'll do that.
As for the program; I think it's a truely amazing thing already...to do the details.
Thanks, I think with this program you indeed can speed up map making a lot. You can make the general layout in the program and then go to the editor to add more details and eye-candy.
If it's ever possible; Could there ... look ingame?
I succeeded making a zoom option(there are 4 scales at the moment) but swing is making a problem about adding an image to a scrollpane(aka I can't scroll the map after zooming in). Also the brushsize doesn't re-size when zooming in but I think I can come up with a solution for it.

But that's probably not what you mean. You want to show the actual map with textures when you zoom in? I think it could be done but it will be hard to do and very machine intensive(still instead of zooming to see the texture I would just make a new not editable image to have a preview of it).
Will all terrains eventually be implemented, with various brushes and tools?
For now I implemented +- 22 terrains of ?40. I can implement all of them but I doubt you need them all.
There are 5 brushsizes and 2 types of brushes: Spraying and painting but it's possible to add more.

[This message has been edited by den cekke (edited 08-15-2012 @ 06:26 PM).]

posted 08-15-12 07:52 PM CT (US)     32 / 34  
please make available all terrain types...
posted 08-15-12 09:09 PM CT (US)     33 / 34  
Even farm1, farm2, old water, old grass, foundation, water, bridge, farm constr1, farm constr2, farm constr3, ice 2, snow foundation, ice beach, snow road 2 and KOH? Many of these use the same graphics as other terrains.
posted 08-16-12 04:50 AM CT (US)     34 / 34  
The ones placable with UserPatch would be nice. Then you can edit the same terrrains in game as in this program
Age of Kings Heaven » Forums » Scenario Design and Discussion » Would it be possible to draw map terrain with an external program?
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames