$bonemerge: Difference between revisions
Jump to navigation
Jump to search
Tip:You can record the following Find & Replace process as a macro in Notepad++ to avoid copypasting the string of text for the next uses.
m (→Writing Bonemerge easily: fixed up the string to work with more names. Previously bone names with : did not work) |
(→Writing Bonemerge easily: Added tip about macro, made copypaste strings easier to identify and renamed section from "Writing bonemerge easily" to "Writing Bonemerge in Notepad++") |
||
Line 6: | Line 6: | ||
$bonemerge <bone name> | $bonemerge <bone name> | ||
== Writing Bonemerge | == Writing Bonemerge in Notepad++ == | ||
There is no automated function for this yet, but you can do it manually using Regex in Notepad++. This process takes about two minutes | There is no automated function for this yet, but you can do it manually using Regex in Notepad++. This process takes about two minutes. | ||
{{tip|You can record the following '''Find & Replace''' process as a macro in Notepad++ to avoid copypasting the string of text for the next uses.}} | |||
#Open your mesh.smd in Notepad++. | #Open your mesh.smd in Notepad++. | ||
#Copy the bone names from the very top into a new, empty file. | #Copy the bone names from the very top into a new, empty file. | ||
#Press '''Ctrl&H''' to enter "Replace" mode. | #Press '''Ctrl&H''' to enter "Replace" mode. | ||
#In the "Find What" field, enter | #In the "Find What" field, enter: <source>^\s*\d+\s*"(.+)"\s*-?\d+\s*$</source> | ||
#In the "Replace with" field enter | #In the "Replace with" field enter: <source>$bonemerge "\1"</source> | ||
#Make sure that '''. Matches newline''' is disabled. | #Make sure that '''". Matches newline"''' is disabled. | ||
#Click "Replace all" | #Click '''"Replace all"''' | ||
Now you can paste those lines in your qc file, or use as a qci file. | Now you can paste those lines in your qc file, or use as a qci file. | ||
[[Category:QC Commands|bonemerge]] | [[Category:QC Commands|bonemerge]] |
Revision as of 07:12, 10 March 2021
Serves as a hint to the game code that the named bone will be used for bone merges (see Attachments) during the game. If this flag is not present, the bone can still be used but you'll get performance warnings.
It can also be used to force a bone existance for the $definebone process. Sometimes when you use Crowbar to write the $definebones lines, it will collapse a bone and simply not write a $definebone line for a bone. Adding a $bonemerge line for all, or just the missing bone, circumvents the bone from being removed.
Syntax
$bonemerge <bone name>
Writing Bonemerge in Notepad++
There is no automated function for this yet, but you can do it manually using Regex in Notepad++. This process takes about two minutes.

- Open your mesh.smd in Notepad++.
- Copy the bone names from the very top into a new, empty file.
- Press Ctrl&H to enter "Replace" mode.
- In the "Find What" field, enter:
^\s*\d+\s*"(.+)"\s*-?\d+\s*$
- In the "Replace with" field enter:
$bonemerge "\1"
- Make sure that ". Matches newline" is disabled.
- Click "Replace all"
Now you can paste those lines in your qc file, or use as a qci file.