:::::XML Code guide for Star Wars Empire At War and Forces of Corruptions:::::
:::::How to make Bodies and Wreckage Stay::::::::
1) The first step is to decide whether you want to mod the base games code or another mod.
2) Next you find the XML's of the mod for example if you wanted the xml files for Republic At War you would navigate to the mods director in your FOC game folder and go into the Republic_At_War folder and then the data folder. There they are, the XML's should be in the folder called "XML". The base games XMLs can be found by using a Meg extractor tool on the config.meg file in your Star Wars Empire at War or FOC Data directory. A good Meg extractor that I use can be found here: Kaelics MEG Extractor I recommended copying the meg file to a different folder before extracting so that way you keep your EAW director clean of unneeded files.
3) Now every mod is different so the XML's you need to edit may vary but the concept is the same for all. That being said the first file we need to edit will be the same for every mod and the base games. Copy the GAMECONSTANTS.XML and paste it in your Project folder or anywhere you like. This is where you will edit the XML... I recommend keeping a backup of all the XML files that you change just in case you mess something up you can start over with a fresh XML file. So just copy the whole XML folder of the mod you are editing and put it somewhere as a backup.
4) Now Open up the GAMECONSTANTS.XML in notepad. Below is the code you are looking for:
5) Now go to edit find and put in this into the search: "Death_Persistence_Duration" Without Quotes and click find. Below is what you should see:
6) This code is what makes all infantry in the game disappear after 30 Seconds. So Notices how it has the number 30.0 there. So all you have to do to make the bodies in the game stay is change the 30.0 to 999999.0 and there you go. Click file save and Paste this into the XML folder of the mod and click yes to replace. Now all infantry in the mod/game will stay on both sides so rebels, stormtroopers, clones, droids, etc. will stay. Now the vehicles, Field commanders, darktroopers will still disappear because they are using different code in different XMLs. But same principle applies.
7) Now to make Vehicles stay.. The base Game XML's that make the Vehicles stay are
GROUNDVEHICLES.XML: Has AT-AT, AT-ST, AT-AA, SPMA-T, MPTL-2A
UNIQUEUNITS.XML: Pod-Walker, Veers AT-AT *Note Veers already stays though when you change the AT-AT in the GV.XML
GENERICHEROUNITS.XML: Field commanders and maybe Sith for FOC
UNITS_LAND_EMPIRE_DARKTROOPERS.XML: DarkTroopers of course
UNITS_LAND_UNDERWORLD_NIGHTSISTER.XML: Rancor Night sister riders
Now obviously for other mods there might be different XMLs so like Republic At War for a example there is a separate XML for each Vehicle: Units_land_cis_aat_tank.xml, Units_land_cis_crabdroid.xml etc.
8) Now this is where things get a little tricky... Open the XML you want to edit and do step 5 so for example lets open up the GROUNDVEHICLES.XML so you should come to this screen below:
Now Change the code by putting 99999 which equals 99999 seconds which is about 27 hours lol they will stay! Now click find next and change the next until you get to one that says this below:
Notice how it says Telekinesis Death... This means that this death is when Vader uses his ability to crush a vehicle... If you make this one stay then it will stay in mid air making it look dumb.... So do NOT change any of these that have the Telekinesis above it.
Also sometimes units don't have death clones so if you make them stay then they will just die standing up.... which looks dumb I ran into this while making Bodies Stay for Thrawns Revenge. The sith just die standing up because there is no death clone for them so this code needs to be left alone... So after you make it for your mod you will need to test it to make sure nothing weird like this happens... so you can change it back to normal. The picture below shows dead Sith just standing in place because I change their code to make them stay....
9) Repeat the process for other XMLs and there you go. Copy the edited XMLs paste them into your mods XML folder and Launch and test the mod!
10) After test if you noticed anything weird like the picture above change it back or start over with a fresh XML. If you don't feel like doing all this then you can just download the already edited XMLs for the base games and Mods in the Downloads Page.
Congrats you Just Learned how to make Bodies and Wreckage Stay!
Okay so if anyone wants to help with getting these mods on the list in the summary page made they can just follow this tutorial and you should be fine. PM me and let me know what mod you are doing so that I don't start doing it when someone else is already making it and wait for me to reply because someone else might already be editing the mod you want. Once someone Agrees to make Bodies and Wreckage Stay for a mod on the list I will update the summary page to let people know which mods are in progress. Test out the mod take screenshots and then send me a copy of the XMLs so I can upload it to the page. Of course I will give you credit in the Readme file. Thrawn's Revenge is complete just a few more tweaks and it will be ready. Should have it up by tomorrow.
As for space units... I have not tried this yet so I do not know if it will work or not and I don't know for sure what XMLs to edit. So trial and error I suppose... open up the xml you think it will be in and search and if you find code there, then there you go. I will be testing Space out myself soon. A lot of people have requested Space Wreckage... As for Heroes it is possible but some of them you won't want to stay because I believe they will do the same thing that the Sith did in the image above so yes I will look into it though.
Thanks for Reading Have fun coding!