Battle Plans 2
Battle Plans 2
Here's some details on the current script implementation for determining the winner of a battle (may be tweaked a bit).
A battle score is calculated for each player using the following factors :
20%: Age rating. (Prime age for a warrior is 21-30, when you're younger or older than that your age-rating decreases. An 80-year old probably won't be much use with a sword :] )
10%: Hunger rating (This isn't just a matter of not being hungry.. a warrior who is 'a bit' hungry will get an advantage here. Being too hungry lowers the rating, as does being completely full)
10%: Current Health. (If your health is low, you won't be so good in battles)
10%: Battle skill (This is currently fixed for everyone)
10% : Sword rating (This is currently fixed, but better swords may be available in the future)
10%: Thirst (Being thirsty simply reduces this rating)
15%: Battle Fatigue (If you've battled recently this will be low, it returns to full after a few hours)
15%: Random chance (Because theres always an element of luck in a fight)
+ Wisdom Bonus - Adds an equivalent of a further 1% per wisdom point.
If you don't actually have a sword your battle rating is reduced by 90%.
Opponents in a battle are grouped.. such that a 2 v 2 battle is calculated the same as 2 separate 1 v 1 battles. When theres more than one person in a group (e.g. a 2 v 1 battle) the battle scores for the 2 players are added together and a modifer applied (currently 75%) - so usually a 2 v 1 battle will go in favour of the 2, but theres still a chance the individual opponent could win.
Tomorrow or Saturday i'll write up details of what happens when you win or lose a battle in different situations.
Thoughts and ideas welcome as always..
(Edit as i forgot to include the effect of higher wisdom)
A battle score is calculated for each player using the following factors :
20%: Age rating. (Prime age for a warrior is 21-30, when you're younger or older than that your age-rating decreases. An 80-year old probably won't be much use with a sword :] )
10%: Hunger rating (This isn't just a matter of not being hungry.. a warrior who is 'a bit' hungry will get an advantage here. Being too hungry lowers the rating, as does being completely full)
10%: Current Health. (If your health is low, you won't be so good in battles)
10%: Battle skill (This is currently fixed for everyone)
10% : Sword rating (This is currently fixed, but better swords may be available in the future)
10%: Thirst (Being thirsty simply reduces this rating)
15%: Battle Fatigue (If you've battled recently this will be low, it returns to full after a few hours)
15%: Random chance (Because theres always an element of luck in a fight)
+ Wisdom Bonus - Adds an equivalent of a further 1% per wisdom point.
If you don't actually have a sword your battle rating is reduced by 90%.
Opponents in a battle are grouped.. such that a 2 v 2 battle is calculated the same as 2 separate 1 v 1 battles. When theres more than one person in a group (e.g. a 2 v 1 battle) the battle scores for the 2 players are added together and a modifer applied (currently 75%) - so usually a 2 v 1 battle will go in favour of the 2, but theres still a chance the individual opponent could win.
Tomorrow or Saturday i'll write up details of what happens when you win or lose a battle in different situations.
Thoughts and ideas welcome as always..
(Edit as i forgot to include the effect of higher wisdom)
Last edited by Mit on Sat Mar 17, 2012 3:48 pm, edited 1 time in total.
Re: Battle Plans 2
mit, are all those percentages stuff that is hard coded?
or is it all settable via *settings?
or is it stuff settable by special vars in a script?
or is it all calculated manually by a script?
or is it all settable via *settings?
or is it stuff settable by special vars in a script?
or is it all calculated manually by a script?
- morbydvisns
- Posts: 1889
- Joined: Sun Jan 30, 2005 12:51 am
so being script driven, would one be able to say, have it check for a particular skill, varliable, or item, and wedge in there a chance for their char. to use some sort of special buffer or special attack for bonus damage, or heal during battle? (automated use at pseudo-random or a script-determined point, of course)
What does it do, enter 'battle mode' and put the players in the animation sequences, and kick a script event, to do its magic and hang in battle until the script gives an end battle command, or until one man is standing? is the blood splat a scripted moment by some new blood splat command? This could get interesting....
What does it do, enter 'battle mode' and put the players in the animation sequences, and kick a script event, to do its magic and hang in battle until the script gives an end battle command, or until one man is standing? is the blood splat a scripted moment by some new blood splat command? This could get interesting....
yup. 'Special attack for bonus damage' sounds like the script would be calling *effect %TARGET% 1 or somesuchso being script driven, would one be able to say, have it check for a particular skill, varliable, or item, and wedge in there a chance for their char. to use some sort of special buffer or special attack for bonus damage, or heal during battle? (automated use at pseudo-random or a script-determined point, of course)
In lieu of proper documentation heres the current list of script events related to battles:
"InitChallenge"
"AcceptChallenge"
"BattleStart"
"BattleUpdate"
"BattleEnd"
"BattleSurrender"
"BattleLeave"
"BattleJoin"
"BattleAcceptSurrender"
"BattleComplete"
and some of the custom batte functions
BattleSetPreludeTime( secs )
BattleSetNumRounds( val )
BattleSetRoundTime( secs )
BattleSetRoundScore( val )
(with more to follow).
As an example, when a player selects to challenge someone, InitChallenge is called and the script checks various things (like 'do they have a sword', 'are the players in the same tribe' etc) - if the script decides the challenge shouldnt happen, it calls CancelTransaction() and nothing further happens. Otherwise, it calls BattleSetPreludeTime and the server informs everyone of the details of the battle about to take place.
Bloodsplats are hardcoded atm, but will be optional and should get linked in to *effect %PLAYER% 11, or some such.is the blood splat a scripted moment by some new blood splat command?
To be fair, much of the *overall* battle sequence isn't configurable atm.. i.e. when someone challenges someone (and once the script has confirmed its ok to do so) the client automatically moves people into position. The UI on the client side (which is deliberately basic atm) is also baked in, as (currently) are the options shown to the participants when they complete the battle and the flow from stage to stage. Thats just mostly a matter of time though and it is the intention to allow script to handle a lot more of that. Essentially the system should just boil down to a way of having a script do stuff in reaction to one player selecting to 'do something' to another player.
This isn't (quite) a valid call, but ya know..
Event( "AcceptChallenge", "" )
{
*universerelocate %PLAYER% Ariya
*universerelocate %TARGET% Ariya
}
- morbydvisns
- Posts: 1889
- Joined: Sun Jan 30, 2005 12:51 am