[Script]/[PoC] NPC Traders Using Jumpdrives OH MY

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

Post Reply
User avatar
RoverTX
Posts: 795
Joined: Wed, 16. Nov 11, 19:37
x4

[Script]/[PoC] NPC Traders Using Jumpdrives OH MY

Post by RoverTX » Sat, 12. Jan 13, 09:14

This is just a Proof of Concept and so it is not a good idea to use this alone with out having first modified your Jobs file, otherwise your universe will have to many traders using to many jumpdrives. OH MY :roll:

Download V1.1 SPK Here

Allows NPC Free Traders To Jump. Use at your own risk. Its more of a proof of concept then for actually consumption. If your going to use it you have to modify your Job files so there are a lot less traders.

It works by making sure before all major move commands that NPC traders have a jump drive, and that they have the needed energy. Also doesn't allow them to use up the room that will be used for the energy cells. In theory of course. It also removes any left over energy from the jump, so your universe doesn't get flood with Ecells.

It just adds a few checks, and a few lines of math, so the additional complexity should be minimal. Even though the traders will be making more runs more often, the NPC trader logic is no where as near complicated as the UT logic. So it shouldn't slow anything down.

The only real time they wont jump is if they hit a string of failures. I left that to be done by a normal gate to gate just in case there is some additional fail safe I am not seeing.

Versions:

1- First Go

1.1 - Updated so that M3-M5 Traders Don't Have Room Wasted by extra energy cells, and made sure all traders had enough energy at max range.

Realspace
Posts: 555
Joined: Wed, 15. Nov 06, 11:21
xr

Post by Realspace » Thu, 3. Sep 15, 23:12

Sorry for necroposting...I think this script is very interesting, since I use a modified map where sectors are very large and it could speed up the economy. Now traders have to take a long to route even if their max speed is 2.5x than the vannilla game.

Any test about it? I installed it in AP but don't see NPC jumping

Idea: would it be possible to make not all but let's say 30-50% of NPC ships use the jumpdrive?


Thank you!

User avatar
RoverTX
Posts: 795
Joined: Wed, 16. Nov 11, 19:37
x4

Post by RoverTX » Sun, 13. Sep 15, 21:48

Been a few years sense I messed with this, but I tested it by sitting at a Solar Power Plant owned by an NPC and watched as the ships once they had bought their wares jumped out. Then I think I tested at a non Solar Power Plant factory. Both had the correct results.

I would have to download this again and review, but I believe they will not always jump if their hold is full up and there isn't any room to add the needed energy cells, I could be miss remembering though.

Edit: Also I don't think it was set up for them to jump to a gate in the same sector. I think this was actual some how part of the vanilla script, but I can't really remember off the top of my head.

Post Reply

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