Litcube's Missile Boat Add-On (Turret:V0.92b / Supply:V0.93b)

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

builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Litcube wrote:I've added 4 for each commonwealth race and 3 per ATF/Terran. I set them to TS ships, and named them Military Supply Transports.
May I ask, Litcube...

Does this include Missile suppliers for Yaki, Pirates, and Xenon? I'm not sure about Kha'ak if they'd need it or not. I tried to open the .xml files and see but... it's all Greek to me.

If not, is it a possibility for a future release?
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

By the time my job script comes into play the ship is already created. Whoever that supply ship belongs to has nothing to do with my script.


Here's my job file for reference. Download it and open it up on Xeditor 2. Do not overwrite your jobs file, though. I have a lot of custom shit in here, and I've changed the whole thing around.

You'll be looking at jobs 833 - 839. I don't have a Yaki one, though. If I did, there'd probably be only 1 ship, and not 3.


[ external image ]
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Litcube wrote:By the time my job script comes into play the ship is already created. Whoever that supply ship belongs to has nothing to do with my script.


Here's my job file for reference. Download it and open it up on Xeditor 2. Do not overwrite your jobs file, though. I have a lot of custom shit in here, and I've changed the whole thing around.

You'll be looking at jobs 833 - 839. I don't have a Yaki one, though. If I did, there'd probably be only 1 ship, and not 3.
Thank you!

Alright, I appended those lines into my Jobs file. I made a backup Jobs file, plus I could always just re-download from vkerinav's thread if necessary. I even have a script that HotSake modified for me that allows me to destroy all AI ships in the universe, in case I want to start a new Jobs file *completely* from 0 ships from within a saved game, without using converter tools.

Pardon me for being dense, but I couldn't gather from your answer if you plan to implement supply lines for the races I mentioned (Xenon, Yaki, Pirates).

I understand you said that race doesn't matter ("Whoever that supply ship belongs to has nothing to do with my script. "), but in the OP you say that ships only supply their own races... so race does matter, right? This is what I don't understand. If those races don't have supply ships, I don't think they can be supplied?
Last edited by builder680 on Wed, 20. Apr 11, 07:40, edited 1 time in total.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Military Suppliers Job Script:

M7s and M8s don't resupply themselves properly, so I wrote a job script for it. Ships running this job will search for their own races missile boats that are low on missiles (<12).
HotSake
Posts: 472
Joined: Sun, 3. Jan 10, 22:15
x3tc

Post by HotSake »

builder680 wrote:I understand you said that race doesn't matter ("Whoever that supply ship belongs to has nothing to do with my script. "), but in the OP you say that ships only supply their own races... so race does matter, right? This is what I don't understand. If those races don't have supply ships, I don't think they can be supplied?
The script just searches for missile boats of the same race as the ship running it, but suppliers of all races are running the exact same script. In order for Yaki/Xenon/Kha'ak to have missile suppliers, the Jobs.txt file will need a few new entries added to spawn suppliers of that race. You can do this yourself if you care to poke around, or you can make the case to vkerinav that (she?) should do it when they are added to the SRM/X-tra Jobs files.
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

HotSake wrote:
builder680 wrote:I understand you said that race doesn't matter ("Whoever that supply ship belongs to has nothing to do with my script. "), but in the OP you say that ships only supply their own races... so race does matter, right? This is what I don't understand. If those races don't have supply ships, I don't think they can be supplied?
The script just searches for missile boats of the same race as the ship running it, but suppliers of all races are running the exact same script. In order for Yaki/Xenon/Kha'ak to have missile suppliers, the Jobs.txt file will need a few new entries added to spawn suppliers of that race. You can do this yourself if you care to poke around, or you can make the case to vkerinav that (she?) should do it when they are added to the SRM/X-tra Jobs files.
I'll probably poke around. Thanks HotSake.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Hey, Builder, I'm posting my response to your PM here, because I think if others read my responses the way you read them, I think I need to publicly clarify.

My apologies if I seemed intentionally vague or obnoxious. I honestly thought my responses were answering your questions.

I think I underestimated how much you knew about jobs.txt. That's my fault.

This supply script is a single set of instructions. These instructions can be run on any ship. The thing is, my military supply script here doesn't actually create the ships, the job engine does. Once the job engine creates the ship, the military supply script is then run on it. It's the job engine that runs my script on this ship. So there's nothing I can do to make Yaki, Xenon, Goner, or Klingon supply ships; that's not what this script does. All it does is tells the Xenon, Yaki, Goner or Klingon ship to supply its own race's missile boats; it cannot create those ships.

The one script runs on any missile supplier, regardless of race. There is not an Argon supply script, a Boron supply script, or a Vulcan supply script. It's one script. This script functions differently depending on what race owns the ship.

So now you probably understand that in order to do what you've requested, one is required to edit the jobs.txt. That is something I can do, but won't be of use to anyone. Jobs is not a modular thing; it's all or nothing. From what I gather, most of you are using the xtra jobs pack. So he (she?) is going to have to edit that, and just include a reference to my script.

For future reference, if you think I'm being a dick, call me out publicly. The record will probably show that I'm not here to pick fights with anyone. And while there's more than a handful of WAAaay over-sensitive forum users in this particular scripts and modding forum, I don't count myself among them; if you call me a douche pocket, I'll probably see the light, buy you a beer, and explain myself a little clearer. If someone is bitter at something we say, it's probably our own fault. :)
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Right on. I'd have preferred to keep it in PM but I understand your motivations. Thanks for clarifying, as well as for the script itself. It's greatly appreciated and increases the fun of the game immensely for me.

Boston Lager if you don't mind. :)
_________________________________________________________

From the jobs.txt file you sent me, I could:

Open the file in a spreadsheet (semicolon delimited)
Append a copy of line 833
Save
Open in X3 Editor
Change the owner flags of the copied line from "Argon" to "Yaki"
Set the number of ships to 1 instead of 4

And then your script would handle the rest after the ship was created by Jobs. Bam, I'd have a Yaki missile supplier.
_________________________________________________________

I think I got it. :)
User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley »

Wow, already on page 4! This was a topic got allot of response.
Before posting I quickly tried to find Graxters script changes to some of the stock commands to lessen the missile spam, as it was said by the author of that change.

The plug-in "reduce enemy missiles" changes scripts:
!fight.attack.object.std
!plugin.acp.fight.attack.tactics
!plugin.acp.fight.evasive.def
!plugin.acp.fight.skill.std

Now I've never tried it (besides I would need to incorporate the script changes into Gazz OOS since they alter the same scripts) but reading about this plug-in kinda got me interested in it again; and I might find it worthwhile applying the changes in the scripts changing the same stock scripts.

Graxter reduced the chance that a pilot choose to fire missiles and it affects missile boats too. Aparently the setting for when/how to fire missiles are the same for both ordinary ships and missile ships?

But now with your turret script changes it might work out fine, with a little fiddling.

Graxters issue was that enemy ships unloads all there missiles at first opportunity, saving none for later. Apparently the the launch chance was raised from X3Reunion (to work with the afore mentioned m.boats).

So, eh, if one reduce the missiles fired from ships how badly will that affect the missile boats with this adjusted turret script? Is it still dependent on the settings in attack. object and such?

Cheers and thanks for an interesting script (I am also fighting with your Phanon corporation :D )
Projects:
Onhold..... time time....
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

;)


This particular missile turret script doesn't touch missile fire probability. You could theoretically have both running at the same time with both intended results.
vkerinav
Posts: 632
Joined: Sun, 11. Apr 10, 21:38
x3ap

Post by vkerinav »

I have no intention of leaving anyone out of having freshly supplied missile boats.
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Post by Cadius »

Bug report!

It doesn't seem to work with Terran missiles. I ran multiple tests with a cobra, minotaur, skirnir, claymore and gladiator. Cobra, gladiator and minotaur start unleashing hell the moment i hit the command, Skirnir and claymore don't fire, I also tested with my custom Terran M7M, same result.

Ships were tested individually against a Cerberus.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Hm. I just tested it in game, and a Skirnir fires missiles, and selects them properly. I wonder if it's a packing issue.

I'm going to update the package. Can you try a redownload?


Edit: if you could report on this I'd be most thankful!
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Post by Cadius »

ok will do. I tried editing TShip and allowed the Skirnir to use Hammer and Flail as well as Ghouls and Shadow just for testing purposes. When I fill the Ship with Flail and Hammer, it works fine, missile selection and everything. But once I empty that and fill it with Ghouls and Shadow, it won't fire.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Cadius wrote:ok will do. I tried editing TShip and allowed the Skirnir to use Hammer and Flail as well as Ghouls and Shadow just for testing purposes. When I fill the Ship with Flail and Hammer, it works fine, missile selection and everything. But once I empty that and fill it with Ghouls and Shadow, it won't fire.
Yeah, it does sound like a packing issue. My original version had that problem, but I thought I had fixed that before I even started this thread. Weird!
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Post by Cadius »

Ok tested, it's firing now, but there's another problem. Between Ghouls and Shadow, it prefers to use Shadow against fighters. Between Flail and Hammer, it uses Flail against fighters. Could it be because I'm using CMOD as well?
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

It will use whichever missile is fastest for any ship smaller than an M6. Which missile is faster?
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Post by Cadius »

Ah that would explain it. The Shadow is slightly faster than the Ghoul, I'll tweak that myself. Thanks Lit, another quality script.
User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube »

Update!

Missile Boat Turret Overwrite Versions

0.6b:
- Fixed packing issue. The old version didn't work with ATF/Terran ships, as I had hardcoded values. Proper version included now.
jlehtone
Posts: 22482
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone »

joelR wrote:
builder680 wrote:@ joelR:
...
That's why I told you to bugger off.

This is getting off topic though, if you wouldn't mind, any responses to this are probably best handled in PM's.
I have no interest in you "eating your words" Let it go please
Reminder: [url=http://forum.egosoft.com/viewtopic.php?t=216696][b]T[/b][b]C[/b] [b]S[/b]&M Posting [b]R[/b]ules[/url] Rule 1. Civil behaviour is required from all parties. :sceptic:

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