User Tools

Site Tools


arma2:tools:sbsmac_sqm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
arma2:tools:sbsmac_sqm [2010-07-21 02:25]
snakeman created sbsmac_sqm initial page.
arma2:tools:sbsmac_sqm [2017-10-06 21:21]
snakeman http to https switch.
Line 13: Line 13:
   * Merge items or classes from another sqm or text file   * Merge items or classes from another sqm or text file
  
-Download [[http://​sites.google.com/​site/​macsarmatools/​sqm|here]]+Download [[http://​sites.google.com/​site/​macsarmatools/​sqm|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: [[https://​pmc.editing.wiki/​downloads/​Sbs.Mac.Tools.SQM.v1.0.exe.and.Mac.Arma.FileFormats.DLL.7z|Sbs.Mac.Tools.SQM.v1.0.exe.and.Mac.Arma.FileFormats.DLL.7z]]. 
 + 
 +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 
 +<​code>​ 
 +-? : 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'​. 
 +</​code>​ 
 + 
 +output outputparams can be one of 
 +<​code>​ 
 +-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 
 +</​code>​ 
 + 
 +**Examples** 
 +<​code>​ 
 +sqm example.utes.pbo 
 +</​code>​ 
 +Prints the contents of the mission.sqm file inside example.utes.pbo to the console. 
 + 
 +<​code>​ 
 +sqm example.utes.pbo -rc name respawn* -wb 
 +</​code>​ 
 +Removes all respawn markers from the mission 
 + 
 +<​code>​ 
 +sqm example.utes.pbo ​ -lc vehicle civilian* -o civs.txt 
 +sqm example.utes.pbo -mg civs.txt -wb 
 +</​code>​ 
 +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. 
 + 
 +<​code>​ 
 +sqm mission.sqm -s vehicle soldier* insurgent -o mission2.sqm 
 +</​code>​ 
 +Changes all soldier units to '​insurgent'​ and writes the result to mission2.sqm 
 + 
 +Useful recipes, Ensure that all units in a mission are playable 
 +<​code>​ 
 +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 
 +</​code>​
arma2/tools/sbsmac_sqm.txt · Last modified: 2024-03-19 07:06 by snakeman