Mod editor

Mod editor

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Mod editor

Post by PauloMorfeo »

I'm building a mod editor for spring in mono (.NET implementation for Linux but multiplatform. And the download is smaller :P ) and MySql.
I'm doing it slowly because i'm making it academicly, using this project to learn mono.

I have the MySql databases for storing the mod's definitions mostly done. You have the 2 here:
ETA's database VR (beta)
ETA's database (beta)
They're files for the program DBDesigner. You can use it to see how the databases are constructed.
They work in a slightly diferent way with ETA's database (beta) trying to have all fields (tags) but i kind of gave up on that idea. That ETA's database (beta) is not complete with all tags (even though it has suport for extra tags). The ETA's database (beta) VR is more complicated but more versatile, relying exclusively on the addition of variable numbers of extra tags.
I'm thinking that i might include some triggers and some stored procedures in them, in the future.

So, about a mod editor, i want to ask:
- What things (beyond the obvious grafical editing) would it have to have to be good?
- Is it, in your opinion, an almost completely useless tool?
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Uh.. er... Well... erm...

could it have metal vs HP comparisons? And..... er.......
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

The only way this thing is going ot be useful is if I can compare anything to anything and then dump it into a file somewhere. In other words, very very exhasutive types of queries.

PARSE.UNITS(AAv1.03,AAv1.98) AND INPARSED SELECTIF AAv1.03.aircraft.speed > AAv1.98.aicraft.speed

For a very hacky example. It needs to be amazingly flexible. Otherwise it's not going to see much use.
mongus
Posts: 1463
Joined: 15 Apr 2005, 18:52

Post by mongus »

Wow paulomorfeo, that is a great task to accomplish.

Have you set initial goals for your work?

is the "web page" generator capability included as part of your project?

I assume that race balance, is done by hand, and by experience playing the game.

But there could be "aids" that a db can offer in this task.

I guess requests and ideas will show as you develop it and prooves usefull.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

mongus wrote:...
Have you set initial goals for your work?
...
Sure did. I've been thinking for a long time about this but i was always ending up with the same things over and over again for lack of organization. Things are organized and planned now and, because of that, it's moving forward.
1- General planning - done
2- Database planning - done
3- Database creation - done
4- Present database in the forums - done as you can see.
I wasn't really going to take the trouble of doing this step because i doubt anyone will be able to help with the database but ... here it is officially.
mongus wrote:...
is the "web page" generator capability included as part of your project?
...
No. Although much of the code can be re-used to easily create aspx pages since much of the unit-pack browsing through a web page is the same as it is with a form. But that would mean the creation of pages that would need to be hosted on a .net enabled web server.
Dragon45 wrote:... It needs to be amazingly flexible. ...
I'm aiming at it. Let's see how it turns out.
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

You could add in a button, 'Export to HTML' that just exports a batch of HTML files for the web page. I was thinking of doing something like that at one stage, but never got round to finishing it. I got quite a way, as it was able to load in custom HTML pages and output a formatted page for each unit. But using a database would just make ti that much easier. I can send the code that I made over if you want to include something like this. But its in VB6, not mono/.net or whatever your doing this in.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Maelstrom wrote:... I got quite a way, as it was able to load in custom HTML pages and output a formatted page for each unit. ... I can send the code that I made over if you want to include something like this. But its in VB6, ...
That's cool. If you could upload it to fileuniverse or something it would be nice (unless you want to keep it private). You can even keep the project files and everything if that was made with Visual Studio 6.0. I have student version of it.

I'm making it in C# (one of the many languages you can program for mono/ms.net in) but i can understand VB6 pretty much enough. I think such code may come usefull for an exporter in my tool, but i'll have to check it out.
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

http://maelstrom.niiil.com/files/ModWeb ... nerator.7z

How to use:
Run the program.
Enter the full path to a mod's .sd7 file.
Hit the button.

Have fun.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

it does not work?
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

It knida works. Just not to well. And the .exe in that download might not be the most current version. I dunno. I just compressed the whole folder as is. If you run it from within Visual Basic it should work, it just has a few bugs. Plus it does not handle download.tdf's, it has to use sidedata.tdf
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Moved slowly (as in almost nothing at all) the past weeks.
- Much things had to be taken care of in my search for job.
- My father had surgery to remove colon cancer. (leaving me with his tasks and stuff)
- Christmas and such.

For anyone who cares, i'm expecting to have it mostly finished around mid january. (15th+)
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

You may also be interested in a build tree editor I made. I never released it, but you might find it useful.
http://maelstrom.niiil.com/files/Build% ... Editor.zip

It can load sidedata.tdf, and download/*.tdf build trees. You can then edit the build tree with in the program, adding, removing, reordering and renaming any builder or buildee. Also of worth could be the way I load in the files. The few functions that come in this program can load almost any Spring text file. fbi's, tdf's, smd's, and the rest. They are basically undocumented, so if you cant understand them, ill explain what they do.

You could also look at the excel FBI editor I made, which you can grab from here:
http://maelstrom.niiil.com/files/FBI%20Editor.xls

Hope this helps as well.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Cool, thanks!
That will probably be usefull to see how you handled it.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

how is this project going??
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Ho, you ressurected this from the dead :lol: . The thread i mean, not the project.

The project is not dead. It's strongly moving forward and quite hapily in all senses, which include my own hapines, which is a nice adition. As can be confirmed by my, almost, total absense from the Spring (worky worky). But, having to trim down 2000 eucaliptus(?) trees before spring (the season) has been proving hard.

- GUI is complete. I've already tested it in Red Hat, Suse and Windows and it worked nearly perfect. Not very pretty but usefull and far from ugly.
- I can already control the databases in the MySql server (create/delete) and do editing to some of the fields.

I'm implementing editing of the remaining fields. Then, i'll move to editing unit's relations (unit has weapon, etc), which will take some time. Then i'll have to handle the importing/exporting functions. I don't know how easy it will be. I hope Maelstrom's code he used in his Excel mod editor proves easy to implement in my program. Then a few stuff.
Unfortunately, as you can see, i'm much delayed.

Anyway, for the first version, the programm shall alow to:
- import a mod from a directory to the database (hopefully directly from a .sdz file but i doubt)
- export a mod from the database to a directory (hopefully direc...)
- basic editing.
This does not include and i'm not planing on including:
- editing images, models, scripts, etc (just assigning the file's name to the unit and stuff)
This does not include but i'm planing on including:[/b]
- advanced editing like global changes (change all weapons gamage, etc) or global selections (see all unit's damage per second, etc)

I'm planning on making a versatile but moderatly basic editor and going from there to see what's missing the most. If you have any idea about that, from what i've said, feel free to request so.
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

If you need any help implementing that stuff ive already written, like the Excel editor, or the Build Tree editor, then just ask. Ill be happy to help, as this sounds very interesting.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

If you know how to program in C#, then you could code the importing/exporting routines.
If not, it will just take me some 1~4 more days to make those. If, by then, i run into any problem, i'll ask you clarifications about the code. Truth is, i have it but i haven't even looked at it, i just have it stored for when i need it. Im planning on making those routines to the end.
User avatar
BvDorp
Posts: 439
Joined: 14 Oct 2005, 12:09

Post by BvDorp »

What awesome project! Some (noob) questions:

- Will users be able to run it without configuring a MySQL DB?
- Will the program itself show, for example, buildimages?
- Will the program be able to output some nice HTML pages with the buildimages, descriptions, some stats, buildtree, etc?
- Will importing and exporting to/from SDZ be implemented?

This program would be a very usefull tool! Combined with Upspring and the upcoming Sharpmap, this game would be one of the most customizable games!

Everytime I read this I want to make a mod myself.. anyone in for some Age of Empires mod preparations?
User avatar
Maelstrom
Posts: 1950
Joined: 23 Jul 2005, 14:52

Post by Maelstrom »

Unfortunatley I cant write C/C++. But the functions I wrote a fairly simple, so you should be able to translate them your self. However, why dont you just use the CSunParse thing that Spring uses? As its coded in the same language, you should just be able to drop it into your project.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Your questions weren't nood. After all, nobody really knows well what i'm doing. So i'll give some light on it.

To the not so nood questions:
BvDorp wrote:...
- Will users be able to run it without configuring a MySQL DB?
...
Yes. Possibly no.
You'll need to have a mono runtime (to execute mono programs) and a MySql server running.
From the program, you'll be able to create and delete databases in the server if you provide the program with a MySql account that has permissions to do so in the MySql server.
If you don't trust my program to not ruin the MySql server, you'll have to rely on making «by hand» the databases on the server.
BvDorp wrote:...
- Will the program itself show, for example, buildimages?
...
I've been thinking about that. First version to be released will probably not suport it. You'll just assign that unit x has buildimage y.
But i'm hoping to implement such up to version 1,2. The problem is the wide variety of diferent image formats. Let's see what future brings.
BvDorp wrote:...
- Will the program be able to output some nice HTML pages with the buildimages, descriptions, some stats, buildtree, etc?
...
No.
In the beginings of the project, i've been thinking wether to make it as a «program» or as a «site». I've chosen «program» for several reasons.
But, the code is separated in the Grafical User Interface, just the grafical part, and a dll, that does all the database editing stuff. To make a similar site in asp, it would be mostly HTML-GUI creation and reuse the stuff in the dll. With some adjustments, it could be made so that, such site, be multiuser so that teams of people could work on the same mod.
But i will not do such thing, most probably, since, after i'm done with this program, i must continue to search job.
BvDorp wrote:...
- Will importing and exporting to/from SDZ be implemented?
...
Not yet, possibly no.
Adding suport for .sdz files is on my wishlist and i've already heard, in another thread, of a .net library for handling zip files. However, some mods are in .sd7 and i don't expect it to be easy to integrate to .net. Also, since the program doesn't allows for editing of images, models, compiling scripts, etc, these all have to be done outside the program and, so, i think it makes more sense that people work on a mod that is decompressed in a folder.
Maelstrom wrote:... But the functions I wrote a fairly simple, so you should be able to translate them your self. However, why dont you just use the CSunParse thing that Spring uses? As its coded in the same language, you should just be able to drop it into your project.
I supose it won't be much hard. At least i hope :P.
By the way, C/C++ aren't the same as C#, they difer pretty much. They just have similar syntax.
Anyway, i've tried to browse Spring's source code many times to try and find the code to load a mod into memory, and some other things. No good results came out of it.
Post Reply

Return to “Game Development”