User Tools

Site Tools


arma2:tools:sbsmac_sqm

ArmA 2 Sqm

ArmA 2 Forum, ArmA 2 Home, ArmA 2 Config, ArmA 2 File Formats, ArmA 2 Missions, ArmA 2 3D Modeling, ArmA 2 Scripting, ArmA 2 Terrain, ArmA 2 Texturing, ArmA 2 Tools

Sqm by sbsmac

Sqm is a command-line tool to allow batch-processing of mission.sqm files. It can also process mission.sqm files that are packed inside pbo files.

Basic capabilities

  • Search for and list classes within an sqm that contain a particular property
  • extract an sqm from a pbo
  • Search for and remove classes that contain a particular property
  • Replace all instances of a property by another value
  • Merge items or classes from another sqm or text file

Download sites.google.com/site/macsarmatools/sqm ← unfortunately the download link is dead there :(

Here is the .exe only from our own tools dir, not official sbsmac release: Sbs.Mac.Tools.SQM.v1.0.exe.and.Mac.Arma.FileFormats.DLL.7z from OFP-ArmA.Tools.2024-03-19/ Torrent Magnet:

magnet:?xt=urn:btih:297c190f64d165274f5d04d22e5f743d4238b2ef&xt=urn:btmh:122000873e0fd4d26f3b3b2d1f6ea86704552a132dd7f6cf4b83a784b3c252599e4d&dn=OFP-ArmA.Tools.2024-03-19&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a6969%2fannounce

Warning - this tool is for advanced users only !

Sqm is a command-line tool to allow batch-processing of mission.sqm files. It can also process mission.sqm files that are packed inside pbo files.

Latest Build date: 24/08/2010 11:26:52

Basic capabilities

  • Search for and list classes within an sqm that contain a particular property
  • extract an sqm from a pbo
  • Search for and remove classes that contain a particular property
  • Replace all instances of a property by another value
  • Merge items or classes from another sqm or text file

Command reference

sqm filename command params outputspecifier outputparams

Where: filename refers to a .sqm or .pbo file. If the input is a .pbo file, the packed mission.sqm inside it is used for input. If filename is the character '-' then the input is read from stdin. This can be useful when chaining sqm operations.

command params can be one of

-? : Prints version info and directs your browser to this page
-e : Echoes the contents of the sqm file
-lc name pattern : Lists all classes (with contents) which contain a property called name and whose value matches the search pattern. The search is case-insensitive and can contain wildcards. Eg '-lc vehicle *soldier* will return all soldier units.  If pattern is omitted, then name is is treated as a configpath and the class at that path is listed.
-rc name pattern : Matches classes like -lc and then removes them from the sqm.
-ec name pattern : Matches classes like -rc but empties rather than removes them.
-s name pattern replacement :  Replaces all properties called name that match the search pattern with replacement
-aps name pattern property value : Searches for all classes that have a property called name  which matches pattern and then adds a new string property with the name property and the value value.
-mm filename : Merges the classes found in filename with the contents of the sqm file.  Any 'bare' classes are assumed to be markers.
-ms filename : Like -mm except that bare classes are assumed to be sensors
-mv filename : Like -mm except that bare classes are assumed to be vehicles
-mg filename : Like -mm except that bare classes are assumed to be groups or units
not present : The default command is '-e'.

output outputparams can be one of

-o filename : writes the result of the command to a file called filename
-wb : Writes the result of the command back to the source file.
not present : If no output is specified, the result is written to stdout

Examples

sqm example.utes.pbo

Prints the contents of the mission.sqm file inside example.utes.pbo to the console.

sqm example.utes.pbo -rc name respawn* -wb

Removes all respawn markers from the mission

sqm example.utes.pbo  -lc vehicle civilian* -o civs.txt
sqm example.utes.pbo -mg civs.txt -wb

The first comand creates a new file containing a list of units based on a civilian model. The second command merges this back to the original mission.sqm file. The end result is that the mission ends up with twice as many civilian units.

sqm mission.sqm -s vehicle soldier* insurgent -o mission2.sqm

Changes all soldier units to 'insurgent' and writes the result to mission2.sqm

Useful recipes, Ensure that all units in a mission are playable

sqm mission.sqm -lc "Mission>>Groups" | sqm - -aps vehicle * player "PLAY CDG" > u
sqm mission.sqm -ec "Mission>>Groups" | sqm - -mg u -o mission.sqm

2024-07-07T17:34:00Z

On 2021-08-18 tested sqm.exe tool but unfortunately it crashes when used on windows 8.1 on ArmA 3 mission.sqm files :(

Have not tested it under windows 10, or actually under windows 7 either in “recent years”.

Actually today ArmA 2/3 community most likely have some other tool that can do such mission.sqm command line editing, if you know one please post a topic to ArmA 2 Forum.

arma2/tools/sbsmac_sqm.txt · Last modified: 2024/07/07 17:39 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.