![]() Mechstorm's Complete Map Making Tutorial or MCM for Short. Covering Mechwarrior4, Mechwarrior4:BK and Mechwarrior4:Mercs. If you have any questions feel free to drop by our Mechstorm Editor/Scripting help Forum after you have registered on our forums. |
|
Updated Jan 23 2005 External Configuration Files for your Single player or Coop Missions.A trick Ash showed me is the use of a custom abi file to store mission settings outside of your missions mw4 file. Thus allowing you to tweak your mission and test it without needing to resave your mission all the time and send it others. One server side file is all that needs tweaking. Much cleaner if your making coops for online play and want to change the settings quickly during a test night and still nice option if your just a player and want to liven up or tone down a mission a bit. Here is the top part of a script. The lines marked in bold type are the ones to look at since these give you a clue how this works. These are dev team abi file entries. Dont touch them. fsm myscript: integer; const type Now if you create a folder in your Mechwarrior 4 Mercs folder called Settings and create a file in there called mysettings.abi then add this line below the ones marked in bold above you can tell the above script to use an external settings file. #include_ <settings\mysettings> This is only really worth doing on Coop missions and Single player missions since Typical team games gain no real benefit from this other than giving server admins a way of tweaking the scoring to make their server unique. Your mysettings.abi file may look something like this. This is a real abi settings file for the Single player Coventry mission available from the Mechstorm site. // BATTLE OF ST WILLIAM 1 Single player settings. // Editable Mission Turret settings. attackRange1 = 999; // used to tell help the bots target mechs at
these ranges. 0 to 100 (999 = best). attackSound = -1; // no sound // ignore these. // Defenders: Bot lance settings. attackRange2 = 999; // used to tell help the bots target mechs at
these ranges. 0 to 100 (999 = best). /////////////////////////////////////////////////////////////////////// alarmreset = 10; // seconds before the turret control alarm can go off again. // Turret Alignments: possible options = FA_FRIENDLY, FA_ENEMY, FA_NEUTRAL,
FA_ANY // timers Settings. As you can see, using this script I can set the turrets alignment to neutral to allow me to test other parts of the mission easily. If you add your Vars to a abi script in this way you do not need to declare them in your actual mission script or set them up in your functions ini section. You can just use them right away in your states. When ever Timer1 is called it always looks it up in the abi file and comes back with this line timer1 = gti_timer_5; // Sector 1 turret control. So you effectively reduce a long line declaring and setting a var to just one word in your script. If you combine a previously setup var with some IF commands then you can change the whole nature of mission by simply editing the abi file AFTER releasing your map. No need to recompile it and release a new version. The possibilities here for dynamic mission creation are so big most good scripters will see right away just how useful Ashs idea is. |