Adding or Updating a Monster in game - voxraygames/worldbuilding GitHub Wiki

Start game Open ‘esc’ menu Goto animation editor

image

With the animation editor open there is now a character drawn in the world This character is in mid air and at the center of the world, the skeleton drawn over is visible through terrain.

image

To add a new monster type go to ‘Manage Mapping’ Add give a the name of a the new monster + _mapping

image

Then press ‘Copy

Then select the newly created monster mapping in the dropdown

image

In ImportModel we now put the asset name (the .vox name without the extension and with the path relative to the game)

image

Ensure that the model is centered properly in the vox file.

(before) image

(after) image

Also ensure they are standing on the ground

image

Set the Animation to ‘walk’ and then try out the available Mapping Pose entries to see if one is a perfect match or which comes closest. image

image

This need a bit of fine tuning.

Select the ‘Mapping Pose’ as the ‘Animation

Enter a name for the new pose: image

And press Copy and select the animation. Also set this new name as the Mapping Pose on the Mapping

Let’s now fine time the skeleton

select the relevant Bone Select the relevant _pose in the Animation dropdown Select the relevant Mapping image

With the bottom group we can move the effector point of a bone.

Lets, start with the head, we pick the ‘head’ bone in the top dropdown.

This turns the top bone in the skeleton red.

Bones work a bit weirdly, they are a line from where they connect, to where they pivot. For the head a good place for the pivot of the head bone is at the base of where the skeleton attached to the head, perhaps a little bit forwards of that.

It helps to move the camera around a bit, from the side, from the front, from the top, especially with the y level aligned.

You move the pivot with the controls at the bottom of the Animation Editor, the controls on the right side control the speed of change and allow for precise tuning. Coordinates are in voxels, ie. tile distance times 9

Lets check the animation

Pick the ‘walk’ animation in the Animation dropdown Select the mapping we’re working on in the Mapping dropdown

Press the ‘Run’ button

image

To add a monster to the game current open the sourcefile ‘monsters.lobster’ Then copy a function like new_pig_big_monster_settings() or which ever existing type matches the new one close enough And change the values appropriately.

image

(pigs/meat_4_ooze should be ooze/meat_4_ooze)

Then add this settings to the known types in Monsters::init()

image

image

Adding a skeleton

1: Open the animation editor and locate the monster in game

screenshot-2022-11-21-09-28-07

2: Select the ‘Torso’ bone and the ‘Animation’ and ‘Mapping’ of the monster you want to edit. image 3: Open Bone mapping and copy the location of the .vox file from the ‘asset’ line. Be sure to not copy the :torso affix. image 4: Paste this into ‘ImportModel’ line above Bone Mapping and press import. This will reimport any change you made to the .vox file. This should be done any time the .vox file is changed. image