[Scripts] Apricot Mapping Service Scripts, MD and mini-mods [APv2.5.1/TCv3]

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

Post Reply
User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Wed, 21. Oct 15, 10:06

If you want it all to cost money, then remove the * from the front of the money lines. At the moment they are commented out so wont execute. I forget which key does this, but look it up in the editor help screen.

When you add a negative number to credits, the amount goes down.

But beware, there is no testing to check if your credits goes below zero. It can happen easily if you are not careful, and I dont know what the consequences will be in the game.

caishow2
Posts: 79
Joined: Wed, 3. Jun 15, 14:21
x3ap

Post by caishow2 » Wed, 21. Oct 15, 10:30

Thank you

caishow2
Posts: 79
Joined: Wed, 3. Jun 15, 14:21
x3ap

Post by caishow2 » Sat, 31. Oct 15, 18:24

Where is wrong?
Add new primary resource to NPC factory

Code: Select all

$race = [Argon]
$ware = {Microchips}

$psec = [PLAYERSHIP]-> get sector
$i = 0
while $i < 40
$factory = find station in galaxy: startsector=$psec class or type=[Factory] race=$race flags=[Find.Random] refobj=null serial=null max.jumps=100
if $factory-> exists
$factory-> add primary resource to factory: $ware
$c = $factory-> get amount of ware $ware in cargo bay
skip if $c > 0
= $factory-> add 1 units of $ware
end
inc $i
end

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sat, 31. Oct 15, 20:59

caishow2 wrote:Where is wrong?
Depends. What are you trying to do?

Executing the code you posted will search 40 times for a random Argon factory in the whole universe, add Microchips as a primary resource and add one Microchip to the factory's cargo room. As there are no further checks, and you're looking for a random factory, there's the chance that you will find a factory more than once.

Also, does this question have anything to do with one of apricotslice's scripts/mods? If not, I would move it to an own topic.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

caishow2
Posts: 79
Joined: Wed, 3. Jun 15, 14:21
x3ap

Post by caishow2 » Sun, 1. Nov 15, 02:04

This is apricotslice script
The modified
Please give a correct code

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sun, 1. Nov 15, 03:22

caishow2 wrote:This is apricotslice script
The modified
Please give a correct code
Please let me know the exact script name this code is from. Off hand, I dont know which one it is.

caishow2
Posts: 79
Joined: Wed, 3. Jun 15, 14:21
x3ap

Post by caishow2 » Sun, 1. Nov 15, 03:33

setup.apricot.PHQ.MO.xml

Code: Select all

$race = [Boron]
$ship = {Yaki Headquarters}

$psec = [PLAYERSHIP]-> get sector
$i = 0
while $i < 40
$dock = find station in galaxy: startsector=$psec class or type=[Shipyard] race=$race flags=[Find.Random] refobj=null serial=null max.jumps=100
if $dock-> exists
$dock-> add product to factory or dock: $ship
$c = $dock-> get amount of ware $ship in cargo bay
skip if $c > 0
= $dock-> add 1 units of $ship
end
inc $i
end

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sun, 1. Nov 15, 03:43

caishow2 wrote:setup.apricot.PHQ.MO.xml

Code: Select all

$race = [Boron]
$ship = {Yaki Headquarters}

$psec = [PLAYERSHIP]-> get sector
$i = 0
while $i < 40
$dock = find station in galaxy: startsector=$psec class or type=[Shipyard] race=$race flags=[Find.Random] refobj=null serial=null max.jumps=100
if $dock-> exists
$dock-> add product to factory or dock: $ship
$c = $dock-> get amount of ware $ship in cargo bay
skip if $c > 0
= $dock-> add 1 units of $ship
end
inc $i
end
No, wont work for what you want to do. This script adds the Military Outpost for sale at a Boron shipyard.

I doubt its designed for the modifications you have made.

I cant help you with this one. My scripting isn't that good, and I'm very rusty these days.

Mods, best remove and make its own thread, so a scripter can help.

caishow2
Posts: 79
Joined: Wed, 3. Jun 15, 14:21
x3ap

Post by caishow2 » Sun, 1. Nov 15, 04:31

Add new primary resource to NPC factory

You can write a code?

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sun, 1. Nov 15, 04:38

caishow2 wrote:Add new primary resource to NPC factory

You can write a code?
No. I think its been done, but I've no idea how you would do that.

caishow2
Posts: 79
Joined: Wed, 3. Jun 15, 14:21
x3ap

Post by caishow2 » Sun, 1. Nov 15, 04:52

No way?

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sun, 1. Nov 15, 04:56

caishow2 wrote:No way?
My scripting ability is basic at best. A lot of scripts in my mods were first written by others.

You need your own thread, asking for a good scripter to help you.

CassCE
Posts: 29
Joined: Tue, 11. Mar 14, 15:20
x3ap

Post by CassCE » Sun, 22. Nov 15, 23:31

Hey, I can't get the X3:AP downloads page on Apricot's page to load in any browser. I'm trying to get the AP-compatible Expanded PHQ, which is v5.3 I believe. Is there another way to get it, either from a different site or a direct link? I guessed various URL's based on the TC page's naming structure, but none worked.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Mon, 23. Nov 15, 01:52

CassCE wrote:Hey, I can't get the X3:AP downloads page on Apricot's page to load in any browser. I'm trying to get the AP-compatible Expanded PHQ, which is v5.3 I believe. Is there another way to get it, either from a different site or a direct link? I guessed various URL's based on the TC page's naming structure, but none worked.
Weird.

I fixed something so its working now, but for the life of me I dont know why it wasn't working.

The only thing I can think of was the server got changed again, so the way the link worked before, stopped working.

Should be ok now.

CassCE
Posts: 29
Joined: Tue, 11. Mar 14, 15:20
x3ap

Post by CassCE » Mon, 23. Nov 15, 05:46

Thanks for the quick reply! It's amazing you're still so responsive after all these years, glad you're still around.

tecticles
Posts: 2
Joined: Fri, 29. Jul 16, 22:52

Post by tecticles » Sat, 3. Sep 16, 16:06

I'm looking for a mod or script similar to cbeam, but lets you choose individual cargo boxes to beam aboard. Is there something like that out there anywhere that allows you to beam 1 box aboard but not all of them in sector?

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Sat, 3. Sep 16, 16:14

tecticles wrote:I'm looking for a mod or script similar to cbeam, but lets you choose individual cargo boxes to beam aboard. Is there something like that out there anywhere that allows you to beam 1 box aboard but not all of them in sector?
From memory, Cbeam has both the hotkey and a command. The hotkey beams everything. The command beams what you select.

Have a look in the menus, as I dont recall where I put the commands.

RustInPieces
Posts: 84
Joined: Mon, 13. Feb 12, 08:22
x4

Post by RustInPieces » Mon, 17. Oct 16, 03:09

I am trying to use Apricot Rename Hub Sector to change the hub name to Xenon Hub. I edited the file, but it is not renaming the sector.
I am also using Dynamic Colored Sector Names. Would that cause incompatabilities?

RustInPieces
Posts: 84
Joined: Mon, 13. Feb 12, 08:22
x4

Post by RustInPieces » Mon, 17. Oct 16, 04:06

I have also tried using X3 Editor 2 to edit 0001-L044.pck. I changed ID 7 ID 1020000 text to Xenon Hub. It still did not change sector names.
edit: changed it back. it changed multiple sectors, but still did not show up in game.
Instead I tried editing ID 300007 ID 1020914 to Xenon Hub, it still does not work :/

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Mon, 17. Oct 16, 07:22

There can only be 1 0001 file, and the game uses the last one it finds. So if you are doing multiple things, they have to be merged into one file, and this file goes in the t folder.

I'm not familiar with Dynamic Coloured, but you'd need to extract the 0001 file from it, merge it with my version, change what you want changed, and put the result in the t folder.

Better is to create your own version of 0001, but it requires a script command in a setup. script to start it running on startup.

Pretty well everything I did to change text is in 8686, not 0001. So changing 0001 and then still using my 8686 might result in mine overwriting yours.

Look at how mine works, both the file and the setup script, find an unused number in the modding documentation thread, and create your own. Instructions should be in my modding 101 guide.

Post Reply

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