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

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

Previous topic - Next topic
August 12, 2007, 12:54PM #30 Last Edit: August 12, 2007, 02:17PM by nodoubt_jr
ok thanks, i'll get started on that one as soon as im done with Capt America for XML2

edit: just looked at it, it shouldnt be too hard to do.
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 21, 2007, 03:29PM #31 Last Edit: August 23, 2007, 11:58AM by Norrin Radd
npcstat entries for converted xml1 characters (they will need to be changed to alphabetical order before they will work)

KidDenise
Skin number changed from 5101
   stats {
   name = KidDenise ;
   charactername = Denise ;
   skin = 7531 ;
   }

screenshot for KidDenise skin (she's the one running away, in orange):


here's another one (the dots dont actually appear in the game, just when i took the screenshot it looks like that)


CivilianFemale
Skin number changed from 5102
   stats {
   name = CivilianFemale ;
   charactername = Civilian ;
   skin = 7532 ;
   willflee = true ;
   fleedistance = 60 ;
   powerstyle = ps_civilian ;
   characteranims = 75_civilians_male ;
      Talent {
      name = fightstyle_hero ;
      level = 1 ;
      }

      Race {
      name = Human ;
      }

   }

screenshots for CivilianFemale skin (she has a cool little hoodie on and the strings sway as she moves)






edit:
i changed the number scheme so they would not conflict with mua numbers

edit:
thanks T,

i updated the 75XX file to contain: 7531, 7532, and 75_civilians_male igbs, 7531 and 7532 package files, and the updated hud that they share (7531, originally 5101), and the converted powerstyle that civilianfemale uses

edit
updated again to include 7533 (business suit female civilian)
http://www.sendspace.com/file/0i33p2

August 22, 2007, 07:38AM #32 Last Edit: August 22, 2007, 08:56AM by Norrin Radd
more possible redundant effects

in xml1:
Quotefilename = weapons/missile/missile_trail ;

changed to:
Quotefilename = base/weapon/missile/missile_trail ;

Possibly can also replace (not sure if there are lrgexp2 or lrgexp3, etc.)
Quotefilename = explode/lrgexp1 ;
   filename = explode/medexp1 ;
   filename = explode/smexp1 ;

with:
Quotefilename = base/material/explode/exp_generic_lrg ;
   filename = base/material/explode/exp_generic_med ;
   filename = base/material/explode/exp_generic_sml ;

also anything with a t in it at the beggining for effects, like

deatheffect = break/t_masion ;
is a tile, so it should actually be

   deatheffect = base/material/tile/tile_mansion ;
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

i was trying to add the sentinel to the level, and i got everything converted but he wouldnt load, it was always defaultman. Then i decided to change the npcstat into alphabetical order, and there you go, he's in the level (minus some arms).

do we know which files must have all entries in alphabetical order? It would be a REAL pain to have to alphabetize every single entry of every single file


I can tell you that effects do NOT have to be alphabetized.

August 22, 2007, 04:37PM #36 Last Edit: August 22, 2007, 06:39PM by Norrin Radd
ok thats a big relief, thanks

edit:
im pretty sure alphabetizing the fightstyle and powerstyle had an effect

yes powerstyle, entities, fightstyle, movestyle, maps, pretty much everything that is not an effect needs to be alphabatized.
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 22, 2007, 06:56PM #38 Last Edit: August 22, 2007, 07:36PM by Norrin Radd
ok thanks

edit:
that sucks, even conversations have to be alphabetized

great news for a very few:

Ultimate Alphabetizer by Norrin Radd RELEASE V1.2
I have created a program that alphabetizes most mua/xml2 files to help when converting the xml1 ones (since after you convert the xml1 ones with xmlconverter, they are not in alphabetical order, and they never were)
(works for conversations, level engs, powerstyle, etc.)

Version 1.2 New!
http://www.sendspace.com/file/inpsde

Enjoy!

===== how to use it =====
Put alphabetizer.exe in c:\windows or any directory
On the file you want alphabetized, right click and select "open with"
Check "always open these types of file with it"
The parts within brackets are then alphabetized into MUA compatible style after double-click
The new alphabetized files are named FILENAME.alpha, where FILENAME is the file which was double clicked on

Or
open it with command prompt and type:
alphabetizer.exe FILENAME


i'm not sure if anyone else encountered this problem but:

To get the zone link to work properly (to exit the level) I had to remove the extents line.
Original (the link to escape the level does not appear in the level):
Quoteentinst {
   type = zone_link01 ;
      inst {
      extents = 12 1500 0 24 2088 480 ;
      name = zone_link01 ;
      pos = 18 1794 0 ;
      }

   }

After the removal (it now works):
Quoteentinst {
   type = zone_link01 ;
      inst {
      name = zone_link01 ;
      pos = 18 1794 0 ;
      }

   }

So i suggest anyone working on xml1 levels also removes this line from the zone link entries (if they are having problems not finding the zone link in the level), unless someone knows why this is happening to me.

ok i know what was wrong with the extents now:
In the level eng's the 'extent' entries are in a different format in xml1 compared to xml2 and mua.
the mua/xml2 format is:
-x -y -z +x +y +z
where the -'s represent how far the object goes on the negative side from the 'pos' x,y,z positions and the +'s are the other side
xml1 format:
x1 y1 z1 x2 y2 z2
where the 1 positions are on the negative side from the 'pos' positions, and the 2's are on the other side

how to convert the 'extent' entries
example: you start with
Quoteentinst {
   type = zone_link01 ;
      inst {
      extents = 12 1500 0 24 2088 480 ;
      name = zone_link01 ;
      pos = 18 1794 0 ;
      }

   }
note it is in xml1 format. Now you take the three values on the left and do:
x1 - xpos = -x, y1 - ypos=-y, z1 - zpos=-z
x2 - xpos=+x, y2 - ypos=+y, z2 - zpos=+z
after the conversion it looks like:
Quoteentinst {
   type = zone_link01 ;
      inst {
      extents = -6 -294 0 6 295 480 ;
      name = zone_link01 ;
      pos = 18 1794 0 ;
      }

   }
Note how there are negative and positive values. Now it has been converted.

I will likely make a program that fixes this automatically because there are so many 'extent' entries, but until then you will have to do this manually

extentConverter by Norrin Radd RELEASE V1.0
I have created a program that converts the 'extent' entries in xml1 level eng's to mua/xml2 format.

Version 1.0 New!
http://www.sendspace.com/file/a5nwj3

===== how to use it =====
Put extentConverter.exe in c:\windows or any directory
On the file you want converted, right click and select "open with"
Check "always open these types of file with it"
The parts within brackets are then converted into MUA compatible style after double-click
The new converted files are named FILENAME.conv, where FILENAME is the file which was double clicked on

Or
open it with command prompt and type:
extentConverter.exe FILENAME

IMPORTANT NOTES
Your file MUST be alphabetized for this program to work correctly, so alphabetize it first!!
If some of the extents have been converted already, it will screw them up.

enjoy!

since the game flags in xml1 are not in mua, you may have to improvise. Also the convension used may not be compatible.
The convension used in xml1 is getMissionFlag and setMissionFlag, but in mua its getGameFlag and setGameFlag. What i mean by improvise is you may have to use variables used in the actual game. I will give an example below.

In nyc2 (fb2) there is a variable required called "nyc_fb", but it doesnt exist in mua. Instead i used "stark" variable which is in the game. Because when you start the level the variable should be a certain way, but this wasnt in the level load up script, i found that the variable should not be a 1 to start, so i put this line in the start up level script nyc_fb2.py
QuotesetGameFlag("stark", 6, 0 )
so i set the "stark" variable #6 to 0
then in another script file that uses the variables i made the following changes:
Original
QuoteiNYC2Done = getMissionFlag("nyc_fb", 2 )
if iNYC2Done != 1
     setMissionFlag("nyc_fb", 2, 1 )
     objective ( "sentinel2",  "EOBJCMD_INCREMENT" )
else
     setEnable("zone_link02", "TRUE" )
     setEnable("trigger_touch01", "TRUE" )
     setEnable("trigger_touch04", "FALSE" )
     objective ( "sentinel2",  "EOBJCMD_INCREMENT" )
endif

After Changes:
QuoteiNYC2Done = getGameFlag("stark", 6 )
if iNYC2Done != 1
     objective ( "sentinel2",  "EOBJCMD_INCREMENT" )
     setGameFlag("stark",6,1)
else
     setEnable("zone_link02", "TRUE" )
     setEnable("trigger_touch01", "TRUE" )
     setEnable("trigger_touch04", "FALSE" )
     objective ( "sentinel2",  "EOBJCMD_INCREMENT" )
endif

After the changes, the level acts just like it should, but uses the mua variable instead of the one that doesnt exist in the game. it also uses a different convension (script functions) to call and change the variable

Hmm, I wonder where the variables hide...  I always thought it was a dynamic variable.  I.E. if that variable is not already built in it creates it, then logs it to the savegame as needed.  I didn't find any stark references in the exe or codex.engb.