Adding Dynamic Stationary Objects

Ryzom Core has two methods of adding stationary objects to the game: dynamic and static.

Dynamic stationary objects are accomplished by harnessing the NPC system to place immobile and inanimate bots. This is the simplest method but has some drawbacks such as:

  • It's a simulated object despite being stationary so it applies to the wire-entity limit (the number of entities send across the client/server connection)
  • All lighting and shadows are dynamic and so a large number may have a detrimental performance impact

That being said they're great for quick-and-dirty events or for areas which require somewhat frequent changes. Creating these is composed of two basic steps, assuming that your building shape is already created and exported via the build pipeline.

Create A Sheet

  1. Clone an existing bot object sheet or create a new sheet using the parent _parent_botobject.creature. These sheets should go in code/ryzom/common/data_leveldesign/leveldesign/Game_elem/Creature/objects. You can use object_watch_tower.creature as a point of reference. It is at the middle of the newbie village that is provided with Ryzom Core.
  2. There are two important variables to change:
    1. Basics.Equipment.Body.Item - should be changed to point the the .shape file that you have exported which represents your building
    2. Collisions.CollisionRadius and Collisions.Height. Alternatively you can use Length and Width instead of CollisionRadius but you must use both in lieu of the latter.
  3. make_sheet_id and sheet_packer will have to be re-run manually if not using the build_pipeline. The new sheet_id.bin will have to be distributed to clients and servers.

Place In Primitive

  1. Open World Editor up and open your target continent's botobjects primitive, for example botobojects_newbieland.primitive. It is helpful to have this as part of a continent project with the associated .land loaded so you can see the terrain.
  2. If you do not have a botobject primitive or need to create a new group:
    1. Right click on the primitive root node and click "Add npc_manager"
    2. Provide the npc_manager with a helpful name for future identification.
    3. Right click on your new npc_manager node and choose "Add npc_zone"

      If you're not using this zone for automatons then you do not need to draw the zone. Remember when drawing the zone, if necessary, to do so counter clockwise.

    4. In the npc_zone properties:
      1. Set the npc_zone name to something useful.
      2. Set the npc_zone ai_activity to no_change
      3. Set vertical_pos to auto.
      4. Ensure that all other fields are blank and that ai_movement is not populated.
    5. Right click on your npc_zone and click "Add npc_group"
    6. In the npc_group properties:
      1. The only properties defined here should be name and autoSpawn should be checked.
  3. Right click on the target npc_group node and choose "Add npc_bot"
  4. Provide a name and choose the correct sheet_client, corresponding to the sheet created in the previous section (or an existing sheet.)
  5. Ensure that vertical_pos is set to auto.
  6. You will need to locate the point representing your new bot. It should be grey instead of light blue. If you select the npc_bot on the three you can press the Locate Selected Primitive Icon (or Alt-L) to locate it.
  7. Click the Move tool (or F6) and drag your bot object into position.
  8. Save your primitive(s) and deploy.