Difference between revisions of "User:Xudojnik"

From The Battle for Wesnoth Wiki
Line 1: Line 1:
 
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.
 
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.
 
There are function, what are completed or close to it:
 
#Weapon vendor.
 
#Potion vendor.
 
#Home(place, where hero can change his weapons, take rest).
 
#Stable, where hero can buy horse.
 
#Mounting/dismounting on that horse. Two types of weapon: for mounted hero and foot.
 
#Talking to NPC's.
 
#NPC's shedule in one string.
 
#Spellcasting system (general-purpose examples of spells, what can be copied and changed later).
 
#Quest log now wait for content.
 
#Beneficial spell effects needs only more spells.
 
#Improved inventory, Spellbook.
 
 
There are in the future:
 
#Dog (taming, training, feeding).
 
#Levelling and customising character.
 
 
 
----
 
At the end of my work, I get unimaginable amount of lags, long and boring loading time and HUGE savegames. And I leave it. Now I wait for stable version of BfW 1.9. The only reason is implemented persistent variables. I will wrote here some basic terms of this project.
 
  
 
===WesMMO===
 
===WesMMO===
Line 35: Line 14:
 
#*Map will automatically use your account. Now choose any existed character and play.
 
#*Map will automatically use your account. Now choose any existed character and play.
  
:''I planned to invent spell-system in this MMO, but not yet decide about mana and cooldowns.''
+
;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''.
+
Character is a "team" of three units. Each unit have own stats, small inventory and spellbook.
 
;Stats should be simple:
 
;Stats should be simple:
 
:Stamina - increases your hitpoints by 5 per point.
 
:Stamina - increases your hitpoints by 5 per point.
Line 56: Line 38:
 
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.
 
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.
  
Spellbook will contains information about direct spells and units's auras.
+
;Classes of units:
 +
:Stalwart ''tank''.
 +
{| border="1"
 +
!Class
 +
!Name
 +
!Description
 +
!Type
 +
|-
 +
|rowspan="4"|Stalwart<br>''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
 +
|-
 +
|rowspan="4"|Berserker<br>''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
 +
|-
 +
|rowspan="4"|Poacher<br>''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
 +
|-
 +
|rowspan="4"|Cleric<br>''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
 +
|-
 +
|}
 +
Spells
 +
:
 +
:
  
 
;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):

  1. 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.
  2. 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
Stalwart tank.
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

Spells

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".