Server General Infos

al5yal511

Administrator
Staff member
Admin
Guide Author
So a little bit of digging into some files I've found a few things that could help you all ..


(itemshop free purchase)
ItemShop server now has options to adjust free purchase in Item Shop. Billing server now has not these options. In item shop it set up the following way: ,where HH:mm - hour and minute, when free purchase counter is reseted (03:00 by default). max-allowed - maximum free purchases per day (10 by default), it is reseted when server is restarted.
(Mentor system)
In order to make mentor system available you need to add /System/ContentKeys/Mentor.xdb content key. When it is on, server checks all active players level 6-30 and >=30 and total active players. if it equals to SocailRool number then activation time is stored and system is fired. Once it is turned on, it cannot be turned off

Territory wars (Guild dominion)

Territory Wars now can be switched on/off in shard.xml by setting twarMode to Disabled, Old and New value. Element twarNode can be found in shard.xml in gameMechanics section. This feature is turned off by default.
Upgrading version notes
Upgrade Notes Before launch of any version be sure if system can open required amount of connections for all fronts. Console command "ulimit -n" should display 8192 or more. It is better to set more available connections right away. In order to do this, add the following line to /etc/security/limits.conf file: old records can be removed: Then restart the current session. After restart you can check applied setting by executing comman ulimit -n under user who start FrontEnds. Return value should be 65536. The LocalShardAstral role has been changed, now it should be the LocalShard role. Please pay your attention on this item if you are going to start the 3.0.0.0 branch on the standalone server. It is now possible to send operator currency to all billing accounts by Billing API. In order to enable this, check the following lines: Make sure that user of logserver on the both master and slave part have CREATEROLE privileges.
Custom database in shard
Also, if custom database setup is used in shard.xml (custom file ... ... ), it is needed to copy this file to server_bin/gametoolEAR/db folder. If nival.ships.wait parameter is set, then data is transmitted at custom intervals, otherwise strictly once per day. "nival.ships.wait" and "nival.ships.start" are incompatible parameters.

Billing API (send crystals to all-PHP parameters etc)
Interface BillingServerAPI Configuration In order to start billing server with Billing Server API, set the billingapi.port parameter (and billingapi.host if you wish) in configuration file (config/billingSrvLaunch.cfg by default). This parameters stand for which port (host) will be used for launching API. Billing Server API is a servlet which processes hessian requests. PHP classes of this API is located in billingApi.inc.php. Commands

There is a single interface (billingserver.billingserverapi.BillingServerAPI) using as API:
Code:
http://<host>:<port>/billingapi

Host and port can be customized in the billing costomization file (localBillingServer.api[], localBillingServer.api[]). All methods return a result as derivative from Result. That is why it has the following fields: status (type ResultStatus) - result of operation: Ok / Error / other specific operation failure (see below) message - error message if status != Error and status != Ok. Is not used to display to user. CurrencyValue has 2 fields: ItemMallCurrency (currency) and value (amount of currency). PHP class Result has isOk() method which checks a status. Interface has the following methods: getAccount - returns account currency amount. If account is not found then a new account will created with 0 currency. Returns AccountInfoResult with the following fields: account - account name money - amount of main currency (MAIN currency). Keeps for compatibility, will be deleted soon. moneys - currency amount array. Array element has CurrencyValue type (see above). accountStatus - status of account (AccountStatus, Normal types or Locked if the account is locked). Parameters:
Code:
accountName: String
result: AccountInfoResult
addMoney - Method deprecated. Use addMoneyWithTranType from 2nd version of api. Parameters:
Code:
accountName: String
money: int
transactionId: long
result: AddMoneyResult

example :
Code:
$result = $proxy->getAccount('someAccount');
var_export($result);
echo "\nAdding money\n. \n\n";

addMoneyWithTranType- Add the summ to the account, marks an transaction operation. Operator may use a value tranType form 0 to 3 (for exmple, 0 - for SMS payments, 2 - by credit card, etc.). The final transaction number gets by moving transactionId on 3 bits to the left and filling the lowest 3 bits by the value of tranType. It is not allowed to specify one transaction number twice. Parameters: accountName: String money: int tranType: int transactionId: long result: AddMoneyResult For example:
Code:
$result = $proxy->addMoneyWithTranType('someAccount', 110, 1, 7);
var_export($result);

, you can use HAPPY() instead of MAIN() for premium crystals.



Code:
$result = $proxy->subMoneyWithCurrency('someAccount',
CurrencyValue::valueOf(ItemMallCurrency::MAIN(), 100));
var_export($result);
echo "\nRemoving money again\n===\n\n";
$result = $proxy->subMoneyWithCurrency('someAccount',
CurrencyValue::valueOf(ItemMallCurrency::MAIN(), 100));
if ($result->isOk()) {
 echo "Ok!\n";
} else {
 echo "Failure!!! " . $result->toString() . "\n";
}
echo "\nDEBUG\n";
var_export($result);
addMoneyToAll - adds money to all accounts. If money was added with the same transactionId, then accounts are not modified. Result AddMoneyResult takes status: Ok, Error, TransactionExists - money was already added with the same (tranType,transactionId).
GM tool and logserve uses
visual studio 2010 (242572)
 
Last edited:
OP
al5yal511

al5yal511

Administrator
Staff member
Admin
Guide Author

Veteran rewards​

Overview​

Veteran reward feature is the system to mark old players between all other.

Veteran status is assigned if player regularly logins to game.

Technically, there is an internal counter to every character. Counter increases by "1" if avatar logins at least one time per week. Only first login at week is recorded. This counter is not visible to player.

There are 5 grades of veteran rewards:

  • 0 grade - no title. Less then 20 weeks (5 months)
  • 1st grade - Soldier. 20 to 54 weeks (5 to 12 months)
  • 2nd grade - Veteran. 54 to 108 weeks (1 to 2 years)
  • 3rd grade - Sentintel. 108 to 270 weeks (2 to 5 years)
  • 4th garde - Commander. more than 270 weeks (5 years)
If counter raises to certain value, the following will occur: changes in interface, title unlock, corresponding message will appear in chat.

Decoration signs​

Each Veteran rank is assigned to appropriate badge.

A badge is always displayed at the following parts of interface:

  • Character equipment window. Visible at own and another characters.
  • Tooltip at character mouseover
  • Special character portrait frame
  • Veteran rank unlock in unlock interface
There are 4 badge grades (0 have no badge). Badge changing depends on internal counter (see above).

Additional bonus​

Veteran rank grants discount at player's faction vendors: 5% for Veteran, 10% for Sentinel and Commander

  • PvP rank discount will be canceled
  • Reputation and Veteran discount are summed up.

Management​

Operator can add this feature as addition item-service root functionality by the following files


Console commands​

veteran_skip_weeks. Adds weeks to internal counter value, does not trigger cooldown.

veteran_clear_cd. Resets cooldown.

list_ac. Shows alternative currencies and week counter.


add_ac. Changes counter value without any unlocks. Example:


unlock_delete. Deletes single character unlock. You need to relogin to take effect. Example:


unlocks_wipe. Deletes all unlocks. You need to relogin to take effect.
Post automatically merged:

Game framework​

File Types​

Main Game Resouces:​

  • *.xdb - data descriptors (XML files in UTF-8 encoding)
  • *.lua - Lua scripts
  • *.txt - localization data in UTF-16LE encoding
  • *.bin - game resources in internal format (generates after export)

Source Images​

  • *.tga - source image format for export

Debug​

In order to view debugging information look in the log file here: Personal\Logs\mods.txt.

Lua scripts​

Game uses Lua version 5.0.xxx

Main libraries include: coroutine, table, string, math.

Implicit declaration of global variables is denied. Use Global( name, value ) instead.

Each AddOn uses its own instance of lua engine. Interaction between AddOns is available only by special events.

Script interacts with game client by event handling mechanism. First time script gains control when AddOn starts. All scripts using by Addon are listed in AddonDesc.(UIAddon).xdb. Scripts are initialized in order specified in ScriptFileRefs field.

Scripts are initialized each time AddOn starts up. AddOn starts when game launches (AutoStart enabled) or it can be fired by another script.

Later, script gains control only for event handling time, which are initialized by game engine. Script does processing routine and gives control back to game engine. There are two main classes of events: game events and Widgets system reactions - key press, keyboard input, etc. Script itself selects event which it wants to process.

Game events and system reactions have only one parameter - a table. Contents of the table depend on what event it is.

In order to register an event you have to add function common.RegisterEventHandler, to register a reaction - common.RegisterReactionHandler.
First parameter is handling function, second is an event or reaction name.
Handling function must have only one parameter - an information table about event.
AddOn can register only one handling function.

Manage loading/unloading of AddOns (include original AddOns) is possible by user scripts as well.

Texture Export​

Source interface textures have to be in *.tga format. In order to use textures ingame it is needed to export to ingame format. Tool for convert is located in GameFolder\bin\UITextureConvertEditor.exe. Source files have to be in data folder. Exported files will be placed there as well.

Texture Types​

  • WidgetLayerSimpleTexture - general export type "UITextureElement". It is used for most interface textures.
  • WidgetLayerTiledTexture - it is used for export "tile" textures. Type "UISingleTexture".
  • UISingleTexture - it is used for "single" textures, like icons. Better use textures in size of degree of 2.
  • UITextureElement - it is used for texture which is part of any interface

Additional Options​

  • "Use DXT3 instead of DXT5" means:
    • DXT3 - more sharpness, less transparency
    • DXT5 - more transparency, less sharpness
  • "Forced export" - forced export whether image is changed or not

Converting​

"Convert" button starts export process.

Packed AddOns​

Packed AddOn is a simple zip archive with standard (normal) compressing and *.pak extension, as packed.

Packed AddOn should be placed in the same folder as other AddOns: data\Mods\Addons. For example:
data\Mods\Addons\UserAddon01.pak
data\Mods\Addons\UserAddon02.pak

Pathes within *.pak file should be the same as in unpacked AddOn.

For example, unpacked AddOn UserAddon01:
Path: Mods\Addons
Files:
AddonDesc.(UIAddon).xdb
MainForm.(WidgetForm).xdb
ScriptUserAddon01.lua

Packed AddOn UserAddon01 should contain files:
Mods\Addons\UserAddon01\AddonDesc.(UIAddon).xdb
Mods\Addons\UserAddon01\MainForm.(WidgetForm).xdb
Mods\Addons\UserAddon01\ScriptUserAddon01.lua

Localization​

Language archive is used for AddOn localization.

Language archive is a zip archive (with normal compression) which contains translated text files. Localization archive should be placed in the same folder as a not-packed AddOns: data\Mods\Addons. For example:
data\Packs\UserAddon01.eng
data\Packs\UserAddon02.eng

Localization file extension must be assigned to localization language, for example:
UserAddon01.rus
UserAddon01.eng
UserAddon01.fra
UserAddon01.ger
UserAddon01.spa

As for packed AddOns, path within archive should be the same as path to unpacked file.

For example, AddOn UserAddon01 is in Mods\Addons folder and consists of
Header.txt
LocalizedTexts\Text01.txt
LocalizedTexts\Text02.txt
NotLocalizedTexts\Text01.txt
NotLocalizedTexts\Text02.txt

For this AddOn, localization archive "UserAddon01.eng" contains next files:

Mods\Addons\UserAddon01\Header.txt
Mods\Addons\UserAddon01\Texts\Text01.txt
Mods\Addons\UserAddon01\Texts\Text02.txt

In that case, when game launches original files

  • Header.txt
  • LocalizedTexts\Text01.txt
  • LocalizedTexts\Text02.txt
will be replaced by files from that custom archive. Notice that only the same language will be replaced.

Client-Lua API​

Interface for Lua-scripts which is provided by game client.

Main client sub-systems:

  • GameState - game logic without visuals
  • UIState (whole UI system) - all visual contents.
  • Widgets - part of the UIState. It stands for panels, buttons, containers, text elements, etc
All functions are grouped to libraries. Each library contains set of functions.
Object-oriented method is used in API.

String constant is used as well as integer. Main reason to use them is localized messages.
"ENUM_" prefix for string constant is used. Integer constant does not any need prefix.

Game Resources​

Main game resource format is *.xdb file - contains resources and links on other resources. It is a xml file in UTF-8 encoding.
*.xdb files can be edited in Notepad or other text editor.

Main resource types for interface include Widgets system elements as well as whole UI system elements.
Default parameter values can be found in ResourceSystem folder.

  • SampleDefault.(type_name).xdb contains default values.
  • SampleDefaultExt.(type_name).xdb contains in additional element values of list and array .
 
Last edited:
OP
al5yal511

al5yal511

Administrator
Staff member
Admin
Guide Author
In order to enable in-game currency exchange between two currencies (portal money and crystals) an internal process uses a special item, created for the Exchange purpose only. It's a 'one crystal item' with ResID=244683776. As the item is used by Allods internal process only it might not have Item Name and Description because it's not visible for the players.

Information about the item is present in the Billing Server's config:



<billingServer ip="10.0.0.6" memory="5000" remote.debug.port="5008" remote.launch.dir="/a1/" user="a1">
<net host="10.0.0.6" port="7320"/>
<api host="10.0.0.6" port="8080"/>
<accounter accounterOneWay="billingserver.accounter.galaimpl.AccounterOneWayGalaImpl" oneCrystalResource="244683776" >
<galaapi host="10.0.0.100" lang-code="EN" port="24731"/>
</accounter>
<db config="billingdb-config-trunk.properties"
database="db_name"
factory="billingserver.billingdb.jdbcimpl.BillingDBContextFactoryJDBCImpl"
host="10.0.0.3" password="db_password" user="db_user"/>
</billingServer>
The item represents one Crystal (or a unit of default in-game currency). If needed, another item with a similar meaning or with the same price (one Crystal) could be used. In that case part highlighted by red colour should be updated.
 

Top Bottom