OOS combat - how SHOULD it work?

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

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

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

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

lets see if I understand correctly:

round : 30 sec

example :
M2
- heavy artillery -> primary attack, no CF ever,
- med artillery -> 20 sec CF - leaves 10 sec (1/3) for primary attack
- light lasers -> 30 sec CF - nothing left

- h. art. sum of all guns damage say 600k , hit prob say 20 % on a capship ---> expectancy 600k * 0,20 = 120k per round (half of this actually due to turret obstruction)
- m. art. sum of all damage 100k , hit prob say 50% on a capship, rest analog
- l.las analog

where does the randomization come in?

saw my structuring efforts above?
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, 22:26

A ship with 24 PPC (at 17 %) would have 190.000 DPS (shield damage)
Half that = 95.000

So 30 sec of fire are 2.8 GJ.

Hmm. Feels a bit on the high side (because it's one turn) but it's actually low for an in sector fight...
Very little can stand up to an angry M2 for even 30 seconds.

A one on one fight between M7 and M2 would practically always result in a win for the M2. And frankly - why not?

Randomisation would come in when the ship actually fires.
The setup phase only determines the base damage vs the generic target.
Since damage is already corrected for skill, the randomisation can always work the same way.
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
wyvern11
Posts: 1702
Joined: Sat, 15. Jul 06, 20:59
x3

Post by wyvern11 » Wed, 6. May 09, 22:55

aahh just the declaration phase - 2,8M is OK, this means combat is not much slower than regular oos but not so completely arbitrary

frigate size weapon : like 16 CIG , rate 33% (guessed) --> 16*9,8k*0,33/2 = 26k
makes 790k in a round

of course it would at least take a salvo before closing in

three to four frigates to a destroyer would stand a chance - looks like a good balance to me
just from the numbers.

EDIT: corvette size craft like 7-10 med lasers - roughly 400k - so bring 8-10 M6 if you are able to control and be prepared to lose 2-3

still a good balance


having a generic randomizer sounds good to me - no hassles that it disadvantages a given shiptype
Redest du noch - oder denkst du schon ?

semiliterate
Posts: 356
Joined: Sat, 13. Dec 08, 23:02

Post by semiliterate » Thu, 7. May 09, 00:50

can you sell this to Hasbro?

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

Post by wyvern11 » Fri, 8. May 09, 08:04

@ gazz

what are you up to?
everything discussed?

i'd like to lend a hand !!
Redest du noch - oder denkst du schon ?

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

Post by orion84 » Fri, 8. May 09, 09:21

Hahaha i kinda took a step back since it got all nitty gritty.

Using the time to learn scripting.

I bet Gazz went to his tower to ponder and actually create some rough lines. He'll be back.
***modified***

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

Post by wyvern11 » Fri, 8. May 09, 10:19

me bet too, but I wanna take part :(

gazz and create rough lines ?? - prepare to be flamed :lol:
Redest du noch - oder denkst du schon ?

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

Post by orion84 » Fri, 8. May 09, 10:54

wyvern11 wrote:prepare to be flamed
*Braces for impact*

I meant it like a rough draft. :D
***modified***

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

Post by Gazz » Fri, 8. May 09, 12:46

wyvern11 wrote:what are you up to?
everything discussed?
i'd like to lend a hand !!
There I was hoping someone else would do the actual work if kept quiet...
Awell.
I usually work 7 - 17:00 so most evenings I'm not good for much other than clowning around the forum.
I was planning for an alpha version sometime this weekend.

I guess I'll stay with the current system of simply rerouting the fire instruction to the logging script.
Except that now it has to do more than just log.

Technically it would be faster to stay in the main script but it's far easier to tie a library call into several scripts.
For instance, OWP may learn to actually use lasers OOS. What a novel concept!

Your armageddon experiment has proven that the additional script overhead won't instantly break the game and it is certainly a lot easier to write like that.


At least for now, I will also make this an add-on to MARS. All the extra laser data I need is already there, sorted, debugged, and ready to use.
It won't use any of the MARS scripts or logic - only the configuration data.

orion84 wrote:Hahaha i kinda took a step back since it got all nitty gritty.
Do not wield the math. Be the math!

orion84 wrote:I bet Gazz went to his tower to ponder and actually create some rough lines.
My code has been called unintelligible before. That was someone looking into the MARS laser evaluation, I think.
It's essentially one huge formula - not pages upon pages of if-thens that everyone can understand at a glance...
But one line of proper math can save a page full of if-thens and it's far harder to break a formula with an unusual object type or whatever.
And I have the occasional script that simultaneously runs three times on different tasks, doing different things, while keeping up a steady stream of communication with it's other incarnations.
Besides, it's easier to edit a script when all of it's incarnations are in the same physical file and can freely call each other's internal subroutines. Prevents needless redundancy which always creates more bugs and speeds up execution because it removes script-call overhead.

Every redundant parameter is naughty in my eyes.
It hurts to see a standard loop with While $Index > 0
where While $Index will suffice! =)
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
wyvern11
Posts: 1702
Joined: Sat, 15. Jul 06, 20:59
x3

Post by wyvern11 » Fri, 8. May 09, 13:37

You started the thread - you run it - so shut up and eat :lol:

No, who might risk the insolence to superpose the ***mighty gazz of scripting*** in his own frontyard :D

You see, no one....

besides, you already own the tables (or part of) via MARS. my hint on a structure has not really been discussed yet (and it was more an attempt to channellize the discussion)
Gazz wrote: I guess I'll stay with the current system of simply rerouting the fire instruction to the logging script.
Except that now it has to do more than just log.

Technically it would be faster to stay in the main script but it's far easier to tie a library call into several scripts.
For instance, OWP may learn to actually use lasers OOS. What a novel concept!
I think this a sound and sensible decision. feel free to ask for any help you might or migh not need

I'll offer a check for distribution of N random(100) calls, N > 10E6.

anything else ?

If you care, I offer a shot on the proper randomization and the evade-values as well


While $Index > 0 ...
actually i like it better that way ... :wink:
Redest du noch - oder denkst du schon ?

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

Post by orion84 » Fri, 8. May 09, 13:39

I'm getting stumped from the resources, and like you Gazz i pull a 8-6 pm shift...

I'll do some work when i learn how to script. From the way you talk code seems easy enough. Then of course its different when you actually do it. PLUS the constant dilemma of testing your script to actually playing...

I haven't got my HQ yet! and the hub is killing me. So teehee.

On the bright side, if the script can be as streamlined as you say, ES might pick up on this, i gotta good feeling about it.

Although i might recommend making this indifferent to mars as people are indifferent to that as well. Kinda like the cure for cancer but you gotta give up your left arm. Mixed emotions about that lol.

I know, give wyvern an assignment. For now im just a cheerleader in the background!
***modified***

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

Post by Gazz » Fri, 8. May 09, 14:01

wyvern11 wrote:I think this a sound and sensible decision. feel free to ask for any help you might or migh not need

I'll offer a check for distribution of N random(100) calls, N > 10E6.
Don't worry, there will be lots of testing required. Many pretty numbers! =)
If you care, I offer a shot on the proper randomization and the evade-values as well
Sure thing.

So far I'm thinking of something terribly simple like
$Rand = random number from 75 to 125
$Damage = ( $Damage * $Rand ) / 100

This may be too timid compared to the current system or too much so it makes the skill system pointless...
It's also no normal distribution, no pretty bell curve... but I doubt anyone would actually notice the difference...
I haven't thought about it, yet.


For the evade system: I haven't thought about that, either.
It's some blurry idea like:
faster than average (what is average?) top speed, somewhat (how somewhat?) harder to hit.

Morale/Aggression stats exist for pilots but not for the player so it would be hard to use them at all. They are are something for IS fight scripts.

Getting ship size OOS is possible (calling one of my libraries) but getting top speed is only one script instruction and therefore much faster.
The get.size library always saves ship size on the object so it's never called twice.
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.

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

Post by MutantDwarf » Fri, 8. May 09, 15:55

Get size of... doesn't work Out of Sector? That's unfortunate. Of course, you could make it three function calls - spawn a copy of the ship in-sector, Get size of... it, then destroy it - but one function call is better for the most part. Or you could insert a ship's size as a local variable during initialization - I'd think reading that would take about the same amount of processing power as Get Max Speed, though that would require extra memory.

A random damage distribution between 75% and 125% of average shouldn't be too bad even if uniform. It's when you've got between 0% and 200% (or between no damage and full average damage, with no progression upwards) that it's a problem.

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

Post by Gazz » Fri, 8. May 09, 16:17

MutantDwarf wrote:Get size of... doesn't work Out of Sector? That's unfortunate.
I already have a library for that. Calling another script just means a lot more organisational overhead than one line.
It's when you've got between 0% and 200% (or between no damage and full average damage, with no progression upwards) that it's a problem.
Yah, that would be uhh... dumb?
Right now we have something like 3% - 400%.

orion84 wrote:Although i might recommend making this indifferent to mars as people are indifferent to that as well. Kinda like the cure for cancer but you gotta give up your left arm. Mixed emotions about that lol.
I said "for now".
Let's just assume that I can write a script that reads values from a text file if I want to.
For any scripting / testing this I'll use the ones I already have.
Last edited by Gazz on Fri, 8. May 09, 16:27, 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.

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

Post by wyvern11 » Fri, 8. May 09, 16:23

for the evade:

we know that victim skill should play some role (like attacker skill somewhat like 0-10%, maybe a bit better - "the force is stron in this one"-like)

target size does play a role, but do we need it full blown or is ist sufficient to know
- fighter size
- corvette/hauler size
- frigate size or larger

how does speed affect "evade"? does it help do be fast on the straights not to be grilled? what classifications do exist ? does one use sqrt(speed) like gazz said?

nimbleness seems easy to classify
the most nimble M6 turns 24 and almost every fighter turns faster than 26 - looks like two classes. this will maybe outbalance some M4s and most M5s, but they are not decisive anyway. maybe add a class for turn rates below 2 instead (M1, M2 and TL's)
Redest du noch - oder denkst du schon ?

Post Reply

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