creature shapes

Added by perkar about 5 years ago

So I have been trying to create a new creature on the server and I think I got most of it, but I just can't seem to find where I specify the .shape file used for the model. I have a list of all the .skel and .shape files and I can specify the correct .skel file under the 3d Data tab in my custom .creature file, but I can't find where to specify the .shape file.

I found this in the given _dag.creature file (the yubo):

Wed Jun 19 17:04:21 2002 (gatto) .3d data.Equipment0.Shape = tr_mo_dag.shape
Wed Jun 19 17:04:21 2002 (gatto) .3d data.Equipment0.Texture = Default

But these were under the <LOG> section of the .creature file and I can't seem to find where that really applies. Any ideas?

thanks,
-perkar


Replies (7)

RE: creature shapes - Added by sfb about 5 years ago

Perkar,

First thing to check is whether you have the actual .shape file you want to use by inspecting the client data:

bnp_make /l fauna_shapes.bnp

Other files of interest are fauna_animations.bnp fauna_maps.bnp fauna_shapes.bnp fauna_skeletons.bnp fauna_swt.bnp - you'll need each variant for the NPC you want to load (foo.anim, foo.png/tga/dds, foo.shape, foo.skel, foo.swt). You can simply put the shape/etc files into the data folder rather than rebuild the .bnp if you want for purposes of testing.

The .creature sheet is based upon data_leveldesign/leveldesign/DFN/game_elem/creature.dfn - the option in here that you're interested in is the "3d data" elem which is defined by _creature/_creature_3d.dfn. In your creature file you'd have something like this:

<STRUCT Name="3d data">
      <ATOM Name="Skel" Value="LOD_Shape_Name.skel"/>
      <ATOM Name="AnimSetBaseName" Value="animsetname"/>
      <ATOM Name="LodCharacterName" Value="LOD_Shape_Name"/>
      <ATOM Name="LodCharacterDistance" Value="50.0"/>
      <ATOM Name="NamePosZLow" Value="0.5"/>
      <ATOM Name="NamePosZNormal" Value="0.7"/>
</STRUCT>

Hope this helps.

Thanks,
sfb
/s

RE: creature shapes - Added by sfb about 5 years ago

Sorry, one more addition. The AnimSetBaseName might need some clarification but I believe that this is the prefix for the animation set sheets used for this character. It is defined by data_leveldesign/leveldesign/DFN/game_elem/_anim/animation_set.dfn.

There are 7 animation states that require animation sets: alert, combat, death, default, eat, hungry and rest. In the previous example I named your AnimSetBaseName to "animsetname." So you'd name your files like this:

  • animsetname_alert__.animation_set
  • animsetname_combat__.animation_set
  • animsetname_death__.animation_set
  • animsetname_default__.animation_set
  • animsetname_eat__.animation_set
  • animsetname_hungry__.animation_set
  • animsetname_rest__.animation_set

It might be easier to start a sheet in Georges Editor than to try and explain how this works but if you look at the animation_set.dfn, animation_state.dfn (which each entry in animation_set.dfn is) and ultimately animation.dfn (which each animation_state.dfn refers to an array of) you should start to be able to visualize how you define the animations and animation sets.

Thanks,
sfb
/s

RE: creature shapes - Added by aquiles about 5 years ago

So if i want to add eg a capyrni like creature i would do

<ATOM Name="Skel" Value="TR_MO_Capryni.skel"/>
<ATOM Name="AnimSetBaseName" Value="Capryni"/>
<ATOM Name="LodCharacterName" Value="TR_MO_Capryni.shape"/>

Do i have to copy shape skel etc into user dir on client and data_shard dir on server or will he find them in the bnps?

Im asking because my first tries werent succesful. Got a poor yubo called Capryni with yubo shape and txture but capryni skel (i think).
So shape seems to be missed (texture is defined in ther afaik). Which leads again to the question about defining the shape. Is the above declaration right?

Thx, aquiles

RE: creature shapes - Added by perkar about 5 years ago

Well I'm no expert but I think I can answer this from the hours of messing around with adding creatures :P

All of the .shape and .skel files are in the .bnp files in your game directory's data folder. You don't have to include them anywhere because they are compiled into those .bnp files.
Now as for how you make sure the correct .skel is being used you have to check the contents of the sheet_id.bin file. A text file of everything in it gets created whenever you compile a new one (sheets.txt), so you can search for the correct .skel in there.

As far as I know the .shape file is only referenced by the animation sets for a given creature. So you also have to look in the sheets.txt file for the correct animsetname (the name of the creature followed by _ followed by some action .animation_set) and the animsetname will be everything before the first _ (usually just the creature's name).

The LodCharacterName value I have no idea what it's used for as I couldn't find anything on the value that was on the test yubo. So sorry there :/

I was able to successfully replace the test yubos with kitin queens :D

Sorry for the convolutedness, I'll try and figure out some more about creature adding tomorrow :/

RE: creature shapes - Added by sfb about 5 years ago

Okay,

So I did a little more research and I was off a little bit. The LOD character name is important but it does not define the shape. The actual mesh is defined by the equipment slots:

Inside capryni.creature

      <STRUCT Name="Equipment">
        <STRUCT Name="Body">
          <ATOM Name="Item" Value="capryni_chest.item"/>
        </STRUCT>
        <STRUCT Name="Legs">
          <ATOM Name="Item" Value="capryni_legs.item"/>
        </STRUCT>
        <STRUCT Name="Arms">
          <ATOM Name="Item" Value="capryni_arms.item"/>
        </STRUCT>
        <STRUCT Name="Hands">
          <ATOM Name="Item" Value="capryni_hands.item"/>
        </STRUCT>
        <STRUCT Name="Feet">
          <ATOM Name="Item" Value="capryni_feet.item"/>
        </STRUCT>
        <STRUCT Name="Head">
          <ATOM Name="Item" Value="capryni_head.item"/>
        </STRUCT>
      </STRUCT>

FYI the Equipment element is contained within the Basics element.

capryni_chest.item:

  <STRUCT>
    <STRUCT Name="basics">
      <STRUCT Name="EquipmentInfo">
        <ARRAY Name="EquipmentSlots">
          <ATOM Name="chest" Value="Chest"/>
        </ARRAY>
      </STRUCT>
    </STRUCT>
    <STRUCT Name="3d">
      <ATOM Name="shape" Value="tr_mo_capryni.shape"/>
    </STRUCT>
  </STRUCT>

You could also define basic armor stats in the equipment slots for each body part:

    <STRUCT Name="armor">
      <ATOM Name="Armor category" Value="Heavy"/>
      <ARRAY Name="protection type">
        <ATOM Name="piercing" Value="Piercing"/>
        <ATOM Name="slashing" Value="Slashing"/>
      </ARRAY>
      <ATOM Name="protection" Value="Heavy"/>
      <ATOM Name="max protection" Value="heavy"/>
    </STRUCT>

This isn't straight from the Ryzom data so it won't work but I'm pretty sure I just pointed you in the right direction.

Thanks,
sfb
/s

RE: creature shapes - Added by aquiles about 5 years ago

Hey Perkar that sounds nice. Wanted to do a kitin queen in the newbyland too :) Perhaps you can do a little tutorial and write down all information you gathered so far.

Thanks sfb, thats a lot of valuable information. Im off until the weekend but then my newbyland will be swarming with creatures :D

Have a nice day, aquiles

RE: creature shapes - Added by perkar about 5 years ago

So yeah. sfb was totally right. The only reason why I was able to switch the yubo with the kitin queen was because I replaced the yubo .shape file contents with that of the kitin queen in the data folder. I had forgotten about that so that's why that worked. In order for you to really get the shapes of the creature you want, you're gonna need .item files linking to the right .shape :/

The only problem is that all the .item files are packed into the .packed_sheets files :(
I'm working with Mankar and he's working on unpacking them so we can have a bunch of stuff to test with, but It's kind of difficult because as far as we know there's not a tool that unpacks them for us :(

Thanks sfb, you've been a huge help :D

-perkar

(1-7/7)