Sandbox RPG module -- TODO
==========================

IMPORTANT
* separate things better inside rpggame.h

* projectiles
** dedicated sound channels
** fly sound, diesound, firesound, etc
** spawn flags

* weapons
** implement melee
** implement ranged weapon attacks
*** knock arrow and draw back when holding click?

* spells
** check for friendly targets and enemies?
** implement cast delay

* game logic
** characters partrolling the world
** scripted events. such as on_approach, on_hit, on_drop, on_death, etc
*** set rpgactor and rpgselected aliases for the above for scripts
*** implement cubescript to engine hooks, such as r_distance
*** implement script functions, such as trigger, die, respawn, etc
*** implement r_get functions for retriving specific values, or many values
*** Implement r_mod functions, for applying a delta to various stats and values
*** Implement group and spawn ids for simplifying scripts (repsectively defined in definition and spawn ent)

* Experience points
** experience does not reset on a level up, instead you just need to earn more
** whenever experience is gained, the overall exp mark goes up an equal amount
** experience is gained in skills only, and is dependant on the difficulty of the usage
*** higher levels generally results in tasks becoming easier

/* EXPERIENCE

	The character's level and his skill levels start at 1 (you know, 0 EXP)

	we'll be using a pretty standard formula for determining the needed EXP, and it's simply the sum of all integers: 1 -> level
	ie: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 45

	now assume we wanted to go to level 100, looping through each number and adding them onto the end is far from efficient

	said iteration in C

	int exp = 0, i = 0;
	for(; i < 100; i++)
		exp += i + 1;

	that should come out to be 5050

	a fellow named gauss, when he was still a wee boy, was quite the bother in class.
	His teacher asked him to count up all the numbers from 1 to 100, just to get him to shut up!
	just as his teacher was about to adress the class again, gauss gave him the answer, 5050.

	How did he do this you might ask?
	1) we know he had to add 100 numbers together
	2) they are consecutive integers ranging from 1 to 100

	1) he added the first number and the last number together
	2) and halved the amount of numbers
	in short, he decreed he had 50 pairs of 101

	formulae in C/C++

	if(level % 2)
		level/2 * (level) + level
	else
		level/2 * (level + 1)

	1 -> 2: 1000
	2 -> 3: 3000
	3 -> 4: 6000
	4 -> 5: 10000
	5 -> 6: 15000
	6 -> 7: 21000
	7 -> 8: 28000
	8 -> 9: 36000
	9 -> 10: 45000
	etc

	GAINING EXPERIENCE

	gaining experience points is highly dependant on the difficulty of an accomplished task,
	gaining any experience in the above skills will cause the same amount to be added to the overall exp

	battles
	* to gain EXP in the attack skills, you actually need to hit a target
	* bonus EXP for hitting multiple targets simultaneously

	blade
		per strike; the amount depends on the enemy's defensive abilities, stronger defense = more points
	marksman
		per shot taken with any bow and it's ammo, once again affected by defensive abilities
	unarmed
		per punch, affected by defensive abilities of opponent
	gun
		per shot taken with a gun, whether this be a rifle or a pistol, or some other toy
		this is also affected by your target's defensive abilities
	repair
		depends on the amount of durability restored to an object.
		the difficulty of preparing the item also has an effect
	throw
		per throw of an item, such as various blades, shurikens, bombs and various other trinkets
		the defensive ability of the target affects gained EXP
	heal
		your ability to heal wounds through mundane means (ie, bandages)
		the healing item used would depend on the gained EXP
	magic
		you gain EXP everytime you successfully cast a spell, the amount is dependant on the spell's difficulty
	barter
		you gain EXP everytime you sell or buy an items
		the gained experience is hugely affected by the merchant's barter skill (in relation to yours), and the item's price
	sneak
		when sneaking with no one around to detetc you, you gain 1 exp a second
		when sneaking around, you get more points, the higher the risk is  of you being detected
		you also get points from stealing random objects and picking pockets whilst sneaking, the amount gained would depend on the size and worth of the item
*/

* Inventory
** preview effects of weapons and other items, when used and equipped, etc
** add stackable items

* NPC interaction
** Quests
** Trade
*** Allow simultaneous trade.
*** Only ask to confirm the amount of items if quantity > 1
**** common batches for munition, say 24 arrows a pop?
** Life loops, inventory updates, etc
** Talk
*** voice samples
*** script variables, do additional things if items are found or certain values equal certain things

* Quests
** Allow multiple conditions, and pathways
** rewards, allow a selection?

* HUD
** make the displayed colour for the ai's hostility vary on the character's friendliness

* GUI
** stat point distribution
** display information of the items
*** stats needed
*** stat boosts

* Spells
** All those that complain about not being implemented
** transformations/polymorph, change models temporarily with a temporary stat (anti)boost
** additional spells
*** Stun
*** Poison type? (fall under water category?)
** effects to show presence; particles?

* AI
** Adapt quin's
*** needs to respect friendliness towards others
*** needs to attack back if attacked by a friendly
*** needs to help friends in distress
** analytical
*** retreats on low health or very strong opponents
*** fights to the bitter end
*** tries to equip things, ie try to avoid fighting unarmed unless they'd perform better unarmed
*** some greedier fellows, chanse after trinkets and loot?
*** factions?

* lights
** modulous - random radius delta per frame
