Author Topic: RPGKIT 2.5 (Cont.) released  (Read 5755 times)

Topic was too old.

I released the script. Scroll down.

Quote
New RPG- Fallos

Fallos directly takes from Fallout 3 to provide it's background because I'm lazy and it's a change of pace from the medieval sort of RPGs. The gameplay represents a RPG-TDM more so than it does a standard RPG. Factions fight for territorial control, as well as fighting numerous bots of the enemy faction and roaming monsters.

More details to come.

The Closed Beta for this is open for recruits. Contact me here or via PM or ingame for details.


RPGKIT 2.3
Building directly off of WOB, I'm on the path to 2.5. Updates include:
-Improved Weapon system
 -possibility for thousands of weapons using only 3-10 datablocks.
 -Numpad keys switch weapons now (previously you had to open your inventory and etc etc.)
 -Various new factors.
 --Inherited velocity is modifiable.
 --Weapons can use other items as ammo.
 --They can use a reloading system.
 --Moving accuracy. Weapons can be more accurate when you are standing still.
 -Soon to come (2.5): Damage range falloff, forward start for long range weapons.

-Skill system
 -You may obtain skill points and put them into skills, which then improve your accuracy and damage with weapons.
 -Skillbook items.

-Inventory improvements
 -Retooled stacking so it actually works
 --That is to say, you can have 100 .44 caliber bullets take up 1 spot instead of 100 in your inventory.
 -Items may have a specific sub-type that separates it from other items of the same type in your inventory.

-Item, Skill, and Monster creation streamlined.
New weapon:
Code: [Select]
CreateRWep_Start("dblshotgun","Double Barrel Shotgun","dblshotgun","rpggunimage","[BETA]Ye olde Double Barrel Shotgun. Power: 6-12 Speed: 0.1");
CreateRWep_Values("dblshotgun",200,2,0.1,0.40,1.00,65,50,3,130,0.1,6);
CreateRWep_Bonus("dblshotgun","shotguns","melees","explosives");
CreateRWep_Reload("dblshotgun",2,3000,10,1,1,0,"shotammo",6);

New Skill:
Code: [Select]
CreateSkill_Stat("pistols","Pistol skill helps you utilize pistols.","skill",100);
New Monster:
Code: [Select]
CreateMonster_start("raider",20,0,"3 4 3 2","raiders");
CreateMonster_combat("raider","hammer",1,1,"0 0 0",1,"1 1 0",33);
CreateMonster_drop("raider",33,2,7,"11mm 10 11mm 10 11mm 10 11mm 10 hammer 20",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");


So I'm well on my way to 2.5 Right now I need to update the monster script to work with the new weapon system.



Remember when we were all working on RPGS?

Good times.















Anyways here's the entire script (as in, RPGKIT, the mod files, everything) for this mod.
2 Condition:
1) don't complain about the shoddyness/incompleteness of the code involved
2) don't complain when it doesn't work when you do something stupid
Fallos (2.5) (Fallout)
http://www.mediafire.com/file/5yyzw2nwyjy/FallosCode.zip

WOB (2.4) (Medieval)
http://www.mediafire.com/file/mwmdyiwyfuh/WOBCode.zip

Client (all)
http://www.mediafire.com/file/mjkmzzxjy5e/Client_WOB.zip
http://www.mediafire.com/file/mnvnjtzttnd/Client_lister.zip

Server (all) NEW - if you don't have this, get it.
http://www.mediafire.com/file/zzooznomrzo/server_lister.zip



This won't work off the bat so you'll have to do some rudimentary setup (extract to a folder with proper naming and stuff) to get it running. Use what you want from the scripts and feel free to ask me questions here.
« Last Edit: March 29, 2010, 10:19:01 PM by rkynick »

I am confused, how does this work in-game, what will you see in-game and what impact can it have in-game.

All downloaded for future references. :D

More details would be nice :o

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
Code: [Select]
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:
Code: [Select]
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)



« Last Edit: March 31, 2010, 02:36:45 AM by rkynick »

Awesome, I hope to see many more RPG servers in the future. I miss RPG servers with a decent playercount. :(

Cool, I wish someone had some servers with this on it.
Anyway, I'll try it myself.

I've worked on the guide some more.

Here's how the future of this is looking, either
A) People will use it, I'll continue to update it majorly, provide help and guides etc.
B) People won't use it, I'll update it minorly, finish the guide, etc.

My TODO list is basically
1) finish guide
2) update quests, tie more of the system into events
3) add more to quickstart

I tried to get it to work, and so far it's going well, except that i can't seem to get the Lister to work.
When I click on an item in the inventory it brings up the lister, but nothing happens and then the console says:
Code: [Select]
Add-Ons/script_FalloutRPG/server_invlist.cs (27): Unable to find function servercmdRkyLister_Request

I tried to get it to work, and so far it's going well, except that i can't seem to get the Lister to work.
When I click on an item in the inventory it brings up the lister, but nothing happens and then the console says:
Code: [Select]
Add-Ons/script_FalloutRPG/server_invlist.cs (27): Unable to find function servercmdRkyLister_Request
MM!

I forgot to upload something!
http://www.mediafire.com/file/zzooznomrzo/server_lister.zip
Download this, plop it in add-ons, and check it off.

Wait, I got it working!
« Last Edit: March 30, 2010, 01:26:35 AM by Quartz »

Gonna update the guide later tonight with stuff on adding new content.

Also if you get it working, post screenshots of your rpgs!
And suggest things for me to add.

I'm a little confused over what this is. Is it code that can be modified to make an RPG system, or are they events used to aid in RPG making?

I'm a little confused over what this is. Is it code that can be modified to make an RPG system, or are they events used to aid in RPG making?
Neither and both.

This is a release of my fallos RPG, which is based on my RPGKIT system. It may be modified via script and be made into completely new RPGs. The events involved are for use with the systems and will probably not help you make an event-based rpg.

Basic overview of what it includes:
-RPGKIT controls player-variables and automatically saves them. When you add new variables to be tracked, they are added to the save list.
-Also provides a base for Variable brick HP, resource build, lumberjacking and mining, etc.
-The WOB-bots system allows you to add monsters, guards, and other npcs to your rpg.
-Event-driven shops automatically restock based on a given item list and have somewhat variable prices.
-The inventory system allows for armor, shirts, hats, consumables(potions), skill-books, shoes, pants, etc
-The RPG weapon system allows for nearly infinite weapons to use the same set of datablocks.
-The faction system allows for players to join a faction and capture territory for them
-Spell system allows for skill-trees (as in diablo) and of course spells.
-Perk system (as in fallout 3) allows for perks to be acquired every or every few level(s).
-Stat system allows for stats to be increased every or every few level(s).
-complete GUI system includes inventory, shops, stats, perks, skills, and more.
-Easy expandability.

This looks great. The more script references the better.