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
- 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.
- There are two important variables to change:
- Basics.Equipment.Body.Item - should be changed to point the the .shape file that you have exported which represents your building
- 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.
- 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
- 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.
- If you do not have a botobject primitive or need to create a new group:
- Right click on the primitive root node and click "Add npc_manager"
- Provide the npc_manager with a helpful name for future identification.
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.
- In the npc_zone properties:
- Set the npc_zone name to something useful.
- Set the npc_zone ai_activity to no_change
- Set vertical_pos to auto.
- Ensure that all other fields are blank and that ai_movement is not populated.
- Right click on your npc_zone and click "Add npc_group"
- In the npc_group properties:
- The only properties defined here should be name and autoSpawn should be checked.
- Right click on the target npc_group node and choose "Add npc_bot"
- Provide a name and choose the correct sheet_client, corresponding to the sheet created in the previous section (or an existing sheet.)
- Ensure that vertical_pos is set to auto.
- 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.
- Click the Move tool (or F6) and drag your bot object into position.
- Save your primitive(s) and deploy.