Battle Plans 2

Forum Archive - from http://theuniversal.net
Locked
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Battle Plans 2

Post by Mit »

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)
Last edited by Mit on Sat Mar 17, 2012 3:48 pm, edited 1 time in total.
Thedabs
Posts: 145
Joined: Thu Feb 15, 2007 6:30 pm

Post by Thedabs »

What about experience gain from battle? having a lot of battle experience could eventually offset age for an older warrior.

And when we die of old age will our experience be lost?
User avatar
Omni
Posts: 156
Joined: Sat Feb 25, 2012 11:07 am

Post by Omni »

Nice!

I see a lot of sword "passing" in the future. The elders passing on their swords to the younglins for a better use (and moving on to basic proffesions like smelting)

And people actually taking care of their health.
Thedabs
Posts: 145
Joined: Thu Feb 15, 2007 6:30 pm

Post by Thedabs »

Yes I see a wondeful market in the healthfood industry.

What if after battles won people gained experience "coins" or something. thing those Experiecnes can be worked with for example, a basic sword to make a better sword?


Sword + Tangible Experience = Flame/Ice/Crystal Sword?
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

yup experience is definitely a consideration (thats what the 'Battle Skill' item is kinda there for, but its not coded up yet).
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

Its way more dynamic than what I was expecting, pretty awesome! On a side note, do we have a scripted way to affect vehicle damage yet?
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

*setvehicledamage <NAME> <VALUE>
User avatar
flametard
Posts: 1245
Joined: Sun Apr 01, 2007 2:05 am
Location: Join NR! faction name: 'NR new recruits' password: 'Truth'
Contact:

Post by flametard »

perhaps:
A small, non-annoying sound effect that sounds to both players upon a challenge request (most importantly to the person being challenged)


reason:
to alert people hanging around in small mode to possible danger/action.
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Re: Battle Plans 2

Post by zaroba »

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?
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

calculated 'manually' by script
(Although 'manually' is a bit of a strange term to use in this context ;] )
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

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....
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

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)
yup. 'Special attack for bonus damage' sounds like the script would be calling *effect %TARGET% 1 or somesuch :)

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.
is the blood splat a scripted moment by some new blood splat command?
Bloodsplats are hardcoded atm, but will be optional and should get linked in to *effect %PLAYER% 11, or some such.

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
}
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

nice man. is the *universerelocate the command to send players between planets? =).

also can osd's be called onscreen during a battle event? =) I have some ideas spinnin here ;).
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

is the *universerelocate the command to send players between planets? =).
No, but its pseudo-code for the actual calls that do that.
also can osd's be called onscreen during a battle event? =)
theoretically, aye.
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

if osd's can be called during a battle, it might allow for a battle to be more interactive by making them turn based.

each turn:
make each fighter choose to attack/defend
if using guns, click to shoot and reload
maybe switch weapon mid battle or use their turn to consume a potion or whatever.
Locked