[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
Private Hix
Posts: 5
Joined: Sat, 18. Nov 17, 00:05
x4

Post by Private Hix » Tue, 28. Nov 17, 00:20

Hey there, I posted this as its own topic but I haven't received any replies.

I'm having an issue with this mod, my 'Military Prestige" rating has changed to "Null" (from 153). Now whenever I gain more prestige it tacks the number on to the end of the "Null". For example, if I kill a pirate and gain +8 prestige, my new total prestige will be Null8. Currently it is sitting at Null8144123 haha.


Is there a fix to this? I tried uninstalling & installing the script in-game, but that didn't change anything...

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

Post by TechSY730 » Mon, 16. Jul 18, 02:54

Hey, I'm still around. Just got distracted with other games. :P

Anyways, another big release here.

@Private Hix Sorry it took me so long to get to this, but I found your issue and have a fix for it. See the release notes for details.

Version 4.0:

New Features:
* Missile boats (M8s and M7Ms, or anything with a missile turret) have greatly revamped logic
> The previous logic relied on turret scripts to do the firing, which tended to result in rather anemic barrages, especially when compared to the missile boat logic that the Rapid Response Fleet logic uses. Now the script will "pull the trigger".
> Missile boats are willing to jump back to base if they run out of missiles. Don't be surprised if a M8 jumps in, dumps a ton of missiles, and then jumps right back out. (There is logic in place to detect cases like the Xenon I which can still have plenty of bite even if they run out of missiles; they won't retreat so readily)
> M8's are wiling to attack other corvette sized classes instead of always beelining to the capital ships. M7Ms will still beeline to fellow capital ships
> They will no longer try to kite ships that are significantly faster then it
> Missile boats are now willing to attack stations. :twisted:
* There is now a small chance that a race will call in ships to a sector that they have neutral relations with (such a unowned sectors), if encounter something "sufficiently scary" and are adjacent to a sector they own or are friendly with.
> This may be relevant to other scripts that spawn in "baddies" in otherwise unoccupied, unowned sectors
* The Terran race now has a small chance of choosing some ATF ships (about 10% for each ship chosen)
> A reminder, the ATF Valhalla is explicitly blacklisted from being selected, so no easy Valhallas for you. ;)
* Fighters that belonged to a destroyed carrier will now seek out a new carrier to become fighters of.
* Integrated the standard fight logic with the Mosquito missile defense and Missile Safety scripts. If you don't one of these, that's fine, it just won't do anything.
* The threshold of danger before races will honor calls for defense is now lower for core sectors then it is for border sectors
* Probably lots of other little things that I don't remember at the moment.

Bug Fixes:
* Fixed an issue where if you cancel out of "exchange prestige for credits" screen, your prestige would be set to null, and then will act weirdly from there. Now canceling the screen will act as if you entered 0 (aka, nothing changes)
> If your save file is affected by this issue, you can click "Install/Upgrade" on the options menu and it will fix it. It will try to extract a meaningful number out of it, but there is a good chance it will fail, and will have no choice but to reset it to 0.
* Fixed an exploit where you could enter a negative amount of prestige to exchange to gain prestige for paying credits. Now your attempts at bribery will be caught and prevented. ;)
* Fixed ships that are retreating not considering how much jumpdrive energy they had before trying to jump, leading them to move slowly to the destination sector instead of the intended response of not trying to jump and doing an emergency jump in the case of an emergency.
* Recon scouts will now scan as soon as they enter a sector before they start patrolling, so they don't blindly dart into an enemy that is right on the other side of a gate
* Disallowed the script from "taking over" race owned TLs that happen to dock at military bases, since they are usually used for other things and MBRR would just interfere with this. This will NOT fix TLs that have already been affected by this.
* Reworked the "give best lasers" logic so it won't overstock with way more lasers when it already had enough lasers from the default equipment
* Probably lots of other little things that I don't remember at the moment.

Planned features:
I wanted to integrate with LIFE's fork of the Galactic News System just like it would with the standalone version, but LIFE made some important changes in how it deals with race specific news that makes this difficult.
> In more detail, they added a way to add a specific news item to a per race's array of articles, but didn't add a way to remove a specific news item from a specific race's array of articles. This means when you call the remove script, it tries to remove it from the last race's news you looked at and not any other the others. This could lead to orphaned news items.
I'm currently investigating ways to work around this.

Version 4.01:
* Fixes a minor packaging mistake I made

MilitaryBaseResponseRevamp-V4.01-15.07.2018.spk:
https://drive.google.com/file/d/1AdQyi4 ... sp=sharing
Last edited by TechSY730 on Thu, 19. Jul 18, 06:54, edited 3 times in total.

michtoen
Posts: 67
Joined: Mon, 22. May 06, 20:09
x3

Post by michtoen » Mon, 16. Jul 18, 19:58

Hi, nice you are still there! And nice update.

I just released this, a modding package for XRM:

https://forum.egosoft.com/viewtopic.php?t=399184

This script is part of the original "what to install with XRM" suggestions of XRM.

I give it a quick test and there are no hard conflicts but it seems there are some problems with other scripts.

Thats sad, because i think in that package, which use only main scripts and mods, it would fit really good.

Problem is also, that there is a good chance that other players run in same problems, also without LxXRM but today no one play XRM really vanilla.

The included invasion scripts are the point, i think.
I noticed in the setup invalid race names like "8" and "unknown" and i noticed that the this script removed ships from the Revelation script, i would guess because it took over the xenon station.

But at all, it seems to me just internal setting and config problems.
If you like, you can give LxXRM a test run, it will also give you a good test enviroment.

How btw. this script works together with the build in race respond fleet of AP?

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

Post by TechSY730 » Tue, 17. Jul 18, 00:17

Just make sure you mention that you want the versions released later in the thread.
The version in the OP is significantly behind my changes.
In fact, I probably should make a new thread for my forks...

Anyways, the original version conflicted with AP's rapid response fleets, but I've updated it so they will work along side each other, so long as they still use the built in !fight.global.call.defencebase script.

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

Post by TechSY730 » Wed, 18. Jul 18, 21:32

Version 4.02:

Bug Fixes:

* Fixes an issue with the laser equipping logic that would sometimes cause it to give more Impulse Ray Emitters then intended, possibly leading to some good lasers getting "left out"

EDIT: Minor fix not worth bumping the thread over
Version 4.03:

Bug Fixes:

* Fixes a minor issue where missile turrets would be counted as "turrets that can only mount IREs" and thus extraneous IREs would be given to the ship,

EDIT2:
Version 4.04:

Bug Fixes:

* Fixes an issue where MBRR ships would be called on by the vanilla "defend base" scripts, which interferes with the MBRR logic.
> This unfortunately had to be done by overwriting the built in script "!lib.fight.defencebase.start". So if you have a mod that changes that script, you will need to "un-overwrite" it when you install this script. Or bug me for a compatibility patch ;) (I will need a copy of the original script your other mod provided).

MilitaryBaseResponseRevamp-V4.04-19.07.2018.spk:
https://drive.google.com/open?id=1eqvlD ... 3do3S75rDB

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

Post by TechSY730 » Mon, 23. Jul 18, 17:18

Finally, a fix worthy of a thread bump

Version 4.05:

Bug Fixes:
* Fixes wings searching for a new carrier idling for a long time before docking
> It may take a while for existing wings to pick up on the new script version

New Features:
* Ships jumping to a sector to defend it will now state that sector as their destination in their info box (this is mostly to help debugging)


From Version 4.04:

Bug Fixes:

* Fixes an issue where MBRR ships would be called on by the vanilla "defend base" scripts, which interferes with the MBRR logic.
> This unfortunately had to be done by overwriting the built in script "!lib.fight.defencebase.start". So if you have a mod that changes that script, you will need to "un-overwrite" it when you install this script. Or bug me for a compatibility patch (I will need a copy of the original script your other mod provided).

MilitaryBaseResponseRevamp-V4.05-23.07.2018.spk:
https://drive.google.com/open?id=1gl24m ... N-j5noXa2Q

+JAZZ+
Posts: 64
Joined: Tue, 10. Feb 04, 14:50
x2

Post by +JAZZ+ » Tue, 24. Jul 18, 07:25

your reworked script does not seem to work correctly with me.

Races not invading sectors, get no subtitle messages or galactic news system messages about invations.
Ships don't get marked by race militaries.
Can join a race at a military outpost, but nothing else happens.
All settings for the script are on standard, i just press install.

Tried the original script and all these things are working, but it's very outdated, especially for AP.

Only other mods are TC plots for AP, official bonus pack and the scripts taged as required in the first post.

Have i missed something or am i doing something wrong?

I would really like to use your script. It is great that someone brings one of my favourite scripts up to date.

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

Post by TechSY730 » Tue, 24. Jul 18, 18:08

1. Looking at it, yeah, it seems I did break invasion calling in my 4.0 scout changes. I'll test out a fix.

2. Ship renaming to mark by race militaries is now an option in the settings under "Military Prestige Scoring". I can't remember if I made it default to on or off (though it sounds like off by default), but if you want that feature, turn it back on.

3.I honestly don't know what is supposed to happen when you join a race at a military outpost. What is supposed to happen that isn't?

Mountain_Puncher
Posts: 87
Joined: Mon, 23. Apr 12, 06:07
x3tc

Post by Mountain_Puncher » Tue, 24. Jul 18, 22:23

I have the same problem as no invasions occurring. Well Actually a Split general always spawns in the sector Soul star at the start and claims it, but that is off tangent. I am using the LxXRM compilation and adding this last. Even though I am not using any plots, revelation, or phanon scripts, once I install this and reinitialize the scripts or save and load the races get messed up for this too. Argon turns into 1, Terran into 8 and Yaki into unknown in the plugin manager menu for this.

Also using the extended comms on a base allows one to join a faction but you receive 0 prestige points from destroying enemy ships.

I used the old version with XRM and it worked, the invasions and prestige anyway. I'm not very good at this and was wondering what I am missing.

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

Post by TechSY730 » Tue, 24. Jul 18, 23:17

Just to clear up a few things.

The script has two levels of "messing with enemies".
1. Invasions. Invasions is merely "willingness to send ships into enemy territory". It does not mount any specially organized attack beyond sending a collection of ships. No commander, no news items declaring an organized invasion, no attempt to claim the sector for themselves.
2. Sector takeovers. As above, but in addition will send a special task force headed by a commander, and will attempt to take ownership.


I am not finding anything especially broken with only invasions. Are you talking about sector takeover logic being broken?

Mountain_Puncher
Posts: 87
Joined: Mon, 23. Apr 12, 06:07
x3tc

Post by Mountain_Puncher » Wed, 25. Jul 18, 00:13

Well I think maybe prestige and sector takeover is broken. I don't know what in the LxXRM compilation would be interfering other than the innate rrf. There are blobs of ships fighting in places. I helped the Terrans destroy everything in Circle of Labor. I didn't get any prestige points destroying valid targets so I could call in a general, albeit there was a task force leader already in the system.

I assumed if one race is cleared from sector and command leader/general of other race is present, then that race gains ownership and spawns their stations.

So there is more fighting, albeit no systems change hands for me.

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

Post by TechSY730 » Wed, 25. Jul 18, 00:24

Taking a look at the logic, it appears that sector takeover is working, but the notifications about sector takeovers are broken. So it all happens silently in-game, and unless you have debugging turned on and are looking at the log files, you would probably have no idea that it is happening. I should be able to fix that by tonight.

I haven't touched much with prestige points. I do have some accumulated in my current game. But I will try to see if I can get more points.
As I mentioned, you may have to turn on the ship renaming in the settings to get the "tagging" feature to work. I should probably go ahead make it "smart" and turn it on by default unless it detects the presence of LIFE's ship renaming logic and if it finds it makes off the default. That way it is consistent with old behavior, but will

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

Post by TechSY730 » Wed, 25. Jul 18, 05:45

Ah hah! I figured out why invasion notifications didn't work. I'll push a fix for that issue in the morning, and will look into prestige point scoring and making a more intelligent default behavior for prestige renaming/marking tomorrow (where instead of being off by default instead of the original's on by default, it will be on by default unless it encounters the conflicting ship renaming logic of LIFE, in which case it will off by default)

+JAZZ+
Posts: 64
Joined: Tue, 10. Feb 04, 14:50
x2

Post by +JAZZ+ » Wed, 25. Jul 18, 11:25

3.I honestly don't know what is supposed to happen when you join a race at a military outpost. What is supposed to happen that isn't?
I just want to make clear that the script was working ingame. just invations or invation notifications didn't work

Would be great if you can fix that :)

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

Post by TechSY730 » Wed, 25. Jul 18, 21:27

Version 4.0.6:

Bug fixes:
* Fixed race takeover attempts not showing up in the news or causing notifications
> It should be noted that the race takeovers were occurring, but the notifications for them were broken.
* Added additional logic to ship tagging in the ship-names from prestige scoring to detect an unset value of the "Rename ships" setting (can happen when upgrading from an old version) and will treat that case as the default, On.
* Cleaned up the conditional logic for recon scouts to call for help

Please let me know if there are any other broken features I missed.

MilitaryBaseResponseRevamp-V4.06-25.07.2018.spk:
https://drive.google.com/open?id=1HzQsg ... 2VJS-QfFrw

Mountain_Puncher
Posts: 87
Joined: Mon, 23. Apr 12, 06:07
x3tc

Post by Mountain_Puncher » Thu, 26. Jul 18, 23:30

I turned every faction to hatred towards each other and now I see invasions popping up all the time. I go to a sector and sure enough a general is there battling the owner of the sector's fleet.

Getting prestige points is still hit or miss though for me. If I Start as Argon I get points it seems on any valid target, if I start as Terran I only received points from boron when destroying split. It also appeared that I could only redeem points for credits as well. Maybe the other options to redeem pop up after acquiring the set amount. I am still testing it out.

Oh and do the faction's relations change dynamically or do you just set friend/foe and then factions invade based upon those parameters?

Either way, it is entertaining and I thank you for the significant enhancements to the game you have provided.

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

Post by TechSY730 » Fri, 27. Jul 18, 19:24

@Mountain_Puncher

Odd about the prestige points. I'll take a closer look. At least it isn't totally broken for you. (Actually, TBH, while being totally broken is worse for the user, it is easier to debug as the developer as totally broken is easier to find then inconsistently broken ;))

Yes, I think the other options for using prestige only unlock in certain conditions (not sure what those are at the moment)

And no, the relations do not change dynamically. They are constant (this isn't anything special about this script, this is also something vanilla does not have).

However, if you have relations set to "default", they should track any relation changes other scripts impose.


Version 4.0.7:

Bug fixes:

* Fixes a bug in the recon scout logic that caused them to be less responsive to enemies then they should have been
* Fixes the Xenon scout logic going over a loop of adjacent sectors for a value that is never used, which wastes CPU cycles.

MilitaryBaseResponseRevamp-V4.07-27.07.2018.spk
https://drive.google.com/open?id=1e1xWB ... -Ecs0lZZ0I

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

Post by TechSY730 » Mon, 30. Jul 18, 19:33

Version 4.0.8:

Bug fixes:
* Fixes an issue where in TC, the script would spam the user to input a number of volleys, even though it was NPCs firing missiles
> It may take a while for all the MBRR NPCs to pick up the new version of the script on their own. You should be able to force it by hitting "Install/Update" in the settings menu.
* Fixes an issue where MBRR ships patrolling through sectors was broken

MilitaryBaseResponseRevamp-V4.08-30.07.2018.spk:
https://drive.google.com/open?id=1mK0AK ... qTObDMOfTl
Last edited by TechSY730 on Mon, 30. Jul 18, 19:59, edited 1 time in total.

KruniacZio
Posts: 14
Joined: Sat, 2. Jan 16, 12:32
x3ap

Post by KruniacZio » Mon, 30. Jul 18, 19:48

TechSY730 wrote:Version 4.0.8:

Bug fixes:
* Fixes an issue where in TC, the script would spam the user to input a number of volleys, even though it was NPCs firing missiles
> It may take a while for all the MBRR NPCs to pick up the new version of the script. You should be able to force it by hitting "Install/Update" in the settings menu.
* Fixes an issue where MBRR ships patrolling through sectors was broken

MilitaryBaseResponseRevamp-V4.08-30.07.2018.spk:
https://drive.google.com/open?id=1mK0AK ... qTObDMOfTl
Thank you for the update!

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

Post by TechSY730 » Sun, 5. Aug 18, 04:46

Version 4.0.9:

Balance changes:
* A few versions ago, I made it so that scouts checked for enemies as soon as they entered a sector. Unfortunately, this made Xenon incursions into commonwealth space excessively frequent, as they would pop in, call an incursion, and then pop out, before the races had a chance to kill the scout (there is a delay between the scout being attacked and the scout calling for help, where if you kill it within that window, then no signal gets out).
> Now Xenon Relay scouts, and only Xenon ones, will only scan for enemies as soon as they enter if they are not in a hostile sector (that is, hostile to Xenon, which is most everyone)

Bug fixes:
* Fixed an issue where mosquito missile defense logic was not properly gated by the installation of the missile defense script (from the bonus pack or downloaded directly)
* Fixed an issue where, when retreating, ships would jump to their military base home sector, and then emergency jump again because of the stale "under attack" signal
* Fixes an issue where recon and relay scouts scanned enemies from furthest then inward instead of closest then outward.

MilitaryBaseResponseRevamp-V4.09-04.08.2018.spk:
https://drive.google.com/open?id=1bkRwI ... 3-2uYVXhNk

Post Reply

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