Difference between revisions of "User:Xudojnik"
Line 39: | Line 39: | ||
;Classes of units: | ;Classes of units: | ||
− | |||
{| border="1" | {| border="1" | ||
!Class | !Class | ||
Line 115: | Line 114: | ||
|- | |- | ||
|} | |} | ||
− | |||
− | |||
− | |||
;How does this work | ;How does this work |
Revision as of 13:44, 12 September 2010
I know Wesnoth from version 1.1.2a. This is really perspective game not only as strategy, but as RPG too. Large world, filled by history, epic battles, heroes and factions, is perfect for creating RPG. It's not so hard because Wesnoth have simple language, what support wide variety of events, easy way to define dialogs, items, forum and Wiki, where always can be found answer for any question.
WesMMO
To play it (now only in theory):
- Design new character.
- Download WesMMO era.
- Download beginner's map, designed for WesMMO.
- Create game in lobby.
- Create an "account" and character on it.
- Win beginner's scenario.
- Get fun.
- Download some other playable map, designed for WesMMO.
- Create game in lobby.
- Map will automatically use your account. Now choose any existed character and play.
- Spell system
- Each class have some predefined spells. In most cases they are not simple "damage unit X for Y hp". That's why they are the greatest headache for me.
- Each unit can use it's spell once per turn.
- There are no limit of uses through whole scenario.
Character is a "team" of three units. Each unit have own stats, small inventory and spellbook.
- Stats should be simple
- Stamina - increases your hitpoints by 5 per point.
- Strength - increases your melee damage.
- Speed - increases your movement points.
- Agility - increase your defense on each type of terrain by 1% per point and ranged damage.
- Intellect or Spell Power (or both)- increase magical potence of unit
- Inventory contains
- Healing Potion - number of them.
- Mana Potions - number of them.
- Melee Weapon - affects melee combat: strength_multiplier and number_of_strikes and possibly defenses.
- Ranged Weapon - affects ranged combat: damage_from_agility_multiplier and number_of_strikes.
- Amulet - affects base stats, magical resistances and magical potency of unit
- Body Armor - affects base stats, all resistances and defenses.
- Boots - affects base stats and have movement_multipier.
- Helm - affects melee resistances and magical potence of unit.
Each item has it own's id. This ID is the key to macro what will apply effect of item stats to unit structure. Data about it will be stored inside WesMMO era. That allows me to implement 'inventory slots'. Players will carry unused items in them.
- Classes of units
Class | Name | Description | Type |
---|---|---|---|
Stalwart tank |
Whirlwind | Damages all nearby enemies. | Spell |
Stun | Temporary stun nearby enemy. | Spell | |
Circle defense | Increase resistances of nearby allies by 50% of caster's resistance. Cancels when caster moves. | Aura | |
Last Stand | Increase caster's agility for amount of nearby allies agility. Cancels when caster moves. | Self-aura | |
Berserker melee damage-dealer |
Reklesness | Temporary increase damage by 25% and decrease all resistances by 1/2. | Spell |
Inspire | Increase damage of all nearby allies by 25% and decrease own damage by 50%. Cancels when caster moves. | Aura | |
Berserker's strike | Damage nearby enemy for 2x of weapon damage. | Spell | |
Cleave attack | Damage three nearby enemies for weapon damage.(targeted and two nearby to it and caster) | Spell | |
Poacher ranged damage-dealer |
Piercing shot | Damage enemy and unit behind it. | Spell |
Way Guidance | Temporary gives to nearby allied units an ability to ignore ZoC and terrain cost. | Spell | |
Throw net | Decrease movement costs of three nearby enemies.(targeted and two nearby to it and caster) | Spell | |
Camouflage | Hides nearby allied units if they are on the same terrain as a caster. Cancels when caster moves. | Aura | |
Cleric healer, spell damage-dealer |
Medicine | Heal full and cure nearby allied unit. | Spell |
Lightbeam | Channels the pure beam of light to burn caster's enemy. | Spell | |
Inner light | Gives nearby units an ability to ignore ToD. Cancels when caster moves. | Aura | |
Anti-magic Shield | Increases resistances of all nearby allies by 50% of caster's resistances. Cancel when caster moves. | Aura |
- How does this work
There should be macro to refresh visible stats of hero (hp, damage e.t.c.) It should be called when unit change it's base stats.
Database is a ton of functions what changes values of equipped items in "unit.inv".
struct unit{ struct inv{ int body_item_id; int boots_item_id; int head_item_id; int melee_item_id; int ranged_item_id; int healing_potions; struct free_slot[6]{ int item_id; string item_type; }; struct body{ int stamina; int strength; int agility; int pierce; int blade; int blow; int arcane; int fire; int cold; }; struct boots{ int speed; int speed_multiplier; int stamina; int strength; int agility; }; struct head{ int pierce; int blade; int blow; int intellect; }; struct amulet{ int arcane; int fire; int cold; int intellect; int stamina; }; struct melee{ int strength_multiplier; string type; int speed; int defense; }; struct ranged int agility_multiplier; string type; int speed; }; }; struct buffed{ int stamina; int strength; int agility; int speed; int pierce; int blade; int blow; int arcane; int fire; int cold; int hitpoints_multiplier; //NOTE: There is no stamina_multiplier. int strength_multiplier; int agility_multiplier; int speed_multiplier; }; struct class{ int stamina; int strength; int speed; int agility; struct defense{ int castle; int cave; int deep_water; int flat; int forest; int frozen; int fungus; int hills; int reef; int sand; int shallow_water; int swamp_water; }; struct resistance{ int arcane; int blade; int cold; int fire; int impact; int pierce; }; }; //standart WML values: int max_experience; int max_hitpoints; int max_moves; struct defense{ int castle; int cave; int deep_water; int flat; int forest; int frozen; int fungus; int hills; int reef; int sand; int shallow_water; int swamp_water; }; struct resistance{ int arcane; int blade; int cold; int fire; int impact; int pierce; }; struct attack[2]{ int damage; int number; int type; int range; }; // 0 - melee, 1 - ranged };
struct "inv" will be stored as persistent variable. Other structures will be forgotten, because there will be functions to calculate their content.
unit Player; StoreUnit( Player ); //This function counts output values, what player will see on the right panel. void UpdateStats( unit * Player ) { Player.damage = Temp = Player.max_hitpoints / Player.hitpoints; Player.max_hitpoints = ( Player.class.stamina + Player.inv.body.stamina + Player.inv.boots.stamina + Player.buffed.stamina ) * Player.buffed.hitpoints_multiplier; Player.hitpoints = Player.max_hitpoints / Temp; Player.max_moves = ( Player.class.speed + Player.inv.boots.speed + Player.buffed.speed ) * Player.inv.boots.speed_multiplier * Player.buffed.speed_multiplier; Player.defense.castle = Player.class.defense.castle + Player.buffed.defense.castle + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; // I can easily tweak it later. Player.defense.cave = Player.class.defense.cave + Player.buffed.defense.cave + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; // I can easily tweak it later. Player.defense.deep_water = Player.class.defense.deep_water + Player.buffed.defense.deep_water + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.defense.flat = Player.class.defense.flat + Player.buffed.defense.flat + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.defense.forest = Player.class.defense.forest + Player.buffed.defense.forest + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.defense.frozen = Player.class.defense.frozen + Player.buffed.defense.frozen + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.defense.fungus = Player.class.defense.fungus + Player.buffed.defense.fungus + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.defense.hills = Player.class.defense.hills + Player.buffed.defense.hills + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.defense.reef = Player.class.defense.reef + Player.buffed.defense.reef + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.defense.sand = Player.class.defense.sand + Player.buffed.defense.sand + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.defense.shallow_water = Player.class.defense.shallow_water + Player.buffed.defense.shallow_water + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.defense.swamp_water = Player.class.defense.swamp_water + Player.buffed.defense.swamp_water + Player.inv.melee.defense + ( Player.class.agility + Player.buffed.agility + Player.inv.body.agility + Player.inv.boots.agility ) * 5; Player.resistance.arcane = Player.class.resistance.arcane + Player.buffed.resistance.arcane + Player.body.arcane; Player.resistance.fire = Player.class.resistance.fire + Player.buffed.resistance.fire + Player.body.fire; Player.resistance.cold = Player.class.resistance.cold + Player.buffed.resistance.cold + Player.body.cold; Player.resistance.pierce = Player.class.resistance.pierce + Player.buffed.resistance.pierce + Player.body.pierce + Player.head.pierce; Player.resistance.blow = Player.class.resistance.blow + Player.buffed.resistance.blow + Player.body.blow + Player.head.blow; Player.resistance.blade = Player.class.resistance.blade + Player.buffed.resistance.blade + Player.body.blade + Player.head.blade; Player.attack[0].damage = ( Player.class.strength + Player.inv.body.strength + Player.inv.boots.strength + Player.buffed.strength ) * Player.inv.melee.strength_multiplier * Player.buffed.damage_multiplier; Player.attack[0].number = Player.inv.melee.speed; Player.attack[0].type = Player.inv.melee.type; Player.attack[1].damage = ( Player.class.agility + Player.inv.body.agility + Player.inv.boots.agility + Player.buffed.agility ) * Player.inv.melee.agility_multiplier * Player.buffed.damage_multiplier; Player.attack[1].number = Player.inv.ranged.speed; Player.attack[1].type = Player.inv.ranged.type; } UnstoreUnit();
void TakeOffItem( int itemid, string itemtype, unit * Player ) { }
void PickUpItem( int itemid, string itemtype, unit * Player ) { }
TODO:
Add missed formulas to UpdateStats();.
Update PickUpItem();.
Update TakeOffItem();.
Implement free slots.
Make things clear about spells.
Make things clear about AMLA.
Make things clear about trade.
Implement loot tables from bosses and mobs.
Implement "Group Loot".