-
Notifications
You must be signed in to change notification settings - Fork 0
BodyState (for Weapons)
Grinch_ edited this page Jan 22, 2024
·
2 revisions
This feature enables you to add some realism and variety to your weapons by changing their states based on CJ's body state. For example, you can have a shotgun model that looks different when CJ is fat, slim, or muscular.
To use this feature, you need to have the following:
- A weapon model (.dff file) that you want to apply the state change feature to.
- Three different models (.dff files) that represent the different states of your weapon: fat, slim, and muscle.
- A dummy object named
x_body_state
inside your weapon's .dff file, with three children namedfat
,slim
, andmuscle
.
To use the state change feature, follow these steps:
- Create three different models for your weapon using any modeling software, such as 3ds Max, Blender, or ZModeler. The models should have the same name as your weapon, but with suffixes _fat, _slim, and _muscle. For example, if your weapon is named Shotgun, your models should be named Shotgun_fat, Shotgun_slim, and Shotgun_muscle. The models should have some differences in their appearance to reflect CJ's body state. For example, the Shotgun_fat model could have a wider barrel and a shorter stock, while the Shotgun_muscle model could have a longer barrel and a larger stock.
- Create a dummy object inside your weapon's .dff file using any modeling software. The dummy object should be named
x_body_state
. - Add three children to the dummy object, named
fat
,slim
, andmuscle
. These nodes will only be visible when their criteria are met. For example, thefat
node will only be visible when CJ is fat, theslim
node will only be visible when CJ is slim, and themuscle
node will only be visible when CJ is muscular. - Attach your models to the corresponding nodes. For example, attach the Shotgun_fat model to the
fat
node, the Shotgun_slim model to theslim
node, and the Shotgun_muscle model to themuscle
node. - Save your weapon's .dff file and place it in the appropriate folder in your game directory.
- Enjoy the state change feature when you use your weapon in the game.
Here is an example of how the state change feature works:
- Suppose you have a shotgun model with three different models named Shotgun_fat, Shotgun_slim, and Shotgun_muscle.
- You create a dummy object inside your shotgun's .dff file, named
x_body_state
. - You add three children to the dummy object, named
fat
,slim
, andmuscle
. - You attach your models to the corresponding nodes.
- You save your shotgun's .dff file and place it in the appropriate folder in your game directory.
- When you use your shotgun model in the game, it will change its state based on CJ's body state. If CJ is fat, the shotgun will have a wider barrel and a shorter stock. If CJ is slim, the shotgun will have a normal barrel and a normal stock. If CJ is muscular, the shotgun will have a longer barrel and a larger stock. The state will change dynamically as CJ's body state changes.