Free Jump for AI's [TC][AP][SCR]

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

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Free Jump for AI's [TC][AP][SCR]

Post by DrBullwinkle »

Free Jump for AI's
(works for Player, Universal Traders, and other player-owned ships)

Free Jump for AI's v1.50 (Less Cheatery Edition)
[ external image ]
Better jumping for your AI traders and explorers. Helps to keep them safe, and reduces wandering into enemy sectors.



What should I see when I install this script?

Nothing.

Specifically, you should not see traders and explorers dying as often as they do with vanilla jumps.

Otherwise, you should not notice much else. For most jumps, your AI's will use the normal vanilla jump routines. They will only Free Jump if they are being targeted by enemies, of if they have run too low on jump fuel.

Reason: The leading cause of trader death is that they run low on jump fuel, then try to fly to their next destination. Sometimes, their path will take them through hostile territory, where they may be attacked. It is somewhat stupid behavior, and can be infuriating. I cannot fix the AI for all traders in the game, but I can fix this one little problem by allowing ships to Free Jump under specific circumstances.

Also includes Free Jump command and hotkey so that the player can Free Jump. In my game I make Free Jump "Shift-J" to replace the vanilla jump key. Don't do this if you are new to the game... wait until you have done a thousand vanilla jumps, more or less. You will appreciate it more then. :)



Test Results
With Free Jump for AI's: Zero traders died during a week of occasional gameplay. Some were severely damaged, but they survived long enough to get to a shipyard for repairs.

Without Free Jump for AI's: Three traders died in one day of the same game.

Results: Substantially improved survivability for traders.



There have been over 1,000 downloads of Free Jump for AI's with zero bug reports for the Less Cheatery Version. (And only one minor report for the Economy-Booster Edition)



Uninstallation
If you need to uninstall Free Jump, simply re-install the vanilla move files here: AP or TC. Or do a Steam Refresh.



About the Economy-Boosting Edition
Unintended behavior in version 1.4.04 (and below) resulted in traders always Free Jumping, without delay. The result was that traders were able to make many more transactions per hour. They jump around so quickly that it is almost comical to watch.

However, I noticed a surprising side-effect. Gradually, the game's economy began to function the way that I think the developers intended it to work.

In my experience, the game economy actually works quite well if you leave the game running 24 hours per day. In other words: dedicate a computer to just playing X3. Even the Terran economy recovers if you put some UT's to work in Terran space (and then give them enough time).

Free Jump accelerates the pace, so that you can see the economy working properly in a matter of hours rather than days. If you can only play a few hours a week, then it is nice to be able to have the economy working at a pace that supports your game style.

Note that there have been a couple of reports of problems when starting new games with the Economy Booster Edition. The solution is to use the Less Cheatery Edition (or wait until you have some UT's or other traders before installing the Economy Booster Edition -- you do not need it before then anyway).

(Most players should use the Less Cheatery Edition.)



History
v1.50
- Repacked (no other changes)

v1.50 BETA 2 (Balanced Edition)
- Many small fixes and improvements.
- No feature changes; just better and quieter.

v1.4.10 BETA (Balanced Edition)
- Major change: Now Less "Cheatery"
- Uses normal jump for most purposes.
- Player ships jump even if low on fuel (prevents traders from wandering into Xenon sectors)
- Added Signal_Targeted library. Only use true Free Jump for player ships which are targeted. This acts as an improved emergency jump.

v1.4.04 2012-06-09
- Bug fix. Includes script file that was missing in the previous version.
- Package actually works now. Previous version had missing .pck's.
- Added jump timer for AI's.
- Re-implemented charging credits for jump. (But jump even if we have to borrow credits from a friend.)
- AI's should no longer ask about jumping with followers.
- Fixed obscure bug in !move.jump that could cause jump to null sector.

v1.4.02 Bullwinkle 2012-05-12
- Added AP 2.0 !move.jump and !move.jumptogate.nearest changes for free jump and Terran Jump.
- Added argument withFollowers to plugin.Grax.free.jump for compatibility with vanilla !move.jump.* scripts.
- Packed !move.jump as .pck so that it will actually update the vanilla file. (Probably)

v1.4.01 Bullwinkle removed checks for credits



Details
Adds Free Jump command, Free Jump hotkey, Free Jump Wing command. Allows gateless jump; including Terran sectors.

This version also allows AI's to use Free Jump (including Universal Traders and Economy & Supply Traders), which makes them more effective and safer.

The main script is Graxster's Free Jump. Bullwinkle added integration with vanilla move scripts (based on AP 2.0).
  • (Does not work reliably on Lucike's scripts, because he has his own jump routines.)
Last edited by DrBullwinkle on Mon, 16. Dec 13, 00:21, edited 21 times in total.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Reserved 1
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Reserved 2
User avatar
Ikaruga
Posts: 376
Joined: Fri, 30. Jan 04, 14:26
x4

Post by Ikaruga »

That looks very interesting !

Does it work with player-owned traders too ?

What about traders targetted by the player ? Do they jump instantly when the player attacks them ? If so, is it still possible to kill them ?
If brute force doesn't solve your problems, then you aren't using enough
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Ikaruga wrote:Does it work with player-owned traders too ?


I suppose I should clarify what I mean by "AI". Specifically, I mean player-owned AI's. Your ships. Not AI ships owned by other races.
What about traders targetted by the player ? Do they jump instantly when the player attacks them ? If so, is it still possible to kill them ?
That is a great idea! If you want that effect, I recommend Phanon Corporation. Phanon Corporation ships have some good tricks to make capturing them more challenging.

B
User avatar
Charon_A
Posts: 105
Joined: Wed, 6. Nov 02, 20:31

Post by Charon_A »

Thanks DrBullwinkle! More robust MK3 traders is a way to go :)

I have the latest plugin manager 1.43 but prefer to install scripts manually, so I tried to extract or export this to zip. I'm getting an error.
Error Extracting Files:
Scripts/!move.jump.xml (Uncompressing)
Be careful about reading health books. You may die of a misprint.
---Mark Twain---
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Charon_A wrote:prefer to install scripts manually, so I tried to extract or export this to zip. I'm getting an error.
Thanks for the report, Charon! This is the first time I have ever seen a bad save from the Creator, first-hand, but I will test them in the future. Now that you mention it, though, a previous version had a missing file that I thought I had included, and Logain Abler reported a similar problem. Perhaps it is a buglet in the Creator?




* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Update:
Free Jump for AI's v1.50b3
Free Jump for AI's v1.50b3




* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
I saw your picture recently, Charon:

[ external image ]
Last edited by DrBullwinkle on Thu, 21. Jun 12, 20:22, edited 1 time in total.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22407
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

sometimes that error can happen if its a bad download as well.

the creator should detect if its not written properly but sometimes it will seem fine to the creator but its been messed up on the file system
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Cycrow wrote:sometimes that error can happen if its a bad download as well.
Right, that was the first thing that I checked.

However, I was able to confirm the problem on the copy that I had on disk (the bad version that I inadvertently uploaded).

So it would appear that the Creator got confused, as you say.

Is there anything I can check and/or send to you that might help you to diagnose it?

The Creator usually works fine. I use it quite a bit, and this is the only confirmed case of it not being able to extract a file.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22407
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

prolly little i can do with the file, its the sorta thing that needs to be caught in the debugger rather than checking after
User avatar
Charon_A
Posts: 105
Joined: Wed, 6. Nov 02, 20:31

Post by Charon_A »

Thanks, DrBullwinkle, for the quick fix and for the photo of me :lol:
I'll be back home in a week and will try it out.
Be careful about reading health books. You may die of a misprint.
---Mark Twain---
bdew
Posts: 7
Joined: Sat, 2. Mar 13, 10:11
x4

Post by bdew »

Me again with weird issues.

I'm using 1.4.0.4 (economy boosting edition) and somehow NPCs are stealing my money to pay for their jumps 0.o

I've noticed constant small drain of funds that i couldn't explain in my main save (like 240-720 credit every minute or so), suspected mod issues and went to check it in a new game.

My 10000 starting credits got instantly drained and i got spammed with that "'Not enough credits to make the jump. I will do it this time, but you owe me, Buster!" even though i own only my starting ship that obviously isn't jumping anywhere :P

I've solved it for now by wrapping the charging code (in plugin.Grax.free.jump) in a check to see if the ship actually belongs to me, which means there are still NPCs somewhere out there getting free jumps, but i'll live with that :P

Code: Select all

045   $owner = [THIS] -> get owner race
046   if $owner == Player
047   |
048   * BW: ==================================
049   * Charge for energy cells, but jump anyway,
050   * even if we are broke.
051   |$cost = $ecells * 12
052   |if $cash < $cost
053   ||send incoming message 'Not enough credits to make the jump. I will do it this time, but you owe me, Buster!' to player: display it=[FALSE]
054   *goto label exit
055   |end
056   * BW: ==================================
057   |
058   |$cost = - $cost
059   |add money to player: $cost
060   end

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

bdew wrote:wrapping the charging code in a check to see if the ship actually belongs to me
Haha, nice catch, bdew. :)

I have not been maintaining the Economy Boosting Edition. I expect that a similar wrapper would work for the free jumping logic, as well.

If others are actively using the Economy Boosting Edition then I could post an update. Personally, I have been happy with the Less Cheatery Edition, which only allows free jumps when my ships are targeted for attack (or are out of jump fuel and likely to wander into enemy territory).
adrianx
Posts: 106
Joined: Sun, 24. Apr 11, 18:45
x3tc

Duplicate and binary lib.bw.breakpoint

Post by adrianx »

And thanks yet again, this time for this script.

I mentioned earlier (in another thread) about using git and it hightlighted lib.bw.breakpoint.xml as being used in an earlier commit, that of DCS. It also mentioned the DCS and Free Jump versions being binary files which confused me given they are supposed to be xml files. I noticed that some of your files with the xml extention are actually pck. Now, this maybe part of a whole, unpack and install it yourself problem, not using the Cycrow's package manager in which case I'll have to see about doing something with it with my shell script (I must admit not having checked other scripts). If not why the xml => pck issue, and do you know if X3TC will trip up over files called xml that are actually packed ?

A quick check of the scripts directory has nearly all .xmls being XML with just LDSC and DCS being packed XML.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

I am glad that you are enjoying the scripts on my list, adrianx!

lib.bw.breakpoint is a debugging script. If it is not present, it will simply be skipped. I no longer distribute it in any new packages.

Xml files packed into .pck's is an artifact from an early version of X-Studio, the awesomest script editor for X games. There have been no reports of trouble due to the incorrect extension. I did not even notice it myself (and I was using DCS regularly until a recent new project -- which I hope to unveil this week).
adrianx
Posts: 106
Joined: Sun, 24. Apr 11, 18:45
x3tc

Post by adrianx »

DrBullwinkle wrote: lib.bw.breakpoint is a debugging script. If it is not present, it will simply be skipped. I no longer distribute it in any new packages.

Xml files packed into .pck's is an artifact from an early version of X-Studio, the awesomest script editor for X games. There have been no reports of trouble due to the incorrect extension. I did not even notice it myself (and I was using DCS regularly until a recent new project -- which I hope to unveil this week).
Great, thanks for the reply. I unfortunately haven't got X-Studio working (properly) under wine yet, but it did seem excellent, with the brief look I got at it.
cryptonite1
Posts: 90
Joined: Sat, 1. Jun 13, 20:06
x4

Post by cryptonite1 »

hi, um one little fast question, do you need a jumpdrive to use free-jump? or can u use it without a jumpdrive?

(i DL this after installing all my hsips with a jumpdrive, can't test it)
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Needs a jump drive (probably).

Why can't you test it?
cryptonite1
Posts: 90
Joined: Sat, 1. Jun 13, 20:06
x4

Post by cryptonite1 »

ok, sorry for the inconveniance, I tested and confirmed that a jumpdrive is required for the option to pop up. thanks
User avatar
Fenris321
Posts: 324
Joined: Sat, 1. Jun 13, 15:23
x4

Post by Fenris321 »

"Not enough credits to make the jump. I will do it this time, but you owe me, Buster!"

Oh I wondered what that was. It was driving me crazy. I started up a new game and got hit with a hundred of those messages in a row. They were coming in so fast I couldn't delete them all. As fast as I clicked close I'd get more messages lol

Oh well, guess I'll try the "less Cheatery" one :D

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