How to convert XML1 stuff (includes UltimateAlphabetizerV1.2, extentConverterV1)

Started by Norrin Radd, August 06, 2007, 04:12PM

Previous topic - Next topic
Anyone can post helpfull information here for importing xml1 maps or characters, etc.

1. To start off, if you're using ps2 files, you'll need to unzip the assets.zip
2. Then look in the packages (packages\generated\maps) folders for map fbs
3. Move the fbs to a folder where you want to extract them (ex: Desktop\xml1_game)
4. Use my fbExtractor to extract all the fbs into known game files (such as igbs, script, etc)
5. Convert the eng files (and any other important map files such as zoneinfo, nav files, etc.) using my xmlConverter

Now, if you want to load an xml1 level just to see what it looks like, copy over an existing game igb (ex: stark1.igb) with the xml1 igb (ex: hanger from xml1).
You then load the level using script (see Teacncum's script info from one of the py threads) or look through the py files to find out how to load a level
You will most likely load at some position outside of the level and will need to use a flying character to fly into the level area before you die. You will also most likely die if you go close to the ground.

How to Replace a game level with an xml1 one
Note that this is a quick way to see if the level will load and to see what the level will look like

How to load a xml1 level and not die:
Remove this line from the level's eng file (for example open stark1.eng and remove this line)
   killz = -450 ;
Removing this allows characters to go further down in the 'z' direction (up/down) without dying

Then, change the load points for the level that you replaced it with
Open the eng file for the xml1 level
Find lines similar to this one:
Quote<inst name="player_start" pos="1289.24 1799.58 0" extents="1269.55 1776.61 0 1309.51 1829.91 83.9544" orient="0 0 -1.65307"/>
Note the position parts of those lines -> pos = 1289.24 1799.58 0

Open the eng file for the level that you replaced it with (ex: open stark1.eng)
Find lines similar to these ones
Quoteentinst {
   type = player_start_all01 ;
      inst {
      extents = -48.0243 -95.2953 0 71.9757 48.7833 83.9544 ;
      name = player_start_all01 ;
      orient = 0 0 -1.22173 ;
      pos = -1880.12 -187.904 -117.522 ;
      }

   }
You now change the positions of the load points from the current game eng to the xml ones

For example, after the change, the new load lines should look similar to this:
Quoteentinst {
   type = player_start_all01 ;
      inst {
      extents = -48.0243 -95.2953 0 71.9757 48.7833 83.9544 ;
      name = player_start_all01 ;
      orient = 0 0 -1.22173 ;
      pos = 1289.24 1799.58 0 ;
      }

   }

Changing the load positions allow you to start in the same load positions as in the xml1 game, like this:



I will add more info later, but anyone is free to add more info in this thread or ask questions

To load a level without overwriting level files

1. copy game.exe as, for example, xml1.exe
2. open xml1.exe with a hex editor and search in the text portion for the string zoneinfo.engb
3. change 'zoneinfo.engb' to, for example, 'zonexml1.engb'
4. copy zoneinfo.engb as, for example, zonexml1.engb, and decompile zonexml1.engb into zonexml1.eng
5. decide which act you want to place your xml1 level in and make the new directories as necessary, for example, to load nyc_fb1 in act1, make the directory maps\act1\nyc and packages\generated\maps\act1\nyc
7. open zonexml1.eng and change the directory of a map in the zonexml1.eng, and compile zonexml1.eng into zonexml1.engb.
For example the directory change is:
name = act1/nyc/nyc_fb1
8. Move files for new level into the packages and map folders, for example: packages/generated/maps/act1/nyc/nyc_fb1.pkgb and maps/act1/nyc/
9. Edit packages/generated/maps/act1/nyc/nyc_fb1.pkg (and the level eng file if necessary) so that it points to the right directory for all the scripts, characters, models, etc.


To load these levels you just call the script to load, for example, act1/nyc/nyc_fb1
And to run the game with this new level, run xml1.exe

yeah ok, your tools will make it a whole lot easier.
Please search the forum before asking a question. I dont answer
PMs about modding, those questions should be posted in a public thread.
What im currently working on: http://marvelmods.com/forum/index.php?topic=2275.0
My mods are mine to booster/update, I will not give anybody permission to do it

If you want to make your other teamates to follow you in the level, use the .nav file of the level that was extracter, then convert it to xml2/mua form using xmlConverter. The form it converts it to is compatible with mua (i havent verified if it is true for xml2, but it should be). Then convert this nav file to navb using xmlbcui for example.

put the convert navb file along with the rest of the xml1 map files, for example in maps/act1/nyc/
then reference this nav file in the package file in for example packages\generated\maps\act1\nyc
After you changed/added a line to the level eng file, it should look like this:

Quote
   zonexml {
   filename = maps/act1/nyc/nyc_fb1 ;
   }

   nav {
   filename = maps/act1/nyc/nyc_fb1 ;
   }

   pkg {

notice how the nav filename points to where you put the actual navb file.

This allows your teamates to follow you around the level. It also most likely allows other characters to move around the level properly also, however i havent checked out this aspect of its functionality.

since the fb files dont contain package files, package files will either need to be created or altered from existing versions, meaning that levels simply cant be loaded by copy and pasting and converting all the files in the fbs, the package files will need to be created/reworked to reflect the level as oppose to converting xml2 levels where there was a pc version, so we have those package files.

thanks nodoubt_jr

yeah i couldnt even get them to load until i did and added a package file to the packages folder
Please search the forum before asking a question. I dont answer
PMs about modding, those questions should be posted in a public thread.
What im currently working on: http://marvelmods.com/forum/index.php?topic=2275.0
My mods are mine to booster/update, I will not give anybody permission to do it

August 09, 2007, 04:59PM #6 Last Edit: July 28, 2008, 06:17AM by Teancum
I think the game loads the packages file first when it loads a level, because that tells it where to look for the rest of the files like the level igb, etc.
if it cant find the package file, it just craps out
but i could be wrong

August 10, 2007, 12:45AM #7 Last Edit: August 10, 2007, 12:56AM by Norrin Radd
it may be possible that all that is needed to write a new pkgb file for the xml1 levels is to extract the levels fb file and see what comes out. then, put all the packaged files as new entries into the new pkgb file, as scripts or whatever they are, then add the ones that are common to all levels (these ones wont be extracted in the levels fb, but in some common fb)

August 10, 2007, 01:48PM #8 Last Edit: August 10, 2007, 01:59PM by Norrin Radd
How to insert xml1 objects into a level

if you want to add xml1 objects inside a level, you must:
1. put an entry for that object model (that points to the model file) in the pkg file so it looks like this for example:
Quote}

   model {
   filename = models/nyc/antennae ;
   }

   model {
In this example, antennae.igb is the model file

2. put the entry from the converted level eng file (the file that was converted from xml1 to xml2 format which contains the object that you want to import) into the new eng file of the level that you are working on (or you can simply edit the converted eng file directly if you want to load that level, see Step 3.), so it looks like:
Quote}

   entity {
   name = antennae_ny ;
   classname = physent ;
   health = 25 ;
   model = nyc/antennae ;
   material = solid_metal ;
   structure = 0 ;
   randompickups = 0 ;
   nogravity = true ;
   nopickup = true ;
   nopush = true ;
   pathignore = true ;
   cameracollide = false ;
   deathsound = death_styles/ds_metal_s ;
   deatheffect = break/break_metal ;
   fxlevel = 1 ;
   }

   entity {

3. then edit this entry so it is alphabetical order (if it is not, the game may crash to desktop!), it should look like this:
Quote}

   entity {
   cameracollide = false ;
   classname = physent ;
   deatheffect = break/break_metal ;
   deathsound = death_styles/ds_metal_s ;
   fxlevel = 1 ;
   health = 25 ;
   model = nyc/antennae ;
   material = solid_metal ;
   name = antennae_ny ;
   nogravity = true ;
   nopickup = true ;
   nopush = true ;
   pathignore = true ;
   randompickups = 0 ;
   structure = 0 ;
   }

   entity {

4. put an instance of that object in the eng file like this:
Quotenocollide = true ;
   }

   entinst {
   type = antennae_ny ;
      inst {
      name = antennae_ny ;
      pos = 2088 1368 240 ;
      orient = 0.0 -1.68587e-007 -1.5708 ;
      }

   }

   entinst {

Now the object will load in the level, and look something like this (the antenna is the xml1 object inserted):



The entries not being in alphabetical order seems to crash the game to desktop, so each entry in the level eng file should be changed to alphabetical order

Just to make it easier on people converting XML1 files, i made a program that converts all the 'entity' entries of a converted XML1 -> XML2 file into alphabetical order

alphabetizer V1.0 By Norrin Radd Released
http://www.sendspace.com/file/72itoy

=====How to use alphabetizer=====
Put alphabetizer.exe in c:\windows
On the XML1 file, right click and select "open with"
Check "always open these types of file with it"
The entity parts are then alphabetized into eng MUA compatible style after double-click
The new alphabetized files are named alphaFILENAME, where FILENAME is the file which was double clicked on


An example:
Before conversion:
Quoteactleader = true ;
   ignoretelekinesis = true ;
   }

   entity {
   name = antennae_ny ;
   classname = physent ;
   health = 25 ;
   model = nyc/antennae ;
   material = solid_metal ;
   structure = 0 ;
   randompickups = 0 ;
   nogravity = true ;
   nopickup = true ;
   nopush = true ;
   pathignore = true ;
   cameracollide = false ;
   deathsound = death_styles/ds_metal_s ;
   deatheffect = break/break_metal ;
   fxlevel = 1 ;
   }

   entity {
   name = barricade_barrel_ny ;
   classname = physent ;
   health = 25 ;

After conversion:
Quoteteam = hero ;
   toggleonact = false ;
   }

   entity {
   cameracollide = false ;
   classname = physent ;
   deatheffect = break/break_metal ;
   deathsound = death_styles/ds_metal_s ;
   fxlevel = 1 ;
   health = 25 ;
   material = solid_metal ;
   model = nyc/antennae ;
   name = antennae_ny ;
   nogravity = true ;
   nopickup = true ;
   nopush = true ;
   pathignore = true ;
   randompickups = 0 ;
   structure = 0 ;
   }

   entity {
   classname = physent ;
   deatheffect = break/break_plastic ;
   deathsound = death_styles/ds_plastic_s ;
   deathspawn = barricade_barrel_ny_b ;

After conversion, these entries are now compatible with MUA


this program makes it way easier to import objects


once again  :bowdown1: , alphabatizing is a major thing, i forgot to do it when i was working on the Mansion Arena and it crashed, but later after sorting it out it loaded find.  thanks.
Please search the forum before asking a question. I dont answer
PMs about modding, those questions should be posted in a public thread.
What im currently working on: http://marvelmods.com/forum/index.php?topic=2275.0
My mods are mine to booster/update, I will not give anybody permission to do it

np, let me know if you have problems with the program

ok :)
Please search the forum before asking a question. I dont answer
PMs about modding, those questions should be posted in a public thread.
What im currently working on: http://marvelmods.com/forum/index.php?topic=2275.0
My mods are mine to booster/update, I will not give anybody permission to do it

August 10, 2007, 07:53PM #14 Last Edit: August 10, 2007, 07:57PM by Norrin Radd
i was able to load a level off the original xml1 eng file after i converted it and used my alphabetizer on it, i just changed the characters in the levels to ones that i had in my npcstat, and i also made my own package file.
the problems i had were that it would only load sometimes (although the original loadpoint styles worked for some locations), and sometimes it would crash at random spots in the level, and the enemies would run all over and dissapear into thin air

when i made the eng file based off the stark one it worked fine, its just when i used the original one there were some bugs