EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
OOS combat - how SHOULD it work?
Post new topic Reply to topic Goto page 1, 2, 3 ... 9, 10, 11  Next
View previous topic :: View next topic
Author Message
Gazz





Joined: 13 Jan 2006
Posts: 12424 on topic
Location: Bavaria
Thank you for registering your game
PostPosted: Sat, 25. Apr 09, 21:07    Post subject: OOS combat - how SHOULD it work? Reply with quote Print

We know that OOS combat is highly random with rare but ridiculously high damage spikes.

In order to replace the current system (fire lasers of turret null) there are several problems to overcome.

  1. get attacker
    Any "scripted" damage is not caused by THIS as far as the engine is concerned.
    Therefore, a ship can not respond to such an "attack", neither does SIGNAL_ATTACKED fire.
    set attacker may have to be used somehow to force the current attacker. No idea on the signal.

  2. Any DPS accounting/creating script must be highly optimised or it may use massive amounts of CPU power.
    Any realistic (aka complicated) system is hard to precompute.

  3. Creating damage:
    What damage is done, what hit percentage do lasers have, etc.

    Let's assume these variables are known:
    • Laser Shield DPS
    • Laser Hull DPS
    • Laser range (add 2/3 of THIS get size ?)
    • Laser bullet speed
    • Laser special type (PSG, Flamer)
    • Ship size
      Possibly important since a Phoenix' lasers have an extra 2km reach from the ship's "position"
    • Target object class
    • Target size
    • Target speed

    Should PSG cause AE damage and if so, how?

  4. Missiles.
    Right now there is no defense against them.
    A (dumbfire) Tornado will hit an M5 with 100 % certainty at 20 km range.
    A cap ship with 6 turrets has no chance to intercept even the slowest incoming missile.

    Stats known about missiles:
    • Speed
    • Range
    • all flags, such as Dumbfire or Swarm


The only system I can imagine to work is to precompute a simple damage table for each ship, then apply what's in there.
This table could be updated 1 (or less) minutes after the ship goes OOS, then rechecked once after 5 and 10 minutes.
After that, no more changes are to be expected.

As a result of that, does the OOS weapon changing of AI ships need tweaking to be competitive with "properly" equipped player ships?

What exactly such a table should contain is the big question...
The more that has to be dynamically calculated at runtime (during combat) the bigger the slowdown.

Can weapons and/or targets be grouped into a few classes? If so, by which system?


I expect that cobbleing together a concept that at least works on paper will require more than a few bright ideas.
Oh, and vague white noise posts like "it should work like IS" are not going to be helpful. Thank you.


_________________
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.
Back to top
View user's profile Send private message Visit poster's website
Sartorie





Joined: 10 Apr 2004
Posts: 384 on topic
Location: Hamburg
Thank you for registering your game
PostPosted: Sat, 25. Apr 09, 21:45    Post subject: Reply with quote Print

One of the main problem OOS has is that it is turn based which means in every turn each ships fires once with all it's weaponry at their target. Ideally each turret should be able to fire on it's own so a M2 does not use up all it's firepower on a single M5.

Tables with precomputed damage / hit / evasion values are a good idea to keep math to a minimum. One important thing to consider is the ships laser generator - a weak generator should give malus to laser damage.

As for 1. you can send ships signals though I have never tried that with SIGNAL_ATTACKED

I am very interested what you come up with on this Smile good luck

Back to top
View user's profile Send private message Visit poster's website
apricotslice





Joined: 16 May 2004
Posts: 13629 on topic
Location: In the Hunter Legacy Universe
Thank you for registering your game
PostPosted: Sun, 26. Apr 09, 15:09    Post subject: Reply with quote Print

Part of the trick is to mimic IS combat as far as how many ships are in range of the target to fire at any one time, and how many of those ships are headed away from the target and thus cannot fire.

Part of the problem is that oos now, 6 M3's all fire at an M2 at once, and the M2 fires at a single M3. But in IS, only 2 of those 6 M3's will be in firing range and pointing at the target, while the M2 could have 4 of the M3's targetted using different turrents.

So maybe what oos needs is some realistic randomising of the variables, so that some random realism comes into it.

Make assumptions of how many ships are in range and able to fire, how many are heading away and only have a rear turrent firing, and how many are in range of the targets various turrents.

So instead of 6 vs 1 per turn, its something random but closer to IS combat in how ships end up all over the sector while attacking, and who can fire on what when.

Also, guns need to be considered. PPC's cant hit a M5, and air's will not damage an M6. So this needs to be part of the equation.

If an M2 is wrongly kitted out for whats attacking it, it should be owned given enough time. But if its being attacked by M4's and M5's, and its kitted with rapid file rapid move guns, then it should wipe them quickly through sheer firepower. And an M2 taking on another M2, but loaded for fighters, should be history quickly.


_________________
Apricot Mapping Services HQ
CLICK HERE for X3 Handbook; TC and AP Guides, Mods, Scripts & Downloads
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pelador





Joined: 06 Nov 2002
Posts: 1230 on topic
Location: UK
Thank you for registering your game
PostPosted: Sun, 26. Apr 09, 15:16    Post subject: Reply with quote Print

SIGNAL_ATTACKED does work OOS but I have noticed it reverts very quickly back to current "jobs" on AI behaviour. But that depends on how the reputation levels are and what current job behaviour is set and how it respond as a result in vanilla.

So if a signal is used I imagine it needs to have AI "objectives" incorporated to fully respond to aggresive situations. But as Gazz points out this in effect removes the current AI behaviour. Wether that is relevant is another matter but may effect AL plugins or other behaviour if not incorporated.

However, applying it to one ship combat command process such as "attack all enemies" doesnt really make sense to me as it limits OOS capabilities. Ideally it needs to plug into all or "take over" ship behaviour for the duration of combat and revert. Which makes sense to me if its a task 0 interupt.


_________________
X3TC:V2.1M

Dedicated Assistant Drones (DAD); Pirate Fence; Player Workshops; Convert Passenger to Marine
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Gazz





Joined: 13 Jan 2006
Posts: 12424 on topic
Location: Bavaria
Thank you for registering your game
modified
PostPosted: Sun, 26. Apr 09, 18:21    Post subject: Reply with quote Print

pelador wrote:
SIGNAL_ATTACKED does work OOS but I have noticed it reverts very quickly back to current "jobs" on AI behaviour. But that depends on how the reputation levels are and what current job behaviour is set and how it respond as a result in vanilla.

Being "the attacker" also depends on the amount of damage done and/or distance to the target.
I suspect that $Damage.Done decays over time.

None of that is accessible or even transparent to scripts.

The only workaround to properly simulate "correct" damage is to rearrange the installed lasers on the attacking ship, fire 1 turret with 1 small laser often enough to do $Desired.Damage, then rearrange the lasers back.
This would need to be done for every single shot.
Then a ship would have "done the damage" and the attacker/signal would be set apropriately.
And it would be a terribly crude and bulky system.


apricotslice wrote:
Part of the trick is to mimic IS combat as far as how many ships are in range of the target to fire at any one time, and how many of those ships are headed away from the target and thus cannot fire.

Ship's orientation would be a royal pain in the bastu so I wouldn't touch it.
For fixed cockpit guns, use maybe 1/3 of the total damage and call it good.
Or full damage at > 2/3 Laser range, 1/4 damage below that.
That would already get complicated, though...
Best would be a flat fee of 1/3 damage for cockpit guns.
Maybe full damage for the first attack on this target. That would work.

For any turrets, divide the maximum firepower by 2. That all turrets can fire at the same target is silly.

Independantly tracking turrets would most certainly be a no go. This would inflate the previously 1 line of script into full blown target acquisition for targets of opportunity.
Hmm. Tabletop rules!
What could be done is allowing "return fire" if a ship (like a fighter) attacks a big ship with turrets.
During the fighters attack (well, directly after), the big ship could do a little return fire.
That would implement multiple target acquisition and tracking without having to do any... acquisition and tracking. =)

Kinda like an action point system like in UFO/Fallout/Jagged Alliance.
OOS turns are kinda long. It can take 10 or more seconds between fire orders.
Time elapsed since last shot is easy to find.
So... If cap ship has fired 5 seconds ago it would have a potential 5 seconds of fire available at this moment if it got it's turn now.
If a fighter attacks it, the cap ship gets 1 second of return fire, adding 1 to the time when it fired the last shot.
So for all following calculations it has now fired 4 seconds ago and 4 action points available for attacking something.
And lets face it - 1 second of fire from an M2 is plenty to worry an M4 pilot.

This would give cap ships "multiple target capability" without creating an instant killing zone around them because each shot of return fire at a missile or fighter substracts a sizable chunk of it's firepower.


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


Last edited by Gazz on Sun, 26. Apr 09, 20:47; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
pelador





Joined: 06 Nov 2002
Posts: 1230 on topic
Location: UK
Thank you for registering your game
PostPosted: Sun, 26. Apr 09, 18:29    Post subject: Reply with quote Print

Indeed we could really do with a "get last damager" and an associated signal for each itteration in the script engine.

Accidents and other damage not directly related to combat I assume would be overlooked however OOS due to collision avoidance so would the damage amount be irrelevant for threat recognition, as its a case of wether the ship is simply attacked that a responce to a threat is required? (Hence use of SIGNAL_ATTACKED to a custom process to only apply if OOS).

Correct me if I'm wrong however, I imagine you have the best combat experince with weapon useage. But just wondering if the above might simplify threat recognition OOS. After all simplicity is key for scalability as there are more OOS sectors than IS.


_________________
X3TC:V2.1M

Dedicated Assistant Drones (DAD); Pirate Fence; Player Workshops; Convert Passenger to Marine
Back to top
View user's profile Send private message Send e-mail MSN Messenger
someone else





Joined: 18 Jun 2006
Posts: 2970 on topic
Location: Italy
Thank you for registering your game
PostPosted: Sun, 26. Apr 09, 19:43    Post subject: Reply with quote Print

I want to see a better OOS fight!!!

just a thought... I'm not a scripter nor a modder... but... this is my idea:

maybe you can implement a more CPU draining (and thus more realistic) OOS script used ONLY for combat involving Player owned ships OOS, and leave the crappy Egosoft scripts to run for the NPC-only battles that the player will never see.

How much player owned ship can fight OOS? not a lot! = not a lot of CPU drain.

feel free to ignore me if it's stupid... Very Happy


_________________
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.
Back to top
View user's profile Send private message
MutantDwarf





Joined: 20 Jun 2006
Posts: 605 on topic
Location: United States
Thank you for registering your game
PostPosted: Sun, 26. Apr 09, 19:48    Post subject: Reply with quote Print

That sounds like an excellent idea. It woulds till require a lot of CPU power if you have huge numbers of ships all getting into OOS fights at once, but hopefully it won't be too much of a problem.

Back to top
View user's profile Send private message MSN Messenger
Gazz





Joined: 13 Jan 2006
Posts: 12424 on topic
Location: Bavaria
Thank you for registering your game
PostPosted: Sun, 26. Apr 09, 19:52    Post subject: Reply with quote Print

someone else wrote:
maybe you can implement a more CPU draining (and thus more realistic) OOS script used ONLY for combat involving Player owned ships OOS, and leave the crappy Egosoft scripts to run for the NPC-only battles that the player will never see.

That's actually a pretty good idea.


_________________
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.
Back to top
View user's profile Send private message Visit poster's website
enenra





Joined: 08 Apr 2005
Posts: 6158 on topic

Thank you for registering your game
PostPosted: Sun, 26. Apr 09, 20:49    Post subject: Reply with quote Print

Gazz wrote:
someone else wrote:
maybe you can implement a more CPU draining (and thus more realistic) OOS script used ONLY for combat involving Player owned ships OOS, and leave the crappy Egosoft scripts to run for the NPC-only battles that the player will never see.

That's actually a pretty good idea.

Though it would mean that the race military would still have no chance against Qs.

Maybe associate this new system also with certain ship types which are unbalanced in OOS combat?


_________________
Back to top
View user's profile Send private message
Gazz





Joined: 13 Jan 2006
Posts: 12424 on topic
Location: Bavaria
Thank you for registering your game
PostPosted: Sun, 26. Apr 09, 21:02    Post subject: Reply with quote Print

enenra wrote:
Though it would mean that the race military would still have no chance against Qs.

Neither do Qs have a chance against race military ships. =)

Qs got their bad rep only because them fighting against cap ships is a common and therefore well documented occurrence and a Q with a good damage spike is annoying when observed by the player. =)
I bet that other races' M7 play in the same league.


_________________
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.
Back to top
View user's profile Send private message Visit poster's website
Dumminion





Joined: 26 Apr 2009



PostPosted: Mon, 27. Apr 09, 01:50    Post subject: Reply with quote Print

Hi Gazz,

How about something like this?

Idea
damge*(1 till 30) //egosoft has factor (1 till 150)
//this saves average 75 circles to compute
*(1+(0,2*numberturrets)) //egosoft is factor 1 for each turret
=shipdamge

Idea
damge*(1 till 30)
*(1+(0,05*numberofgunsinturrets*numberturrets))
=shipdamge

Idea
(damge
+(tdamge*(0,05*numberofgunsinturrets*numberturrets)))*(1 till 30)
*sizeoftarget //sizeoftarget (0.05m5 0.15m4... 1.0m
//(sizeship*speedofship)
=shipdamge

Idea
turretdamge
*numberofgunsinturret
*sizeoftarget
=(tdamage*(1 till 10)
tdamage*numberofturrets=numberofattacks //4 turrets are 4 attacks

Back to top
View user's profile Send private message
Gazz





Joined: 13 Jan 2006
Posts: 12424 on topic
Location: Bavaria
Thank you for registering your game
PostPosted: Mon, 27. Apr 09, 11:19    Post subject: Reply with quote Print

Getting even remotely real damage values can be quite tricky...
Code:
500 * PSG:
501 $damage.factor = ( $Target.Size * 3200 + 62000 ) / 1996

Code:
536   *           Flamer
539   ||||if $Target.Distance>= 1150
540   *             Nearly no damage
541   ||||else if $Target.Distance>= 350
542   |||||$damage.factor = ( 1240 - $Target.Distance) / 15
543   ||||else
544   |||||$damage.factor = $Target.Distance/ 15
545   ||||end
546   |||end

This is a pretty close approximation of the multiplicator to apply to the "on paper" damage of PSG/Flamer.
I doubt this is quite usable for OOS. =)


_________________
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.
Back to top
View user's profile Send private message Visit poster's website
Fame





Joined: 16 Aug 2006
Posts: 30 on topic

Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 19:07    Post subject: Reply with quote Print

Quote:
maybe you can implement a more CPU draining (and thus more realistic) OOS script used ONLY for combat involving Player owned ships OOS, and leave the crappy Egosoft scripts to run for the NPC-only battles that the player will never see.


Using an table for firepower and shields in case it isn´t already in the game ( such as IS battle).

If there isn´t a person could make one. An example:

-Weapons

Impulse ray emiter, the most basic weapon, damage power 1.
Hept is 4X stronger, so damage power 4, and so on...

- Shields

1Mw shield can sustain an damage power of 1.
and so on...

- Distance

At a range of 1Km damage power with an Hept 4/1=4
At a range of 2Km damage power with an Hept 4/2=2

And so on for all class of weapons and shields.
If weapons power > shield = ship destroyed

If there are 2 fleets in battle a person could sum up the equation and subtract the ships that where destroyed.
And yes the firing rate could also be introduced, as any others.
The prob with this is, it requires heavy simulations in order to avoid strange outcomes.

I´m sorry if someone had already spoken of this.

Thanks

Back to top
View user's profile Send private message
wyvern11





Joined: 15 Jul 2006
Posts: 1702 on topic

Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 19:53    Post subject: Reply with quote Print

wow gazz, fine to see you on a thread like this Very Happy

too bad I only found this now.

using your fine logger-script and some elementary bash scripts I calculated some tables for OOS as it now occurs for the major ship classes

target was a hivequeen ship because of the immense shielding

http://home.arcor.de/mwein/repository/oos_ship_stats.ods

here is a view of the M6 page

http://home.arcor.de/mwein/repository/shot02.jpg

OOS in vanilla is extremely random and rather unlucky for ships larger than a corvette because even corvettes have a good chance for a crippling hit on a destroyer.

on the other hand it is over fast and it is symmetric (which it wouldn't be if player-oos-logic was different)

my opinion is Keep It Simple and Stupid:

- one should agree on a balanced table of weapon damages (we should make that one up from scratch probably, no firing rates perhaps)

- since there is no direction oos we should postulate that 2-3 turrets have the target in firing arc

- we should not put too much stress on range - those shooting further than 2K are long range, other short range

- base damage should be calculated as average over all guns in arc in range * no of guns in arc in range

- multiply a random, say 3-8

- get the initial table such high, that 3-5 average hits kill an opponent ship of same class

voila - a fast but not so random system for guns



EDIT : @enenra
there is no real unbalance in the ships if you do look over the fact that ships having fewer turrets suffer a lesser multiplicator from that side (see point 2 below).

the only inconsistencies in original oos damage dealing are :
- if only one ammo based weapon aboard lacks ammo, ship does not do any damage at all but hits 0 damagepoints (in fact thats the problem with most of the terrans in my tables)
- the damage of every mounted weapon is summed up, but it is multiplied by the number of turrets *again*

if you special balance some given ships at least some people will find their favorite craft outgunned / overpowered
-


{oversized image replaced by link - Carlo}


_________________
Redest du noch - oder denkst du schon ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3 ... 9, 10, 11  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Sat, 23. Jun 18, 19:51

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.14052 seconds, sql queries = 29