Page 1 of 5

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

Posted: Thu, 19. Jan 06, 01:13
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.

Posted: Thu, 19. Jan 06, 01:24
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

Posted: Thu, 19. Jan 06, 14:07
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

Posted: Thu, 19. Jan 06, 15:02
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. :)

Posted: Thu, 19. Jan 06, 16:00
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?

Posted: Thu, 19. Jan 06, 16:12
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.

Posted: Thu, 19. Jan 06, 16:17
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.

Posted: Thu, 19. Jan 06, 16:30
by Dgn Master
Thanks for the reply, i look forward to the update on relations with them.

Posted: Thu, 19. Jan 06, 16:43
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

Posted: Thu, 19. Jan 06, 16:55
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.

Posted: Thu, 19. Jan 06, 17:57
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

Posted: Thu, 19. Jan 06, 18:03
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.

Posted: Thu, 19. Jan 06, 18:40
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

Posted: Thu, 19. Jan 06, 19:49
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.

Posted: Thu, 19. Jan 06, 20:00
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

Posted: Thu, 19. Jan 06, 20:34
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

Posted: Thu, 19. Jan 06, 23:07
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.

Posted: Fri, 20. Jan 06, 00:55
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

Posted: Fri, 20. Jan 06, 06:49
by banghead
thank you again for updating it :)

Posted: Fri, 20. Jan 06, 16:52
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.