[SCRIPT] Advanced Thruster Control V1.01 : Updated 08/05/2006

The place to discuss scripting and game modifications for X³: Reunion.

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

Talon1571
Posts: 163
Joined: Sat, 29. Oct 05, 00:14
x3

Post by Talon1571 » Mon, 8. May 06, 22:42

Name is showing up fine now - unfortunately nowhere has it in stock (not checked all Boron EQ docks yet though, so I'll try and be patient :P )

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22230
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 8. May 06, 23:13

ok, seems i made a mistake with the old script whihc is y its not stocked up

try this one http://x3.ircwhore.co.uk/AdvancedThrust ... 5.2006.spk

Talon1571
Posts: 163
Joined: Sat, 29. Oct 05, 00:14
x3

Post by Talon1571 » Tue, 9. May 06, 01:18

I'll go give it a try =]

Talon1571
Posts: 163
Joined: Sat, 29. Oct 05, 00:14
x3

Post by Talon1571 » Tue, 9. May 06, 01:59

Phew - ok just tried the script. Everything installed and working correctly now.

Got into a firefight with a P patrol inside my personal M6.

Number of points:

1) Whenever I activated the script during the firefight , it cuts out after about half a second of firing (mentioned before I believe).

2) When the above happens, I occaisionally noticed the ship itself warping to another location.

3) The override isnt particularly smooth, but then my computer is getting rather elderly so it might just be that.

I was wondering - does this cut out the standard engines when it activates, and then move the position of the ship manually? If so, might it be an idea to reorientate the direction the ship faces relative to its forward point?

Not sure if that could be workable - not too familiar with the engine myself, I don't have the time/patience to try to learn the engine properly =]

Also, i'm sure there is a way to increase the efficiency of finding the velocity vector, but can't think of it right away - I'll get back to you =]

All in all, an ambitious script! Well done...

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22230
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 9. May 06, 03:20

well, the main problem with the effiecent, is that if the range it moves per step is too lowa it introduces erors, which means when the ship is traveling at slow speeds the time between updates needs to increase so the distance it moves is greater than this amount.

however, the main problem is when it comes to using trig on fixed point maths, which causes inacuracies, as the scripting engine doesn't do floating points.

so i had to fake it abit, but it limits to 3 decimal places using fixedp oints, ie 1000 = 1, 1100 = 1.1, etc
increase it any more would mean you run the chance of the calculations exceeding the max values.

i will attempt to refine the algorithm to be more accurate so i can get abit smoother movement.

points 1 and 2 are actaully the same program, the move to position command in the scripting engine does an automatic collision check, so if theres anything in the way, it moves it to a new position thats "safe" i tryed to add failsafes for this to turn off the device if this happens, however, it seems to happen when your firing

Talon1571
Posts: 163
Joined: Sat, 29. Oct 05, 00:14
x3

Post by Talon1571 » Tue, 9. May 06, 14:19

Is it possible to access the strafe controls using the scripting engine? This has got me curious now, might need to try learning the engine :P

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22230
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 9. May 06, 16:45

nope, unfortuatlly not, you cant even set the current speed

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Tue, 9. May 06, 17:17

Cycrow wrote:nope, unfortuatlly not, you cant even set the current speed

well .. you can ...(I'm doing it in my attack-scripts)
the thing is ..
on an attack-run you can set a max-speed (check out the existing attack-scripts they also use a ships max-speed to decide how fast a ship is allowed to attack)
but it might/afaik only work(s) IS ...

so doing it on ships that arent actually attacking something is butt-ugly .. but can be done (at least for as long as a ships is IS)


G

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22230
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 9. May 06, 17:51

i thought thats only for when the autopilot is enagaded, rather than when the player is in manual control ?

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Wed, 10. May 06, 16:27

yes and no ...

basicly the same as this script does you could use that command as well without the need for an autopilot..
(by faking it a bit)

try this;
start a high task on your ship with a script that does the following;
find/create an object in front of the ship
make the ship do a very very very short attack-run on that object ..
and see how speed has changed without the player doing a thing ....

(I've done this once and it wasnt too pretty but I also didnt spend much time on it as I wasnt too interested by the 'feature' ..)


G

Talon1571
Posts: 163
Joined: Sat, 29. Oct 05, 00:14
x3

Post by Talon1571 » Wed, 10. May 06, 17:43

Would it be possible to use the "move to position" command without reorientating the ship?

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22230
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Wed, 10. May 06, 17:47

tthere are ways
basically, you use the set position command, which moves the ship to the new position, and usually your orientation remains the same.

however, if theres an object close to where you'r trying to move too, like a station or another ship, then it repositions the ship to somewhere "safe".

so if you create 4 ships and move them all to the same position, they will all be places apart so they arn't colliding.

one way to fix the oritentation, would be to save the current rotations, then move the ship, and set the rotation back to what they were, making it still face the same direction

Talon1571
Posts: 163
Joined: Sat, 29. Oct 05, 00:14
x3

Post by Talon1571 » Wed, 10. May 06, 20:06

hmmm but that would have the same "jerky" motion ...

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22230
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Wed, 10. May 06, 21:14

unfortutally.

one way to improve the jerky motion is to make it update more often, but this would mean you need to move then less distance, ie if you update 10 times a second, when you try for 20 times, you need to move half the distance each time so it travels at the same speed

and its the low movement distances that causes the problem, and due to not having floats, makes it pretty inaccurate

angrysquirrel
Posts: 267
Joined: Tue, 18. Nov 03, 00:46
x3

tried it out but feature cuts out whenever I fire my guns

Post by angrysquirrel » Fri, 12. May 06, 01:12

tried it out but feature cuts out whenever I fire my guns. Any way to fix that? I have the script mapped to my "v" key.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22230
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Fri, 12. May 06, 01:21

im currently looking into it, hopefully i can find a way to allow the ship to fire

angrysquirrel
Posts: 267
Joined: Tue, 18. Nov 03, 00:46
x3

Post by angrysquirrel » Fri, 12. May 06, 14:10

Thanks! Keep up the great modding!

DesertEagle
Posts: 117
Joined: Thu, 2. Feb 06, 05:32
x3

Post by DesertEagle » Thu, 8. Jun 06, 07:23

Just a thought... Noticed as I was going through the pages that there was a signal like : Obj_In_Danger_Of_Colliding.
Maybe you could override this signal with your own logic?

DE

User avatar
n!ghtshade
Posts: 76
Joined: Fri, 28. Oct 05, 18:39
x3tc

Post by n!ghtshade » Wed, 30. Aug 06, 03:04

I can't remove it. I tried removing it in the script manager and running the uninstall script in the script editor but the ware is still in the equipment dock. :?

Saxit
Posts: 5
Joined: Fri, 15. Sep 06, 15:58
x3ap

Post by Saxit » Fri, 15. Sep 06, 16:05

Is it possible to make a script that changed the speed controls from 0-max velocity to 0-max acceleration instead, while at the same time setting max speed (for any ship) to a very high number, and let the newtonian physics take care of the rest.
It would be nice if the engine alowed you to continue to travel one direction if you just turned off acceleration and turned around - if the script is even possible ^^.

Add a hotkey for turning it off and on and it would kinda be like I-war 2: Edge of Chaos.

Post Reply

Return to “X³: Reunion - Scripts and Modding”