Site Tools

en:primitive:mission:user_model

user_model

Rules and information used in mission creation.

Properties

General rule : This system allows you to create a customized npc without creating a new George Sheet. Basically, a user_model is a script in which you describe the properties of the npc and their values. The user_models are loaded and unloaded along with the primitive which contains them. If the model contains error, the model will still be applied (except the line containing the error) and the name of the customized npc will be visually replaced by “< ERROR > userModelId”.

name : id of the user_model. It must be unique : if two user models have the same id, the second one won't be taken into account. This id is used to assign the model to a npc. To do this, type “USER_MODEL: ” followed by the model id in the equip params of the npc.

script : Script describing what attributes will be redefined by the model. The syntax is: “Category.attribute value”. This script handles C-style comments. The categories and attributes are described below.

Basics category

Give access to the main attributes of a npc. The syntax is Basics.attr value. The attributes for this category are:

  • life : unsigned integer, min value is 1 (if 0, a default value of 100 is applied)
  • liferegen : positive float (ex: 10.6)
  • attackspeed : positive float, corresponding to the latency in seconds between each attack
  • attacklevel : unsigned integer
  • defenselevel : unsigned integer
  • attackable : bool (0, 1, true, false, on, off)
  • selectable : bool (0, 1, true, false, on, off)
  • lhstate : NONE, LOOTABLE, HARVESTABLE, LOOTABLE_HARVESTABLE
  • race : race name (matis, fyros, tryker, zorai)→ won't have any visual impact
  • gender : bool (0, 1) → won't have any visual impact
  • size : unsigned integer → won't have any visual impact
  • nbplayers : unsigned integer, between 1 and 254 (if crossing those limits, default value of 1 is applied)
  • playerhplevel : unsigned integer
  • nbhittokillplayer : positive float
  • ecosystem : lakelands, forest, jungle, desert, primeroots.. → won't have any visual impact
  • type : unknown
  • fame : kami, karavan, fyros, matis, tryker, zorai
  • famebykill : signed integer, quantity of fame gained for each kill of that bot
  • xplevel : unsigned integer
  • tauntlevel : unsigned integer
  • meleereachvalue : unsigned integer
  • xpgainoncreature : positive float
  • dodgeasdefense : boolean (0, 1, true, false, on, off)
  • walkspeed : positive float
  • runspeed : positive float

Protections

allow to redefine protect values for the npc. You have to define a max value and a protect factor for each protection type. Syntax is “Protections.attr max value” and “Protections.attr factor value”. Factor is a floating value of a percentage (12 for 12%) and max is an unsigned integer. The protections attributes are :

  • piercing
  • slashing
  • blunt
  • rot
  • acid
  • cold
  • fire
  • poison
  • electricity
  • shock

Resists

allow to redefine resist values for the npc. Syntax is “Resists.attr value”. All values are unsigned integers. The resist attributes are :

  • fear
  • sleep
  • stun
  • root
  • snare
  • slow
  • madness
  • blind
  • acid
  • cold
  • electricity
  • fire
  • poison
  • rot
  • shockwave

sheet_client : This is sheet from which all non-modified attributes are extracted for the customized bot. NB: all visual information are still extracted from the original sheet of the bot.

For other customization possibilities, see also custom_loot_table.

How to change creature damage: CreatureDamagePerHitWithoutAverageDodge = uint32( (100*playerHpLevel) / nbHitToKillPlayer );

By setting nbhittokillplayer to 100, the minimum damage done by the npc or creature will be ’playerhplevel’.

Template: Copy/paste the following and make necessary changes

//weak soloable level 6 bandit
basics.life 40
basics.LifeRegen 0.1
basics.xpgainoncreature 5
resists.acid 5
resists.cold 5
basics.attacklevel 6
basics.nbhittokillplayer 100
basics.defenselevel 2
basics.playerhplevel 8
 
//immune to piercing melee damage
protections.piercing factor 100
protections.piercing max 10000
en/primitive/mission/user_model.txt · Last modified: 2016/11/13 14:08 (external edit)