OOS combat - how SHOULD it work?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
wyvern11
Posts: 1702
Joined: Sat, 15. Jul 06, 20:59
x3

Post by wyvern11 » Wed, 6. May 09, 12:25

Some handicap/advantage, yes, but rather in the 10-40% range overall.
agreed, 40% is already a decisive advantage
will the PC "devote" involved ships to combat regardless of new data/information brought through scanners? Will this affect playerships only or NPC ships (reverse the scenario, you jump in the M7 for fire support)
rather not - new combat situation should at best influence next combat round (is in-character too : sir - we have a new battle-group on the screens !! sh** ... <hard-thinking-taking-at-least-some-seconds-begins>
get squad 5 to cover our flank !!)


EDIT
I'm pretty sure OOS laser switching does not happen at all. (right now)
I'm not convinced there is a need for that, either.
There is at least evidence, that IS loadout is different from OOS loadout - I know you know, but ...
Last edited by wyvern11 on Wed, 6. May 09, 12:28, edited 1 time in total.
Redest du noch - oder denkst du schon ?

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Wed, 6. May 09, 12:27

Those 40 % are just a meaningless number I pulled out of my hat.
It's far too early to attach any values to rules that don't even exist. =P

wyvern11 wrote:rather not - new combat situation should at best influence next combat round (is in-character too : sir - we have a new battle-group on the screens !! sh** ... <hard-thinking-taking-at-least-some-seconds-begins>
get squad 5 to cover our flank !!)
Ongoing ship-ship fights would not change instantly. It may influence things like targets of opportunity or the likes.
Last edited by Gazz on Wed, 6. May 09, 12:28, 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.

orion84
Posts: 162
Joined: Thu, 30. Apr 09, 16:14
x4

Post by orion84 » Wed, 6. May 09, 12:28

Sorry you misunderstood me. When I said "fix" i meant the ship would "point" their guns on selected target. Using current loadout of weapons installed in turrets/cockpit (disregarding any in cargo bay unless a spin-off of MARS will be introduced into this) will be set to fire upon said target once in effective combat range. :)
***modified***

User avatar
wyvern11
Posts: 1702
Joined: Sat, 15. Jul 06, 20:59
x3

Post by wyvern11 » Wed, 6. May 09, 13:09

numbers pulled out of the hat are OK

one could set up a subcommitee to recalculate this hat-number and after 3 weeks of 24h discussions they would druidize 39,856

for a balancing start 40 % works as well as 30%

imho one has to have some agreed housenumbers in mind to set up agreeable rules
Redest du noch - oder denkst du schon ?

orion84
Posts: 162
Joined: Thu, 30. Apr 09, 16:14
x4

Post by orion84 » Wed, 6. May 09, 13:43

Gazz wrote:The only tricky bits I forsee are if the player doesn't want to fight a particular OOS fight. =)
Or if the player decides to reinforce his side too. :)
wyvern11 wrote:imho one has to have some agreed housenumbers in mind to set up agreeable rules
Back in college, final versions of programs we made were a vague selmblance to what rules we initially agreed to set to work around.

The only things that really did stick was the concept and the end purpose/objective. I think the best way is just to implement a crude structure first, then test out what's reasonable and what's not.

This is how i see this project to pan out:

1. A combat "arena" or errata or process will be made first. Kinks in it (primarily simple ship to ship scenarios) will be ironed out.

2. Once a satisfactory script structure is achieved then the introduction of various what-ifs will be played out to stress limitations of the script. (probably common scenarios at first) more revisions will follow. Perhaps even adjustments to current rules and parameters.

The rest will follow when we get there. 8)
***modified***

orion84
Posts: 162
Joined: Thu, 30. Apr 09, 16:14
x4

Post by orion84 » Wed, 6. May 09, 14:06

As far as i can see two tables exist. (correct me if its n00b)

An array consists of only 2 columns correct? ID and value?

1 table sets parameters for ship classes with values pertaining to following indexes:
-Life value(hull/shield)
-Threat value (for preemptive counterfire aka fire selection/targeting)

Broken down by class? Or generalized? Fighters/big ships/Huge ships... Will the engine call the table when combatants are introduced? Or will the engine generate/construct the table based on what's introduced into scanner range?

--

1 table sets parameters for weapons systems with values pertaining to following:
-Size value (S-M-L)
-Damage value
-Instances value (how many strikes/salvos/etc)

I'm trying to summarize whats agreed upon already but its quite hard as when we agree on something, someone poses a new idea which could change things.

But since Gazz is spear-heading this endeavor, i put in what he wants so far.
***modified***

Dumminion
Posts: 38
Joined: Sun, 26. Apr 09, 22:22

Post by Dumminion » Wed, 6. May 09, 15:33

Adding wares requires a mod and that's always messy.

IS, the kind of Fight Software on board makes no difference whatsoever on how AI ships fight so I would not want to base any performance on it.
Besides, what would be the point? The player would just buy all those softwares and have perfect ships.
That would be an advantage solely for the player.
Is it possible to bind a variable for experience or rank and for combat computers or pilots?
Maybe by the ships name? (nova.m3*rank:sergeant.xp1233.cpu3)
I would like to pay for good pilots or combat computers.
No.
It's not possible to detect SETA with certainty.
And how do you lose combat rating with SETA? :P
It's not.
The turrets turn towards the missile and only fire after they have the missile "in sight".
Not the least bit of cheating is involved.
Are you making fun of me?
If it's no cheat why doesn't M.A.R.S get signed for a Bonus pack?
Do you really think it is ok when mars defends all missiles and makes all M7 and M8 obsolete?
Mars does alot more damage and defence, then what was supposed to be done.
It does.
AI capital ships always switch weapons in a way similiar to MARS so this is simply how X3 is designed. It's not my invention.
Yes computer AIs "cheat" cause they are to weak. But this is balanced by design.
For example missiles and fast pirat ships became to weak.

orion84
Posts: 162
Joined: Thu, 30. Apr 09, 16:14
x4

Post by orion84 » Wed, 6. May 09, 16:09

Is it possible to bind a variable for experience or rank and for combat computers or pilots?
Maybe by the ships name? (nova.m3*rank:sergeant.xp1233.cpu3)
I would like to pay for good pilots or combat computers.
As Gazz mentioned, there's a script for ai pilots called CODEA. I've been reading through it for the past half hour and looks awesome. :)

I think the issue of fighter rank affecting player ships is for the purpose of introducing a handicap to add realism to combat. E.g. Bravado. I don't think Gazz wants to make it something that can be bought at EQ docks but something integrated in the proposed combat system. :) Again, check the Codea Weapon System. Very nice (in a Borat tone)
Yes computer AIs "cheat" cause they are to weak. But this is balanced by design.
For example missiles and fast pirat ships became to weak.
I was holding out on it but since you opened the topic.. After this ambitious project is successful i'll see if i can start working on another one to modify this balance. (teaser intended)

In my experience, AI will never be as good as human intellect, only inferior or superior. All the devs can do for this game is to try and keep up with the human player, or set predefined obstacles and challenges to give the players milestones and rewards. :)
***modified***

User avatar
wyvern11
Posts: 1702
Joined: Sat, 15. Jul 06, 20:59
x3

Post by wyvern11 » Wed, 6. May 09, 16:42

A first essay on a rulebook-structure for a regular (non-counter-preemptive) salvo (though CP-salvo might use parts of same logic

I'll break it down in functions or subscripts as I would do it for a script (not too experienced a X3-coder, but not too bad in RL (sysadmin))


section null :

- every info array should sport precalculated values (and be as short as possible?)

EDIT :

- since probabilities given in percent are used, calculation type should probably be multiplication ( overall = base_value (e.g 60%)* modifier (e.g. 125 %) = 75%

section one : get opponent info

- if possible no looking up of ship info except probably weapons array

1. get.victim.info(victim-ship)
+ depending on shiptype OR shipclass OR objectclass OR some classification of rudder-effectivity --> base evade probability
+ depending on fight skill AND maybe morale/aggression --> evade prob. modifier

------> return overall evade probability

2. get.attacker.info(victim-ship,attacker-ship)
+ depending on **victim-ship** shiptype OR shipclass OR objectclass OR some classification of rudder-effectivity --> base to hit probability
+ depending on fight skill AND maybe morale/aggression --> to hit prob. modifier 1
+ classify weapon-array in range-classes OR "recipient"-classes
+ depending on **victim-ship** and range-class OR "recipient"-class --> per class : to hit prob. modifier 2 OR to hit prob. modifier 2 for most likely to hit OR /most damaging range/rec-class

------> return overall to hit probability


section two : salvo outcome

3. decide.outcome.of.salvo (possibly per range- OR recipient-class)
+ roll random against "to hit" - "to evade"
+ regardless of evade chance should say 98,99,100 allways hit (dumb luck)
+ regardless of evade chance should say 01,02,03 allways fail (bitter fate)

------> return boolean

4. calculate.victim.damage (possibly per range- OR recipient-class)
+ somehow calculate weapon damage from predef. (per weapon OR weapon class) table
+ subtract it from victim



feel free to comment / add-to / laugh-about / tear-apart / compliment /
Redest du noch - oder denkst du schon ?

MutantDwarf
Posts: 682
Joined: Tue, 20. Jun 06, 02:29
x4

Post by MutantDwarf » Wed, 6. May 09, 17:19

Remember that these are thirty second combat rounds. It's extremely unlikely that two ships attacking each other will always miss during a full combat round. Thus, I would combine the to-hit probability with the weapon damage calculation - thus calculating the number of shots that actually hit rather than just assigning full damage (or some set percentage of full damage).

If you look up a bit, you'll note I already went through the trouble of figuring out a basic number of shots that hit calculation. It doesn't include pilot skill, but that's an easy thing to modify - just alter the target number for the to-hit calculation accordingly. You don't even really need to have seperate calculations for each laser if you want to be really crude - you could easily take average values for everything in order to make an 'average Huge laser' statistic or whatever.

If we can, I'd make it so the ship's position in the combat round is determined by pilot skill. I have a feeling that altering when ships go in the combat round might be a little too complicated, however.

I also very much disagree on using a straight 1-100 percentage chance. A uniform distribution is a terrible idea - you'd just be perpetuating the highly random out of sector combat that we already have. Try to get a normal distribution - that's why I advocate using 3d6, which can be calculated through a single 1-216 random number call and a lookup table if you think three 1-6 random number calls are too complex. For more graduation, you could make it three 1-10 or 1-20 numbers, but then you'll need to recalculate all of the modifiers (RoF, Hnd, Acc, SM) to fit that distribution - using 3d6 and the %Hits calculation I specified means we can steal twenty-plus years of work on GURPS to get decent figures for those things.

User avatar
wyvern11
Posts: 1702
Joined: Sat, 15. Jul 06, 20:59
x3

Post by wyvern11 » Wed, 6. May 09, 17:42

nothing was said about the actual design of the evade/to hit tables or rules
my point was just to get a strructure using in-variables and getting out-results:

in-variables -----(magic)-----> out-results

since i only covered primary salvo it is likely that the victim is of roughly same ship class (which will probably lead to a solid chance of a hit). scratching a scout from a capship will see a different chance - but this would be counter-strike

as to percentage : one can either transform the distribution or transform the tables - result should be the same.
to my knowledge actual damage is definitely no uniform distro and for my part i didn't try, if
random(100) is really uniform
Redest du noch - oder denkst du schon ?

Dumminion
Posts: 38
Joined: Sun, 26. Apr 09, 22:22

Post by Dumminion » Wed, 6. May 09, 18:01

I also very much disagree on using a straight 1-100 percentage chance. A uniform distribution is a terrible idea - you'd just be perpetuating the highly random out of sector combat that we already have. Try to get a normal distribution - that's why I advocate using 3d6, which can be calculated through a single 1-216 random number call and a lookup table if you think three 1-6 random number calls are too complex. For more graduation, you could make it three 1-10 or 1-20 numbers, but then you'll need to recalculate all of the modifiers (RoF, Hnd, Acc, SM) to fit that distribution - using 3d6 and the %Hits calculation I specified means we can steal twenty-plus years of work on GURPS to get decent figures for those things.
Don't mind about things like this.
Computers work diffrent and 3d6 just unnecessary cost cpu power.
It will be 100% or something like 0to255.
3d6 for example is just 18 * 5.5556% = 100%


Also read this:
Heh, no worries.
The THAC0 is just an arbitrary term for "very much simplified combat result generation system".
I didn't quite intend for players to roll d4, d6, d8, d12, and d20 and enter these values into the script. =P
If I use a system it will have a resolution of at least 0-100 because that should be sufficient accuracy and it's easy to relate to.
But those are technical details.

MutantDwarf
Posts: 682
Joined: Tue, 20. Jun 06, 02:29
x4

Post by MutantDwarf » Wed, 6. May 09, 19:14

Dumminion: Wrong. 3d6 is in no way, shape, a uniform distribution.

A uniform distribution is when each outcome in the distribution has the exact same chance of happening as every other outcome. If you use a distribution of 1-100, each number (1, 100, 87, what have you) has a 1% chance of occuring. When applied to something like this, that means extreme results are very likely to occur compared with a more realistic distribution. Over time, those extreme results will balance out - but if you use a uniform distribution, there's a much greater chance of, say, an M4 blowing away your Boreas by its lonesome.

A normal distribution is different. It places much more weight on the expected outcome - so you won't see extreme outcomes nearly as often.

And no, 3d6 isn't different on computers than it is in real life. It's not a straight Random(3,18) call - it's Random(1,6)+Random(1,6)+Random(1,6). There are 216 different possible outcomes to those rolls, but when added together they yield a distribution between 3 and 18 that's roughly normal.

And yes, Gazz might want to use 0-100 (really should be 1-100 if you use a percentile method at all, though) because it's simpler, but there's very little reason to and what Gazz speaks isn't the gospel truth to end all truths. A normal distribution might be more difficult to relate to, but since this is all going to be operating under the hood that shouldn't matter.

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Wed, 6. May 09, 21:26

Maybe I should start at the beginning.

In the beginning Gazz created the ship setup script.
And the script was without form, and void and null was upon the return array.
And the Spirit of Gazz moved upon the face of the editor.
And Gazz said, Let there be lines: and there was lines.

Sooo... what would these lines do?
Before any kind of fighting can commence, the ships need weapons.

I'll divide them into the 3 afforementioned classes. I gave the 30+ laser class system a second thought but in the end it would do the exact same thing. Whether a laser acts as a medium laser because of it's firepower and bullet speed or because of being lumped into the medium laser pool... what exactly is the difference between a laser and itself?

Counterfire
A ship can use counterfire with anything but it's highest laser class.
M2 can therefore CF with medium and light lasers.

CF expenditure (in seconds of fire) is recorded and any unused CF allowances are poured in with the main batteries.

Turrets
Turrets do not exist OOS. (it's a mantra, really!)
All lasers are dumped into the three pools and the CF mechanics simulate any turrety behaviour.

Laser class: heavy
Any laser with
( Shield.DPS > 22000 OR Hull.DPS > 8000 ) AND Range > 4500

Laser class: light
Bullet.speed > 580
(I'd like it higher but that would exclude EMP)

Laser class: medium
Anything else.

Laser class basic stats for each ship
These stats will be used "for the duration".
They might get updated at yet undefined intervals or events.

For every laser class, DPS is added up and the hit probability on a generic target of "it's" class computed.
The light laser battery of a Flak equipped ship would be higher than if it was using HEPT.

Later on, ships can get a simple avoidance bonus based on their speed.

DPS is halved because it's unlikely that a ship can fire 100 % of it's lasers on one target.

Hit percentage:
Based on my Reunion tests a 290 bullet had a 25 % chance to hit a (100m/s) fighter, a speed 515 laser had a 48 % chance.
(2500-5700 samples =)

TC fighters are faster on average so hit % could be SQR(Bullet.Speed).
It's a bit coarse but it scales very well.

The Hit % would then simply be multiplied with the (half) DPS of that laser type and this expected DPS be added to the laser class.
This way a laser class can get a simple damage bonus when firing at a bigger target.

Pilot (?) and Player (0-30) skill is factored in here.
(the Numeric Race Ranks script displays the exact rank numbers that will be used so it may help with the explanation)
Let's assume pilots scale 0-30 as well. (or I'll make them!)

Boni I can imagine are
Laser.Range:
+ rank / 2 % (15% max)
This is a cheap way to give the better pilot a better chance on the first shot.
Other than that it won't do anything useful.

Hit percentage:
Hit percent can not increase much without making everything else useful.
I'd say
rank 0 - 16, +1% / 4 fight ranks (4)
rank 19 - 25, +1% / 3 fight ranks (3)
rank 27 - 29, +1% / 2 fight ranks (2)
rank 30, +1% (1)
Total (+10 %)

This increases PPC hit % from 17 to 27 % (by 58 %) which sounds sick - but keep in mind that AI pilots have fight skill, too. =)

Critical hits:
The hit does more damage and/or destroys a random weapon or (rare) shield.
Equipment destruction sounds fun - until you have to reequip 10 patrol ships every hour.
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.

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Wed, 6. May 09, 22:09

A possible spin off of the counterfire (registering) system:

The old (and extremely useful) Navigation Override System had one major problem and that was finding out about attackers before they would fire at the ship.

Assuming the CF system is in place, a freighter would know what fighters are heading it's way before they got into laser range.
I mean if you were in the sector, you would immediately see what's happening but a script needs rules.
So as long as those attackers are in scanner range, the freighter captain would be allowed to "spot" the red blips beelining for his ship...
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.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”