Garry's Mod
777 voti
Composite Bonemerge Tool
3
4
3
3
5
2
4
2
3
3
2
2
   
Premio
Aggiungi ai preferiti
Preferito
Rimuovi dai preferiti
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Scenic
Dimensioni del file
Pubblicato in data
Aggiornato in data
99.294 KB
29 nov 2022, ore 13:53
22 ago 2024, ore 9:05
64 note di rilascio ( visualizza )

Sottoscrivi per scaricare
Composite Bonemerge Tool

Descrizione
The Composite Bonemerge Tool (CBT) is an advanced bonemerge tool that lets you modify bonemerged models with any vanilla or custom tool after bonemerging them with other model. The bonemerged models' data will be automatically available when you use your favorite tools, as if they truly were a single model. This includes the following data: body groups, skins, submaterials, flexes, eyes, bones and attachments.

Additional cool features:
  • Models are added, removed or detached with menus in an intuitive way.
  • We can change the position, angle and scale of child models from within a PAC3-style editor.
  • Bonemerged models' color can be changed in the editor.
  • Players, NPCs and NextBots preserve the models that were attached to them when they die.
  • Everything is saved correctly in dupes and saves.
  • Flawless ghost preview.

This tool fixes many of the bugs of the Easy Bonemerge Tool as well, for example:
  • Halos are drawn smoothly across parent models and their children (see the images above).
  • When you attach something to yourself, there aren't bugged shadows in first person view.
  • When you remove a child model from its parent, the child's shadow is removed instantly.

INSTRUCTIONS
  • R-click: Select the model you want to add or remove models from.
  • L-click: Add something to the model on which you right-clicked. Clicking on the selected model allows for removing the models that you merged with it before. KEEP IN MIND THAT THE MENUS WILL ONLY APPEAR WHEN YOU HOLD YOUR C KEY.
  • Reload: Select yourself as the model you want to add or remove models from (click again to remove models from yourself).

It's possible to make very complex models with infinite depth. For example, you can bonemerge a prop to another prop that you've already bonemerged before, and so on.

Available convars
  • sv_compositeentities_enable: Enable/disable scripted models (those that are created with LUA scripts). See info for developers.

  • sv_compositeentities_childboneediting: By default, the feature that lets you transform bones of child models using bone tools is disabled. It can be enabled with this ConVar (set it to 1). Anyway, some bone tools have built-in features for child bone editing (Ragdoll Mover), so you could just use them directly. You should disable this if it causes problems with other addons.

INFO FOR DEVELOPERS
The CBT includes an internal system for bonemerging models automatically when they're spawned using small LUA scripts. The child models specified in these scripts will ALWAYS spawn, even in playermodel selectors. This way, we can make custom playermodels, NPCs, ragdolls, or whatever we want.

Personally, I use this feature for creating very complex models that couldn't have been compiled with Studiomdl (too many vertices, more than 32 materials...).

In order to use this system, you just need to call a special method called addModel in a hook called CompositeEntities_AddModels. This function is used to register a model and returns a registration ID. Then, you can add child models to that model by calling the function again. It has the following parameters:
function CompositeEntities:addModel(modelChild, modelParent, att, localPos, localAng, scale, scale2)
  • modelChild: A path to the MDL file of the model you wanna register. If you want to attach this model to multiple parent models, you can either use the registration ID returned by the function in a previous call or just type the path of the MDL file again.

  • modelParent (OPTIONAL): A path to the MDL file of the model you wanna use as the parent of modelChild. It must have been registered in a previous call, otherwise the function will fail. You can use its registration ID too. This argument may be nil if you intend to use modelChild as a root model.

  • att (OPTIONAL): Name of the bone that you wanna use for parenting (it must exist within the parent model). If this argument is nil, bonemerge will be applied instead. If you use this argument, modelParent, localPos and localAng must be set.

  • localPos (OPTIONAL): Relative position (Vector) of the child model within its parent (doesn't work if att isn't set).

  • localAng (OPTIONAL): Relative angle (Angle) of the child model within its parent (doesn't work if att isn't set).

  • scale (OPTIONAL): Scale (number) of the child model (doesn't work if att isn't set).

  • scale2 (OPTIONAL): Scale (Vector) of the child model's root bone (doesn't work if att isn't set).
NOTE: You can use the PAC3-style editor in-game for helping you determine localPos, localAng, scale and scale2.


As an example, this's the script I used for my Velikan playermodel. This code was added to a file within the "lua/autorun" folder.
hook.Add("CompositeEntities_AddModels", "CoD: MW Velikan", function(composite) local id_pm = composite:addModel("models/kuma96/codmw/characters/velikan/velikan_pm.mdl") composite:addModel("models/kuma96/codmw/characters/velikan/velikan_bodygroups.mdl", id_pm) end)

Recommended Addons
Use this along with Overhauled Bone Tool to do head swaps. Enable the "Scale child bones" checkbox for better results. Remember that sv_compositeentities_childboneediting must be set to 1.
Discussioni più popolari Visualizza tutte (2)
88
17 ago 2024, ore 9:14
IN EVIDENZA: Bug reports
kuma7
2
13 set 2024, ore 1:56
IN EVIDENZA: Post the dupes you've made here!
kuma7
344 commenti
DoomQuake95 22 feb, ore 1:00 
Badass! Like a PAC3 Jr. that could be used on NPCs
Pixl 4 dic 2024, ore 11:28 
Still stumped on animation. IDK then
Pixl 4 dic 2024, ore 11:20 
I see.
kuma7  [autore] 4 dic 2024, ore 10:30 
You just need to enable sv_compositeentities_childboneediting in the console, and then you can start animating.
Pixl 4 dic 2024, ore 10:11 
If someone can lmk how this is in any way working with SMH I will appreciate it.
Specneo 20 nov 2024, ore 18:11 
sorry bout that. But I wanted to show the bugs to you.
kuma7  [autore] 20 nov 2024, ore 17:56 
Read the blue statement in the bug reports thread and check whether the errors persist when the tool is disabled. HUDNumber5 and TextWidth are not used in this addon's code.
Specneo 20 nov 2024, ore 15:23 
[Composite Bonemerge Tool] RunString(Ex):113: attempt to perform arithmetic on local 'TextWidth' (a nil value)
1. unknown - RunString(Ex):113
2. oldDrawModel - [C]:-1
3. DrawModel - lua/compositeentities/override/sh_entity.lua:520
4. Render - lua/includes/modules/halo.lua:76
5. v - lua/includes/modules/halo.lua:145
6. unknown - lua/includes/modules/hook.lua:96
Specneo 20 nov 2024, ore 15:23 
[Composite Bonemerge Tool] 'HUDNumber5' isn't a valid font
1. unknown - RunString(Ex):106
2. oldDrawModel - [C]:-1
3. DrawModel - lua/compositeentities/override/sh_entity.lua:520
4. Render - lua/includes/modules/halo.lua:76
5. v - lua/includes/modules/halo.lua:145
6. unknown - lua/includes/modules/hook.lua:96
Bad Opinions Squid #FixTF2 19 nov 2024, ore 17:17 
Would it be possible to make this mod compatible with the shadow remover tool?
I'm trying to use it to make certain parts of a model glow in the dark but not others