[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: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

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

Post by morbideth » Wed, 22. Aug 12, 16:39

The Opponent Balancing System is responsible for determining what opposition you face during missions.

The current system uses a fixed range, giving it a relatively low upper limit on what you will face even at the highest combat rank.

This mod changes that by taking into account the player's fleet in the sector. If you are stronger than what the normal OBS would spawn, you get stronger opposition. If you are weaker, no change is made. This provides the best of both world, giving you casual missions if you want them, and big battles should you prefer those.

ImageDownload v1.02

Install as a fake patch in the addon folder, or by placing in the mods folder and selecting it from the launch screen.

Changelog:
v1.02
  • Fixed a bug causing less opposition if the player was weaker than what the mission would normally spawn.
  • First pass on improving opposition fleet composition. Feedback is requested: too hard? too easy? just right?
  • Added some randomness to the players fleet strength calculation.
  • NOTE: You may have to reset the mission director cues if you are updating. Esc->Gameplay->Mission Director->Reset Cues
  • WARNING: The changes to fleet composition significantly increases the difficulty at higher ranks, and this affects all missions. It is recommended that you install this as a mod package so you can turn it off and lick your wounds.
  • Note: For large fleets there will be a significant delay between accepting a mission, and objective updating, due to the time it takes to create the fleet. The longer the delay, the more devout your prayers should become.
v1.00 Initial Release


Old Versions:
ImageDownload v1.0

TODO:
Improve fleet organization, placement, and naming.
XRM version?
World domination
Customization options and/or more dynamic opposition based on ?
Last edited by morbideth on Tue, 9. Oct 12, 21:50, edited 3 times in total.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Mon, 8. Oct 12, 20:41

I've been meaning to ask what it would take to consider the player's entire fleet strength, rather than just the in-sector fleet?

The player could have a fleet of capital ships, but if they accept a mission while flying a TP or scout, then OBS creates a very weak opponent. In that case, the opponent should be strong enough to require the player to call for reinforcements.

When I look at your changes, I cannot figure out how you filter by sector. But, then, I am weak at reading MD code.

BTW, this is a great idea. OBS could use some tune-ups to improve combat challenge. Thanks for doing this!

User avatar
joelR
Posts: 1996
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Mon, 8. Oct 12, 21:53

DrBullwinkle wrote:BTW, this is a great idea. OBS could use some tune-ups to improve combat challenge. Thanks for doing this!
Agreed. Good work morbideath. We need more mission related stuff for AP.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Post by morbideth » Mon, 8. Oct 12, 23:59

DrBullwinkle wrote:I've been meaning to ask what it would take to consider the player's entire fleet strength, rather than just the in-sector fleet?

The player could have a fleet of capital ships, but if they accept a mission while flying a TP or scout, then OBS creates a very weak opponent. In that case, the opponent should be strong enough to require the player to call for reinforcements.

When I look at your changes, I cannot figure out how you filter by sector. But, then, I am weak at reading MD code.

BTW, this is a great idea. OBS could use some tune-ups to improve combat challenge. Thanks for doing this!
The problem comes in with... well do you want every single fight to be tooth and nail? And what about sector defense fleets? Do those get included in the scale or not? It is kind of a hard thing to get both the challenging/fun mission and the "I just need cash" mission all in one file.

I may do something with impossible mission difficulty so that when you take an impossible mission, it reeeaaaaaly means it.

Maybe even something that spans more than one sector simultaneously for the high combat ranks.

First I want to fix the fleet composition, but that is proving to be a pain. The flow of control in MD makes my brain cry.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 9. Oct 12, 00:06

Yeah, I was really trying to start a conversation about "how" to do it. Mostly because I have been dabbling with OBS for a while, and want to learn/share more.

One way to deal with the intensity level is a random choice between Vanilla, Sector Fleet, and Universe Fleet. Add to that a random multiplier, and I think you could achieve a good spread pretty easily.

Another idea that I had was to include a multiplier that reads from a t file (or, better but more difficult, a command menu). 1x = Vanilla, 2x = Regular, 5x = Hardcore, 10x = Insanity. Something along those lines; give people an option about combat difficulty.

What do you mean by "fix the fleet composition"?
Last edited by DrBullwinkle on Tue, 9. Oct 12, 08:42, edited 1 time in total.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Post by morbideth » Tue, 9. Oct 12, 04:10

I saw someone mention a way to interact between MD and scripts, however they didn't go into details, so I don't know how to do that. If I could it would make things a lot easier. Then I would be able to customize it and not be limited to a one size fits all MD file.

By fleet composition I mean change how OBS spends its points. Right now it just loops buying the biggest ship it can afford. You end up with carriers with like 3 m5s protecting them. In my mind, that isn't right. I want to change it so you get fleets. Carriers protected by m2s and wings, actual wings, of fighters, with frigates supporting the m2, and m6s supporting the frigates. That alone would make things a lot more challenging as well as fun.

There is a lot that could be done to improve things. I just wish MD was easier to work with.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 9. Oct 12, 04:54

MD can call an SE script, but not vice-versa. So the trick is to communicate from SE to MD, which can be done by creating objects which MD can detect. Create one object in SE; trigger a cue in MD. Create a different object in SE to trigger a different cue in MD. Perhaps more information can be communicated, such as the name of the object which could pass a string.

The objects are created far from the trade lanes or, perhaps, in a special sector created just for this task.

MD Control by h2o.Ava is an entire framework for communicating that way, although it seems to me that a custom object/message pair might be just as easy to create from scratch.

I understand what you mean about fleet composition. Yes, M5's just create lag; better to add an M6 or M7 instead of multiple M5's.

I agree that MD is difficult to work with. Only a few have really mastered it. A proper editor for it would make a night-and-day difference (like Exscriptor or X-Studio).

To repeat my original question, how do you filter the player fleet to the sector? What change would count the entire player fleet? I could not figure out where you set the filter to the current sector.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Post by morbideth » Tue, 9. Oct 12, 08:31

I think it just defaults to one jump.

Multiple Jumps would be like:

Code: Select all

<find_ship includedocked="1" multiple="1" race="player" group="this.PlayerShips">
	<jumps exact="3"/>
</find_ship> 

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 9. Oct 12, 08:38

morbideth wrote: <jumps exact="3"/>
Awesome. Thanks!

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Post by morbideth » Tue, 9. Oct 12, 09:47

Update tomorrow, be afraid, be very afraid. Also, invest in some anti-fighter ships, and missiles, lots of missiles.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 9. Oct 12, 09:49

Oooh... sounds like big fun!

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Post by morbideth » Tue, 9. Oct 12, 21:34

Updated, let me know if it is too hard now.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 9. Oct 12, 21:36

I have done a lot of testing -- I am fairly certain that X3 combat cannot be made *too* difficult (without making it impossible). The engine simply cannot support it.

For example, if you spawn 100 enemy M2's, only two or three will attack that player at any one time. The rest spend most of their time avoiding collisions with each other. So three M2's is about as tough as it gets. Or two M2's plus an M1 with fighters.

(The above assumes that the player has a capital ship and strong fighter escort, plus appropriate OOS defense. Combat *can* be made extremely difficult early in the game -- while the player is still flying fighters and M6's.)

Thanks.

PS: Do you happen to know how to make an enemy follow you, like the three Tyr's at the end of Balance of Power? That was the toughest enemy I have seen in the game. You wouldn't want that all of the time, but once in a game day or two might spice things up a bit. :twisted:

(Of course, only if the player is at top fight rank).

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Post by morbideth » Tue, 9. Oct 12, 21:57

You might wanna try the update before you say it can't be too hard :twisted:. So far none of my ships have survived a mission... of course I was using the cheat package create fleets option, so they were not exactly balanced fleets.

Off the top of my head... I guess you would use set_command to tell it to attack the player specifically instead of the default just respond to direct threats.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Tue, 9. Oct 12, 22:03

morbideth wrote:You might wanna try the update before you say it can't be too hard :twisted:
Sorry, I edited my post rather than double posting. I explained above. The maximum effective opponent is, approximately, three M2's. I base that on several hundred hours of trying to make harder opponents. :)

Early in the game, when the player is flying a fighter or corvette (M6), then the combat difficulty can be very high.

Post Reply

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