Mm.
I'm more awake now so I'll give you the rundown of what's involved.
First distinction: What's the difference between WOB and Fallos?
1) Fallos has some updated code
2) WOB uses medieval style weaponry and skill/spells, Fallos is based on Fallout. Fallos could be reworked to be medieval.
3) While WOB uses a 1-slot system, Fallos allows you to have 3 characters.
WOB is mainly up for reference in-case someone wants to see how to do medieval stuff.
Secondly, What do the RPGKIT scripts involved do?
ABILITIES / RESOURCES / CLASSES
- These are fairly straight forward. They each assign variables to the player that are automatically added to the savelist when they leave or rejoin.
-These were written when I was considerably stupider, so most of it isn't indented. The code works well, though. It's just horrendously unreadable.
Adding an ability to be tracked and saved.
-Addability(%name,%default,%saves,%description,%above,%amountabove)
-addability("endurance",2,1,"Endurance is used for ...","level",5);
-Default is the default value. Saves is whether or not it saves (1 = yes, 0 = no),
- Above and amountabove are more complicated.
- Above is another ability that is added to [amountabove] amount whenever this ability is added to. In the example above, level gains 5 points for every endurance point that is added.
Setting the value of that ability.
-Then you have your Add2ability(%client,%name,%amount,%message,%abil), Sub2ability, Mul2ability, Set2ability, etc
--add2ability(%client,"totalexp",%amount,0,0);
-The last two arguments are used for automated messaging. 1,0 = "Your mining has increased to 5" 1,1 = "Your mining ability has increased to 5" 0,# = ""
Initializing the player's set of abilities.
-initability(%client)
-Sets all abilities to default values
Finding the value of an ability.
-getability(%client,%name)
-Returns the value of [%name]
Letting the player check their abilities
-servercmdcheckability(%client,%name)
-if $RPGKIT_PRESETS_ABILITYCHECK = 1, then this lets players check their abilities with this /cmd
Something you probably won't end up using but clears all abilities
-clearallability(%client)
-sets all abilities to 0
RESOURCES
Most of it is the same
-Addresource(%name,%default,%saves,%description)//notice no above/amountabove
-Add2resource(%client,%name,%amount,%message)//notice no 'abil'
-initresource(%client)
-getresource(%client,%name)
Resource Trading Preset
-servercmdGiveresource(%client,%who,%name,%amount)
-if $RPGKIT_PRESETS_RESOURCETRADE =1, then players may give resources to other players that are within $RPGKIT_PRESETS_RESOURCETRADEDIST distance.
Resource checking for clients
-servercmdcheckresource(%client,%name)
-if $RPGKIT_PRESETS_RESOURCECHECK =1, clients may use this command to check resources.
Automated Mining and Tree Cutting Systems
-Cutting:
--$RPGKIT_PRESETS_CUT_WEAPON = "gunProjectile"
--Set it to a projectile that can be used to cut wood.
--$RPGKIT_PRESETS_CUT =1
--1 = on, 0 = off
--$RPGKIT_PRESETS_CUT_FUNCTION = "cut"
--set that equal to a function that is called when a player tries to cut a tree down.
--cut is the default provided for you in resource.
--For default cut function:
---You need these abilities: cutting, cuttingexp, cuttingexpneed
---You need these resources: wood, seed
-Mining
--$RPGKIT_PRESETS_MINE_BRICK = "brickdatablock"
--Set this equal to the datablock of a brick that can be mined
--$RPGKIT_PRESETS_MINE_WEAPON = "swordProjectile"
--See the above, Cut_weapon
--$RPGKIT_PRESETS_MINE = 1
-- Mining on = 1, Mining off = 0
--$RPGKIT_PRESETS_MINE_FUNCTION = "mine"
--Set to a function called when a brick is mined. mine is the default provided for you
--For default mine function:
---You need these abilities: mining, miningexp, miningexpneed
---You need these resources: stone
CLASSES
Adding classes
-Addclass(%name,%default,%saves,%description,%ability)
-addclass("Warrior",0,1,"Warriors have great strength, they excell at mining and melee fighting.","Mining 1 Melee 1 Ranged -1");
-- Name : name of class
-- Default : default value
-- Saves : 1/it saves 0/it does not save
-- Description : A description
-- Ability : For each point added to this class, this list of "stat amount" has the stat go up by amount.
--- Example: 3 points of warrior = +3 mining, +3 melee, -3 ranged
Changing Values
-Add2class(%client,%name,%amount,%message)
-Set2class, sub2class, etc. work as seen in resources.
Similar Functions
-Class shares many functions with the other subsystems.
-initclass(%client)
-getclass(%client,%name)
-servercmdcheckclass(%client,%name)
--Lets users check class values if $RPGKIT_PRESETS_classCHECK=1
-clearallclass(%client)
BUILD
-Build is all about bricks. Building bricks.
-Build lets you make bricks require resources to construct, require resources based on brick size and color to construct, etc.
-WARNING: there are some... disturbing debugging echos I set up when I was really frustrated with it not working. Ignore the excessive swearing.
Enable Resource Building
-$RPGKIT_PRESETS_RESOURCEBUILD=1;
Force a brick to be made a certain color ( example: green trees only)
-$RPGKIT_BRICKCOLOR[nametoid("brickPineTreeData"),0]=2;
-$RPGKIT_BRICKCOLOR[nametoid("brickPineTreeData"),1]=39;
-$RPGKIT_BRICKCOLOR[nametoid("brickPineTreeData"),2]=53;
- [datablock,list#] = color#;
Resource that must be painted on and not built initially
-$RPGKIT_PAINTONLY= "paint";
--Note: having a resource that is paint only but is not called paint may pose problems.
Toggle resource build
-servercmdtoggleresourcebuild(%client)
-Lets super admins toggle resource build mode
Making a specific color be a specific resource
-$RPGKIT_PAINTRESOURCE[8,0,0]="wood";$RPGKIT_PAINTRESOURCE[8,0,1]=0;
-Syntax is complicated :
-- [color# , list# , amount]
-- color# is the spot of the color on the list
-- list# is in this list; you may have a color use up to 50 different resources by increasing this value
-- amount is a static value that determines how much of the resource is used. 0 means that amount is based on brick size.
-Examples:
-$RPGKIT_PAINTRESOURCE[8,0,0]="wood";$RPGKIT_PAINTRESOURCE[8,0,1]=0;
-$RPGKIT_PAINTRESOURCE[8,1,0]="metal";$RPGKIT_PAINTRESOURCE[8,0,1]=1;
--When you try to make a brick of color 8, it costs [bricksize] wood and 1 metal.
QUICKSTART
-Quickstart is your best friend.
-Quickstart contains preset modules for rudimentary things, such as variable brick HP and setting up the resource-build system.
Include all QUICKSTART systems
-$RPGKIT_PRESETS_QUICKSTART_ALL=1
--Have fun.
Variable Brick HP
-$RPGKIT_PRESETS_QUICKSTART_BRICKHP = 1
-$RPGKIT_TESTRPG_BRICKHP=20
--The value determines how strong bricks are in general.
--Brick strength is also based on size.
--Fortwars necessitates low values, say 10, RPGs should have values closer to 25.
Bricks made of different materials have different brick HPs
-$RPGKIT_PRESETS_QUICKSTART_BRICKHP=1
--This assigns values to the resources "stone", "wood", "glass", and "cloth"
-Custom values:
--$matbonus["stone"]=35;
--$matbonus["resource"]=amount;
-This is added onto the brickHP value
Quickstart cutting for resource cutting as seen above
-$RPGKIT_PRESETS_QUICKSTART_CUT=1
--Makes trees choppable with your sword.
Quickstart mining
-$RPGKIT_PRESETS_QUICKSTART_MINE=1
-Must define a brick called "brickminingData"
-Must make a weapon with an AxeProjectile
--Alternatively, you can edit the quickstart module.
Quickstart resource build
-$RPGKIT_PRESETS_QUICKSTART_PAINT=1
-This sets up the system to work with variables called "wood", "paint", "stone", "cloth", "glass", "seed"
-Use it as an example for setting your own custom values.
That's all for quickstart, but on a side note it's probably the most likely system to receive future updates.
QUEST
-For the moment, quests are just abilities that are intertwined with events.
-As such the syntax is similar. Their usefulness is unknown; be creative.
Add a quest
-Addquest(%name,%default,%saves,%description)
--Name is name, default is default value, saves is 1 or 0 (true or false), description is description
Add a message to be displayed when a certain quest flag is reached
-Addquestmessage(%name,%flag,%mesg)
-- [description],[example]
--Name is the quest, "gold-digger"
--Flag is what value the quest should be at, 2
--Mesg is the message, "Go get more gold!"
Add to a quest
-UpdateQuestFlag(%client,%name,%amount,%message)
--name is the quest
--amount is how much to add
--message depends;
--- 0: nothing
--- 1: "Your [quest] questflag has changed from # to #!"
--- 2: See the above( "add a message to be displayed ..."). Displays a quest message.
-Also available as a client event.
--Hint hint.
-SetQuestFlag(%client,%name,%amount,%message)
--Works the same way
Set quests to default values
-initquest(%client)
Find value of a quest
-getquest(%client,%name)
Use events to do something if a quest flag is at a certain number
-Output: brick:ifquestflag
-Input: brick:onquestflag
SAVING
-This is code you shouldn't have to wade through or even have to know about. All of the saving is automated, so you really don't have to mess with this
-But! There is a lot to be learned here and probably just as much to be improved upon.
-This is also one of the few systems that has many changes from WOB to Fallos
-I'm going to simply archive the functions here.
servercmdSaveRPGKIT(%client,%slot)
-Lets users save their current profile in a slot
-This is automatically called when you leave a server, but the host must manually call it for themselves.
wattest(%client,%slot)
-Saves a dummy save in %client.blid/slot
-Also clears any existing save
servercmdLoadRPGKIT(%client,%slot)
-Allows users to load a slot.
-WARNING: most issues with saves come from players loading multiple times. It is advised that you deal with (harshly) players who abuse this knowingly or unknowingly. Use a wattest on their accounts or manually deal with them. Loading is announced to help you deal with this and the corruption issues likely should no longer occur but I haven't really checked.
rpgonspawn(%this2)
-This method grabs the items the player was holding when they left the server and gives them back
-If you hold a bow, a spear and a sword when you leave, they should be there when you come back.
WOB SCRIPTS
-These are systems that were added when I started WOB.
MONSTERSPAWN & MONSTERLIST
-These are RPG-versions of my mission-bots.
-There is a lot (a lot!) to go over here, so we'll be touching the basics.
-Monsterlist holds data for the monster types.
Add a Monster Type
CreateMonster_start(name,hp,hp-at-which-it-flees,mana,stats,faction);
CreateMonster_combat(name,weapon,attackdistance,weaponcooldown,hop(1yes0no),hop(x y z),lurch(1yes0no),lurch(x y z),lurchchance);
CreateMonster_drop(name,goldchance,mingold,maxgold,droplist("item chance amount item chance amount item chance amount ..."),extraexp);
CreateMonster_appearance(name,"headskin","chest","rhand","lhand","rshoe","lshoe");
WOB_monstersetcolor_head(name,minRed,minGreen,minBlue,maxRed,maxGreen,maxBlue);
WOB_monstersetcolor_chest(name,minRed,minGreen,minBlue,maxRed,maxGreen,maxBlue);
WOB_monstersetcolor_hands(name,minRed,minGreen,minBlue,maxRed,maxGreen,maxBlue);
WOB_monstersetcolor_shoes(name,minRed,minGreen,minBlue,maxRed,maxGreen,maxBlue);
Example:
CreateMonster_start("raider",35,17,0,"3 4 3 2","raiders");
CreateMonster_combat("raider","hammer",3,0.3,1,"0 0 0",1,"1 1 0",33);
CreateMonster_drop("raider",33,2,7,"11mm 5 3 30cal 7 4 hammer 20 1",0);
CreateMonster_appearance("raider","headskin","chest","rhand","lhand","rshoe","lshoe");
WOB_monstersetcolor_head("raider","50","77","51","85","66","66");
WOB_monstersetcolor_chest("raider","50","50","50","30","30","30");
WOB_monstersetcolor_hands("raider","50","77","51","95","66","66");
WOB_monstersetcolor_shoes("raider","20","27","21","25","26","26");
I will update this guide more as I write more.(which I'm doing now)