[Script] Friendly Pirates v4.01 (upd: 05/08/06)

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

TycHouse
Posts: 488
Joined: Wed, 6. Nov 02, 20:31
x3tc

[Script] Friendly Pirates v4.01 (upd: 05/08/06)

Post by TycHouse »

UPDATED

This script initially sets the player notoriety with pirates to -500 then continues to monitor the notoriety and sets the relation accordingly.

You will now gain notoriety by helping pirates that are being attacked

If you want to play as a pirate or with the pirates as allies then this script is for you.
Simply download and extract, then follow the instructions in the readme.txt - the rest is automatic.

IMPORTANT - If you are currently running an older version of Friendly Pirates you must remove it first as follows:
1) delete the files setup.friendly.pirates.xml and friendly.pirates.xml from your ..\X3 Reunion\scripts folder
2) start your game (and load from the save you wish to continue from)
3) go to the Script Editor and select GLOBAL TASKS
4) note the PID number on xxxx:friendly.pirates:null and select it
5) press the 'delete' key
6) check the PID number is correct
7) select 'yes' and press 'enter'
now save your game, exit to desktop and install the new version


Download v4.01 here and be sure to read the new enclosed readme.txt

Enjoy :)

Edit: v4.01 fixes problems noted in some of these posts, specifically it will now work with Cockpit Callback installed.
Last edited by TycHouse on Sat, 5. Aug 06, 16:25, edited 6 times in total.
AMD FX-8350 Eight-Core 4.0GHz Processor
ASrock Extreme 3 R2.0 Motherboard
8Gb memory
2 x AMD HD7770 Graphics (Crossfire not enabled)
Windows Vista Ultimate 64bit SP2
User avatar
bladeuk
Posts: 2063
Joined: Sat, 8. May 04, 18:26
x3tc

Post by bladeuk »

Ooo could be just what i need, make them allies, build up my militray without interuption, then BOOM, no more pirates :twisted: :twisted:

~Nice job
TycHouse
Posts: 488
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by TycHouse »

Small update v3.01

Relation is no longer changed if the pirate ship is within 15kn of a player owned ship. Therefore if you want to kill a few it will no longer reset the ship you are attacking back to neutral mid fight :) Obviously your notoriety with pirates will drop if you shoot them !

TycHouse
AMD FX-8350 Eight-Core 4.0GHz Processor
ASrock Extreme 3 R2.0 Motherboard
8Gb memory
2 x AMD HD7770 Graphics (Crossfire not enabled)
Windows Vista Ultimate 64bit SP2
User avatar
Dgn Master
Posts: 1311
Joined: Fri, 27. Feb 04, 10:36
x3tc

Post by Dgn Master »

All i can say is thank you!

About the only thing that tends to pick on my sats are the free roaming pirates, now all i have to do is set up a few space fuel/weed factories in presedents end and build up my relations with them. :)
Could the parents of the little Argon girl, Suzie, please claim her sealed jar of remains?
She didn't mind the gap and ended up vapourized!
User avatar
Simon029
Posts: 65
Joined: Wed, 14. Jul 04, 11:12
x4

Post by Simon029 »

Hi,

when you start a new game or load the script the pirates should be enemys of you, but if you start as assasin they should be friendly to you.

Edit: One question: If the pirates are enemys how can you get them friendly? trading? or shooting someone?
User avatar
Dgn Master
Posts: 1311
Joined: Fri, 27. Feb 04, 10:36
x3tc

Post by Dgn Master »

Simon029 wrote:Hi,

when you start a new game or load the script the pirates should be enemys of you, but if you start as assasin they should be friendly to you.

Edit: One question: If the pirates are enemys how can you get them friendly? trading? or shooting someone?
I actually like the idea that they start off neutral to you no matter if your an assassin or not, if you haven't done any pirate hunting then why should you be concidered an enemy?

I think that you can make them friendly in much the same way as with other races through trading (i'm going to set up a few space fuel/weed factories then kill a few after they have traded with me a while to test it out.
Could the parents of the little Argon girl, Suzie, please claim her sealed jar of remains?
She didn't mind the gap and ended up vapourized!
TycHouse
Posts: 488
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by TycHouse »

The problem with the game asis is the fact that your notoriety with pirates is set at -1000000 to start with and there isn't much in a standard game that will change that.
My script simply starts you off at 0 giving you the opportunity to go either way however, i don't know whether trading with pirates or killing their enemies in their space will affect that (i will test it and report back).
What i can say is that if you shoot pirates you will lose notoriety with them and in the mission in my TycPack1 it is possible to gain notoriety with them.

Thus if you want pirates as always enemy no matter what then don't use this script, however if you want to play a game where you are a pirate then use it... it's up to you.
AMD FX-8350 Eight-Core 4.0GHz Processor
ASrock Extreme 3 R2.0 Motherboard
8Gb memory
2 x AMD HD7770 Graphics (Crossfire not enabled)
Windows Vista Ultimate 64bit SP2
User avatar
Dgn Master
Posts: 1311
Joined: Fri, 27. Feb 04, 10:36
x3tc

Post by Dgn Master »

Thanks for the reply, i look forward to the update on relations with them.
Could the parents of the little Argon girl, Suzie, please claim her sealed jar of remains?
She didn't mind the gap and ended up vapourized!
TycHouse
Posts: 488
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by TycHouse »

Well after a few trial runs i can report that trading with pirate stations definately DOES improve your notoriety with them.

I creates 54 Slaves (all i could carry !) and sold four times to the same station (sold them 200 in total) then flew to another pirate station and checked, my notoriety with them had increased to 2 from zero.

However if you check on any individual ship they appear to be friendly to all races unless they have been attacked (say by the paranid) in which case the attacking race is their enemy. I didn't gain any notoriety by killing that attacker.

TycHouse
AMD FX-8350 Eight-Core 4.0GHz Processor
ASrock Extreme 3 R2.0 Motherboard
8Gb memory
2 x AMD HD7770 Graphics (Crossfire not enabled)
Windows Vista Ultimate 64bit SP2
User avatar
Dgn Master
Posts: 1311
Joined: Fri, 27. Feb 04, 10:36
x3tc

Post by Dgn Master »

Great news indeed, i didn't actually think that pirates would care much for you killing their enemies, but the trading aspect will make me a happy camper, i just hope the ships they send to buy your wares move your rank up accordingly so i don't have to trade manually.

Thanks for checking.
Could the parents of the little Argon girl, Suzie, please claim her sealed jar of remains?
She didn't mind the gap and ended up vapourized!
B-O'F
Posts: 724
Joined: Sat, 21. Feb 04, 02:15
x3tc

Post by B-O'F »

Hi TycHouse,

Just tried out your Friendly Pirates script and have found what appears to be a slight problem.

I am running Deadly Da's rev 1 hidden base, and 1.3.1 BETA.

When I started a saved game with your script, I lost all the autotrader options in the trade menus of my ships, and the Cheat scripts General menus. Removed your script, restarted the saved game - no problem. Restarted the saved game with your script, and they are missing again.

Why this is happening I do not know, as I cannot see anything obvious in your script.... Has anyone else seen this problem?

Have fun,

Boron - Ol Fh'art
TycHouse
Posts: 488
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by TycHouse »

Hmmm very strange !

Friendly pirates does not use any command slots or wares so i have no idea what the problem could be ! I'll have to check the other scripts and see how they operate.
AMD FX-8350 Eight-Core 4.0GHz Processor
ASrock Extreme 3 R2.0 Motherboard
8Gb memory
2 x AMD HD7770 Graphics (Crossfire not enabled)
Windows Vista Ultimate 64bit SP2
B-O'F
Posts: 724
Joined: Sat, 21. Feb 04, 02:15
x3tc

Post by B-O'F »

Hi TycHouse,

I have tested further, with the same saved game. All other setup files have been removed, apart from:-

setup.plugin.autotrade.pck - 11/01/2006 11:03
setup.plugin.patrol.bas.pck - 11/10/2005 17:31

Without your friendly pirates script, ships show the ST and UT commands.
With your friendly pirates script, ships do not show the ST and UT commands.

setup.friendly.pirates.xml - 19/01/2006 12:43 is the v3.01 copy.

No init files apart from the !inits, so a really strange problem.

This should narrow down your checking to virtually nothing....

Boron - Ol Fh'art
Naffarin
Posts: 481
Joined: Sat, 3. Dec 05, 09:49
x3

Post by Naffarin »

I am wildly guessing just as usually :) but i don't think it's a good idea to use an endless loop in a setup script. I am not convinced that the initializing phase executes scripts in parallel.

Might be worth a try to put the while loop in an extra script and start it as a global task.
TycHouse
Posts: 488
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by TycHouse »

Yep you are absolutely right :)

I've seen identified and fixed the problem. v3.02 has been up loaded.

It seems that a setup.*.xml file MUST complete and return therefore i've moved the code into another script which is called from the setup file. I've tested this and it works.

Thanks for letting me know and identifying the problem. Anything else just yell.

Cheers

TycHouse
AMD FX-8350 Eight-Core 4.0GHz Processor
ASrock Extreme 3 R2.0 Motherboard
8Gb memory
2 x AMD HD7770 Graphics (Crossfire not enabled)
Windows Vista Ultimate 64bit SP2
B-O'F
Posts: 724
Joined: Sat, 21. Feb 04, 02:15
x3tc

Post by B-O'F »

Hi TycHouse,

Just tried the new script, no problem with ST and UT now, haven't checked if the pirates like me - will have to try and kill a few....

Thanks for your work, we have all learned something with this error - that is the sole purpose of errors, to learn from them. Having made a lot in my time, and still making new errors, I am still learning..

Thanks,
Boron - Ol Fh'art
virgil_182
Posts: 7
Joined: Sun, 15. Jan 06, 04:55
x3

Post by virgil_182 »

I have a quick question.

(A really good idea by the way, nice script.)

My question is this. Will the pirates be friendly only to you, the player, or will running this script make your merchant fleets and pilots, ie.. station support / traders, immune to pirate attack as well. I like the idea of being able to trade, and establish relations with the shady pirate underworld with my character but I don't like the idea of the script as a global, player empire, get away from pirates free card. (I just began playing so as of yet my empire consists of myself and my Buster. But I assume that as my fleet grows and becomes more automated my pilots will be subject to the dangers of enemy fleets, and pirates as they ply the trade lanes.)

Thanks again for the script.

Best.
TycHouse
Posts: 488
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by TycHouse »

No, the player is a race just like the Argon, Boron etc. It basically tells the pirates that the player 'race' is neutral therefore they will not attack your stations or other ships.
Think of it like this: you are a pirate just like them but it's not possible for you to be of race type 'pirate' therefore this is the next best thing.
If however, you start attcking them then they will start to dislike you more and more and eventually you would be back in the same position as a normal game.
The script was written so that the player could truely be a pirate. You can go out and attack the Argon, Boron etc and make them enemies but as long as you don't attack the pirates you will always have their bases to dock at. Also, with TycPack2 (still writing it !) it will be possible to buy ships (and later maybe stations) from pirate bases thus negating the need to be friendly with normal faction races altogether.

TycHouse
AMD FX-8350 Eight-Core 4.0GHz Processor
ASrock Extreme 3 R2.0 Motherboard
8Gb memory
2 x AMD HD7770 Graphics (Crossfire not enabled)
Windows Vista Ultimate 64bit SP2
banghead
Posts: 148
Joined: Mon, 26. Jul 04, 18:00
x3

Post by banghead »

thank you again for updating it :)
TycHouse
Posts: 488
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by TycHouse »

Update v3.03
Found another small problem where after saving your game and reloading there would be multiple copies running as a global task, not a huge problem but would degrade performance after multiple saves.

Fixed: setup file now checks whether code has been run before launching script.

Install v3.03 then load game, check global tasks and stop (select correct task and use 'del' key) all but one 'friendly.pirates' task. Then save game, all should now run correctly.
AMD FX-8350 Eight-Core 4.0GHz Processor
ASrock Extreme 3 R2.0 Motherboard
8Gb memory
2 x AMD HD7770 Graphics (Crossfire not enabled)
Windows Vista Ultimate 64bit SP2
Post Reply

Return to “X³: Reunion - Scripts and Modding”