milling_hordesman's script page

The place to discuss scripting and game modifications for X²: The Threat.

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

Taki
Posts: 2
Joined: Sun, 28. Aug 05, 15:10

Post by Taki » Sun, 11. Sep 05, 21:23

mbthegreat wrote:Sorry for the necromancy but I'm habing problems with this script, I ran the add ware script from the editor but there is no ware at the argon equipment dock in argon prime (only one i tried) have i done something wrong?
If there isn't any conflict with some of your other installed "unsigned scripts" you shouldn't have to use the editor to make the ware avalaible .. it seems you hava a ware conflict that prevents MH's ware being avalaible.

Taki
Posts: 2
Joined: Sun, 28. Aug 05, 15:10

Post by Taki » Sun, 11. Sep 05, 22:43

Oops forgot something...
Despite the ADV jumper 1.72 is an awesome piece of cake
(setting wingmen with auto jump .. you are in trouble somewhere ... just call them by a press of a key and they jump right next to you with that incredible sound .... NEATT ... my wingmen are 10 M3 Class Khaak Ship fully load with 3 beta kyon .. they can extractme from quite all situations :) ..
Anyways ... back to what is important, i have the regret to annonce i have discover .. a bug or a little glitch .. dont really know, it is a minor one but still...

Here it is!!

Situation: Player flying normally with a cohort of follower or wingmen set to protect or any other command that make your cohort to follow you.
All the cohort is set with an hyperbolic drive, enough energy or the SSTC and the auto-jump additionnal command set to on.

Trigger: Player flying normally through a jumpgate to the next sector

Bug: The cohort of followers dont follow the player trough the gate, instead they engage hyperbolic drive and go to the edge of the sector they currently are ( ie: coordinate x:250km y:250km z:250km) and start to follow player again so going back to where the player entered the gate and this AT NORMAL SPEED ( this will be long till they come back from that position )

Debugging and explanation:
I looked at the script to try to fix it myself, so i know why this is happening but dont really have a solution right now to fix it.
Here i go.
When you enter a jumpgate, any ships that have you as a target will see the distance between you and them going up real fast ( you are entering the wargate ) so as soon as that distance is above 15km, the auto jump command kicks in and the followers try to rejoin you engagng the hyperbolic drive. Unhappily you are not in the current sector anymore ( remember you just jump through the jumpgate ) so the AI followers still try to rejoin you ( you are in the next sector they are in) and go to the edge of sector.
Once their hyperjump is done, they realize the fact ( going back to the follow command ) you are in the next sector. As you are in the next sector ( jump distance = 1 ) they dont engage freejumping ( this is normal as it is scripted that way, and it is good ) and begin to rejoin you from where they are ( position x:250km y:250km z:250km)

This only happen when YOU are the leader and AI is the follower.

I tried with an AI sets as leader with a command "Fly to sector.." choosing the next sector. Me with autopilot engaged with command "Follow" that AI leader and the bunch of followers sets to "Follow" that AI leader with autojump still engaged.... Result all that mess goes through the gate .. just fine...

Solution:
I have some but they are not very usable or i dont know how to apply them
  • 1: Disengage Auto jump command on any AI following you when entering a jumpgate ( a pain in the *** )

    2:Make an AI the leader and order it to go where you want and set all the followers to "Follow" that AI leader
    The problem in this solution is that the whole group will go smooth through the gate but will not follow you if you engage hyperdrive and will travel at the speed of the slowest of the followers

    3: Put a fast M5 (or other ship faster than you are ) as a damper setting it to follow you without autojump engaged and all other AI sets to follow the "damper" with auto jump engaged
    The problem evoked at solution 2 is stil here as you use an AI as a "leader"

    4:Make AI use freejump even when jump distance =1
    I dont really like that idea

    5:MAke the AI Hyperjumping back to the gate ( not sure if it is possible
    and not quite a solution just a workaround )

    6:Add a check somewhere to verify that leader ( YOU) is still in sector before engaging hyperjump ( possible problem, hyperjump will take time to kick in )

    7:Check if destination position is somewhere between 220 and 250km at anytime -> abort hyperbolic drive
    This sounds the best option as you dont really often go yourself as far in a sector neither the AI. And this solution would not alter at all the regular mechanism of the current auto jump
    Though i dont know how to add that check but i'm sure MH can
    ( i can read a script and quite understand it ...but i'm not confident enough to mess with it... in fact i already tried :lol: All went wrong )
I'm sure there could be another solution better than mine
Feel free to express them.

I hope MH will find the way 8)
And this will make ADV jump the ultimate jump script

Now a good news, some possible enhancements for advance jumping:
  • 1:Possibilty for the auto jump command to engage hyperbolic drive or freejump drive if command is "move to position", with the added ability for a ship that dont have the freejump drive but have the hyperbolic one to engage hyperbolic to fly to the jumpgate and doing it again until final destination reached if the 'position" is in another sector( this will cost less e-cells than a freejump but journey will be a little longer)
    Hint: Action is "entering warpgate" dont know if it can be implemented

    2:Same as above but for the "Fly to sector" command with the added ability for a ship that dont have the feejump drive but have the hyperbolic one to engage hyperbolic to fly to the jumpgate and doing it again until final destination reached ( this will cost less than a freejump but journey will be a little longer)
Thanks for reading this long post

Regards to MH, his beta testers and Galaxy ( i hope i'm not messing with names ) for those incredible sounds we have when engaging and disengaging freejumping :)

AdmiralTigerclaw
Posts: 2131
Joined: Mon, 27. Dec 04, 11:49
x4

Post by AdmiralTigerclaw » Mon, 12. Sep 05, 01:36

Since I helped MH with most of the work on the Adv Jumper system... I beta tested quite a few jump situations.

The bug with the hyperbolic drive and the instant jump sequence being used has been seen during testing of the autojump command. Now, the major problem was that after flying through a gate, the AI use their jumpdrives instead of following you directly.

We contemplated ways of figuring out how to implement the autojump sequence depending on how the player jumps, but we just couldn't figure it out. The best we've come up with is a forwarding check to ships assigned to follow player to initiate jump when the player excecutes a jump.

However we determined that there just isn't a command, or a simple list of checks to determine how to enforce the auto-jump when the player flies through a gate automatically.


Anywho... this bug is only a minor irritant if you employ the ADV Jumper package safely. Mainly, if you have an autojumping support team, we can usually assume you've got enough money that everyone is fully kitted with HDrive FJDrive, and SSTC, including the player. And that as such, the player would more commonly be using the FJDrive to go from place to place in a hurry rather than flying gate to gate.

Anywho... glad to hear you like the sounds. Would you believe some of them came out of Battleship?

User avatar
milling_hordesman
Posts: 372
Joined: Mon, 1. Mar 04, 06:16
x3

Post by milling_hordesman » Thu, 15. Sep 05, 17:43

ah... hunh. interesting. so let me make sure i understand this correctly:
- when entering a gate, the player ship actually moves to the edge of the sector map before being "placed" into the next sector
- because the player is is temporarily at the edge of the sector, wingmen set to autojump with hyperdrives will lock that point at the edge of the sector as their destination and engage hyperjump to travel there
- by the time they hit the edge of the sector, following ships see that the player is now in the next sector and turn around and go into "fly through the gate" mode, not using hyperjump to get there

also, this situation occurs when the player is on autopilot or when they manually fly into a gate?

well, if this is the case, i could see a solution:
1) perform checks involving the leader ship's distance to a gate. if the leader gets within, say, 1km of the gate in the "flat" plane of the gate and no more than, say 200 meters to either the front or back of the gate, then the leader sets themselves in a special state where the follower's auto-jump scripts do not trigger jumps for about 5 seconds or so. this should give the leader time to travel to the next sector and the wingmen to begin docking with the gate. exact times and distances would need testing.

thanks for the regards. i give my own for you being able to sort through my code :p

the sounds are entirely thanks to AdmiralTigerclaw (with only a little timing work done by myself), and it heartens me to see that he's still active in the X2 community :)

for future reference, if you do find more bugs, PM-ing me will send a notice to my hotmail account, which i check... well, weekly, maybe. i'm always interested in finding ways to improve my work.

i'll take a look at this problem in particular once i get home today, maybe set up a few test situations myself so i can see what the exact behavior is.

EDIT: okay, i've done a little twiddling, and the result is: ships will no longer auto-hyperjump to a target within 1.5km (the radius of the ring) of a jumpgate. 3 seconds after the target leaves the vicinity of the gate OR whenever the target leaves the sector, ships will go back to auto-jumping as usual. this only affects auto-jumping ships that might jump to a target that is within the radius of a jumpgate or who have just recently left the vicinity of a jump gate.

i write it off to the inaccurate nature of trying to calculate jump coordinates that close to a fixed jumpgate ;) the updated files can be found at my FTP site. any currently active auto-jump scripts should restart themselves after installing the new version, so hopefully it'll just be a clean unzip, replace the old ones, and keep going.

as always, if something else seems to be adversely affected by this update, please let me know so i can fix it :)

Regards,
//----------------------------------
--the milling_hordesman

Me Mods

RagX
Posts: 552
Joined: Fri, 23. Sep 05, 08:04

Post by RagX » Tue, 27. Sep 05, 13:56

Just a quick Q:

Which scripts have you tried with your adv jumper script that you're sure doesnt lead to problems? I'm still not keen on looking for conflicts in scripts I choose, and so I hate to un/reinstall everything when I do find a serious conflict :shock:

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Wed, 28. Sep 05, 05:10

"Nature's first green is gold" . . . stay golden.

StormSinger
Posts: 89
Joined: Tue, 15. Mar 05, 18:04
x4

Post by StormSinger » Wed, 28. Sep 05, 06:32

The only real problem I've had with AJ is if my trade ships have it set to Freejump and they try to jump before clearing the dock. I lost 12 ships consecutively before I went outside and watched what was happening.

Even the few that made it, eventually trashed themselves in a similar fashion. Otherwise, I love the script.

AdmiralTigerclaw
Posts: 2131
Joined: Mon, 27. Dec 04, 11:49
x4

Post by AdmiralTigerclaw » Wed, 28. Sep 05, 16:11

What version are you running? The latest version should do a collision avoidance move before it jumps. (IE, it will teleport a few meters away.)

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Wed, 28. Sep 05, 16:51

I have the same issue even with the latest versian (1.72/1.73). THe problem lies with giving the ship a Subspace Displacement Drive, and then setting the ship on Auto-Jump. The moment the ship leaves the station, it initiates the Freejump command, and stops dead, even while still inside the docking tube. This results in the tube closing on the ship and causing it to explode.

RagX
Posts: 552
Joined: Fri, 23. Sep 05, 08:04

Post by RagX » Wed, 28. Sep 05, 17:01

so we need some sort of wait for them to clear the tube into clean space (about 10 seconds flight time should do even for the slowest TS), start autojump, cleared it, and cancel the wait.

I'd love to program in the wait thing, but I dont know how :oops:

StormSinger
Posts: 89
Joined: Tue, 15. Mar 05, 18:04
x4

Post by StormSinger » Wed, 28. Sep 05, 17:56

I was using 1.72. Some of the ships did fly out for several seconds before jumping, but it was random at best, and eventually they jumped within the dock.
A couple of them even jumped back close enough to the station that they collided with it (this was far less common).

AdmiralTigerclaw
Posts: 2131
Joined: Mon, 27. Dec 04, 11:49
x4

Post by AdmiralTigerclaw » Thu, 29. Sep 05, 00:00

That's a weird problem indeed. I've never had it. The collision avoidance built in the system is supposed to check if the ship is within X range of ANY object, and if it is, 'set position' so that it is away from the object for the jump. In the case of a station, even if it's in the docking tube, the first thing it should do is suddenly 'appear' in a different spot before even going through orientation. And even then, if it wants to fly right through the station, it should 'set position' over and over until it clears the station. (Which also results in a thunderous number of microhops going off in your ear if you're in range of the sound.) It should NEVER collide. Are you by chance using SETA at the time?

StormSinger
Posts: 89
Joined: Tue, 15. Mar 05, 18:04
x4

Post by StormSinger » Thu, 29. Sep 05, 01:25

Nope, and I've never had them hit anything else... ever.

If they dock at a carrier or TL, no problem. Even when a fairly large group of ships jumps to the same target to dock, I've never had them bounce off each other (impressive, actually).

I'll try it again with the updated version.

RagX
Posts: 552
Joined: Fri, 23. Sep 05, 08:04

Post by RagX » Thu, 29. Sep 05, 01:34

:roll: everyone expected you were on 1.73, so we were wondering what was up.

BTW, I found one conflict with the advjumper: Dont try it with any navigational software scripts, or else they'll conflict.
*EDIT: another conflict. Overwrites Mark's Wing/Patrol/Resupply script by taking the place of Fight Command Mk3.

RagX
Posts: 552
Joined: Fri, 23. Sep 05, 08:04

Post by RagX » Sat, 1. Oct 05, 09:55

Not to double-post but I figured out how to de-conflict both Mark's Patrol/Wing scripts and AdvJumper 1.73. If you're interested MH I'll PM you the corrections I've made

StormSinger
Posts: 89
Joined: Tue, 15. Mar 05, 18:04
x4

Post by StormSinger » Sat, 1. Oct 05, 11:31

Fixing the conflicts with the Patrol scripts were easy, but they were also conflicting with the Xai Advanced Combat AI, so I had to sort that out too... along with a few others.

They seem to be happy now.

RagX
Posts: 552
Joined: Fri, 23. Sep 05, 08:04

Post by RagX » Sat, 1. Oct 05, 11:54

scratch my offer on fixing advjumper, looks like I've botched both scripts to obscurity.

StormSinger, mind forum-PM me your corrections for Marks and AdvJumper?

StormSinger
Posts: 89
Joined: Tue, 15. Mar 05, 18:04
x4

Post by StormSinger » Sat, 1. Oct 05, 23:55

I would, but I'm not sure they'd be of much help to you in my case. I was working around 4 other scripts that were inter-conflicting.

I ran the conlfict program several times and just picked out each one and re-numbered it until there were no further conflicts. I still have a "read text" issue with the slope tension device and HRS, but they work just fine.

RagX
Posts: 552
Joined: Fri, 23. Sep 05, 08:04

Post by RagX » Sun, 2. Oct 05, 04:15

Doesnt matter, I'd still like to take a look and see what I'm doing is right in just changing the numbers in the t files and not bother with the scripts themselves.

LaserEye
Posts: 4
Joined: Mon, 9. Jan 06, 13:11
x3tc

Advjumper

Post by LaserEye » Mon, 9. Jan 06, 13:30

ok i really like your Advjumper. makes traveling between the vast of space faster by alot. Anyways my question is how do i stop the script from overloading my logbook to the point it crashs the game???

Edit: Believe it or not. After I posted this i went back in and i found what was doing it.

Line 88 of the mhordes.autojump.xml
It writes to the logbook the distance from your ship to the "gate" when your ship goes to jump.
now have that script running for 44 ships for an hour and you soon find yourself waiting 10 minutes for your logbook to open.

to fix just grey it out by pressing the period button. :D

Post Reply

Return to “X²: The Threat - Scripts and Modding”