[S] Race Patrols v1.43 22/01/09 ; Military logic + less CPU load

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

Fire_Spy1
Posts: 56
Joined: Fri, 25. Aug 06, 14:06
x4

Post by Fire_Spy1 »

Nice job ttl.. 8)

I enjoyed using your last response scripts for X3:R with XTM .
Thanks for doing the conversion.. :D
CPU : 486 DX4 100 Mhz
RAM : 16 Mb
GPU : SVGA
Sound : Soundblaster 8 Bit
HDD : 40 Mb
Name of System : The Beast!
User avatar
ttl
Posts: 537
Joined: Sun, 6. Feb 05, 13:04
x3tc

Post by ttl »

Malakie:

Yes, the script will work without installing the mod. It will just add the patrols without removing anything.

The main issue with the CPU load is not the ships in sector. It's the entire universe in the background that needs to be kept humming along. That's thousands of ships, even if they are not handled anywhere as detailed as the in-sector ones. Of course this adds up with the in-sector load, and it will be worse in more populated sectors. The fact that the game slows down after awhile means exactly that the background is getting fully up to speed, with all the ships in the universe doing their thing. And this out-of-sector background is what this script and mod also mostly addresses, by removing in the order of thousand ships from the universe.

It seems the in-sector CPU load is largely due to collision avoidance. A corollary of this is that large numbers of rocks and/or bullets leads to big FPS issues. The way the lasers are spamming bullets, especially as AI prefers to shoot flies with cannons, is just stupid, and could benefit from a massive mod. The basics such needs to rely on is easy enough, if not for having to consider OOS combat issues as well. Which is really the weakest point in this game, imo.

Veering a tad off-topic :roll:
lordlexus
Posts: 135
Joined: Wed, 9. Nov 05, 18:53
x3tc

Post by lordlexus »

Hey there! I got to try it again a little last night. I did notice some ships with no names (blank entries) in the sector map. Is this an indicator that it is starting to work?
q6600 (@3ghz)
4 gb ram
8800gtx
40" LCD @1920x1080 (yeah, thats right!)
User avatar
ttl
Posts: 537
Joined: Sun, 6. Feb 05, 13:04
x3tc

Post by ttl »

Blank entries mean the mod is working, and you should run the kill script.

The script works if you see ships with "Patrol xxx" and/or "Assault xxx". You immediately can see if it works or not by following the simple 3-step instructions I gave in a previous answer to you. Here's it again:

1) check script editor is turned on
2) check Race Patrols is turned on in AL menu
3) check if a race parols timer script is running in global scripts.

You should either see the global script in 3), or every race sector should contain at least some Patrol/Assault ships, unless the sector is overrun by an enemy.
lordlexus
Posts: 135
Joined: Wed, 9. Nov 05, 18:53
x3tc

Post by lordlexus »

lol. i must be coming across like an idiot.
I dont have an AL setting for race patrols
I dont have a kill script in script editor
Actually i dont have any scripts listed in the script editor that I can find related to 'race patrols'.

I must not be installing this correctly.

I installed this via renaming the dat/cat files and dumping them in my x3tc folder. Will that make a difference in how this works?
q6600 (@3ghz)
4 gb ram
8800gtx
40" LCD @1920x1080 (yeah, thats right!)
lordlexus
Posts: 135
Joined: Wed, 9. Nov 05, 18:53
x3tc

Post by lordlexus »

I downloaded your 'no civs' mod and there is an spk in that rar file but not in the 'civs' rar file. Do I still need the spk from the no civs rar file?
q6600 (@3ghz)
4 gb ram
8800gtx
40" LCD @1920x1080 (yeah, thats right!)
lordlexus
Posts: 135
Joined: Wed, 9. Nov 05, 18:53
x3tc

Post by lordlexus »

alright. I downloaded the other file as well and pulled out the spk and installed it alongside the cat/dat and now I do have the options you were talking about. No worries.
q6600 (@3ghz)
4 gb ram
8800gtx
40" LCD @1920x1080 (yeah, thats right!)
User avatar
ttl
Posts: 537
Joined: Sun, 6. Feb 05, 13:04
x3tc

Post by ttl »

lordlexus:

Ah, yes, now I get what was wrong. The instructions certainly aren't perfect in this respect
:oops:

Also, the lower link is the mod with civilians, the default has both civs and militaries removed.

OP edited, thanks for your perseverance and help. :)
User avatar
dragonsblade71uk
Posts: 236
Joined: Sat, 8. Jul 06, 00:01
x3tc

Post by dragonsblade71uk »

Had a problemwith a RED patrol. I was on good terms with all races, and it had too be 1 of your script patrols as there was no race tag at start.
They were called PATROL {shipname}
User avatar
ttl
Posts: 537
Joined: Sun, 6. Feb 05, 13:04
x3tc

Post by ttl »

dragonsblade:

Is this just one patrol ship that turned hostile on you? The ships are created as standard race ships, so if the race is not hostile, the patrols will not be either, when created. Like any ship, they can turn hostile on you, however, and rarely this can happen without reasonable cause, because of the game logic. Doesn't have to do with this script.

The prime candidate for accidentally getting that is one of your AI patrols ships that has "show as hostile if hostile to me" turned on. At least it was in X3R. This can make ships hostile to a race, and the ships your ship attacks, are turned hostile in turn. It has appeared to to me such a chain reaction started with a collision, usually, and could ruin a X3R savegame. Bottom line, turn "show hostile if hostile to me" OFF for ships you leave patrolling, and do not arm your freighters (their weapons are worthless for anything but pissing others off, anyway).

If it's just one ship, and you can avoid it, it will go away with the next change of guards. Maximum of ten hours. If you destroy the patrol, the assault wing will not target you, unless you have set their race hostile on your personal ship settings, or sufficiently lowered your standing to make the race hostile. Other race ships in the sector (police, border patrol, etc.) might choose to retaliate, however.
User avatar
ttl
Posts: 537
Joined: Sun, 6. Feb 05, 13:04
x3tc

Post by ttl »

Updated to version 1.2 on 24th Nov 2008. OP modified to include changes.
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

ttl wrote:Updated to version 1.2 on 24th Nov 2008. OP modified to include changes.
Perhaps a good idea to change the title of the post? It still says v1.1.

I *really* like the idea behind this script, but there are a couple of things that bother me (being rather OCD about such things).

The ship names - been mentioned before they don't include the race's name, just like 'Patrol Eclipse'. Also, the weird way some of them are named 'Patrol' and some 'patrol'. Are the ones with lower-case 'p' ones that are changing guard? Perhaps something more along the lines of 'Retiring' or something more descriptive would be good. I suggest using local variables instead of ship names in the scripts.

The beacons. It looks a bit ugly to me when there are loads lying around for a while for no apparent reason. If you really need these then perhaps tone them down a bit?

Can you give any clues as to the path you intend to take this plugin, what sort of features/changes we can expect in the near future?

Oh and one feature suggestion: would be cool to be notified for help requests from the patrols if you have police license. With LV's bounty boost this could be a good way to earn both cash and notoriety.
jimhsu77479
Posts: 168
Joined: Sun, 25. Nov 07, 22:39
x4

Post by jimhsu77479 »

Not sure if this has been mentioned, but can you make patrol ships respond when important sector stuff (stations in particular) is being attacked? Not too realistic for a NPC M2 attack force to waltz in and destroy half a sector without any response simply because there are no patrol ships around. Ideally the response should also at least match the attacking force (e.g. cap ships against a M2, M6 and fighters against a M6, etc)
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

jimhsu77479 wrote:Not sure if this has been mentioned, but can you make patrol ships respond when important sector stuff (stations in particular) is being attacked? Not too realistic for a NPC M2 attack force to waltz in and destroy half a sector without any response simply because there are no patrol ships around. Ideally the response should also at least match the attacking force (e.g. cap ships against a M2, M6 and fighters against a M6, etc)
Agreed.
User avatar
OOZ662
Posts: 1212
Joined: Tue, 8. Apr 08, 10:45
x4

Post by OOZ662 »

Noting that the 1.2 spk doesn't overwrite the 1.1 spk, so it seems both can be installed at once since the package names are different. Just an FYI.
User avatar
ttl
Posts: 537
Joined: Sun, 6. Feb 05, 13:04
x3tc

Post by ttl »

Good ideas there, thanks for the input. Only the first suggestion implemented so far (see title).

The response grows in steps, meaning that an M2 will be met with an assault destroyer, unless the combined lesser forces take it down before that. But yes, some corvettes and fighters will end up making suicide runs to distract the enemy destroyer first. However, the patrols are no less suicidal than the standard militaries.

While the patrols will not respond to stations attacked, per se, there should always be at least one patrol present in the sector, and it will soon find the enemy, and the assaults will start their thing. Only cases when no patrols are present are:
- During an ongoing assault
- The enemies have beaten down the strongest force sent to defend a border sector (this means several cap ships downed)
- The entire race has run out of reserves to send.
In large sectors the patrols can miss a far-lying station being attacked for some time ... but I can't recall ever seeing it happen so that stations would have been destroyed because of that. For now, I have no plans to create for explicit response to stations being attacked, this looks to be alot more complexity for little gain.

The future direction I'm tossing around in my head, what I think the game really needs, is to replace pirates and xenon with a similar logic, only including attack fleets as well. I.e. make an attack wing if reserves are high enough. This would reverse the current idiotic trend that you get attacked more, the more succesfully you fare against pirates/xenon on their home turf. I might never actually get the time/energy to get to this, though.

Back to earth ...

The names ... I never though they would annoy people. Yes, I understand locals would have been the better way around, and it should be easy enough to change. Speaking of which, is there a way to make the computer say e.g. Argon *Military* Eclipse, when targeting the corresponding patrol ship?

The beacons are used to relay position data for the assaults. They could self-destruct once the assault had arrived. Perhaps the Patrol ones could self-destruct, since one of them lingers. During an ongoing assault there's a few lying about, but after the assault cycle finishes, there should only be the "Patrol Beacon". Thus, max beacons around in a sector should be about half a dozen. Personally, I kinda like these for flavor.

The notification suggestion I like a lot. Will look into it, I think it is very easy to send a message whenever an assault is called if player has the police license. I'll restrict it to the second level assaults, i.e. player notified when a frigate is called to the scene.

I could make the wing calling for backup revert to escorting the leader of the heavier asssault when it arrives. This should make for more sensible and less suicidal behavior.
User avatar
ttl
Posts: 537
Joined: Sun, 6. Feb 05, 13:04
x3tc

Post by ttl »

OOZ: thanks for the info. Looks like there's a typo in the name of the old version, "Race Patrol", instead of "Race Patrols". Will keep the correct plural version for future versions. Please remove old version manually.

Also: It's still unknown exactly how the patrols would respond to race skirmishes. This might require further complexity of the scanning for enemies scripts.
Last edited by ttl on Tue, 25. Nov 08, 02:29, edited 1 time in total.
jimhsu77479
Posts: 168
Joined: Sun, 25. Nov 07, 22:39
x4

Post by jimhsu77479 »

I brought that up because this is what happened:

Sector - Njy's deception (Split border)
Invader - Boron Ray + Thresher + fighters
Patrol - One mamba

-Boron ray enters system, mamba somewhere in far corner
-Engages and destroys a rastar refinery, heavily damages a trading port, and sits there for ~10 minutes - no resistance at all
-Mamba is non-hostile towards invaders (i.e. does not turn towards the attacking fleet)
-Several minutes later, it just happens to cross paths with the invasion fleet, gets blown up by flak, and finally assault triggers.

Possibility is that it's not registering the invading fleet as hostile (even after its attacked the station).

Script is very effective when hostile (pirate/yaki/khaak/xenon) ships appear - response time is at most a few min.
Last edited by jimhsu77479 on Tue, 25. Nov 08, 02:33, edited 1 time in total.
User avatar
ttl
Posts: 537
Joined: Sun, 6. Feb 05, 13:04
x3tc

Post by ttl »

Yes, the skirmishes. Since Boron are not hostile to Split per default, the patrol doesn't recognize them as such. I'm using a simple "find hostiles" command in the script, for the patrol to scan for targets. Gah! Need to figure out a way around this. Ideas appreciated. Perhaps I can look for ships this ship is hostile to, as well as ships that are hostile to this ship? How to make that happen easiest?

Did the assaults correctly wipe out the invaders, in the end?
Last edited by ttl on Tue, 25. Nov 08, 02:35, edited 1 time in total.
jimhsu77479
Posts: 168
Joined: Sun, 25. Nov 07, 22:39
x4

Post by jimhsu77479 »

They actually survived and went on to family njy .. but yes a python or something did spawn before the invasion fleet left.

A possible idea is to run a task on "important assets" of a race, something like "get attacker" if shields < threshold or is hostile, followed by "get race" which feeds into the assault fleet spawning script.

PS I forgot how RRF worked but it handled these situations admirably. I loved it when accidental fire between some fighters escalated into a capital ship armada that cleaned out the whole system ... oh the memories.

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