Jump to content
Sign in to follow this  
dystopian1

v7 automatic mission patcher

Recommended Posts

v7 automatic mission patcher (AMP) 1.0

Download

Description

AMP automatically edits some mission features. For example you're fed up with standard weapons and want to have your own weapon gear set in each mission you play - AMP will add it very easily. Or everybody hates locked vehicles. With AMP any vehicles will be unlocked.

AMP is mostly for coop missions but it can be useful for other mission types.

Many AMP features are for A.C.E. mod. If you aren't using it, don't use such features.

Almost all features are made for ArmA2. Some of them had been used for OFP years ago. I don't doubt AMP can be used for any sqm-based missions.

AMP is open-source. You can add/edit (VBScript required :)) any feature if you know how it can be done with simple text editor. (VBScript files can also be edited with text editor)

Usage

AMP can operate with unpacked missions only. There is included "unpack+edit+pack.vbs" script that can be used for automatic unpacking mission pbo, calling AMP, packing (ExtractPbo and MakePbo are required).

You'll need following file hierarchy for unpack+edit+pack.vbs:

AMP\
       edit_mission.vbs
       unpack+edit+pack.vbs
tools\PboDll\
       ExtractPbo.exe
       MakePbo.exe

Find tools at https://dev-heaven.net/projects/mikero-pbodll

AMP has no UI. It has 2 command line modes: 1-feature and many-features. Features can be viewed with edit_mission.vbs starting without any params or in source code in MODES_* variables.

Syntax: edit_mission.vbs [feature] <mission_folder> [...]

If feature is specified then only this feature will be applied. If feature isn't specified then features from MODES_DEFAULT variable (see source code) will be applied. You should edit this variable for your needs.

There can be several mission_folder parameters passed to AMP. If mission_folder contains spaces, double-quote it.

Examples

h:\ArmA2\scripts\edit_mission.vbs r:\miss\co05_versus_augescimus.Chernarus "r:\miss\co09 cwr2_adam_busters.adam"

edit_mission.vbs enableSaving r:\miss\co08_Escape.Chernarus

unpack+edit+pack.vbs "r:\miss\CO6 NarcWars_Villa_Assault_v3.lingor.pbo"

Included features

  • "v7_weapon" - add your own weapons to "description.ext" (my weapon set is in included description.ext for example);
  • "unlock" - unlock all locked vehicles;
  • "respawn" - enable respawn ("SIDE" is default);
  • "no_norrin_revive" - disable Norrin's revive feature (I prefer ACE revive);
  • "3rdView" - disable ACE "Force 1st person" module;
  • "no_alarm" - remove the alarm sound from mission (it is better not to hear it at all than to "enjoy" it during gameplay because mapmaker forgot to shut it up);
  • "spectator" - enable ACE spectator after your death (you can watch your side players, see included onPlayerRespawnAsSeagull.sqs);
  • "enableSaving" - enable saving if it is disabled;
  • "ACE_Fix" - fix "nil" variable assignment (see https://dev-heaven.net/projects/cca/wiki/Nil_Check);
  • "no_music" - disable and remove music from mission (some mapmakers abuse of music including);
  • "ACE_Repair" - replace all repair vehicles with ACE's ones;
  • "Disable_BIS_FA" - disable BIS First Aid modules;
  • "AI" - enable disabled AI (in network lobby) (not included in MODES_DEFAULT).

2 very easy ways to use AMP:

  • (for Windows Explorer users) just drag'n'drop mission folders onto "edit_mission.vbs" icon or shortcut (or drag mission pbos onto "unpack+edit+pack.vbs");
  • (for Total Commander users) create buttons for "edit_mission.vbs" and "unpack+edit+pack.vbs", then select objects you want (dirs or pbos) and press corresponding button.
    Buttons:
    Replace my paths with yours
    TOTALCMD#BAR#DATA
    H:\ArmA2\scripts\edit_mission.vbs
    %S
    wcmicons.dll,39
    my edit
    
    
    -1
    


    TOTALCMD#BAR#DATA
    H:\ArmA2\scripts\unpack+edit+pack.vbs
    %S
    wcmicons.dll,60
    unpack+edit+pack
    
    
    -1
    

Some implemented functions, useful for further using

Sub ReplaceUnit(old_unit,new_unit,prob)
       replaces [i]old_unit[/i] with [i]new_unit[/i] with probability = [i]prob[/i]

Sub SetDescrValue(name, value, force)
       sets "description.ext" parameter [i]name[/i] value to [i]value[/i]. If parameter isn't set, it will be set only if [i]force[/i] == 1

Requirements

Windows XP and upper (tested on WinXP 32bit and Win7 64bit).

Bugs

Sometimes AMP makes mission crash Arma. Most often because of wrong patching of "description.ext" - there are duplicate entries after patching. I've found 2 reasons: "#include" directive and mission user variables named like "Weapons" or "Magazines". Both cases are rare.

Very big sqm-files cause unhandled error and can't be patched. Very rare bug for me.

"patternWeaponClass" RegExp should be improved. It mustn't include descriptions like mission user variables. If anyone knows how to do this with VBScript RegExp please tell me.

AMP can't patch binarized files (I've met a couple of such missions).

The source code contains russian comments. If it is very necessary I will translate them. Some day :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×