Logo Khaganat
This translation is older than the original page and might be outdated. See what has changed.
Translations of this page?:

Game-data updates for the Lirria server

This tutorial is under construction!! It is necessary to correct the “content” of this tutorial for use of the scripts, which now make use of Git and Mercurial

To simplify the deployment of new data for the client(image, sound files)or the server(some primitives) or both(translation files, datasheets), it can then be wise to create scripts that do the operations quickly for you.

This is how we have done it with our own servers(by using three scripts that handle several scenarios). OBS: Be cautious, these are only presented as a reference, as they may need to be adapted to your needs/environment.

The architecture on which these scripts are based is the architecture detailed in Installing a patch server. All names begin with script_ so that they easily are listed next to each other.

With these scripts, we can:

Preparing the "Lirria client data" for a future patch

This script get's the organized client data from a dedicated git repository for the Lirria client. (khanat-data-client), where they are classified by future destination directorys(Because we always strive after a stable server).

For now, were just updating the “.bnp data” but in a near future, this will change to a FULL update(client included).

script_regenerer_bnps_client.sh
#!/bin/bash
# Script to retrieve data from the repository.
# Make the .bnp .
# Ready the patch server.
# Next patch generation
 
 
#-------------------------------------------------------------#
# Retrieve the latest data repository in the right directory: #
#-------------------------------------------------------------#
cd ~/patch_service/khanat-data-client
git pull
 
 
#----------------------------#
# Go to the patch directory: #
#----------------------------#
cd ~/patch_service
 
 
#--------------------------#
# Copy the recovered data: #
#--------------------------#
for folder in ~/patch_service/khanat-data-client/data/
    do cp -R $folder/fontspatch_lirria/
    done
 
for folder in ~/patch_service/khanat-data-client/data/
    do cp -R $folder/kh/* patch_lirria/
    done
 
for folder in ~/patch_service/khanat-data-client/data/
    do cp -R $folder/ryz/* patch_lirria/
    done
 
#--------------------------------------------------------------------#    
# Generate the patch_"lirria.bnp" and move it to the right location: #
#--------------------------------------------------------------------#
 
for i in patch_lirria/* ; do bnp_make -p $i ; done
#rm ~/patch_service/patch_game/bnp/
 
for folder in ~/patch_service
    do cp $folder/patch_lirria/*.bnp ~/patch_service/patch_game/bnp/
    done
 
 
#----------------------------------------------#
# Cleaning up the temporary transit directory: #
#----------------------------------------------#
rm -Rf patch_lirria/*
 
#-----------------------------------------#
# Going back to "root" of home directory: #
#-----------------------------------------#
cd ~

Creating and activating a patch

We must now prepare a preliminary “batch of customer data”(via the script above Preparation of Lirria client data for a future patch) that we want to make available via the patch, by this script.

If you also want to update primitives, datasheets, or server data, you SHOULD prefer to run the following script: Create server data and activate a patch.

Simply fill in any release-nots if desired, then(and most importantly), increment the patch version number of Lirria by (1) ←- “One”

script_creation_patchs_simple.sh
#!/bin/bash
set -o verbose
 
# =======================  IMPORTANT =======================
# You only need to increment the "index value" of 1 as usual.
# This is automatically offered in the end, after
# the modifications is done to the patch-release
# ==========================================================
### VERIFY THAT ALL NEW BNPs ARE LISTED IN "$PATCH_CLIENT_SYSTEM/patchgame/ryzom.xml".
### IF DECIDED TO PATCH OTHER BNP's THAN THOSE AUTOMATICALLY GENERATED BY
### BOTH SCRIPTS, RUN THIS:
# * script_mise_a_jour_data_serveur.sh
# * script_regenerer_bnps_client.sh
# Then modify as below:
# Nano $PATCH_CLIENT_SYSTEM/patchgame/ryzom.xml
#
# Line added for server data:  <_Files type="STRING" value="dataserver.bnp"/>
 
#------------------------------------#
# Let's move to the right directory: #
#------------------------------------#
cd ~/patch_service
 
#-----------------------#
# Generate a new patch: #
#-----------------------#
patch_gen updateProduct patch_game/ryzom.xml
 
#---------------------------------------------------#
# You can now(if you want to)edit the release notes #
#---------------------------------------------------#
nano patch_game/patch/index.php
 
#------------------------------------------------------------------------------------------------#
# To enable the patch, simply increment the two digits of the Lirria.version file by 1 <-- "One" #
#------------------------------------------------------------------------------------------------#
nano patch_game/patch/Lirria.version
 
#-----------------------------------------#
# Going back to "root" of home directory: #
#-----------------------------------------#
cd ~

Creating and patching of the server

This script performs the same operation as the Creating and Activating a Patch script, but performs the update of the data at a “server level” and also any “data common files” to the client and the server.

It uses the file dataserver.bnp that's generated automatically from the data of the corresponding repositories and files calculated for the game server.

<WRAP center round important 80%> Note that this script stops the game server(shard) from re-calculating the .packed_sheets, sheet_id.bin, and visual_slot.tab files. But the server will resume the calculation at the end of the proceedings. </ WRAP>

Simply fill in the release note if desired, then(and most importantly) increment the patch version number of Lirria by 1. ←- “One”

script_mise_a_jour_data_serveur.sh
#!/bin/bash
set -o verbose
 
# ==================== IMPORTANT ======================
# This script stops and restarts the shard by itself.
#
# It is used to re-calculate packed_sheets, sheet_id.bin and
# Visual_slot.tab files, and this after the changes to
# datasheets in the Khaganat-data directory HAVE BEEN PULLED!!
# It is therefore necessary to have the "patch client"
# automatically "set up" at the end of the script
#
# You just need to increment the index of 1 as usual
#
# This is automatically offered in the end, after
# the modifications is done to the patch-release
#
# ------------- Edit these variables ---------------
 
 
# Set path's of the installation files for the RC sources:
#------------------------------------------------------------------
# OBS: Be sure to check that these PATH's is correct to your system
#------------------------------------------------------------------
export RYZOM_HOME=~/khaganat
export RYZOM_DATA_HOME=~/khaganat-data
export PATCH_CLIENT_SYSTEM=~/patch_service
 
# ------------- End of variables ---------------
 
# Let's move to the data directory
cd $RYZOM_DATA_HOME
 
#We update the data with the Lirria branch of the data repository
hg pull http://depots.khaganat.net/scm/hg/khaganat-data
hg update -r lirria
 
# Let's stop the shard:
shard stop
 
# Delete the old packed_sheets from the server and client folders:
rm -f $RYZOM_HOME/code/ryzom/server/data_shard/*.packed_sheets
rm -f $RYZOM_HOME/code/ryzom/client/data/*.packed_sheets
rm -f $RYZOM_HOME/code/ryzom/common/data_common/visual_slot.tab
 
# Regenerate the file sheet_id.bin:
cd $RYZOM_HOME/code/build/bin
./make_sheet_id -o$RYZOM_DATA_HOME/leveldesign/game_elem/sheet_id.bin $RYZOM_DATA_HOME/leveldesign/game_elem $RYZOM_DATA_HOME/leveldesign/game_element $RYZOM_DATA_HOME/leveldesign/world $RYZOM_DATA_HOME/leveldesign/ecosystems $RYZOM_DATA_HOME/sound
 
# Regenerate packed_sheets:
cd $RYZOM_HOME/code/ryzom/tools/sheets_packer
./sheets_packer
 
# Copy the new visual_slot.tab to it's right place:
cp visual_slot.tab $RYZOM_HOME/code/ryzom/client/data/visual_slot.tab
cp visual_slot.tab $RYZOM_HOME/code/ryzom/common/data_common/visual_slot.tab
 
# In the following:  $RYZOM_HOME/code/ryzom/client/data/
# - the client's packed_sheets
#
# In the following: $RYZOM_HOME/code/ryzom/common/data_common/
# - the visual_slot.tab
#
# In the following:  $RYZOM_DATA_HOME/leveldesign/game_elem/
# - the sheet_id.bin
#
# Copy the necessary data(for the client) residing in the "patch creation directory".
# This includes translation files.
### OBS: VERIFY THAT ALL NEW BNPs ARE LISTED IN $PATCH_CLIENT_SYSTEM/patchgame/ryzom.xml
# nano $PATCH_CLIENT_SYSTEM/patchgame/ryzom.xml
# Line added for server data:    <_Files type="STRING" value="dataserver.bnp"/>
 
# Generate a new patch
patch_gen updateProduct patch_game/ryzom.xml
 
# Edit the release notes:
nano patch_game/patch/index.php
 
# Enable the patch
# Simply increment the two digits of the Lirria.version file by (1).
nano patch_game/patch/Lirria.version
 
# Shard restart
 
rm -Rf $PATCH_CLIENT_SYSTEM/dataserver/*
cp $RYZOM_HOME/code/ryzom/client/data/*.packed_sheets $PATCH_CLIENT_SYSTEM/dataserver/
cp $RYZOM_HOME/code/ryzom/common/data_common/visual_slot.tab $PATCH_CLIENT_SYSTEM/dataserver/
cp $RYZOM_DATA_HOME/leveldesign/game_elem/sheet_id.bin $PATCH_CLIENT_SYSTEM/dataserver/
cp $RYZOM_DATA_HOME/translation/translated/* $PATCH_CLIENT_SYSTEM/dataserver/
 
# Now, move to the directory where we will generate the new dataserver.bnp
cd $PATCH_CLIENT_SYSTEM
bnp_make /p $PATCH_CLIENT_SYSTEM/dataserver/
rm $PATCH_CLIENT_SYSTEM/patch_game/bnp/dataserver.bnp
mv dataserver.bnp $PATCH_CLIENT_SYSTEM/patch_game/bnp/
 
# Optionally, you can add extra .bnp files in the $PATCH_CLIENT_SYSTEM/patchgame/bnp/ directory
# to also be patched.
 
shard start
CC Attribution-Share Alike 4.0 International Driven by DokuWiki
en/mises_a_jour_des_donnees_de_jeu.txt · Last modified: 2021/12/03 19:19 by 127.0.0.1

Licences Mentions légales Accueil du site Contact