[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
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sun, 14. Jun 15, 19:54

apricotslice wrote:Why?

Please answer the question.
caishow2 wrote:No.
Thank you

LOL!

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

Post by apricotslice » Mon, 15. Jun 15, 02:31

Certainly the realm of the bizarre.

Most people have a reason for requesting something. And often that reason can be handled without having to build something new.

First time I've had a request without a reason before.

User avatar
scoutster
Posts: 97
Joined: Sun, 13. Jul 08, 11:45
x3tc

Post by scoutster » Tue, 4. Aug 15, 15:57

Hi,

about the Extended PHQ.. is there any way to decrease ship building times for an existing one?

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

Post by apricotslice » Tue, 4. Aug 15, 16:00

scoutster wrote:Hi,

about the Extended PHQ.. is there any way to decrease ship building times for an existing one?
No. Unfortunately, when the PHQ is dropped, whatever hq script is running is permanent for it.

The only thing you can do, is offload everything from the PHQ, undock all ships, destroy the station, then cheat another into a TL and drop it again. The new one picks up the new file.

User avatar
scoutster
Posts: 97
Joined: Sun, 13. Jul 08, 11:45
x3tc

Post by scoutster » Wed, 5. Aug 15, 10:56

Finally there is a point in building ships on your own.. thanks for this mod :)

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

Post by apricotslice » Wed, 5. Aug 15, 11:41

scoutster wrote:Finally there is a point in building ships on your own.. thanks for this mod :)
That's more or less why I did it.

If they cost pretty much the same, building or buying, why bother building?

But now, its worth it to build.

Matticus88
Posts: 337
Joined: Sat, 28. Mar 09, 14:42
x4

Post by Matticus88 » Mon, 12. Oct 15, 23:46

Hi, Do the Hub Plot reduction mods mark game as *modified* ? if so, is there a way to reduce what is needed without the tag, or so i still get steam acheivements?

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

Post by apricotslice » Tue, 13. Oct 15, 02:34

Matticus88 wrote:Hi, Do the Hub Plot reduction mods mark game as *modified* ? if so, is there a way to reduce what is needed without the tag, or so i still get steam acheivements?
No, they dont. The script editor is not required.

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

Post by caishow2 » Wed, 21. Oct 15, 02:36

apricot.outfit.jump.xml

Is this correct?

Modified

Code: Select all

* $class = $ship-> get object class

if $ship-> is of type [Huge Ship]
* if $class == [Huge Ship]
= $ship-> add 10000 units of {Cargo Bay Extension}
$ship-> add default items to ship
* add money to player: -1000000
else
if $ship-> is of type [Big Ship]
* if $class == [Big Ship]
= $ship-> add 5000 units of {Cargo Bay Extension}
$ship-> add default items to ship
* add money to player: -500000
else
if $ship-> is of type [Fighter]
* if $class == [Fighter]
= $ship-> add 2000 units of {Cargo Bay Extension}
$ship-> add default items to ship
* add money to player: -200000
end
end
end
return null

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

Post by apricotslice » Wed, 21. Oct 15, 03:32

caishow2 wrote:apricot.outfit.jump.xml

Is this correct?

Modified

Code: Select all

* $class = $ship-> get object class

if $ship-> is of type [Huge Ship]
* if $class == [Huge Ship]
= $ship-> add 10000 units of {Cargo Bay Extension}
$ship-> add default items to ship
* add money to player: -1000000
else
if $ship-> is of type [Big Ship]
* if $class == [Big Ship]
= $ship-> add 5000 units of {Cargo Bay Extension}
$ship-> add default items to ship
* add money to player: -500000
else
if $ship-> is of type [Fighter]
* if $class == [Fighter]
= $ship-> add 2000 units of {Cargo Bay Extension}
$ship-> add default items to ship
* add money to player: -200000
end
end
end
return null
The code looks ok at first glance.

Why are you asking ?

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

Post by caishow2 » Wed, 21. Oct 15, 08:46

So effective?
This is the default equipment and then spend money?

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

Post by apricotslice » Wed, 21. Oct 15, 08:53

caishow2 wrote:So effective?
This is the default equipment and then spend money?
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.

I've no idea what you mean by 'then spend money'.

What are you trying to do?

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

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

I hope that equipment buckle money

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

Post by apricotslice » Wed, 21. Oct 15, 09:27

caishow2 wrote:I hope that equipment buckle money
What do you mean by 'buckle'?

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

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

Cost

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

Post Reply

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