[SCRIPT] Military Base Response revamp v2.16 [2011-10-27]

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
TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Sat, 11. Mar 17, 22:43

So I think I have discovered a bug.

When ships managed by this mod try to jump to a sector, they attempt to jump to a random gate (as opposed to using the built-in jumping function). I suppose this was done so that attacking ships get surrounded as opposed to all coming from the same gate.
The problem is that in Terran space, they don't account for the fact that you can't jump to trans-orbital accelerators. Thus, they try to jump to a trans-orbital accelerator, which of course doesn't work, and they just sit there.

If you have been seeing a large number of Terran USC ships just sitting around doing nothing in Terran space, I think this is your bug.

I will upload a bugfixed version of the jump script (and I'll even have add the capability of jumping to a jump beacon while I am at it).

EDIT: Ok, here is the fix. Download into the scripts/ folder (or addon/scripts for AP)
ThisIsHarsh, feel free to integrate these changes into the main mod.
You will need to go to the Military Base revamp settings page (either from the community configuration menu) hit "Install/Upgrade" for the fix to take effect.
What that does is to "reset" all the ships that are erroneously thinking they are in transit (but are actually just sitting there), and make them get a new job again, and thus run the updated scripts.

plugin.mbase.jump.randomgate.xml:
https://drive.google.com/open?id=0B80_E ... XpLMktQZzQ
plugin.mbase.job.defend.xml:
https://drive.google.com/open?id=0B80_E ... UZNTzBjODQ


For the details of what I did:
plugin.mbase.jump.randomgate:
* now checks to see if the gate is jumpable in addition to checking to see if it exists
* if it cannot find any jumpable gate, it will try to just jump to the sector normally, in the off chance there is a jump beacon in the sector

plugin.mbase.job.defend:
* now checks the return value from plugin.mbase.jump.randomgate, if it is null (meaning the jump did not succeed), it now falls back to just issuing a move command

User avatar
Hakilen
Posts: 4
Joined: Thu, 23. Mar 17, 05:33
x3tc

Post by Hakilen » Thu, 23. Mar 17, 05:38

Can some kind soul please upload the latest version of MBRR (2.16) on any file sharing site and share a link?

All the links in this thread (in the opening post and previous few pages) are dead.

I did find a version of MBRR on xdownloads.co.uk, but the version hosted there (2.13) is outdated.

Thanks in advance! :)

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24961
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Thu, 23. Mar 17, 10:29

The file on xdownloads is the current version. When you hit the download button, you'll see that the file name contains the version identifier "V2.16".
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
Hakilen
Posts: 4
Joined: Thu, 23. Mar 17, 05:33
x3tc

Post by Hakilen » Thu, 23. Mar 17, 15:21

Thanks very much X2-Illuminatus!

I actually remember clicking download on the file hosted on xdownloads last night but didn't notice the version number in the file name and didn't save it, assuming it was an older version. :? First clear sign of totally losing my marbles. :o

Sure enough, the version is right in the file name and it's the latest one!

Thanks a lot! :)

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Sun, 30. Apr 17, 03:17

Ok, so since Military Base Revamp and Albion Prelude try to do many of the same things, they conflict pretty heavily.

I've taken it upon myself to resolve these conflicts, and update with new features while I am at it.

EDIT: Not true anymore! Please note, in getting this to be compatible with AP, it now requires AP; sorry about that. If you hate the war stuff, there are good mods that will disable the war (I am using TC plots in AP personally).

EDIT: Actually it was pretty easy to make a TC compatible version. Updated the link with a dual-game spk; make sure to select the right game upon installation.

Please note, I have not tested nor investigated the interaction of AP's war logic with Military Base Revamp's invasion or sector takeover features; please let me know how that goes.

To get these changes, you will need to press "Install/Update" in the config menu.

EDIT: 3.01 - Fixes a trivial issue where the Argon Drone Interceptor from DCS2 was not included in the blacklist

MilitaryBaseResponseRevamp-V3.01-30.04.2017.spk:
<link removed, this version was broken, see below for 3.02>

Anyways, here are the changes:
  • * Fixed an issue where it would fail to send ships to sectors that couldn't be jumped to (like Terran sectors), leading to ships just accumulating (this is the same issue and fix I posted earlier in this thread)
    * Fixed an issue where if a ship fails to jump, it may just stay in one place forever (this fix is NOT retroactive, to apply the fix to already stuck ships, you will need to manually run the script "plugin.mbase.DEBUG.unstick.move.stay". I may add an option to run this script in the config menu in a future version.
    * Made Military Base revamp work along side, instead of conflict with Rapid Response Fleets
    * Greatly expanded the Recon logic, integrating vanilla AP's scouting logic with mbase's, and even a special surprise for one to discover for themselves ;)
    * Made Military Base revamp fleet emergency jump if needed
    * Made ships "owned" by carriers set their home to their owned carrier. (1)
    * Added the ability to turn of prestige naming without turning off prestige scoring (so you can get rid of those pesky "{A}" suffixes or similar). This also makes this script not conflict with other scripts that try to rename ships (like LIFE)
    * Updated the ship type blacklist with a bunch of new entries (2)
(1) This was supposedly turned off because G.O.D. rebuilt ships with a home regardless of their "disable ship rebuild" status, but I haven't noticed any issues with it. Let me know if you see large numbers of loose ships trying to get back to their homes (you can tell if it is a ship spawned by this script if their home is set to something like "Argon Federal" or "Boron Navy" or "Xenon Auxiliary" or similar such "jobs" that are not in the vanilla jobs.
(2) New entries include, but are not limited to
  • * All vanilla "UNDEFINED" ships that have a race attached to them
    * The OTAS Sirokos (due to its general uselessness in the hands of NPCs because NPCs don't generally try to board ships)
    * The ATF Valhalla (due to general gargantuanness and overpoweredness)
    * The drones of Drone Carrier Software 2 (DCS2)
    * Orbital Weapons Platforms (including the ones from Lucike's orbital weapons platform mod) (many were already blacklisted, but some were missed)
If you don't have any of the listed mods, that's fine. All that will do is blacklist an "unknown" ship type ID, which is harmless.
Last edited by TechSY730 on Mon, 8. May 17, 05:21, edited 2 times in total.

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Sun, 30. Apr 17, 19:24

Actually it was pretty easy to make a TC compatible version. Updated the above post's link with a dual-game spk; make sure to select the right game upon installation.

EDIT: 3.01 - Fixes a trivial issue where the Argon Drone Interceptor from DCS2 was not included in the blacklist

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Mon, 8. May 17, 05:20

Version 3.02:
* Fixes a critical error with the scout self-restarting logic
TO NOT BREAK SCOUTS, you must go into the "Military base revamp" config in the community configuration menu and press "Install/update". IF YOU DO NOT, SCOUTS WILL STOP DEAD AND DO NOTHING.

I made a critical error when I implemented the scout self-restarting logic. I tried to start a new task in a script running in that same task, without realizing that doing this deadlocks that task...

This has been fixed and a safe way to self-restart scripts has been implemented.

MilitaryBaseResponseRevamp-V3.02-07.05.2017.spk:
https://drive.google.com/open?id=0B80_E ... WJiSEREekU

I have removed the links to the broken versions.

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Fri, 19. May 17, 01:55

Version 3.03:
* Xenon bases that change ownership to another race now terminate their Military base response scripts
Spoiler
Show
Relevant to the Hub plot
* Xenon Relay scouts now have race logic disabled, so they no longer have their scouting logic disabled (as well as keep them from despawning). You will need to turn off and turn back on the Xenon military base option in the Artificial Life settings for this fix to take effect.
Version 3.03b:
* Xenon Relay scouts now have a random wait period before respawning, so now killing them now means something.
* Xenon Relay scouts now start will full engine tuning and half full rudder optimizations (to match Jobs spawned recon ships get)

MilitaryBaseResponseRevamp-V3.03-18.05.2017.spk:
https://drive.google.com/open?id=0B80_E ... zVsYlEwWlk


(Mods, please let me know if quadruple posting like this is a problem)

EveRohann
Posts: 16
Joined: Thu, 15. Dec 05, 21:50
x3

Post by EveRohann » Sat, 10. Jun 17, 09:53

So can you foresee any issues of your version using XRM? Btw great job on the updating of old scripts .... I think I am using all of them lol.

User avatar
soulmata
Posts: 154
Joined: Thu, 15. Nov 12, 10:34
x4

Post by soulmata » Wed, 21. Jun 17, 07:39

I'm impressed you are continuing to update this for so long, it is really fantastic. This is one of my favorite AL scripts that adds so much flavor and a motivation for me. (Say the Xenon have taken Black Hole Sun, I actually feel obligated to go take it back for the Argon!)


I have 3 questions. You mentioned you fixed the logic for a ship trying to jump somewhere it couldn't (like trying to jump to a ToA). This problem also appears in Litcube's PhanonCorp (not the LU version), where the Phanon traders will try to jump to a ToA and do nothing. So, the questions:



1) If I replace ToAs with Jumpgates, will MBRR-spawned ships jump to them?

2) If I /don't/, and another mod, like Improved Kha'ak, spawns a Kha'ak horde in, say, Saturn 3, will the Terrans slowly meander over there using the ToAs to respond, and/or will they jump to the nearest jump beacon to reduce travel time?

3) Would it probably be simple to take a peek at your logic and edit Litcube's stuff to do the same thing?

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Sun, 25. Jun 17, 05:02

Version 3.04:

New features:
* Military Base Revamp spawned ships will now spawn with upgrades (Engine tuning, Rudder optimization, Cargo Bay Extension)
> Regular ships will spawn with a bit of randomness, leaders/generals will always have maxxed out stats
* Military Base Revamp spawned ships will now spawn with increased aggression, morale, and flight skill
> Regular ships will spawn with a bit of randomness, leaders/generals will always have maxxed out stats
* Military base patrol ships will now set their homebase to the military base they are currently "working for".
> This lets you see, at a glance, which military base is coordinating which ships by checking the "owned ships" option of military bases.

Balance tweaks:
* Last version "unbroke" Xenon relay scouts, but this had the unfortunate side effect of making Xenon incursions into commonwealth space FAR more frequent, excessively so. So now Xenon relay scouts only have a chance of calling for an incursion
> Huge ships and stations will still always cause them to call for incursion, but smaller stuff won't always cause it to happen
> Careful about attacking them, attacking them will also cause them to always call for an incursion
>> Keep in mind, just because a scout calls for an incursion, doesn't always mean the receiving military base is obligated to always send in forces
> This may still be too excessive, in which case I may dial down chances even further (in particular, maybe make the chance to call for help when an enemy station if found to below 100%)

Bug fixes:
* Missile boats (ships with missile turrets, e.g. M7Ms) will now "throttle" how often they kite (move to stay at the edge of their range)
> Always kiting was leading to those ships sometimes not attacking, and instead always running away
* Xenon relay scout SIGNAL_KILLED handler now delegates the delayed respawning to a new global task, to get a random wait out of the SIGNAL_KILLED handling task
> Having a wait on the SIGNAL_KILLED handler may have been causing some Xenon relays to be unkillable.
>> If you have such an unkillable Xenon relay wandering around (stuck at 0 HP but refusing to die even if you attack it), you can use a "jump out of existence" script command on it to get rid of it. (No GUI for that, sorry, you will need to use the script editor yourself)
> Please let me know if this change didn't fix it and you do see new unkillable Xenon relays continuing to wander around causing trouble

MilitaryBaseResponseRevamp-V3.04-24.06.2017.spk:
https://drive.google.com/open?id=0B80_E ... nhnc2M4ZU0
Last edited by TechSY730 on Sun, 25. Jun 17, 05:32, edited 6 times in total.

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Sun, 25. Jun 17, 05:13

@EveRohann
No, I don't think XRM should pose any issues. In fact, any new ships types added will automatically be picked up and spawned by the script alongside vanilla ones. The only thing is that if XRM added any ships that NPCs should not have, you will need to update the ship blacklist to exclude them (plugin.mbase.cfg.invalids.xml).
To get the changes to apply, you will need to click the "Install/Update" options in the configuration menu.

@Soulmata
1. Yes; the script checks for warp gates dynamically; if you add more warp gates, the script will pick them up.
2. Yes to both. If there are no warp gates, it will try using the built-in jump logic instead of its randomized warp gate choice, which will mean it will use jump beacons. (Note that this means they will never use jump beacons if there are warp gates available; this is a bug I hope to address at some point). If there are no warp gates or jump beacons, then the script (as of my updates) will just have the ships move to the sector "the slow way"; better late then never after all
3. No idea about Litcube's Universe. The script does a lot of its own stuff instead of relying much on built-in scripts, but I wouldn't count on that being enough to ensure compatibility. In particular, this script replaces one or two of the built-in scripts for integration purposes, which would highly likely clash with Litcube's changes. Also, while this script doesn't modify Rapid Response fleets, it does integrate with them, which may cause issues if Litcube edited them.
Plus there is the same caveat I gave to EveRohann, you may need to edit the blacklist (plugin.mbase.cfg.invalids.xml) if there are ships the NPCs should not have. To get the changes to apply, you will need to click the "Install/Update" options in the configuration menu.
On the bright side, any new ships types added will automatically be picked up and spawned by the script alongside vanilla ones (hence the potential need to update the blacklist).

CloneSargaent
Posts: 68
Joined: Wed, 16. Jul 14, 19:27
x4

Post by CloneSargaent » Sun, 2. Jul 17, 04:58

Thanks for continuing development on this TechSY730 liking the fixes you've done :) . But I'm having bug on my XRM setup where the Paranid M1s, M2s, M7s, and m6s spawned by MBRR are equiped with only HEPTs while the other races ships are being equiped some what properly.
For example:

-Terran M1/M2s have PSPs and SSCs but no FBCs or FPD.

-Split M1/M2s only had PGPs and ISRs

-Argon and Boron only had PPCs and CFAs

- Teladi Gauss and FBLs

But the Paranid are the only ones spawning without PSG :(

This bug makes paranid nearly incapable killing 7 Xenon destroyers without there being 38 M1/M2s and thats OOS. IS all those ships get steam rolled by those destroyers.

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Mon, 3. Jul 17, 03:44

Not sure what is going on; MBRR uses the standard "add default items to ship" command, which, AFIAK, should be equipping ships with their most powerful weapons. Maybe this is an XRM specific thing? I'll test it with some Paranid M2s on my "psuedo-vanilla" setup.

In any case, as a fall back, I can try augmenting the ship spawning logic to check if the ship has at least some of the most powerful (non-ammo) weapon they can equip, and add some if the standard "default items" logic doesn't.

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Tue, 1. Aug 17, 22:48

I was wondering if the issue reported by CloneSargeant has been reproduced, or if TechSY730 was able to address it.

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Wed, 2. Aug 17, 02:40

No, I haven't been able to reproduce it. It may be something that only triggers in XRMs loadouts.
But the script uses the built-in command "add default items to ship" to load up ships, so if he is seeing it for MBRR Paranid ships, I would expect that naturally spawning ships would be hitting similar issues.

I think I can add a workaround to check to see if the ship had at least some of the most powerful laser it can mount, and if not, give it a few of them.
But I just haven't had time until recently to be able to devote to this.

CloneSargaent
Posts: 68
Joined: Wed, 16. Jul 14, 19:27
x4

Post by CloneSargaent » Wed, 2. Aug 17, 14:07

Thanks for looking into my issue :) TechSY, but i might have figured it. There is a post on this thread on page 66 by risbosix, he attempted to put MBRR into XTC which already has integrated rrf and that caused ALL the MBRR ships to mount m3 class weapons. Unfortunately I didn't see this statement about MBRR on the main page XRM about XRM-AP(my setup that I'm having the problem with) before downloading MBRR:
MBRR is not necessary for XRM in Albion Prelude. AP includes its own race response system which XRM fully utilises
It never occurred to me that XRM-AP's rrf may be in conflict with MBRR so this may not be solvable problem. :(
Last edited by CloneSargaent on Thu, 17. Aug 17, 00:27, edited 1 time in total.

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Thu, 3. Aug 17, 17:02

I am curious about what change in XRM causes loadouts from MBRR spawned ships to be so suboptimal. MBRR's ship spawning and loadout logic is completely standalone; I can't see how it would conflict.

Sadly, I don't play XRM, nor do I have any interest in installing it just to test this. But if anyone knows what is going on, I may be able to implement a workaround.

But as mentioned, on the main page, MBRR is sort of redundant with any mods that expand upon RRFs, so maybe this is no big loss. If you want the sector takeover functionality, there should be other mods that let you do that.

rhine770
Posts: 6
Joined: Sat, 24. Oct 15, 20:42
x3tc

Post by rhine770 » Wed, 16. Aug 17, 22:51

I also have CloneSargaent's issue and also have XRM (AP) installed. The problem seems to really only hit the Paranids. Exactly like Clone said, their M2s are popping into the sector with measly HEPTs. Every other MBRR faction's troops so far have equipped decent to pretty mediocre weapons for their fleets.

I have only a couple of scripts/mods with this installation, but I don't see how they could interfere too much: MARS, Yaki/Pirate Guild, XRM Phanon, a couple of minor scripts and TechSY's MBRR, and IR 2.0 (I heard I.R conflicts with MBRR because they do pretty much the same thing, but I wanted to see for myself, so I made a separate folder to test them. Apart from just making everything more chaotic I don't see any noticeable issues, yet.)

The reason I even considered merging those two, was because MBRR has a much more interesting and customizable invasion system compared to IR. I like everything else about IR, but IR's assault fleets only bother Xenon and Pirate sectors and often take them over and it's very annoying. Apart from the lame loadouts, though, MBRR's spawn fleets are causing mayhem here and there. It's cool to see the Boron invade a Split Sector and mess everything up for once. I'm not sure I'm going to keep this installed, though.

Does anyone have any recommendations on a better mod that has factions invade each other? Or at least where I could begin to modify the loadouts of MBRR's spawned ships, or keep IR's assault fleets but stop them from complete overrunning Xenon and Pirate sectors. One of the things I like about MBRR is that it allows you to disable factions from overrunning pirates. Really, that's a pretty understated feature.

CloneSargaent
Posts: 68
Joined: Wed, 16. Jul 14, 19:27
x4

Post by CloneSargaent » Thu, 17. Aug 17, 00:20

I haven't tested MBRR with XRMTC to see if happens with TC yet. But Rhine its most likely because it is in conflict with AP's built in RRF scripts. Which has killed any use RRF type scripts with AP without lag or major bug (which sucks imo). IR/IR2.0 and LV's RRF (for TC) are only other plugins I can think of, but they not as optimized as MBRR and XTC's RRF. Outside those 4, I have not seen a plugin that had invasions and/or an RRF that worked as intended.

Post Reply

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