Repository navigation
leveldesign_item_npc_sheets
title: Adding Item and NPC Sheets to the Core Leveldesign description: How new item and NPC sheets get into the core4 leveldesign through its generators, what to check first, what the generated sheets must contain for the client and the services to show them, and how to rebuild and load them on the quick start development shard; worked example the four nation leaders. published: true date: 2026-11-12T12:00:00.000Z tags: editor: markdown dateCreated: 2026-11-12T12:00:00.000Z
A playbook for adding item (.sitem) and NPC (.creature) sheets to the core4 leveldesign (ryzomcore_leveldesign, the leveldesign folder of the Quick Start), and seeing them on the development shard. Worked example: the four nation leaders, Emperor Dexton, King Yrkanis, Governor Still Wyler and Grand Sage Mabreka-Cho, with their armor, weapons and haircuts.
-
Core4 sheets come from the generators in
leveldesign/scripts/generate_r2_sheets(readme.txtthere lists the steps). They are not written by hand, and not copied from the classic leveldesign: classic is the reference for how an item or creature behaves (its type, slot, stats family), the generators are the source of the sheet. -
The translation files are the list of what exists.
translation/translated/item_words_en.txtandcreature_words_en.txtname every item and creature by sheet id (icfahv_leader01 Dexton's Vest), under an open licence. -
New sheets need the leveldesign pipeline and a shard restart: the services load the packed sheets and
sheet_id.binat start, and the client needs its packed sheets rebuilt. Primitives and translations can change on a running shard; sheets cannot (Changing Leveldesign on a Running Development Shard).
Most of what a sheet needs may already exist. For the leaders everything did, except the sheets themselves:
| What | Where | The leaders |
|---|---|---|
| The name |
translation/translated/item_words_en.txt, creature_words_en.txt (second column is the sheet id) |
"Dexton's Vest" and the other 15 armor pieces; the weapons by sheet name |
| A reserved sheet id |
leveldesign/game_elem/sheet_id.bin: grep -a -o "icfahv_leader01[.a-z]*" game_elem/sheet_id.bin
|
all 20 items had ids from the start |
| The shape and textures |
pipeline/install/characters_shapes (armor, hair), objects (weapons), characters_maps_hr (textures) |
*_lead_*.shape, ge_mission_chef_wea_fy/ma/tr/zo.shape, *_lead_*_c3_u1.dds… |
| The sheet | find leveldesign/game_element leveldesign/game_elem -name "<id>.*" |
missing |
| Why the generator skipped it |
generate_r2_sheets/sitem_list_r2.txt (the Ring palette), sitem_list_wk.txt (added by hand, in sections: boss armor, tribe melee, tribe shields…) |
on neither list |
The behaviour reference is the classic sheet (X:\source\ryzomclassic_leveldesign or a checkout of it): item type, parent, craft plan, shape names. Read it; do not copy it.
The scripts write straight into R:\leveldesign (the quick start root mapped as R:, see _r_check.bat) and read their tables from the current folder, so run them from generate_r2_sheets.
-
They were written for Python 2. The quick start ships Python 3.15 (
RC_PYTHON3_DIR). With the Python 3 fixes now in the scripts,generate_sitem.pyandgenerate_creature_npc_3dset.pyreproduce every committed sheet.generate_creature_npc.pydoes not: Python 3 integer division and float formatting give other values, so a full run rewrites every ring NPC sheet. Run it with the argumentleaders(or a similar mode) to write only new sheets. -
The bundled Python does not put the script folder on
sys.path(its._pthfile), so a script that imports a neighbour (from balancing_config import *) needs it added:python -c "import sys; sys.path.insert(0, '.'); sys.argv = ['generate_creature_npc.py', 'leaders']; exec(compile(open('generate_creature_npc.py').read(), 'generate_creature_npc.py', 'exec'))" -
They write CRLF; the repository stores LF. After a run,
git diff --statshows the real changes, andgit checkout -- game_element game_elemdrops the files that differ only in line endings. Convert the new files to LF before adding them. -
generate_sitem.pyrewrites every item, brick and phrase it knows. Checkgit statusafterwards: only the new files should remain.
Items that follow the naming scheme (icfahv: item, crafted, fyros, heavy armor, vest; icbm2sa: tribe two-handed axe) go through the chain in readme.txt: the item lists, scheme_sitem_parser.py (tags from the id), the shape parser and sitem_shape_matcher.py (match_sitem_shape.tsv: id, male shape, female shape, tags), then generate_sitem.py, which derives parent, type, slot, icon, folder and a craft plan brick from the tags. To add one, put its id in a section of sitem_list_wk.txt and run the chain.
Items that do not follow the scheme, or use shapes the matcher leaves out (it skips _mission_ shapes), get a table. The leaders' table is sitem_leaders.tsv:
; item base craft plan shape male shape female
icfahv_leader01 icfahv base fy_hom_armor01_lead_gilet fy_hom_armor01_lead_gilet
fy_weapon_leader_dexton icfm2ss none ge_mission_chef_wea_fy ge_mission_chef_wea_fy
-
base is the systematic item it is a variant of: its tags give the parent, item type, slot and icon. Pick it from the classic sheet's type and craft plan: the classic leader armor used the plan of the ordinary piece (
bcfaea06, the heavy vest), whichsbrick_index.tsvlists as the alias of the core4 brick (bcfaec16_fahv). The Zorai leader set is caster-shaped in classic but its plans are light armor ones, so its base is Zorai light armor. -
craft plan
basereuses the base item's brick;nonewrites noCraftPlan(the classic leader weapons had none). A unique item never gets a brick or phrase of its own. - The generator puts them in
<armor|melee_weapon>\<origin>\leader, withDrop or SellandSaleablefalse, and for armormap_variantLow Quality, the variant the lead textures were made for. - A weapon whose shape has a particle system of the same name (
pipeline/install/sfx/ge_mission_chef_wea_fy.ps, listed insfx_ps_parsed.tsv) gets it as its glow, as the classic leader weapons had it:3d.fx.StaticFXson the bonebox_arme,3d.fx.AdvantageFX, and3d.has_fxtrue. Withouthas_fxthe client shows the bare mesh. - Values inherited from the base stay: the leader weapons have the bulk, equip time and strength requirement of an ordinary two-handed weapon, where the classic ones had none. That only matters once players can get them (classic
named_items.txthas them at quality 250).
A Ring scenario can hold plot items: mission objects with a name, a description and a comment of the author's, shown with the icon of an item the author picks in the editor. The items to pick from are the sheets r2_plot_item_0 to r2_plot_item_184 in game_element/sitem/scroll, which differ in their icon only. Their table is sitem_plot_items.tsv:
; item icon icon background
r2_plot_item_0 ar_armpad.png bk_mission.png
r2_create_new_plot_item curs_create.tga bk_mission.png
generate_sitem.py writes each line as an item of the family scroll R2, book R2, letter R2 (SCROLL_R2 in the code), stackable 99, Bulk and Weight 1, Saleable false: no parent, no shape, no brick or phrase. What the table takes from the classic sheets is which icon item N has, and the background; what the generator takes is those five values, the same in all 186 classic sheets.
| Who | Finds the sheets by | Needs |
|---|---|---|
The editor (CEditor::initReferencePlotItems) |
every item sheet of the client with r2_plot_item in its name, 200 at most (r2ed_max_num_plot_item_sheets) |
the packed sheets of the client; without them the item chooser is empty and the log has an ASSET ERROR
|
The client, for the texts (r2:setPlotItemInfos) |
the family SCROLL_R2
|
|
The scenario service, when a scenario starts (CRingAccess::init) |
the names r2_plot_item_0.sitem to r2_plot_item_184.sitem
|
sheet_id.bin |
The EGS, to give one to a player (CR2MissionItem::giveMissionItem) |
its own sheet of that id, of the family SCROLL_R2
|
the packed sheets of the services |
-
A scenario holds the number of the sheet (
SheetId = 8630062), from thesheet_id.binit was made with. The core4sheet_id.binhad the 186 names before the sheets existed, with the numbers the classic one has, so a scenario file from any shard names the same items. That lasts as long assheet_id.binis extended and never made anew, and as long as item N keeps its icon: do not reorder the table. A new icon is a new line with the next number, and the scenario service must be told of it. -
Icons are names of the interface atlas (
texture_interfaces_*.txtininterfaces.bnp); the client ignores case and reads.pngas.tga. The generator does not check them.r2_plot_item_74names a texture no data has (Wood.tga), as in classic: the client shows its default item icon. It was meant to be the dry wood icon, whose texture name has a space in it, which the atlas table cannot carry. -
Rebuilding is as for any sheet (below): the client packed sheets and the packed sheets of the services, then a shard restart.
sheet_id.binstays as it is. -
r2_create_new_plot_itemcarries the icon of the editor's "new item" slot. The line ofr2_plot_item.luathat puts it there is commented out, so nothing uses it now; the sheet is there because the translation files andsheet_id.binname it. It is not a plot item: its name does not haver2_plot_itemin it, and the scenario service does not accept it.
An NPC is two sheets, as for the ring NPCs:
-
A look,
game_elem/creature/npc/_parent_3dset/_<name>.creature(generate_creature_npc_3dset.py): the race parent (_fyros_male.creature, which gives skeleton, animations and four random haircuts), thenBasics.EquipmentwithBody,Legs,Arms,Hands,Feet,Head,Face, each anItem, aTexture(Lacustre/Low Quality/Young, the variant) and aColorlabel (Red), and3d datawithHairItem,HairColor,EyesColor. AHairItemarray with one entry fixes the haircut (fy_leader_01.sitem). -
An NPC sheet,
game_elem/creature/npc/<folder>/<name>.creature(generate_creature_npc.py,writeNpcCreature): the look as parent, the stats of a type and level (the leaders arering_guard_melee_tankatf4, about level 260),Basics.Equipment.<slot>.Coloras numbers, anditem_right/item_leftfor what it holds.
What the client shows of an NPC comes from two places (CBotNpc::sendVPA in the AI service, the SAltLookProp part of CCharacterCL in the client):
- the clothes, face and haircut from the look sheet;
-
the colors and the weapons from the server, which reads them from the bot's own sheet:
Basics.Equipment.<slot>.Colorof the NPC sheet, the head color as the hair color, anditem_right/item_leftturned into visual slot indices. An item that holds no visual slot is not shown.
Colors pick the texture variant: equipment color 0 Red to 7 Black select the textures _u1 to _u8, and hair Color 1 to Color 6 the hair textures _u1 to _u6. Textures that exist in one variant only need that color. The leader textures are Fyros _u1 (Red, 0), Matis _u3 (Green, 2), Tryker _u5 (Blue, 4), Zorai _u6 (Violet, 5), for the armor and the hair alike, so each leader's NPC sheet has that number in every slot.
Stop the shard first (the dashboard or stop_all on Mainland and Unifier; the web can stay). Then, in the console of cmd_build_gamedata.bat (it maps R:, sets RC_TOOLS_DIRS and PATH, and opens code\nel\tools\build_gamedata):
python 1_export.py -ipj common/leveldesign shard/data_leveldesign
python 2_build.py -ipj common/leveldesign shard/data_leveldesign
python 3_install.py -ipj common/leveldesign shard/data_leveldesign
python 1_export.py -ipj common/data_common shard/data_shard
python 2_build.py -ipj common/data_common shard/data_shard
python 3_install.py -ipj common/data_common shard/data_shard
python b2_shard_data.py
python b3_shard_dev.py
| Step | What it does |
|---|---|
common/leveldesign |
sheet_id: ids for the new sheets, in pipeline/install/data_leveldesign/sheet_id.bin and leveldesign/game_elem/sheet_id.bin and sheets.txt (commit those two with the sheets: an id given to another sheet first would no longer match the packed sheets built from it); sheets: the client packed sheets (pipeline/install/packedsheets) and visual_slot.tab
|
shard/data_leveldesign |
the leveldesign data of the shard |
common/data_common |
installs visual_slot.tab for the client (pipeline/install/data_common) |
shard/data_shard |
the packed sheets of the services |
b2_shard_data.py |
copies the install to pipeline/shard (the shard's visual_slot.tab, sheet_id.bin) |
b3_shard_dev.py |
copies the service packed sheets to pipeline/shard_dev/live, where the development shard reads them, and rewrites its configs |
Missing any of the last four leaves the new sheets half known: ids without packed sheets, or a weapon without a visual slot. Then start the shard. The development client reads pipeline/install directly; a client from a patch needs a new patch.
visual_slot.tab holds sheet ids, not names: compare its size before and after (8 bytes per item that got a slot; the leaders added 160 bytes for their 20 items). Slots are numbered in sheet id order, so new items shift the numbers of later ones: the client and the shard must get the same table, and a client from a patch needs the new one.
A change that only affects how the client shows a sheet (an fx, an icon) needs only common/leveldesign and a client restart; the shard can keep running.
run_command { "dashboard": "Mainland", "process": "egs_mainland", "command": "eventCreateNpcGroup",
"args": ["(0x00000000d0:00:00:8e)", "1", "leader_dexton.creature", "0", "true", "180", "Emperor Dexton", "7774.20", "-4887.23"] }
Give the NPC sheet itself as the sheet, not a stats sheet with the look as the client sheet argument: the colors and the weapon come from the bot's sheet. Name it with the AI script (script2 "<bot name>" '()rename("...")'), and remember that event groups never attack on their own; see Spawning a creature.
| Symptom | Cause |
|---|---|
| A generator run changes hundreds of files | Line endings only (git diff --stat is empty for them), or generate_creature_npc.py run in full under Python 3. |
ModuleNotFoundError: No module named 'balancing_config' |
The bundled Python leaves the script folder off sys.path; add it as above. |
TypeError: 'filter' object is not subscriptable, a bytes-like object is required
|
Python 2 code; the scripts in core4 have the fixes now. |
| The NPC wears the gear in the wrong color, or untextured | The texture exists in one color variant only; the NPC sheet's numeric colors must match (_uN is color N-1). |
| The NPC holds nothing |
item_right is on a sheet the bot does not use, or the item has no visual slot: visual_slot.tab not rebuilt or not installed for client and shard. |
| The services do not know the sheet after the pipeline |
b2_shard_data.py and b3_shard_dev.py not run, or the shard not restarted. |
An item or haircut is invisible, and the client logs Cannot bind the skin <shape> to the skeleton in the slot
|
The shape was exported without a skin (it names no bones: grep -a -c Bip01 <shape>). No sheet fixes it; a Bind Point on the slot only helps for a mesh modelled in the space of that bone. Check the source, and whether another .max file exports a shape of the same name: Mabreka-Cho's haircut (zo_hom_cheveux_lead.max) had its Physique skin all along, but a skinless copy of the node in the leader's outfit file (zo_hom_civil01_lead.max) wrote the shape first. A new export of the haircut fixed it: see Exporting One Character Shape by Hand. |
| A visual change does not show in the running client | The client loads its packed sheets at start: restart it after the rebuild. |