[MD][AP] Advanced Opponent Balancing System v1.02 (10/09/12)

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

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth »

Fight Rank 20 is only 1.6% of the max combat rank. If you start spawning m1s and m2s there you don't leave a lot of room to expand.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Fight Rank 20 is only 1.6% of the max combat rank.


20 is 67% of 30, right?


If you start spawning m1s and m2s there you don't leave a lot of room to expand.


Fight Rank is another problem. The maximum is 30, but it is impossible to stay at 30 while playing other parts of the game, because the game slowly reduces fight rank when you are not fighting (*sigh*).

I am not sure what to do about that. Fight Ranks under 20 work OK AFAIK, but ranks *between* 20 and 30 are unreliable.

I suggest treating 20 as "approximately equal to 30" when doing your fleet calculations.

And, yes, at my level, I need M1/M2's to have any sort of challenge at all.

The above is another reason why I think that the player's entire fleet is a better indicator of his strength than anything else (including fight rank). To base response strength largely on fight rank is easy and it sounds like a good idea, but it does not work out correctly in the actual game.
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus »

DrBullwinkle wrote:20 is 67% of 30, right?
The rank progression in X is non-linear. For reference see the fight rank table in this FAQ article.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Yep, got it.



The more important issue is that there is a limit to how strong the enemies can be. Yes, rank 20 needs M1/M2. What to do about rank 30? That's a harder question. Maybe more missile-spamming bombers and M7M's?

Scaling combat is a difficult problem if the player has access to all of the ships and weapons that the enemies have. For example, a cure for the high-end limitation could be stronger ships, like a super-duper M0. But, if the player can also fly such a ship, then the enemies lose the advantage.

Kha'ak capital ships are like that in TC. They cannot be bought, captured, or boarded in the vanilla game. If they were also more powerful, then they would be perfect for the role!

An alternative could be weapons that are nerfed for the player. You know how there are two different System Override Software wares? One for plain SOS, and the other is automatically swapped in if Software Signature Scrambler is installed? Maybe we could have duplicate weapons like that... or even duplicate ships. With a script that swaps them for the player?

I know that is beyond the scope of OBS, but it is a possible way to address the issue of limited enemy strength that does affect OBS.
.
morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth »

The thing is, the opposition also follows an exponential curve; fight rank 20 only spawns a fleet about 6.8% the strength of flight rank 30. If you make rank 20 spawn m2s then rank 30 is going to be... excessive. Especially using the fleet code, as that increases the cost.

The m7m thing is planned, listed as a todo in the comments. I just have to look into the files more to figure out if SRST has an argument for subtypes or not.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

morbideth wrote:The thing is, the opposition also follows an exponential curve; fight rank 20 only spawns a fleet about 6.8% the strength of flight rank 30. If you make rank 20 spawn m2s then rank 30 is going to be... excessive. Especially using the fleet code, as that increases the cost.
OK, that is a clue to how to alter the calculation.

You said it yourself: It is not easy to balance OBS for all purposes. I am fairly certain that an external multiplier factor (that the player can adjust) is the only way to make it work for a broad audience. Like most other games, there should be different combat difficulties that the player can choose: Novice, Regular, Hardcore, Insanity (at least).

However, that is almost a separate topic from the fleet calculation. If you help me to understand what you are doing with it, then I will be better able to help you to fine-tune it. A few comments would help, if you feel like adding them.


The m7m thing is planned, listed as a todo in the comments. I just have to look into the files more to figure out if SRST has an argument for subtypes or not.


Yeah, I saw that. If SRST does not allow you to specify M7Ms, then some alternatives are:

1) Use bombers. (That's the quick-and-easy way). Two bombers are as dangerous as one M7M.

2) Don't use SRST -- just hard code the ship type, or make your own selection of M7M by race. (More effort but gives you full control).

3) Forget specifying M7M's. You don't need to do that anyway. Let SRST pick the M7's, and some percentage of them will be M7M's, right? (No effort but more random behavior).



One problem with bombers and M7M's is that Xenon do not have them. You might want to do something about that, such as let them use other-race bombers and/or missile frigates. (Possibly the same for Pirates and Kha'ak, in case the player has a mod that allows them.).
.
morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth »

DrBullwinkle wrote: OK, that is a clue to how to alter the calculation.

You said it yourself: It is not easy to balance OBS for all purposes. I am fairly certain that an external multiplier factor (that the player can adjust) is the only way to make it work for a broad audience. Like most other games, there should be different combat difficulties that the player can choose: Novice, Regular, Hardcore, Insanity (at least).
Adding a linear multiplier to a nonlinear function is not really a good idea, it would result in odd behavior. At your rank a 7x multiplier and a very hard mission would spawn 2 carriers, or 3 m2s, at mine the opposition would exceed the combined power of every ship I own. (Vanilla ship selection).
DrBullwinkle wrote:
However, that is almost a separate topic from the fleet calculation. If you help me to understand what you are doing with it, then I will be better able to help you to fine-tune it. A few comments would help, if you feel like adding them.


I honestly do not know what you mean. Other than the insane flow of control, I think it is pretty clear just going by variable names?

DrBullwinkle wrote: Yeah, I saw that. If SRST does not allow you to specify M7Ms, then some alternatives are:

1) Use bombers. (That's the quick-and-easy way). Two bombers are as dangerous as one M7M.

2) Don't use SRST -- just hard code the ship type, or make your own selection of M7M by race. (More effort but gives you full control).

3) Forget specifying M7M's. You don't need to do that anyway. Let SRST pick the M7's, and some percentage of them will be M7M's, right? (No effort but more random behavior).
1. There are bomber wings, but there are also bomber groups which have, or should have M7Ms. But that may be a work around for races that do not have M7Ms but do have M8s.

2. Absolutely not, that is reinventing the wheel. Edit SRST, maybe, write my own... that is way too much work.

3. I kind of feel that I do need that. And at the moment, no the OBS doesn't look like it will spawn M7Ms, ever.
DrBullwinkle wrote: One problem with bombers and M7M's is that Xenon do not have them. You might want to do something about that, such as let them use other-race bombers and/or missile frigates. (Possibly the same for Pirates and Kha'ak, in case the player has a mod that allows them.).
.
Not a choice I am willing to make for the player. Maybe if I ever do some customization options, but not by default.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

morbideth wrote:
DrBullwinkle wrote: OK, that is a clue to how to alter the calculation.
Adding a linear multiplier to a nonlinear function is not really a good idea, it would result in odd behavior.


Of course. "Clue" <> "do it linearly". :)

DrBullwinkle wrote:A few comments would help, if you feel like adding them.


I honestly do not know what you mean. Other than the insane flow of control, I think it is pretty clear just going by variable names?


Other than that, yeah. :)

You have spent more time looking at the fleet code than I have. I see multiple paths through the cues, although it is not entirely clear which path is for what (insane flow control, as you say). I will probably figure it out eventually... I'm just saying that you could speed the process if you feel like it. If not, that's cool, too.

You documented your work in v1.00, for example.


Edit SRST, maybe, write my own... that is way too much work.


Sure, editing SRST is a fine approach.

I don't think it would be as hard to roll your own as you think; just the MD equivalent of a "Do Case" statement or half a dozen "If/Then's". It would not need all of the sophistication of SRST. But I haven't tried it, either, so I could be wrong. :)


[Xenon M8's and M7M's:] Not a choice I am willing to make for the player. Maybe if I ever do some customization options, but not by default.
Sure, suit yourself. I'm just brainstorming ideas with you about how to deal with the game's limited top-end of combat challenge.

Customization options = :thumb_up:

.
morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth »

Don't suppose you know how to get the game to reload the constants file without changing the version number or resetting the mission director?
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

I don't, but someone else might. What are you trying to do?

Can you do what you want by using a language file in the t folder?:

Code: Select all

<load_text fileid="1234"/>


Then, instead of a variable use:

Code: Select all

textid="567"
dillpickle
Posts: 1159
Joined: Mon, 3. Nov 08, 14:25
x3tc

Post by dillpickle »

Code: Select all

<reset_cue cue="constants">
:)
morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth »

dillpickle wrote:

Code: Select all

<reset_cue cue="constants">
:)
Doesn't seem to work if I do not change the version number. It is why I am asking, and something I do not understand. Maybe I need to destroy the cue then reset it...
dillpickle
Posts: 1159
Joined: Mon, 3. Nov 08, 14:25
x3tc

Post by dillpickle »

This is what I did:
  • Open constants.xml
  • Changed:

Code: Select all

<set_value name="Constant {lookup.class@m5} Points" exact="1"/>
  • To:

Code: Select all

<set_value name="Constant {lookup.class@m5} Points" exact="10000"/>
  • Saved, and closed the file, nothing else changed.
  • I then used this:

Code: Select all

<cue name="ConstantReset">
  <action>
    <do_all>
      <incoming_message author="Debug" text="{value@Constant {lookup.class@m5} Points}"/>
      <reset_cue cue="constants"/>
    </do_all>
  </action>
  <cues>
    <cue name="ConstantsCheck">
      <condition>
        <cue_is_complete cue="ConstantReset"/>
      </condition>
      <timing>
        <time exact="2s"/>
      </timing>
      <action>
        <incoming_message author="Debug" text="{value@Constant {lookup.class@m5} Points}"/>
      </action>
    </cue>
  </cues>
</cue>
  • First message returns 1
  • Second message returns 10000
Conclusion, constants has been successfully changed.
morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth »

Hmm I did something like that and it didn't work. Maybe I had a typo or something somewhere. Guess I should have tried more than once. Thanks for the assist.

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