Description
Information for ES1.5 Version for RPGMaker:
At the very top of the es_rpgmaker.txt file there is something called 'block configure' there are comments detailing what each of the vars do. Read through them to find what each one does.
[syntax="es"]block configure
{
//Name of your RPG Mod
es_xset rpg_modname "RPGMaker"
//Say command values - These var determin what you want the chat commands to be to bring up the menus
//Select a new character while dead
es_xset rpg_menucommand "!character"
//Command to show the users their Level, Character, and Xp
es_xset rpg_infocommand "!info"
//Displays all the user's skills
es_xset rpg_skillscommand "!skills"
//Shows the helpmenu
es_xset rpg_helpcommand "!help"
//Brings up the RPGAdmin Menu
es_xset rpg_admincommand "!admin"
//Brings up the items menu
es_xset rpg_shopcommand "!shop"
//Command to birng up information on items
es_xset rpg_shopinfo "!sinfo"
//Command to see a player's character
es_xset rpg_pinfocommand "playerinfo"
//Vars that set values for different xp gaining things
es_xset rpg_killxp 60
es_xset rpg_headshotxp 40
es_xset rpg_knifexp 100
es_xset rpg_bombxp 80
es_xset rpg_hostagexp 30
es_xset rpg_levelinterval 400
//What character you want your players to get when they join, also the character bots will use
es_xset rpg_defaultcharacter "Werewolf Hunter"
//Maxium number of items a person can have at one time
es_xset rpg_maxitems 3
//Sets the level that a user's save file is safe once obtained when rpg_cleanuserfile is run
es_xset rpg_safelevel 5
}[/syntax]
Creating Characters:
The Outline for creating a character in the es_rpgmc_db.txt is the following:
[syntax="es"] "Werewolf"
{
"weaponrestricttype" "allowonly"
"weapons" "knife"
"numberofweapons" "1"
"spawn" "es rpg_health event_var(userid) 125 1"
"1cfg" "spawn"
"1description" "Bonus Speed."
"1cmd" "es rpg_speed event_var(userid) .7"
}[/syntax]
In this example the name is 'Werewolf'
First let me explain the weaponrestricttype, weapons, and numberofweapons lines
weaponrestricttype determins whether you want to character to only be able to use the listed weapons or not use the restricted weapons.
If set to 'allowonly' then they will only be able to hold weapons you list
These are three optional lines you may include when building a character to limit the types of weapons they are allowed to hold
Example 2:
[syntax="es"] "Vampire"
{
"weaponrestricttype" "allowonly"
"weapons" "knife,usp,glock,p228,fiveseven,elite"
"numberofweapons" "6"
"spawn" "es rpg_drain event_var(userid) event_var(userid) 5 5 0"
"requiredlevel" "0"
"1cfg" "spawn"
"1description" "+75 Health."
"1cmd" "es rpg_health event_var(userid) 75 1"
}[/syntax]
Seperate each weapon name with a ',' and then set the numberofweapons to the number of weapons in your weapons value
In this example 'weaponrestricttype' is set to 'restrict' so this character will not be able to hold the restricted weapon but he will be able to hold all others
[syntax="es"] "Werewolf Tracker"
{
"weaponrestricttype" "restrict"
"weapons" "awp"
"numberofweapons" "1"
"spawn" "es rpg_health event_var(userid) 20 1;es rpg_speed event_var(userid) -.2"
"requiredlevel" "0"
"1cfg" "attacker"
"1description" "Slow your victims."
"1cmd" "es rpg_speed event_var(userid) -.1;es_xdelayed 3 rpg_speed event_var(userid) .1"
}[/syntax]
Next value 'spawn' is also an optional value. This is a command that is run when the users spawns reguardless of level.
After 'spawn' comes the value 'requiredlevel' this is the minimum level the user must have in at least one other character before they are able to play as this character.
Each skill you give a character needs 3 values each value starts with the level you want the skill gained.
cfg - when you want the skill run(see below for events skills can trigger on)
description - this is what shows up in the !info menu, keep it short
cmd - What you want to run when this skill triggers
The possible different cfgs for skills are:
Runs when ever user hits someone with an attack
attacker
Runs when ever user gets hit
victim
Runs whenever the users spawns
spawn
Runs whenever the users says something
say
Runs when the user jumps
jump
Runs when the user dies.
victimdeath
Runs when the user kills someone
attackerkill
Runs when a user gets hit by a flashbang
blind
You can make any number of level skills for each character
Custom RPG Maker Commands:
Deals damage to the target from the attacker:
rpg_damage Usage: rpg_damage
Gives the user xp into their current class == to the given amount
rpg_givexp Usage: rpg_givexp
Gives the user level into their current class == to the amount stated
rpg_levelup Usage: rpg_levelup
Stops a player from walking for the x seconds
rpg_stun Usage: rpg_stun
Blacks out a the targets screen for x seconds
rpg_blind Usage: rpg_blind
Makes a player immune to damage for x seconds
rpg_god Usage: rpg_god
Burn the target for x seconds
rpg_burn Usage: rpg_burn
Affects the players gravity by the amount, negative numbers lower it postive raise it
rpg_gravity Usage: rpg_gravity
Affects the players speed by the amount, positive raise speed negative lower it
rpg_speed Usage: rpg_speed
Sets the player to the color of you choice
rpg_color Usage : rpg_color
Colors that are supported:
#blue
#green
#red
#teal
#yellow
#purple
#black
#pink
#orange
#normal (standard colors)
Sets the target to the visiblity % you choose
rpg_visible Usage: rpg_visible
Turns a user back to 100 visible for the duration amount of seconds, 0 will leave them visible until you run rpg_stealth_on
rpg_stealth_off Usage: rpg_stealth_off
Colors a users base on their color value which is affected by the rpg_color command
rpg_stealth_on Usage: rpg_stealth_on
If value is postive adds health if it is negative subtracts health
rpg_health Usage: rpg_health
This command may raise some questions with the last value 'Affect Maxhealth' there in an internal var in the RPGTemp keygroup for each users storing a value known as 'maxhealth' if you use the rpg_health command with a 0 at the end and the value you are boosting the health by would put the user beyond his or her 'maxhealth' they are instead set to their 'maxhealth'. This makes it useful when 'healing' players
If value is postive adds cash if it is negative subtracts cash
rpg_cash Usage: rpg_cash
Blurs your targets screen so they can't see well for x seconds
rpg_drug Usage: rpg_drug
Sets the model of a user
rpg_model Usage: rpg_model
These following three commands are not 100% supported yet and may or may not work:
Gives your taget health every so many seconds
rpg_regen Usage: rpg_regen
Slowly drains the target every x seconds for the duration
rpg_drain Usage: rpg_drain
Heals the target and all allies with the radius around him at every delay amount of seconds
rpg_arearegen Usage: rpg_arearegen
Adding Admins(es_rpgadmins_db.txt):
Admin Key:
[syntax="es"] "STEAM_0:0:7663580"
{
"name" "J3ff"
}[/syntax]
Just add a key like this one but change the steamid to the ID of the player you wish to have adminship. Admins can kick, ban, and give levels. The name value is no used for anything within the mod. It is just for keeping track of which id belongs to who.
Adding Items(es_rpgshop_db.txt):
[syntax="es"] "Silver Stake ($1600)"
{
"cost" "1600"
"cfg" "attacker"
"cmd" "es_xset type 0;es_keygetvalue type rpgusers event_var(es_steamid) character;if (server_var(type) == Vampire) then rpg_damage event_var(userid) event_var(attacker) 30"
"description" "Your attacks deal bonus damage to Vampires."
}[/syntax]
The three needed lines are:
cost - How much money the item costs
cfg - When the item's effect triggers
cmd - What it runs when the item triggers
description - What it tells the user the item does when it is purchased
Items in the shop can use all the same cfg's as character skills plus the 'onbuy' cfg which means the item will run when it is purchased and then dissapear not holding a slot.(Good for items the you can purchase to gain xp or to gain health back.)
Extra Shop example:
[syntax="es"] "Potion of Xp ($5000)"
{
"cost" "5000"
"cfg" "onbuy"
"cmd" "es rpg_givexp server_var(_popup_userid) 50;es_tell server_var(_popup_userid) #multi #lightgreen You have gained #green 50 #default Xp #lightgreen for drinking a Potion of Xp!"
"description" "Gain 50 Xp for buying this item."
}[/syntax]
*Note: When using the 'onbuy' cfg that the userid of the person purchasing the item is: server_var(_popup_userid) not event_var(userid)
Shop example 3:
[syntax="es"] "Ring of Regeneration ($3000)"
{
"cost" "3000"
"cfg" "spawn"
"cmd" "es rpg_regen event_var(userid) 1 2"
"onbuycmd" "es rpg_regen server_var(_popup_userid) 1 2"
"description" "You gain regeneration."
}[/syntax]
Note the extra value 'onbuycmd' this line runs only when the item is purchased and then never again. This way you are able to have an item that would say only happen on spawn also happen when it is purchased like my ring of regeneration does in this example.
Also it is a good idea to include the cost of the item at the end of its name so they users will know how much it costs
Note for advance users:
There is a temporary keygroup you can save values to that do not need to be permant for skills, (for such as numbering the amount of times something can be used) The keygroup is called RPGTemp each player has a key in the RPGTemp key that is their userid
A var called 'rpg_random' can be used for es_rand checks to generate random numbers
Also there are 5 vars with the following names: rpg_var1. rpg_var2, rpg_var3, rpg_var4, and rpg_var5 that are not used that can be used in skills for character. Also there are 3 vars: rpg_x, rpg_y, and rpg_z to use for locations.(and then if you need a second set these are also included: rpg_x2, rpg_y2, and rpg_z2)
Now the new stuff(And quicker/more flexiable!) RPGMaker Python Guide:
These are the values at the top of your rpgmaker.py that will determin many things for you read the comments above each for more info:
[syntax="python"]
#Name of your RPG Mod
modname = "Solairis Source"
#Say command values - These var determin what you want the chat commands to be to bring up the menus
#Select a new character while dead
menucommand = "character"
#Command players use to see the different skills characters have
characterinfocommand = "characterinfo"
#Command to show the users their Level, Character, and Xp
infocommand = "xp"
#Shows the helpmenu
helpcommand = "help"
#Displays the RPGAdmin menu
admincommand = "admin"
#Displays the a menu to buy items from
shopcommand = "shop"
#Command to bring up information on items
shopinfocommand = "shopinfo"
#Command to see a player's character
playerinfocommand = "playerinfo"
#What character you want your players to get when they join, also the character bots will use
defaultcharacter = "Innate of the Sky"
#Maxium number of items a person can have at one time
maxitems = 2
#Sets the level that a user's save file is safe once obtained when rpg_cleanuserfile is run
safelevel = 3
#These values determin how much Xp you get for certain things
killxp = 60
headshotxp = 40
knifexp = 100
objectivexp = 80
endroundxp = 20
levelinterval = 400[/syntax]
Creating Characters:
The Outline for creating a character in the rpgmc.py is the following:
[syntax="python"]
rpgmc = {
'Innate of the Sky' :
{
'Menu Place' : 1,
'weapon restriction' : ['awp', 'g3sg1', 'sg550'],
'restriction type' : 'restrict',
'skills' :
{
1 :
{
'name' : 'Grace of Feathers',
'cfg' : 'spawn',
'description' : 'You have slightly lower gravity',
'cmd' : 'es rpg gravity event_var(userid) -.4;es_tell event_var(userid) #lightgreen Grace of Feathers has granted you lower gravity.'
},
4 :
{
'name' : 'Jar with Wind',
'cfg' : 'attacker',
'description' : 'Have a change to throw your victim some',
'cmd' : 'es_xrand rpg_random 1 6;if (server_var(rpg_random) == 1) then playerset push event_var(userid) 100 100 1;if (server_var(rpg_random) == 1) then es_xtell event_var(attacker) #lightgreen You have tossed your target with the wind.'
},
7 :
{
'name' : 'Leap Beyond the Sky',
'cfg' : 'jump',
'description' : 'You jump higher than most other players',
'cmd' : 'es rpg gravity event_var(userid) -.2;es playerset push event_var(userid) 200 200 1;es_delayed rpg gravity event_var(userid) .2'
},
10 :
{
'name' : 'Grace of Air',
'cfg' : 'spawn',
'description' : 'You are granted a small speed boost',
'cmd' : 'es rpg speed event_var(userid) .25'
},
16 :
{
'name' : 'Gust Shield',
'cfg' : 'victim',
'description' : 'Have a chance to block bullets and toss your attackers',
'cmd' : 'es_xrand rpg_random 1 5;if (server_var(rpg_random) == 1) then rpg health event_var(userid) event_var(dmg_health) 0;if (server_var(rpg_random) == 1) then es_tell event_var(userid) #lightgreen Gust of Wind has block an attack.;es playerset push event_var(userid) 100 100 1'
}
}
}
}[/syntax]
A few key things to note:
First - Notice the , at the end of each line if there is a line following it. This is important if it is not there it will feed you an error message.
Second - All character entries much have a 'Menu Place' value.
Option values you can put in the main key of your character for different effects:
'weapon restrict' and 'restriction type' these will limmit the weapons your character is able to use. 'restriction type' can have one of two values 'restrict' or 'allow only' if set to restrict the character will not be able to hold the listed guns, if set to allow only they will only be able to hold the listed guns.
'required level' - this determines the level a user must have in at least one other character before being able to play as this character.
'team allowed' - setting to 2 will make it so you may only play the character as a terrorist, setting it to a 3 will do the same for CT
Next lets look at this inside point:
[syntax="python"] 'skills' :
{
1 :
{
'name' : 'Grace of Feathers',
'cfg' : 'spawn',
'description' : 'You have slightly lower gravity',
'cmd' : 'es rpg gravity event_var(userid) -.4;es_tell event_var(userid) #lightgreen Grace of Feathers has granted you lower gravity.'
}
}[/syntax]
The number is the level need in the character to obtain the skill, then there are 4 different values within the skill:
'name' - this can be anything you want it is what you want to call your skill
'cfg' - this determines when the skill cmd will be run values can be - spawn, jump, say, attacker, victim, death, kill, blind
'description' - this is a broad description of the skill your users will see when they look it up in game
'cmd' - this is code that will be run when cfg activates, it use ESS(event scripts shell) code. If you need to use code that needs more than a single line you can store it in addons/eventscripts/rpgmaker/skills/es_skills.txt and then call it up using an es_doblock rpgmaker/skills/BLOCK_NAME
Next these are a few option values you may include in the top level of your character key they are different things that can run extra commands without the user neededing any extra levels:
'spawn' : 'commands to run'
'jump' : 'commands to run'
'victim' : 'commands to run'
'attacker' : 'commands to run'
'kill' : 'commands to run'
'death' : 'commands to run'
'blind' : 'commands to run'
'say' : 'commands to run'
Custom rpg commands you have access to use in your cmd's
'rpg damage '
'rpg health '
'rpg givexp '
'rpg stun '
'rpg god '
'rpg blind '
'rpg burn '
'rpg gravity or rpg gravity set '
'rpg speed '
'rpg color '
Colors that are supported:
#blue
#green
#red
#teal
#yellow
#purple
#black
#pink
#orange
#normal (standard colors)
'rpg visible or rpg visible math '
'rpg stealth on '
'rpg stealth off '
'rpg cash '
'rpg drug '
'rpg model '
'rpg regen '
'rpg arearegen '
These commands are used for storing data kinda like keygroups, only they provide direct access to a python dic(faster than keygroups) and they already contain a userkey(by userid) for each user in the server. - Note this is perminat storage for information
'rpg set '
'rpg get '
'rpg cleanuserfile'
Adding items(rpgshop.py):
[syntax="python"] 'Belt of Strength' :
{
'Menu Place' : 2,
'cost' : 2400,
'cfg' : 'attacker',
'cmd' : 'es rpg damage event_var(userid) event_var(attacker) 5',
'description' : 'Heals you for 30 when you purchase this item.'
}[/syntax]
The three needed lines are:
menu place - Where the item will appear in the menu
cost - How much money the item costs
cfg - When the item's effect triggers
cmd - What it runs when the item triggers
description - What it tells the user the item does when it is purchased
Items in the shop can use all the same cfg's as character skills plus the 'onbuy' cfg which means the item will run when it is purchased and then dissapear not holding a slot.(Good for items the you can purchase to gain xp or to gain health back.)
Extra Shop example:
[syntax="python"] 'Potion of Healing' :
{
'Menu Place' : 1,
'cost' : 800,
'cfg' : 'onbuy',
'cmd' : 'es rpg health server_var(_popup_userid) 30 0',
'description' : 'Heals you for 30 when you purchase this item.'
}[/syntax]
*Note: When using the 'onbuy' cfg that the userid of the person purchasing the item is: server_var(_popup_userid) not event_var(userid)
Shop example 3:
[syntax="python"] 'Ring of Regeneration' :
{
'Menu Place' : 2,
'cost' : 3000,
'cfg' : 'spawn',
'cmd' : 'es rpg regen server_var(_popup_userid) 1 3',
'onbuycmd' : 'es rpg regen server_var(_popup_userid) 1 3',
'description' : 'You gain regeneration.'
}[/syntax]
Note the extra value 'onbuycmd' this line runs only when the item is purchased and then never again. This way you are able to have an item that would say only happen on spawn also happen when it is purchased like my ring of regeneration does in this example.
Lastly let's configure your admins Line 38 in the rpgmaker.py -
#The list of steamid's in here determines your users whom can access the rpg commands through chat
adminlist = ['STEAM_ID_LAN', 'STEAM_0:0:7663580']
Add your steamids to you admin list and you are done! With version 2 there is no longer a full admin menu.(If you are looking for a full amdin menu check out my j3ffpluggin: http://addons.eventscripts.com/addons/view/j3ffpluggin) Now admins simply have full access to all rpg commands via typing them into chat. for instance if one of your admins types rpg cleanuserfile in chat it will clean out your user file for you.
Vars for storing information in:
rpg_random
rpg_var1
rpg_var2
rpg_var3
rpg_var4
rpg_var5
rpg_var6
rpg_var7
rpg_var8
rpg_var9
rpg_var10
~J3ff