War of Attrition mod (current version 0.56)

Home Board Index » X3AP » Scripts and Modding » War of Attrition mod (current version 0.56)

Hammerit

Hammerit avatar
Level badge Stickguey (8)
Posted 12 years ago.

I'm currently rewriting the entire war code so it isn't as random anymore but still uses the basic concept of AP (eg. war sectors, war missions, etc.). On startup the AP war manager is disabled as if Shady business were completed and the war ended that way. Only that it didn't. The mod is 100% compatible to all plots including the X3tc ones.

A little recap of how the war worked in vanilla:
- Fleets spawning out of thin air when the player ship changes systems
- Fleets specifically exclude Carriers and Bombers
- Fleet spawn size depends solely on player assets and enemy stations
- Hence some systems are prone to be flooded with countless ships (eg. Jupiter / Asteroid Belt)
- Fleet spawn layout is identical for all fleets, only subtypes are random
- Sector ownership changes on randomly with war status updates
- Destroyed stations / docks are instantly replaced when the player leaves the sector
- Fleets attack player assets regardless of his notoriety if the player is in another sector
- Fleets attack friendly fleets after friendly fire (happens between ATF and Terrans occasionally, usually starts in Jupiter)
- Fleets always priorities player assets as targets regardless of what else is in the system
- Race Military not engaged in the war sometimes tries to "invade" friendly sectors (eg. Teladi launching a full scale attack on Jupiter; Only they won't do anything there because they're friendly with both ATF and Terrans)
- Code is a mess, algorithms are mostly iteration driven and thus very slow
- Execution is sluggish and crams up jump times for the player ship
- Egosoft


Current Features in version 0.56
- All Fleets spawn inside Shipyards and jump/patrol to their final destination
- Sector defense fleets are deployed in owned sectors at startup (one time event)
- Regular War Fleet spawns are done in intervals and individual spawns are delayed so they don't arrive all at once
- Regular War Fleet spawns may be skipped randomly to allow for stationed forces to weaken over time
- War Fleet spawns now include fully stocked Carriers and Bombers
- War Fleet spawns and RRF work together to create momentum
- Size of War Fleets is limited based on sector load to prevent permanent slowdowns
- War Fleet spawn layout is randomized and can contain any ship the specific race has
- War Fleets no longer attack harmless player assets with highest priority if there are more dangerous enemies around
- War Fleet movements decide if sectors remain peaceful or become death traps
- Sectors don't change ownership randomly
- Destroyed stations / docks are no longer instantly replaced when the player leaves the sector
- Instead of random spawns all ships are now part of fleets with specific missions
- VANILLA BUG FIX: War Fleets attack only hostile targets and ignore the player if he's friendly and doesn't friendly fire them
- VANILLA BUG FIX: Fleets no longer attack friendly fleets after friendly fire
- VANILLA BUG FIX: Neutral races no longer launch invasion forces into Terran space
- VANILLA BUG FIX: Code runs far smoother than original
- VANILLA BUG FIX: Jump times are back to normal
- VANILLA BUG FIX: Spawn hiccups are gone
- VANILLA BUG FIX: "!lib.get.randomshiptype" script substituted with fixed "!lib.war.get.randomshiptype" script that works with all possible argument combinations and doesn't ignore "Hauler" variants anymore. Blacklist functionality now works as well (was implemented but didn't do anything in the original script)
- VANILLA BUG FIX: Cleaned up TShips and set class of all none-unique ships unreferenced by vanilla to "0" to simplify Blacklisting during random spawnage
- BUG FIX: Xperimental Shuttle, #Deca and Valhalla are now blacklisted from random generation
- BUG FIX: Valhalla spawns again, however since the game says it's the mobile command flagship of the ATF there can never be more than one around) Smile
- BUG FIX: RRF can no longer derail my fleets
- BUG FIX: All War ships are now controlled entirely by my fleet logic

- Version 0.56


Planned features
- TLs deployed from a nearby shipyard try to replace destroyed stations / docks
- Plot evaluation: Boron won't launch forces against Terrans / ATF unless they've already declared war
- Plot evaluation: Ending the war through completing Shady business for real also ends WOA
- Sectors change ownership if attacker manages to destroy all main stations and deploys a main station of his own
- War missions involving above task forces
- War Score implementation (based on sector ownership + economy and player actions
- War Fleet spawns are affected by war score
- War Fleets ignore enemies who are a lesser threat as long as they are attacking their enemies
- Supply Fleets bringing much needed Ammunition and Missiles to the front lines (which the player can intercept for fun and profit Wink)


Known Issues
- VANILLA: MSCI command "add default items to ship" sometimes creates incorrect / insufficient equipment loadouts (eg Boron Megalodon with projectile weapons but without any ammunition)
- VANILLA: AL script sometimes parades giant convoys though war sectors causing massive slowdowns


If you're interested in testing the mod I'll be happy to provide a test version. It's only three days old so it probably still contains countless bugs.

If you want to request additional changes feel free to post them here and I'll let you know if they fit in Smile. If they don't I may provide an alternative version if it's a good enough idea.

redheart

redheart avatar
Level badge Eagleguey (11)
Posted 12 years ago.

Wow that is a big change to the game. Man I wish I could use this mod and still get credit for vanilla. I just need to hurry up lol. Looking very good!

Roguey

Roguey avatar
Level badge Rebelguey (24)
Posted 12 years ago.

3 days and you managed to come up with that many changes already? Eek

Once thing I suggest (if not done already) is to post about this in the X³: Terran Conflict / Albion Prelude - Scripts and Modding (on the egosoft boards), as youre bound to get some more people interested. I do agree the war-scripts wanted some big improvements, and im sure people will be interested in this.

ps. I did once try and code station defenders, but it went a bit nuts and spawned 1000's of ships. Smile

Hammerit

Hammerit avatar
Level badge Stickguey (8)
Posted 12 years ago.

3 days and you managed to come up with that many changes already?
- Roguey

Did I mention I'm a game programmer by trade? LOL

Once thing I suggest (if not done already) is to post about this in the X³: Terran Conflict / Albion Prelude - Scripts and Modding (on the egosoft boards), as youre bound to get some more people interested. I do agree the war-scripts wanted some big improvements, and im sure people will be interested in this.
- Roguey


So far I haven't posted this on the egosoft boards, because I have made some bad experiences with the majority of the people running around there a few years back. I'll probably post it there too once I have prototypes of most features implemented. Mods with a stable test build usually attraction more attention then "hey I have this cool idea, but nothing to show for it" posts anyway.

ps. I did once try and code station defenders, but it went a bit nuts and spawned 1000's of ships.
- Roguey

If you still have the code I could take a look and debug it for you Smile.

Btw just taken a look at the bugs in the "!lib.get.randomshiptype" script from egosoft ... holy smokes it's a miracle the thing works even some of the time. It doesn't just cause crashes/infi-loops if it gets bad arguments like I thought. It also ignores every single "Hauler" variant because a few don't exist (probably a legacy bug). Already fixed it though.

redheart

redheart avatar
Level badge Eagleguey (11)
Posted 12 years ago.

@Hammerit, Game Programmer? Your my new hero.

Hammerit

Hammerit avatar
Level badge Stickguey (8)
Posted 12 years ago.

Progress Update for 0.53:

The last couple of days I've mostly been busy fixing bugs and finding script engine limitations workarounds. However I've also made nice progress along the way Smile.

All in all it's coming along quite nicely so far. The Fleet spawner is done and I've already started implementing the fleet controller and will soon give it some basic functionality. Mainly so the ships don't just stand around looking pretty half of the time. Until now the fleets were partially controlled by the race logic. But with the spawner down I'm finally ready to assumed direct control.

Once the fleet controller is set up I'll implement the fleet tasks. They'll help make the war sectors appear much less random. Each fleet that's created will have a certain task it's trying to complete. Later these tasks will also be the basis of the new war missions. Hopefully at least some of the stuff from vanilla can be reused. Making missions with the director is pretty tedious after all and stuff takes ages to test. But I'll cross that bridge when I come to it.

For more details you can check out the initial post. I always update when something gets done.

Hammerit

Hammerit avatar
Level badge Stickguey (8)
Posted 12 years ago.

@Hammerit, Game Programmer? Your my new hero.
- redheart

Why? It's just a job after all. Okay it allows me to do what I like and get paid for it. But it's not rainbows and sunshine all the time either. Pretty much like every job I guess.

My hero is the guy doing my taxes because I hate tedious work like that and he does it for me Smile.

Roguey

Roguey avatar
Level badge Rebelguey (24)
Posted 12 years ago.

Sounds like your making great progress in such a short amount of time; although guess since your a games programmer, its hardly surprising. I guess a few more days and youre be finished?

Hammerit

Hammerit avatar
Level badge Stickguey (8)
Posted 12 years ago.

Most of it should be done by Sunday. However the changes I'll have to make with the director will take a while longer. There's just so much stuff that can go wrong and having nothing to effectively debug with doesn't help either.

I'm using an external Script Editor which speeds up scripting a whole lot. It's got real time syntax checking and everything. Sadly it doesn't support director scripts yet Cry.

It's really funny that my "!lib.get.randomshiptype" replacement is 4 times faster on average than the original script by egosoft even though it has additional features and is fail proof. Given it's called for every AI ship spawned in the game that's a huge boost to overall performance Smile.

Hammerit

Hammerit avatar
Level badge Stickguey (8)
Posted 12 years ago.

It's been a while since my last update. Sadly there hasn't been too much progress lately due to personal stuff and debugging going very slow. I've found that some ships can have a very dramatic effect on performance even if they're just idling around. So right now I'm profiling how different fleet configurations affect performance. Once I've crunched the numbers I can hopefully get rid of the random spikes I get while crossing some contested sectors.

Roguey

Roguey avatar
Level badge Rebelguey (24)
Posted 12 years ago.

Sounds like something that used to happen to me when creating mods; testing/bug finding can slow you down. Quite often random things happen you didnt expect. Anyway, good to hear your still working on it.

redheart

redheart avatar
Level badge Eagleguey (11)
Posted 12 years ago.

Awesome job Hammerit!! Thank you for your hard work on this mod. I know the community will love it when its finished.

1


You need to log-in to post here.