scripting help x3ap

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

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

Re: scripting help x3ap

Post by X2-Illuminatus » Mon, 15. Apr 19, 22:40

I finally found some time to make some changes again:

- If you have a Freight Scanner installed, and a ship targeted, pressing the hotkey will write a ship log to logfile 150 containing the following data:
  1. Some generic data: Relation (omitted if it's your ship), ship name, sector name, position in coordinates, distance to your current ship.
  2. The wares (and their amount) that are installed on the ship, divided into weapons (listed by front and turret weapons), shields and softwares. If none of either category are installed, the log will say so.
  3. The wares that are not installed on the ship (i.e. which are located in the cargo room), only if wares are present in the cargo room. The log will contain the ware, its amount, volume, transport class, whether the ware is illegal in the space of the current sector owner, and for missiles and weapons whether the target ship can install (i.e. use) them.
The ship log is called for your current ship, if you have no target selected.
Currently not logged are Marines and other personnel.

- If you have a Trading Computer Extension installed, and a factory targeted, pressing the hotkey will write production information about that station to logfile 150 containing the following data:
  1. Some generic data: Relation, factory name (contains sector name), position in coordinates, distance to your current ship
  2. The product(s) sold by the station, including the current amount and maximum amount, the product name, the current price, the min and max price, the volume and the transport class of the ware, and whether the ware is illegal in the space of the current sector owner, only if it is really so.
  3. The resource(s) (divided into primary and secondary) bought by the station, including the current amount and maximum amount, the product name, the current price, the min and max price, the volume and the transport class of the ware, and whether the ware is illegal in the space of the current sector owner, only if it is really so. If the station has no resources of either type, the log will say so.
  4. The production cycle information, including how many units of which product(s) are produced in what time as well as which and how many wares are required for one cycle.
  5. The remaining time for the current production cycle.
  6. Whether the station has enough resources to start the next production cycle. If it has enough resoures to start more than one, the log will tell you how many cycles it can run with the current amount of resources. If it doesn't have enough resources, it tells you which ware(s) and how many units of them are missing.
The current production log will not work very good with player complexes consisting of lots of different production chains. But for single NPC stations and NPC production complexes, as well as single player stations or complexes just containing one production chain, it should work fine. I'll see about changing that in the next version.

- I also fixed / changed a couple of minor things:
  • The ware order for factories was incorrect (i.e. wares weren't logged in the correct order).
  • I replaced the long version of the transport class with the short version (e.g. "Extra Large Container" turns into "XL").
  • For ware containers floating in space, it is now also logged whether the ware is illegal in the space of the current sector owner.
Download here:
v0.40.zip

Alternative Download: Click here (Not a direct link though, the actual download link is below the "Thanks for visiting XDownloads, here is your file:" line.)

For Installation: extract to your addon\scripts folder. This will overwrite the existing files (whereby there are two new ones this time).

As usual, please tell me if this works for you or whether there need to be any changes.

----------------------------

As for your other requests: I don't think there's an easy way to get the incoming ship list of a station via script. I'll have to check whether there's an easy workaround. As for the destroyed ship equipment, I will add something to the ship log script, so it remembers what you had installed last time, when you ran that log.
You do not have the required permissions to view the files attached to this post.
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!

User avatar
Red-Spot
Posts: 102
Joined: Wed, 9. Jan 19, 10:22
x3ap

Re: scripting help x3ap

Post by Red-Spot » Wed, 17. Apr 19, 14:36

Big KUDOS to you Illuminatus :)
'Ignoramus et ignorabimus'

Gandalf The White
Posts: 2185
Joined: Sat, 9. Nov 02, 12:21
x3

Re: scripting help x3ap

Post by Gandalf The White » Fri, 19. Apr 19, 14:56

hi,

thank you very much. i will test all this and let you know how it goes.

i'm so sorry i haven't been around in a little while.
many thanks again for all your efforts it really is appreciated.
some who deserve life receive death. Others who deserve death receive life. Can you give it to them? Don't be eager to deal out death in judgement, for not even the wise can see all ends.

Gandalf The White
Posts: 2185
Joined: Sat, 9. Nov 02, 12:21
x3

Re: scripting help x3ap

Post by Gandalf The White » Sun, 19. May 19, 18:41

hi there.

ok so the scrips seem to work so far.

however i can't seem to see how much money i have or anything like that anymore.

anything you can do about that?
sorry i haven't been about, rl has been well it's been rl lol.
some who deserve life receive death. Others who deserve death receive life. Can you give it to them? Don't be eager to deal out death in judgement, for not even the wise can see all ends.

Gandalf The White
Posts: 2185
Joined: Sat, 9. Nov 02, 12:21
x3

Re: scripting help x3ap

Post by Gandalf The White » Sun, 19. May 19, 19:13

actually don't worry about that i have worked it out. absolutely brilliant. the work you've done has been fantastic.
some who deserve life receive death. Others who deserve death receive life. Can you give it to them? Don't be eager to deal out death in judgement, for not even the wise can see all ends.

Post Reply

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