[Scripts] Apricot Mapping Service Scripts, MD and mini-mods [APv2.5.1/TCv3]
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01
As far as it reads, it should add cargo bay extensions and then add in the normal fittings for the specific ship its run on. What is put in depends on the ship.caishow2 wrote:So effective?
This is the default equipment and then spend money?
I've no idea what you mean by 'then spend money'.
What are you trying to do?
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01
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.
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.
Where is wrong?
Add new primary resource to NPC factory
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
- X2-Illuminatus
- Moderator (Deutsch)
- Posts: 24962
- Joined: Sun, 2. Apr 06, 16:38
Depends. What are you trying to do?caishow2 wrote:Where is wrong?
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!
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!
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01
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
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01
No, wont work for what you want to do. This script adds the Military Outpost for sale at a Boron shipyard.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
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.
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01
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.
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01
Weird.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.
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.