StendhalRefactoringRP: Difference between revisions

From Arianne
Jump to navigation Jump to search
Content deleted Content added
imported>Oslsachem
imported>Oslsachem
Line 130: Line 130:
''Player1'' offers a trading deal with ''Player2'' by right-clicking on ''Player2'' and choosing ''Trade'':
''Player1'' offers a trading deal with ''Player2'' by right-clicking on ''Player2'' and choosing ''Trade'':


*''Player2'' is prompted with a window asking for accepting beginning a deal with ''Player1'' or not.
''Player2'' is prompted with a window asking for accepting beginning a deal with ''Player1'' or not.
*A bag window opens in the middle of the screen. The window is vertically splitted in two parts with a certain number of free slots in each part.
**Each part has the name of each Player on Top:
**The left part corresponds to Player1 who has made the trading offer and the right part to Player2 who has accepted it.
**Each part of the window has two buttons at the bottom: ''accept'' or ''reject'' (alternatively ''deal!'' or ''no way!'')
*Each player can drag items from his respective bag and drop them only in his part of the window BUT once the item is dropped, none of the players can remove it (this measure prevents cheating in the deal due to net lag).


A bag window opens in the middle of the screen. The window is vertically splitted in two parts with a certain number of free slots in each part.
One of the players clicks on one of the buttons at the bottom once he is:
*Each part has the name of each Player on Top:
*Satisfied with what the other player has dropped in the other part of window and
*The left part corresponds always to each Player, so the window that both players are looking is different because it is horizontally flipped from their view.
*Satisfied with the items he has offered for the trade in his own part of the window
*Each part of the window has three buttons at the bottom: ''that's my offer'', ''deal!'' and ''no way!''. The ''deal!'' button is greyed at first.

GUI suggested by '''danter'''
<pre>
|----------------------------------|
|Myself ||Other |
|----------------||----------------|
|ITEM ITEM ||ITEM////////////|
| ||////////////////|
|ITEM ||////////////////|
| ||////////////////|
|----------------||----------------|
|ICON || ICON |
|----------------||----------------|
|This is my offer!| Deal! | No way!|
|----------------------------------|
</pre>

Each player can drag items from his respective bag and drop or remove them only in his part of the window.

Each player clicks on the ''that's my offer'' button at the bottom once he is satisfied with the items he has offered for the trade in his own part of the window.

Once a player has clicked on ''that's my offer'', the button is greyed and the background of the items he has offered for the deal appears greyed. If he tries to drop more items or remove any item, the ''that's my offer'' button is lightened again and the background too.

Once both players have clicked on ''that's my offer'' then their respective ''deal!'' buttons lighten.
They press it if they are satisfied with what the other player has dropped in the other part of window.

*If both players click on ''deal!'': the window is closed and the items are exchanged between them.
*If any of the players clicks on ''no way!'' at any time: the window is closed and the items return to their original owners.


Let's suppose he clicks on ''accept'' then the other player sees that the first player has accepted the deal and that he can't drop any more items to his part of the window. So, he just can choose ''accept'' or ''reject'' too.
*If any of the players clicks on ''reject'' at any time: the window is closed and the items return to their original owners.
*If both players click on ''accept'': the window is closed too and the items are exchanged between them


<br>
<br>

Revision as of 16:57, 28 March 2006

We need a rebalance of the RP system so it is playable and fun for both newbiews and high levels. We have to talk about several things here:

Skill system

The whole system will be skill based, so if you use sword, you will get better and better hits with the sword, but if you change to axes you will have to learn to use it again, as you did with swords. At least we have the next set of skills:

  • sword
  • axe
  • club/staff
  • range
  • shield

We want to avoid the situation of having to add items to monsters for them in order to combat, so we need to find a way of making compatible both systems ( the above one with the actual ATK/DEF one ).

We need to design the system to avoid campers:
http://arianne.sourceforge.net/wiki_images/stendhal_0.39_campers.jpg
Image: Campers training in Stendhal 0.39

There are several valid approach for this problem, and IMHO we should try from less severe to most severe first.

  1. Blood solution
    You only improve your skill when you damage/are damaged the creature
  2. Don't get XP points nor skill points from weak creatures
  3. Kick idle players
    No action in X minutes means that you are logged out

We want to disallow first camping to increase skills, you gain skills by playing not by camping. Later we will fix camping by not respawing monsters if player is waiting for the monster. The whole point is to have player create value: fun.

Leveling up

To level up you need to gain XP by killing monsters and/or solving quests.
On level up you gain HP.

Combat

Melee Combat

Combat right now works as follows:

  1. We compute the risk to hit the target, using their ATK and DEF attributes-
  2. If risk>0 then we compute if the target blocks the attack, or how much damage the target recieved.

The formula looks like:

  risk_to_hit = 2 * source[ATK] - target[DEF]+ roll[1D20] - 10

  if risk_to_hit > 0:
    attacker_part = 0.8 * (roll[1D100] / 100) * source[ATK]^2 + 4 * source[ATK] * weapon
    maxdamage = 0.8 * source[ATK]^2 + 4 * weapon
    defender_part = 0.6 * (roll[1D100] / 100) * target[DEF]^2 + 4 * target[DEF] * shield + 2 * target[DEF] *
                   armor + target[DEF]* helmet + target[DEF] * legs + target[DEF] * boots

    damage = ((attacker_part - defender_part) / maxdamage) * (maxdamage / source[ATK])

See that it is very important the ATK and DEF value, but that you can also get big improvements using weapons, armors, shields, etc... The beneficts you get from weapons and armors are directly proportional to your level.

The formula is nicer than previous one because it gives a good range of damages and it adds lineal damage increase for using weapons and lineal damage absortion for using armors. Now the point is to give values to monsters that will always lack of equipment ( to simplify everything ).

Range Combat

Should be based on the above formula but:

  • We have a maximun range
  • Weapon is only effective on middle-long range
  • Damage also depends of the arrow

So a nice formula would be:

  range_damage = damage * ( actual_distance / max range of weapon )

  if actual_distance < min_range: 
     range_damage = damage / 20
  if actual_distance > max_range:
     range_damage = 0

Here is some improved formulas for ranged combat, they also use arrow damage.

  attacker_part = 0.8 * (roll[1D100] / 100) * source[ATK]^2 + 4 * source[ATK] * (weapon + arrow)
  maxdamage = 0.8 * source[ATK]^2 + 4 * (weapon + arrow)

  range_damage = damage * ( 1 - (actual_distance / max_range) ) + ( damage - damage * ( 1 - (min_range / max_range) ) ) *
                ( 1 - (actual_distance / max_range) )

Magic

Magic will be mana based, with each spell costing mana. Also you can have written spells that don't cost mana, but that vanish after they have been used.

We will mainly have 6 elements in Stendhal, maybe 8 later, and those are Fire, Water/Ice, Earth, Wind, Holy and Dark. The 2 that might be added later is Physical and Mental magic, that focuses on protecting against and strenghtening charm and poison attacks. For now poison will just be treated as a normal attack, and not be affected by any magic resistances.

For the Element there will be some properties:

  • Fire strong vs Water
  • Water strong vs Earth
  • Earth strong vs Wind
  • Wind strong vs Fire


  • Dark strong vs Holy
  • Holy strong vs Dark

The Holy and Dark elements will also be used in healings, depending on if the target is a good or an evil creature the dark and holy elements will heal or damage the target.

Here is some speculative formulas for how magic might be working

risk_to_hit = 2 * source[INT] - target[INT] + target[DEF]/2 + roll[1D20] -10

  if risk_to_hit > 0:
    attacker part = 0,8 * ((roll[1D100]/100) * source[MATK]^2) * (ELEMENT * 0,2) + 4 * source[MATK] * (ELEMENT*0,2)
    maxdamage = source[MATK]^2 + 4 * (ELEMENT)
    defender_part = 0.6 * (roll[1D100] / 100) * target[DEF]^2 + 2 * target[DEF] * shield + target[DEF] *
                   armor + 0,5 * target[DEF]* helmet + 0,5* target[DEF] * legs + 0,5 * target[DEF] * boots

damage = ( ( ((attacker_part - defender_part) / maxdamage) * (maxdamage / source[MATK]) ) * 
           (1 + (target[WEAK] * 0,01)) ) * (1 - target[STRONG] * 0,01)


ELEMENT = The elemental power of the skill that is used (Equivelant to the ATK the equipped weapon has, but for magic).
WEAK = The element that is weak to the skill that is used. (beeing strong in one element makes you weak to another)
STRONG = Is the target strong against the element casted upon him?

These Formulas is based on that all creatures have an elemental resistance to all the elements in the game:

  • An elemental resistance below 0 means that you gain extra damage from that element -100 means you recive the double damage.
  • An elemental resistance of 0 means that there is no change in damage from that element, or the element that is strong against it.
  • An elemental resistance of 100 means that the target is immune to that form of damage, but also weak against the element strong against it.
  • An elemental resistance of 100+ means that you absorbs some of that element (ie you get healed) having 200 means that instead of getting damaged you get healed the entire damage cast upon you, but you are also very weak against the oposing element.


Check over at the class section for spells that might be added Class Basics

Trading system

Based on a idea suggested by Khesus

Player1 offers a trading deal with Player2 by right-clicking on Player2 and choosing Trade:

Player2 is prompted with a window asking for accepting beginning a deal with Player1 or not.

A bag window opens in the middle of the screen. The window is vertically splitted in two parts with a certain number of free slots in each part.

  • Each part has the name of each Player on Top:
  • The left part corresponds always to each Player, so the window that both players are looking is different because it is horizontally flipped from their view.
  • Each part of the window has three buttons at the bottom: that's my offer, deal! and no way!. The deal! button is greyed at first.

GUI suggested by danter

|----------------------------------|
|Myself          ||Other           |
|----------------||----------------|
|ITEM   ITEM     ||ITEM////////////|
|                ||////////////////|
|ITEM            ||////////////////|
|                ||////////////////|
|----------------||----------------|
|ICON            ||    ICON        |
|----------------||----------------|
|This is my offer!| Deal! | No way!|
|----------------------------------|

Each player can drag items from his respective bag and drop or remove them only in his part of the window.

Each player clicks on the that's my offer button at the bottom once he is satisfied with the items he has offered for the trade in his own part of the window.

Once a player has clicked on that's my offer, the button is greyed and the background of the items he has offered for the deal appears greyed. If he tries to drop more items or remove any item, the that's my offer button is lightened again and the background too.

Once both players have clicked on that's my offer then their respective deal! buttons lighten. They press it if they are satisfied with what the other player has dropped in the other part of window.

  • If both players click on deal!: the window is closed and the items are exchanged between them.
  • If any of the players clicks on no way! at any time: the window is closed and the items return to their original owners.






Back to stendhal refactoring page
Back to Stendhal main wiki page