LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   Modding forum (http://www.lucasforums.com/forumdisplay.php?f=644)
-   -   Mini-Tutorial: Installing and Creating XML based mods (http://www.lucasforums.com/showthread.php?t=161131)

Bob Lion54 02-22-2006 03:24 PM

Mini-Tutorial: Installing and Creating XML based mods
 
Basically, I’ve been seeing a bunch of people with the same problem. I thought I would write a mini-tutorial about how to install and create basic mods. (This is only for xmls as for as I know)


A) Downloading a mod.

Download a mod. Read the readme. Most of the mods that have been made so far are simple changes to various xml files. Simply create a folder called “XML” in the game directory –“Program Files\LucasArts\Star Wars Empire at War\GameData\Data.”

Drop the modded xml files into the created “XML” folder (which should be “Program Files\LucasArts\Star Wars Empire at War\GameData\Data\XML”) and you’re done! Enjoy the mod!

B) Creating a mod. (Keep in mind, this is only for editing the xml files.)

As an example, I will increase the health of “Home One”.
1) Download a program that can extract meg files. The one I use can be found here - http://www.technical-difficulties.com/hacks/eaw/ (The site says its for the demo, but version 1.1 will work with the full game.) Unzip the file.

You will get two programs, megExtractor and megInserter. You will not need megInserter, however. (megInserter actually causes the mods to not work.)

2) Create a new folder somewhere on your hard drive outside the game directory. It doesn’t matter where, just make sure you remember where you created it. I made the folder “EAW files” under “Program Files\LucasArts.” Copy and paste megExtractor into this folder. Now return to “Program Files\LucasArts\Star Wars Empire at War\GameData\Data” and copy the file “config.meg” and paste it in the same folder where you pasted megExtractor. You should now have a folder with two files in it, megExtractor.exe and config.meg.

3) Run megExtractor and follow its instructions. It will create a new folder called “config.” Open this folder. Since for my example I will be editing Home One, I need to go to the file “DATA%XML%UNIQUEUNITS.” Copy the file and paste it somewhere outside the “config” folder. (You can just leave it in the “config” folder, but this way, you don’t have to extract the files later if you want to edit something else. I like to put it in a new folder that describes the changes. For my example, I would make a folder called “Home One more health” or some thing along those lines.)

4) Right-click “DATA%XML%UNIQUEUNITS” and select “open with notepad.” Four lines down, you will see “<UniqueUnit Name="Accuser_Star_Destroyer">” I like to copy the part “UniqueUnit Name” and use the “Ctrl+F” trick to easily search through the various units. Do this until you come to “<UniqueUnit Name="Home_One">.” Scroll down until you get to “<Tactical_Health>8000</Tactical_Health>” Change the number to whatever you want. You can increase it slightly, say to 8100, or you can make it virtually invincible by increasing it to something like 9999999 or whatever. (You can also decrease it if you want.) Whenever you are done editing whatever you want, click the “X” at the top right corner of the screen to close notepad. When prompted if you want to save the changes, select “yes.” (**NOTE** If you try to save your changes by clicking “save as…” or “Save” from the “File” menu, it will save it as a text document and will not be useable.)

5) Almost Done!!
You will now have a modded version of the file “DATA%XML%UNIQUEUNITS.” Change the file name to “UNIQUEUNITS.” In other words, for the game to read your modded xmls, you have to get rid of “DATA%XML%” from the file name. Either right-click and copy or right-click and cut the file.
If you have not already done so, create the folder “XML” under your game directory. (See Section:A for further details) Right-click and paste the file in the “XML” folder and your DONE!!

I hope this has helped someone!! Thanks for reading!!

Bob Lion54

EDIT: While notepad is fine as an XML editor, there are other programs available that have more options.

A few XML editors:
Microsoft Visual Web Developer (Free)
Stylus Studio® 2006 XML (30day trial)
XMLwriter XML Editor v2.6 (30day trial)
Altova XML Spy 2006 (30day trial)


Cmdr. Cracken 02-22-2006 03:42 PM

This needs to be stikied immediatly.

Bob Lion54 02-22-2006 04:02 PM

hehe. I'm glad you approve.

Let me know of anything is worded awkwardly or needs to be clarified. Its actually my first tutorial of any kind.

dookie23 02-22-2006 08:08 PM

Hey ill give you credit, can I put this in my readme? Too lazy to type all that in my mod readme. :P

Bob Lion54 02-23-2006 01:01 AM

Yea, you can use it if you want to.

Jan Gaarni 02-23-2006 12:37 PM

Why isn't this stickied yet?

*stuck*

There.

Much better. :)

Evil Jeremy 02-23-2006 12:38 PM

what is the file for the heros?

Athanasios 02-23-2006 01:15 PM

Good work Lion.

Just for history (this mini-tutorial is 100% perfect afterall) new modders may use more advanced XML editting programs. Of course advanced doesn't mean complicated too. I use Microsoft Visual Web Developer that teams the code -very handy- and does plenty more things.

So, you may edit the tutorial with a small list to those XML editting tools. I'll send you a message with them as soon as i gather 3-4 of them.

Good work again ;)

Bob Lion54 02-23-2006 03:01 PM

Quote:

Originally Posted by Evil Jeremy
what is the file for the heros?

Ground heros are in "NAMEDHEROUNITS"
Space heros are in "UNIQUEUNITS"

To edit heros that can fight in space and on land (Han and Chewie, for example) you have to edit both files.

Quote:

Originally Posted by Athanasios
Good work Lion.

Just for history (this mini-tutorial is 100% perfect afterall) new modders may use more advanced XML editting programs. Of course advanced doesn't mean complicated too. I use Microsoft Visual Web Developer that teams the code -very handy- and does plenty more things.

So, you may edit the tutorial with a small list to those XML editting tools. I'll send you a message with them as soon as i gather 3-4 of them.

Good work again ;)

First, thanks for the complements!

Just send me the links to whatever other programs are good, and I'll edit my post. The more options, the better!

Quote:

Originally Posted by Jan Gaarni
Why isn't this stickied yet?

*stuck*
.....

COOL! Thanks for my first sticky!

Athanasios 02-23-2006 05:53 PM

No glory for me in this area mate ;) . Keep up the good work.

Bob Lion54 02-24-2006 09:02 AM

^^^
Done! You might as well leave your post sinse there really is no reason to delete it. That, and it will look like I'm talking to myself! heh

Admiral Sith 02-24-2006 04:52 PM

I personally like this XML Editor, http://www.mindfusion.org/product1.html.

gswift 02-27-2006 04:34 PM

I use MS Visual Studio 2005 and Macromedia Dreamweaver. They're really nice, but not free.

Det. Bart Lasiter 03-01-2006 04:07 PM

Just so you know, Visual Studio/C++/C#/VB 7+ can edit XML files as well, and there are a number of LUA plugins for it as well.

wherryj 03-23-2006 01:36 PM

Placing file in "XML" folder
 
So I guess that if you place a file that is currently in the config.meg game file, placed into that "XML folder" the game will ignore THAT portion of the official config.meg and use the modded sections?

It's not that I believe you, but I guess that the game must have been programmed to deal with mods if it knows to ignore the existing file and go for the modded file. I would have figured that one would have to mod the actual config file.

Great info! I think that I'll try adding the hangar bays again now that I know that I don't actually mod the config file.

Three60 03-23-2006 01:39 PM

If you can't add them, there are plenty of mods that do.

KirtanLoor_PL 06-06-2006 06:13 AM

Hmm, anybody has the full list of the XML tags with the explanation;-)?
Some of them are quite easy to understand, as <Tactical_Health> or <Shield_Points>, but there are some as <Death_Explosions> or <Death_Clone> which I do not understand...

Slipstreme 07-05-2006 04:09 PM

I just use Notepad

I've got SSD, SDs and Venators launching ARC-170s, V-Wings and TIE (Fighters, Avengers, Defenders, Bombers, Interceptors) agaisnt the Rebelions B-Wings, E-Wings, X-Wings, A-Wings, Y-Wings and Eta-2 Interceptors

Just a bunch of ships and models from other mods that I've... collected :D

Darth Khasei 07-05-2006 04:31 PM

Quote:

Originally Posted by KirtanLoor_PL
Hmm, anybody has the full list of the XML tags with the explanation;-)?
Some of them are quite easy to understand, as <Tactical_Health> or <Shield_Points>, but there are some as <Death_Explosions> or <Death_Clone> which I do not understand...

Not that I know of to date. The Death explosion is the explosion used when that part or ship explodes. The death clone is the model of the ship dying. Death clone is listed as another ship entry. It appears like a slight of hand trick as this model seems to quickly replace the regular one upon its destruction, not that human eyes actually sees it :)

Teej2005 07-17-2006 12:27 AM

Ive owned this game since it first came out but I just recently started trying to use 'user-made' mods. For some reason though, I cannot see the new vehicles and space craft in the game. I can see their description, but the icons do not show up on the 'build' or 'fleet view' and of course do not show up during battle.

I am using the 'conflict in space' mod.

I am sure theres something minute that I am not doing correctly.

Dreng 07-17-2006 06:54 AM

What do you have to type on the black screen?

DarthMaulUK 07-17-2006 07:04 AM

If your mod isnt working, you might need to re-install it. Remember, it will write over your current game files (XML) so allow it do this. If you have patch 1.4, the game has now created a new Mod folder where all your mods should sit. Some mods come with an Icon which you must use as the game exe file to start it up (double click it) and the game will boot up using the new mod.

Dreng - please give more information on what you are trying to do

DMUK

Teej2005 07-17-2006 10:09 AM

My main 'Mods' folder sits inside my main 'Data' folder... and my actual downloaded mod of "CIS" sits first level inside the main 'Mods' folder that came with the 1.4 update.

Here's where its located:
G:\Games\Lucas Arts\Star Wars Empire at War\GameData\Data\Mods\CIS

Inside the 'CIS' folder sits the mods 'Data' which holds Art, Text, and XML

Should I try to overwrite the default files?
This mod did come with its own .bat file which sits inside the main game directory. I do use it to start the game.

Dreng 07-17-2006 12:12 PM

when i open megExtractor a window pop up and i dunno what to type in there

Teej2005 07-17-2006 12:54 PM

http://i41.photobucket.com/albums/e2...ngsquadran.jpg

see how I am missing some of the model's as well as one of the heroes?

DarthMaulUK 07-17-2006 01:58 PM

What mod are you playing with? More information is needed. Or are you trying to make your own?

DMUK

Teej2005 07-17-2006 02:49 PM

CIS V.3

Conflict in Space Mod. Here are the installation instructions which I followed. I mean, it cant be that hard but apparently there is something elementary that I am doing wrong or perhaps, though unlikely, maybe the mod itself is just missing the art files??

Quote:

[INSTALLATION]

1) Method for EAW v1.04 and newer (recommended)
Unzip the archive and put "CIS" folder into your "Star Wars Empire at War" Mods directory (e.g. "C:\Program Files\LucasArts\Star Wars Empire at War\GameData\Mods\"). You may need to create this folder ("Mods") in "GameData" directory. Put "conflict_in_space.bat" file into "Star Wars Empire at War\GameData\" folder and double-click on it to start the game with the mod enabled. You can use provided icon to create a desktop shortcut (optional).

2) Method for all versions
Unzip the archive, find "Data" folder and copy it into "Star Wars Empire at War\GameData\" folder, overwrite existing files. It is recommended to backup your original "MasterTextFile_ENGLISH.DAT" file. Start the game with the default shortcut.
I downloaded it from:
http://empireatwar.filefront.com/fil...Units_V3;66030

DarthMaulUK 07-17-2006 03:38 PM

Theres a good chance the mod is missing the art files. Its no big deal really, so long as it works.

DMUK

Teej2005 07-17-2006 03:42 PM

Well... my main purpose was for the extra ships like the B-Wing. They dont show up in battle, they dont show up visually in production. I can hear them like ghosts in my mind when they say "B-wing squadron at your service".

Also, could it be because I dont install to default path on my C drive? I use a different drive for my game installs.

Thraka 08-29-2006 10:37 PM

I created a tool that will take the files in this format: DATA%SCRIPTS%AI%BUILDCANTINAPLAN.LUA and create sub directory structure with this file name:
[CurrentDirectory]\data\scripts\ai\buildcantinaplan.lua

It also has a mode to then parse the data sub directory and move the files back to this:
[CurrentDirectory]\DATA%SCRIPTS%AI%BUILDCANTINAPLAN.LUA

Is this of interest to anyone?

CIAop 10-16-2006 11:13 AM

anyone know which XML file controls the laser graphics?

wherryj 11-17-2006 05:04 PM

Does anyone know if the mods that worked for EaW work exactly the same way for EaW:FoC? I had a mod that successfully made fighters spawn from Mon Cal cruisers for EaW, but it doesn't work when I reapply the same coding to the XML files for FoC.

I was able to make visible changes to things like pop caps, so at least some of the mods are the same. Did they change the coding or did I just make a mistake somewhere?

wherryj 11-17-2006 05:05 PM

(Oh, before people ask, I added the spawn_fighters to space behavior, added the units underneath for specifics, added the hard point and modified the hard points in the other XML file. I used the same structure/wording as for EaW.)

Slocket 11-17-2006 11:01 PM

There are significant changes. Some basic mods will work such as the Free Camera, but a proper one needs to be made so that the bigger maps distances visuals will show in game.

So basically, 90% + mods will not work.

wherryj 11-20-2006 02:01 PM

Quote:

Originally Posted by Slocket
There are significant changes. Some basic mods will work such as the Free Camera, but a proper one needs to be made so that the bigger maps distances visuals will show in game.

So basically, 90% + mods will not work.

Thanks. Actually, I finally tracked down my problem. Adding the extra random letter while typing a hardpoint doesn't help. For mods like adding fighter bays, the old EaW versions will work.

I do find it strange that you need rebel_X-Wing, but all other units will work as just the unit, however.

Dactillion33 11-26-2006 05:40 PM

i followd ur instructions for installing a mod but it still didnt work and i removed the downloaded files and tried to run my game and it would not start

do i need to open the mod and extract something to make it work

and how can i get my game to work again, the box will come up and after i hit play the game will appear for a second then dissapear

i dont have FOC and i have the Collectors Addition

Thrawn3.14 12-08-2006 11:29 AM

is there something different you need to do for FOC?

I tried everything you said, but it gives the error "Expect Strange Errors: There is a syntax error in..."

What do I need to do?

Slocket 12-10-2006 01:45 AM

Some of the FoC XML files do that to me too if you make any changes to them. They have some real syntax errors in them.

I found out using a hex editor to edit the file works, while using wordpad causes thse odd files to puke.

Try out Rouge_Squadron and see what I mean. You will notice the mispelled word...try to fix normally with Wordpad (or make any other change) it will puke. So I used a Hex editor and that took, and worked in game.

I made a post about that bug somewhere, after the small fix..the Rouge Squadron Hero is a heck alot better now that it is being read proper.

There is also a buglet of the same nature to the 'Gallofree Transport' not showing up in GC mode. I posted the fixed file in the Mod section.

These are not openly stated as being fixed in the patch...we will see.

Thrawn3.14 12-10-2006 12:40 PM

Quote:

Originally Posted by Slocket
Some of the FoC XML files do that to me too if you make any changes to them. They have some real syntax errors in them.

I found out using a hex editor to edit the file works, while using wordpad causes thse odd files to puke.

Try out Rouge_Squadron and see what I mean. You will notice the mispelled word...try to fix normally with Wordpad (or make any other change) it will puke. So I used a Hex editor and that took, and worked in game.

I made a post about that bug somewhere, after the small fix..the Rouge Squadron Hero is a heck alot better now that it is being read proper.

There is also a buglet of the same nature to the 'Gallofree Transport' not showing up in GC mode. I posted the fixed file in the Mod section.

These are not openly stated as being fixed in the patch...we will see.

Ok, so it wasn't my fault... that's good. Is there somewhere I can download a Hex editor?

Darth Badguy 01-08-2007 12:54 PM

I like this tutorial... Good job!


All times are GMT -4. The time now is 10:19 AM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.