## OOS combat - how SHOULD it work?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.
wyvern11
Posts: 1702
Joined: Sat, 15. Jul 06, 20:59
general distro served no purpose except to get me aquainted to the numbers

same thing for ships speed distro

I'm trying for a formula to combine pilot-specifics (morale, skill, agression) into a bonus/malus

first try on that :

say
L is a fixed fightskill (maybe average skill, maybe not)
k1,-,k are scaling factors

A is aggression (A goes in negative, since aggressiveness counteracts evasion)
M is morale (M goes in positove - weighs imho against A)

both together are not as decisive as skill, therefore k2

S is skill

so **skill**-based evade could be like

bonus = integer { k1 [ ( S - L ) + ( M - A ) / k2 ] }

example:
Argon 1 :
S = 28, L = 20 --> +8
M = 26, A = 11 --> +15 / k2 ==> would have a high skill-based evade (of course getting a carrier to evade would get some hefty size and speed malus )

size (any idea to get this into a formula and not if-thens?) :

huge: -2 k3
big: -1 k3
little: +1 k3

speed :

idea : get k4 times an integer that is
-2 for speeds about 0
+k5 for speeds about 600

linear function is bad so take sqrt. for example :

bonus = k4 * round ( 0,16 * sqrt ( speed ) - 2 )

table for k4=1 :

Code: Select all

``````
speed bonus
1	-2
25	-1
50	-1
75	-1
100	0
125	0
150	0
200	0
250	1
300	1
350	1
400	1
450	1
500	2
550	2
600	2
650	2

``````
one can easily stretch and squeeze depending on balance
Redest du noch - oder denkst du schon ?

Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
size (any idea to get this into a formula and not if-thens?) :
If the ship class corresponds to array indices for the lookup of it's damage tables, we'd have
0 little ship
1 big ship
2 huge ship

As an evade modifier:

\$Mod = \$Class.Index * \$Class.Index * \$Class.Index
so
0 little ship (1 ?)
1 big ship (2 ?)
8 huge ship (9 ?)

The size/evasion difference between m3/m6 is noticable but not huge.
The evasion of an M1 is umm... Texas trying to evade a bullet. =)

But as I said before, getting the general size of an object is possible.
Phoenix;2378
Python;1068
Boreas;705
Thresher;1430
Shrike;636

Centaur;64

Nova;17
Falcon;23
Discoverer;14

Getting this costs one library call during the setup phase so probably not a big deal.
I just don't like how it favours the tiny... Boreas.
However, I wouldn't want to disadvantage it because it an overpowered hellspawn. Ship balancing needs to be done in other places.

What... if the class index like above is used as the primary modifier (because of general maneuvering ability) and size as a secondary?
A Boreas is more difficult to hit than a Phoenix...

A is aggression (A goes in negative, since aggressiveness counteracts evasion)
M is morale (M goes in positive - weighs imho against
I'm not sure how to rate morale or aggression at all because they are not used at all in any fight script.

They may be used in hardcoded functions like ships bailing but any and all offense/defense related issues are based on fight skill alone.

There is also (currently) no way to assign a useful morale/aggression to player ships. (no pilot)
How aggressive is the player?
Last edited by Gazz on Sat, 16. May 09, 11:23, edited 1 time in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

wyvern11
Posts: 1702
Joined: Sat, 15. Jul 06, 20:59
third power for class modifier ?

lets see second power

bonus = - \$size.id * \$size.id + 1

huge : -4+1=-3
big : 0
little : +1

with a linear transformation on that one can do the tuning

concerning length i can do some checks where it leads us

because they are not used at all in any fight script.
well now they would be

assign player morale and aggression identical to skill and the second part of the equation collapses?

edit : other way maybe :
aggression = fightskill

this would get non-trading warlords somewhat stiffer repsonse - kinda like that
Redest du noch - oder denkst du schon ?

Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
wyvern11 wrote:edit : other way maybe :
aggression = fightskill
Now there's a great idea.

The question is - what to do with it?
High morale would imply that the ships fight instead of running but "running" is not part of the OOS damage.
So a high Player.Tradeskill would mean +offense but -defense, since they don't evade.

I can't find an explanation of how Morale would positively influence evasion at all.

Player.Tradeskill = aggression would work.
It could add a small damage bonus since ships are not afraid to use ammunitions.
That would add enticement to work up that rank as well if you want the perfect army. Evil. =)
It can't lower defense, because that would punish the player for the completely independant trade.rank.

I would leave morale out completely unless you can find a reason why it should affect damage or evasion and why it should be tied to either fight or trade.skill. =)
An implementation of morale would IMO require a completely different approach.
It can not be a static value but has to be used like in tabletop games where formations do break and flee if they take too many losses.
OOS that would be extremely easy to track if my script is doing all the shooting but IS...?
I say we ignore morale until we can do it right...

wyvern11 wrote:third power for class modifier ?
lets see second power

bonus = - \$size.id * \$size.id + 1

huge : -4+1=-3
big : 0
little : +1
That's pretty good as well and is already heading into the right direction of +/-.
After positing I was tinkering with one of the indices, too, but I see you're already ahead of me. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

vr01
Posts: 1036
Joined: Sun, 10. Sep 06, 00:01
Maybe scale this way:

Code: Select all

``````
Calculate bonuses based on Player skill

Offense Bonus = ( -31 + Player.Fightskill + Player.Tradeskill ) / 3

Defense Bonus = ( 31 - Player.Fightskill - Player.Tradeskill ) / 3

``````
(The divide by 3 as just a pull out of the hat number for scaling, effectively gives a range from -10 to +10 for both. The 31 is what I believe to be the number of Fight and Trade ranks?)

1) Player owned ships are more aggressive because their employer (the player) has racked up the kills or has the economic capability to supply them with the best weapons and shields. Less aggressive at low fight rank because they don't have the confidence that the player knows which end of the laser is which... or less likely to be adequately armed / shielded.

2) Player owned ships are more evasive at low trade rank because the assumption is the player doesn't have the economic means to defend / replace the ship / less likely to be adequately armed / shielded. Conversely at high trade rank, less likely to evade because the player should have the capability to provide patrol ships / fleets, arm ships with best weapons / shields, etc.

3) Balances out playing styles, i.e trade versus combat. Ships will get biggest offensive bonus at high fight and trade, biggest defensive bonus at lowest fight and trade. However they may still get some bonus if the player is only focusing on combat or trade.

Feel free to flame it away

vr01
Posts: 1036
Joined: Sun, 10. Sep 06, 00:01
Gazz wrote:Completely unrelated thought:
Since it would fit in technically it may be worth consideration.
If the player boards a ship, the ship being boarded will permanently turn hostile with no chance to excuse for "accidential fire" ever again.
Also, all ships of that race within 30 (?) km and all police/military ships currently in the sector permanently turn hostile.

So you could still board ships perfectly fine. You'd just have to... deal with the witnesses. =)
All Police / Military ships in sector: Yes, provided at least one such ship is within 30 km of the target at the time of boarding.

All ships of that race within 30 (?) km: Not quite, this should be some sort of percentage chance. Just like "real life":
• "Sorry officer, I didn't see anything"
• Harbouring of criminals
• Doesn't want to get involved
• Wants to continue to trade because the economic impact of not trading is too large
• Car rebirthing... (well the ship's id does change slightly when you board it )

Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
vr01 wrote:Calculate bonuses based on Player skill
Offense Bonus = ( -31 + Player.Fightskill + Player.Tradeskill ) / 3
Defense Bonus = ( 31 - Player.Fightskill - Player.Tradeskill ) / 3
All these explanations of why trade.skill should affect offense/defense at all seem a bit farfetched to me.

If it requires a long explanation, it's not obvious. It's not a good rule.
The purpose of this project is to balance OOS combat, not to "use aggression" or "use morale".
If they make good sense in a user-transparent way, only then they will be used at all.

Trade.skill = aggression as a minor offense bonus sounds good to me
"because the pilots are a bit more reckless with ammo and missiles"

Here's a thought:
Trade skill = defensive bonus to trade ships only. (TS,TP,TL only)
So you're a Super-Magnate?
Your traders benefit from your experience at... keeping the freighter in one piece.

It won't make you a great military leader and won't impress your warship's captains but it's a nice and useful bonus for trade oriented players. =)

And when you have a vast trade empire and your trade rank is very high as a result, this reduces micromanagement from replacing freighters.

There would be no representation of this for AI ships. AI freighters don't really affect any OOS fight...

vr01 wrote:All Police / Military ships in sector: Yes, provided at least one such ship is within 30 km of the target at the time of boarding.
No, the whole sector.
It's easy enough to lead a ship a few km to the side. That would make any such system meaningless.
The cops have... a phone!

Good points on civilians, though.
Some may just not care enough. The cops have to. =)

PS: I've actually been doing something!
Tied all those OOS-Damage script calls into the !fight scripts, tied Missile Safety in as well (as an optional hook), taught all OWP to use their lasers (!) OOS in addition to more missiles...
Yes, as a side effect, OWP will work OOS...
Only missing now: plugin.gz.oos.damage that sits in the center of this spider web. =)

OOS missile launches are also rerouted to plugin.gz.oos.damage.
This allows for a future feature to make M7M work OOS.
A call to fire "a" missile OOS could easily turn into 20 missiles being fired if the ship has the "missile boat" flag. (only M8 and M7M do)
And it allows for... OOS missile defense. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

vr01
Posts: 1036
Joined: Sun, 10. Sep 06, 00:01
Gazz wrote:
vr01 wrote:Calculate bonuses based on Player skill
Offense Bonus = ( -31 + Player.Fightskill + Player.Tradeskill ) / 3
Defense Bonus = ( 31 - Player.Fightskill - Player.Tradeskill ) / 3
All these explanations of why trade.skill should affect offense/defense at all seem a bit farfetched to me.

If it requires a long explanation, it's not obvious. It's not a good rule.
The purpose of this project is to balance OOS combat, not to "use aggression" or "use morale".
If they make good sense in a user-transparent way, only then they will be used at all.
Fair enough, I have had a few more thoughts on it anyway based on your comments.
Trade.skill = aggression as a minor offense bonus sounds good to me
"because the pilots are a bit more reckless with ammo and missiles"
Obviously this is only being applied to player owned ships? But all, combat only or trade only?

Here's a thought:
Trade skill = defensive bonus to trade ships only. (TS,TP,TL only)
I think this is what I was looking for in my earlier post but I would give them a higher bonus at lower rank, to help trade oriented players when they are starting out.
And when you have a vast trade empire and your trade rank is very high as a result, this reduces micromanagement from replacing freighters.
Early on in this thread the attack signal was being discussed but seems to have dropped off the radar? This would also help the player defend their vast trade empire.
There would be no representation of this for AI ships. AI freighters don't really affect any OOS fight...
Agree.
vr01 wrote:All Police / Military ships in sector: Yes, provided at least one such ship is within 30 km of the target at the time of boarding.
No, the whole sector.
It's easy enough to lead a ship a few km to the side. That would make any such system meaningless.
The cops have... a phone!
OK then, but before we settle on that, how about something like this - again factoring in a little bit of real life...

If you can determine if the sector is core or border then maybe some sort of small chance that the police / military don't turn hostile? (Unsolved crime...)

1 in 40 for core sector?
1 in 10 for border sector? (The Split would rather blame a Boron for stealing a ship )

If you can't determine the sector type, maybe 1 in 25?

Good points on civilians, though.
Some may just not care enough. The cops have to. =)
Thanks - it would appear I have an idea included I was thinking just a straight 1 in 2 chance that they will turn hostile / stay friendly (KISS principle). Do you agree?
OOS missile launches are also rerouted to plugin.gz.oos.damage.
This allows for a future feature to make M7M work OOS.
A call to fire "a" missile OOS could easily turn into 20 missiles being fired if the ship has the "missile boat" flag. (only M8 and M7M do)
And it allows for... OOS missile defense. =)

That would be interesting!!! You also need to ensure these ships work on a different minimum range (20km?) and that they should actually try to maintain that range, i.e. fly away from hostiles whilst attacking. However I think we should pick that up for discussion, later!

Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
vr01 wrote:I think this is what I was looking for in my earlier post but I would give them a higher bonus at lower rank, to help trade oriented players when they are starting out.
The better the player is at trading, the worse his ships get... ?
A "starting out" player with one or two TS should be able to keep an eye on them.

Early on in this thread the attack signal was being discussed but seems to have dropped off the radar? This would also help the player defend their vast trade empire.
There are already scripts specifically for that. One is from Lucike I think.
I don't want to mess with the game on every level - just bring OOS damage back in line plus small improvements that are an immediate result of the damage system.

If you can determine if the sector is core or border then maybe some sort of small chance that the police / military don't turn hostile? (Unsolved crime...)

1 in 40 for core sector?
Hmm. Use sector security level somehow. Noted!

That would be interesting!!! You also need to ensure these ships work on a different minimum range (20km?) and that they should actually try to maintain that range, i.e. fly away from hostiles whilst attacking. However I think we should pick that up for discussion, later!
A completely new M7M AI is not on my list. Maybe someone else wants to do that...
vr01 wrote:Thanks - it would appear I have an idea included :D
Oh, every idea I come across is butchered and twisted into something useful. Even if that turns out as the opposite of what you intended. =P
Whether that's a Warhammer 40k or Battletech initiative rule, the X3 Sector Security level... or whatever.

Ideas are nothing rigid and not attached to any particular object/situation.
I think of them as a form of... energy. The more ideas, the greater a script's power. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

vr01
Posts: 1036
Joined: Sun, 10. Sep 06, 00:01
Gazz wrote: The better the player is at trading, the worse his ships get... ?
A "starting out" player with one or two TS should be able to keep an eye on them.
Yes, but they probably won't be able to do anything about them. Hence my line of thinking. If you are going to give them a slight offensive bonus as trade rank increases then it would make sense to have a slightly less defensive bonus because they can't effectively do both at the same time.

Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
vr01 wrote:Yes, but they probably won't be able to do anything about them.
I don't see a reason to reward the player for not paying attention to his traders.

There are fighter drones, escort fighters, or the player can personally ride shotgun. There are ways, especially if OOS combat works in a comprehensible way.

That highly experienced trader is better at his job (even at avoiding fights) is only logical.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

vr01
Posts: 1036
Joined: Sun, 10. Sep 06, 00:01
Gazz wrote:I don't see a reason to reward the player for not paying attention to his traders.
I didn't say that. I said they couldn't do anything to help. There is a difference. Think early game, where you have put all your hard earned credits into that first factory, ST, whatever and all of a sudden...
There are fighter drones, escort fighters, or the player can personally ride shotgun. There are ways, especially if OOS combat works in a comprehensible way.
Provided the player has supporting infrastructure / funding. In a way trade rank reflects this.
That highly experienced trader is better at his job (even at avoiding fights) is only logical.
You have me there, but they are also more likely to be the target of pirates because they are better. So they will attract fights

Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
vr01 wrote:You have me there, but they are also more likely to be the target of pirates because they are better. So they will attract fights :P
And at the same time pirates will think twice about attacking ships of The Man who just happens to own a private fleet of destroyers.
Guess we could argue this point indefinitely..
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

vr01
Posts: 1036
Joined: Sun, 10. Sep 06, 00:01
Gazz wrote:Guess we could argue this point indefinitely..
Yep, so happy with whatever you go with.

wyvern11
Posts: 1702
Joined: Sat, 15. Jul 06, 20:59
Gazz wrote:
wyvern11 wrote:edit : other way maybe :
aggression = fightskill
Now there's a great idea.

The question is - what to do with it?
High morale would imply that the ships fight instead of running but "running" is not part of the OOS damage.
So a high Player.Tradeskill would mean +offense but -defense, since they don't evade.

I can't find an explanation of how Morale would positively influence evasion at all.
think you misunderstood me a little:
how does aggression influence combat and why?

an aggressive pilot tends to stress his offense more than his defense - quick-kill-guy (--> a bonus for offense damage, a malus on evading damage)

how does morale influence combat other than not running away from it

high morale might imply staying calm and rational during heavy and chaotic fighting thus benefitting evade (and reducing negative aggression efects)

what does player trade and fight have to do with that? nothing directly RPG-ish, but

fight > trade : player stresses fight more than trade build -> player pilots receive better combat training

trade > fight : other way around

lets round up the facts:
bonus = k3 * ( - \$size.id * \$size.id + 1 )

huge : -4+1=-3
big : 0
little : +1

I take this as accepted [ yea / nay ] yea
bonus = k4 * round ( 0,16 * sqrt ( speed ) - 2 )
(see table above)

accepted ? [ yea / nay ]
L is a fixed fightskill (maybe average skill, maybe not), A is aggression (A goes in negative, since aggressiveness counteracts evasion), M is morale (M goes in positove - weighs imho against A)

S is skill

bonus = integer { k1 [ ( S - L ) + ( M - A ) / k2 ] }
accepted [ yea / nay ]
morale/aggression part ? [ yea / nay ]
tradeskill ? fightskill part ? [ yea / nay ]

anything left out on evade ? [ yea / nay ]
adjustments on real size wanted ? [ yea / nay ]
Redest du noch - oder denkst du schon ?