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

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

Previous topic - Next topic
@ Norrin -- Let me know if you find any more Angel convos.  Also, intro_normal.py pointed to "main_beenox".  I looked at main_beenox.pkgb which pointed to ui/menus/main_beenox.engb.  Bingo.  Found it:

QuoteXMLB menu {
animonclose = true ;
animonopen = true ;
background_movie = i109 ;
background_movie_fullscreen = i109 ;

...


i also see it called in ui\menus\main.engb

QuoteXMLB MENU {
background_movie = i109 ;
desctext1 = $MENU_ACCEPT Select ;
desctext2 = $MENU_BACK Back ;
fadein = true ;
fadeout = true ;
igb = mlm_main ;
lighting = false ;

how to convert objectives
convert the mission file from /data/missions/ using xmlconverter and the ultimatealphabetizer

now open the converted file with a text editor. remove the first lines until the first entry and replace it with a line indicating the act the level is on (see below).

before
QuoteXMLB MISSION {
descname = Sentinel flashback. ;
description = Nightcrawler's Danger Room Flashback ;
keepheroes = false ;
mapload =  ;
maxheros = 4 ;
minheros = 4 ;
remote = true ;
scriptstart = missions/mission_fmv_107 ;
skinset = 70s ;
teamselect = false ;

   REQUIREDHERO {
   name = nightcrawler ;
   }

   OBJECTIVE {
   descname = Battle the Sentinel. ;

After
QuoteXMLB MISSION {
   act = 1 ;
   REQUIREDHERO {
   name = nightcrawler ;
   }

   OBJECTIVE {
   descname = Battle the Sentinel. ;

Now remove all entries that dont start with OBJECTIVE (i am not sure if they are compatible with Mua) (see below)

Before
QuoteXMLB MISSION {
   act = 1 ;
   REQUIREDHERO {
   name = nightcrawler ;
   }


   OBJECTIVE {
   descname = Battle the Sentinel. ;

After
QuoteXMLB MISSION {
   act = 1 ;
   OBJECTIVE {
   descname = Battle the Sentinel. ;

Now remove all lines indicating xp, and replace them with rep (see below). Also add the line indicating whether the objective is optional or not, and add lines indicating the zone the mission will take place in, and add the line indicating that the type is normal (see below). You can also remove 'updatedescription' lines that dont actually contain information.

Before
Quote   OBJECTIVE {
   descname = Battle the Sentinel. ;
   description = Defeat the Sentinel in combat. ;
   enabled = true ;
   name = sentinel1 ;
   updatedescription =  ;
   xp = 100 ;
   }

After
Quote   OBJECTIVE {
   descname = Battle the Sentinel. ;
   description = Defeat the Sentinel in combat. ;
   enabled = true ;
   name = sentinel1 ;
   optional = false ;
   rep = 5 ;
   type = normal ;
   zone = nyc1 ;

   }

Follow the steps above for all the OBJECTIVE entries. Now go to the last entry. It is usually the main objective. If it has a line indicating xp = ; just remove that line. You might need to change the name of the OBJECTIVE from a name with spaces to one without spaces (ex: Protect the city --> Protect_the_city). If it is the main objective you can add the line '   major = true ;' and remember the name of this OBJECTIVE, it will be used as the 'parentname'. Now go look at the objectives, if they are all descendents of the main objective add the line '   parentname = Protect_the_city ;' to all of them (not to the main objective itself of course). If there are multiple parents you can use multiple parentname lines. And MAKE SURE everything is still in ALPHABETICAL order.

Now save the file and compile it. Remember the filename. decompile and open data/missions/missions. Add an entry indicating your new objective (see below). Now save and compile it.

Before
QuoteXMLB MISSIONS {
maxmissions = 25 ;
maxquestsperact = 75 ;
maxtotalquests = 300 ;
   MISSION {
   name = act1_heli ;
   }

   MISSION {
   name = act1_stark ;
   }

After
QuoteXMLB MISSIONS {
maxmissions = 25 ;
maxquestsperact = 75 ;
maxtotalquests = 300 ;
   MISSION {
   name = sent_fb ;
   }


   MISSION {
   name = act1_heli ;
   }

   MISSION {
   name = act1_stark ;
   }

Now decompile and open packages/generated/maps/package/missions. Add an entry for your new objective (see below). Save and compile.

Before
Quote   xml {
   filename = data/missions/autotestquests ;
   }

   xml {
   filename = data/missions/missions ;
   }

}

After
Quote   xml {
   filename = data/missions/autotestquests ;
   }

   xml {
   filename = data/missions/missions ;
   }

   xml {
   filename = data/missions/sent_fb ;
   }


}

Now decompile and open data/zoneinfo. Look for the line 'objective_category' for your mission. Change it to point to your new objective (see below). Save and compile.

Before
Quote   texture = textures/zoneshot/act1_extract1 ;
   towncenter = true ;
   }

   zone {
   act = 1 ;
   build = normal ;
   extraction = true ;
   loading = textures/loadingxmen/sentinel_fb ;
   name = act1/fb/nyc1 ;
   objective_category = act1_heli ;
   savename = Seventh Ave. ;
   start_game = true ;
   state = 2 ;
   }

   zone {
   act = 1 ;

After
Quote   texture = textures/zoneshot/act1_extract1 ;
   towncenter = true ;
   }

   zone {
   act = 1 ;
   build = normal ;
   extraction = true ;
   loading = textures/loadingxmen/sentinel_fb ;
   name = act1/fb/nyc1 ;
   objective_category = sent_fb ;
   savename = Seventh Ave. ;
   start_game = true ;
   state = 2 ;
   }

   zone {
   act = 1 ;

Now, open your level eng's that will use this new objective file. Add the line 'act = x ;' to the first entity, where 'x' is the number of the act you added in the objective file (see below). Save and recompile your objective files.

Before
QuoteXMLB world {
   entity {
   extent_max = 3000 3240 360 ;
   extent_min = 0 480 0 ;
   level = 8 ;
   name = world ;

After
QuoteXMLB world {
   entity {
   act = 1 ;
   extent_max = 3000 3240 360 ;
   extent_min = 0 480 0 ;
   level = 8 ;
   name = world ;

Now, if you changed any of the names in the mission file (ex: Protect_the_city) then you also have to change that name in all the scripts that refer to those objectives.

If everything was done right, you should get something like:



How to make objectives with counters appear in the objectives menu

in some xml mission files, objectives contain counters, indicated by 'count = x'. If you do a straight conversion the way i described above, the counters wont appear in the objective menu, so you need to change a few things. You need to add to or overwrite the part in 'description' with the part in 'updatedescription' because the part in 'updatedescription' will not appear in the menu.

example:
Before
Quote   OBJECTIVE {
   count = 2 ;
   descname = Defeat the Sentinels. ;
   description = Battle the Sentinels and destroy them. ;
   enabled = false ;
   name = sentinel2 ;
   optional = false ;
   parentname = Protect_the_city ;
   rep = 5 ;
   type = normal ;
   updatedescription =  You have defeated %d of %d Sentinels. ;
   zone = nyc2 ;
   }

After
Quote   OBJECTIVE {
   count = 2 ;
   descname = Defeat the Sentinels. ;
   description = You have defeated %d of %d Sentinels. ;
   enabled = false ;
   name = sentinel2 ;
   optional = false ;
   parentname = Protect_the_city ;
   rep = 5 ;
   type = normal ;
   updatedescription = Battle the Sentinels and destroy them. ;
   zone = nyc2 ;
   }

Now instead of


you will see



dont forget to alphabetize the .nav file. I found some entries in there besides the "   c { p = 2 -17 0 ;   }" entries that need to be alphabetized.

You will be able to tell if you need to alphabetize the nav file (unless you forgot to make the nav file) if your teamates dont follow you.

For saveonly xtraction points to work, do the following:
make a new file called exp_activatelite.py in scripts/common/extraction/ The contents should be:

Quoteactivator = getID("_ACTIVATOR_" )
owner = getID("_OWNER_" )
if activator != owner
     act("_OWNER_", "_OWNER_" )
     extractionPointLite('_OWNER_','false','true','false')
else
     extractionUnlock("" )
endif

and now call common/extraction/exp_activatelite as the act script in the level eng file (for the extraction point, of course)

downside: It says the word SHIELD when you activate it. There may be away around it, not sure yet.

OR, you could try doing it this way, as mentioned by BliZZ in another thread:

1) Change the first entry about xtraction to this:

   entity {
   actleader = true ;
   actmatchteam = true ;
   actonuse = true ;
   actscript = extractionPointLite('_OWNER_','falso','true','false') ;
   actsound = common/game/xtraction ;
   acttogglesanim = false ;
   animstarton = true ;
   classname = gameent ;
   description = X-Men Access Point ;
   extent = -30 -30 0 30 30 60 ;
   fxlevel = 2 ;
   ignoretelekinesis = true ;
   loopfx = base/misc/extraction_lite_loop ;
   loopfxstarton = true ;
   model = puzzles/beacon_xtraction_noteamchange ;
   name = xtraction_point_lite ;
   nogravity = true ;
   nopickup = true ;
   nopush = true ;
   quickuse = true ;
   team = hero ;
   toggleonact = false ;
   }


2) Change the second entry about xtraction to this:

   entinst {
   type = xtraction_point_lite ;
      inst {
      name = xtraction_point_lite ;
      pos = 1500 864 0 ;
      }

   }

haha, dont remove the line
Quotenogravity = true ;
from xml1 bridges or they will fall down

Success:


To make a bridge from xml1 work in mua, remove the following lines in the bridge entry in the level eng:

Quotestopfly =   ;
   stophero =   ;
   stopnpcaltenemy =   ;
   stopnpcenemy =   ;
   stopnpcneutral =   ;
   stopwalk =  ;

(note for those who didnt know, when directly converted, the characters would fall right through the bridges)

Do you know how to select which bridge types are made by which character? Metal = Magneto, Molten Rock = Magma, TK = Jean, Ice = Iceman, Rock = Avalanche?

there are separate entries for each one, but i dont see anything linking certain entries with a character, it may be defined elsewhere and they may use
Quotereactpower = bridge ;
to decide

edit:
also this line
Quoteclassname = powertriggerent ;


-------how to convert motionpaths--------
-you can add all the motionpaths you will be using as precache to the level eng
-add all the motionpaths you will be using to the pkg file, and make sure you use the full extention for the motionpath, not just the filename. For example, if the filename is /mansion/boogey, but you are using the motionpath goforgold inside of boogey.igb, then you need to reference that one. You can see which motionpaths a file contains by searching inside with a hex editor.
-call the correct motionpaths from scripts. These convert directly from xml1, so there shouldn't be any problems with the scripts.

The motioncaptures for xml1->mua should be salvageable. All we would need to do is replace the skins since the mocap specific ones from xml1 do this:


but when they are replaced they look good:



The only thing is that the subtitles dont appear. So what we can do is just run a conversation. We know what people are suppose to say because its all in the subtitle files. Currently the camera follows the motioncapture, but you dont really know whats going on because there is no sound or subtitles. If we make it a conversation instead of a cinematic, then we would need to remove the cinematic part and just run a pure conversation, then load the next mission when the convo is done.

Norrin, would it be possible to create a FBBuilder?  The reason I ask is it'd make console mods easier, plus allow me to port the PC port *lol* of XML1 to the Xbox XML2 engine. 

I thought it might be easiest to have a config file placed in a directory with all files needed for that particular FB (no subfolders, just all in one directory).  So you'd see stuff like

moonknight_4101_nc.cfg
4101.igb
41_moonknight.igb
moonknight_icons.igb
etc...

The config file would look something like this:

Quote
FORMAT: [filename to add], [directory listed in FB], [type (from pkgb files], [filesize (in hex if you want)]
4101.igb, actors/4101.igb, actor, 4A44
41_moonknight.igb, actors/41_moonknight.igb, animset, 55A7

Then the builder would just go right down the list, appending each file one right after the other.  I know that might be a lot to ask, but it would make my mods/the Xbox XML1->XML2 port 100x faster.

Just in case anyone asks, I'm porting XML1 Xbox to XML2 Xbox for all the added functionality.

i'll have to think about it, tonight or tomorrow i will check and see how much work it will take to do it, if it looks pretty simple then we may be able to have something by the end of next week, if not it may take a while, it also would depend on how busy i am, but hopefully something can be made yes :)

edit:
done, see http://marvelmods.com/forum/index.php?topic=863.0