|
|
 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
euclid

Joined: 15 Feb 2004 Posts: 7213 on topic Location: Gower, South Wales

 |
Posted: Thu, 12. Jan 06, 19:13 Post subject: [X3 Script] Lasertower Array [2.0.01 compatible Upgrade] |
|
|
Lasertower Array (download)
=====================
New Version - 2.0.01 compatible !!!
New features:
#1 Lasertowers now come automatically with 125 MJ shields: As part of the 2.0.01 Update all purchased or produced Lasertowers have 125 MJ shields. There is no need anymore to upgrade the shields from 25 MJ to 125 MJ.
#2 Remote placement: You do not need to be in the same sector anymore. The position of the Lasertowerarray is no longer determined by the player's ship. Instead just select a sector and within a position using numpad 2,4,6,8.
#3 Names for yout LT's are generated: As an additional user input a 'name' is requirered. All 30 Lasertowers are then named as 'name'0 to 'name'29.
Installation:
Copy the setup.lasertowerarray.xml and the lasertowerarray.xml into the 'scripts' folder of your 'X3' folder, and copy the 447003.xml into the 't' folder.
Usage:
You'll find a new ship special command. Click that then select sector/position, radius in metres of the circle of lasertowers (3000 is a good value, don't make it too small), select the orientation (0 for xy plane, 1 for yz plane and 2 for xz plane) and finally choose a name (for example 'Laser Southgate' will name your LT's 'Laser Southgate0' to 'Laser Southgate29').
Enjoy !
Cheers Euclid
Last edited by euclid on Fri, 10. Nov 06, 18:33; edited 5 times in total |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Skillers
Joined: 24 Apr 2005 Posts: 537 on topic Location: Omicron Lyrae

|
Posted: Thu, 12. Jan 06, 19:20 Post subject: |
|
|
Cool. Would be really good if you could select an object as the centre of the ring, like a station, though I guess you can get roung that by moving really close to the station then running it (just don't crash).
I can't wait to be able to afford building a tunnel out of an important gate...
_________________ "Warning, cargo bay now contains; Gate, Home of Light" |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
bengoin

Joined: 31 Mar 2005 Posts: 161 on topic

|
Posted: Thu, 12. Jan 06, 21:51 Post subject: |
|
|
looking forward to this
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
bendyspex
Joined: 13 Apr 2004 Posts: 708 on topic

|
Posted: Thu, 12. Jan 06, 22:15 Post subject: |
|
|
Sounds great, this will help a lot in protecting my stations and gates. Thanks
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
bengoin

Joined: 31 Mar 2005 Posts: 161 on topic

|
Posted: Thu, 12. Jan 06, 22:41 Post subject: |
|
|
what would be a good number to add the the radius?
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
djssuk
Joined: 11 Dec 2003 Posts: 177 on topic

|
Posted: Thu, 12. Jan 06, 22:59 Post subject: |
|
|
Sounds great.
How about the player specifying the X number of lazer towers and then a point on the map, the radius then calculates X distance bewteewn each one? Just some ideas.
By the way, the link seems to fail at the moment. I will try later.
Thanks
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
euclid

Joined: 15 Feb 2004 Posts: 7213 on topic Location: Gower, South Wales

|
Posted: Thu, 12. Jan 06, 23:33 Post subject: |
|
|
| djssuk wrote: |
......How about the player specifying the X number of lazer towers and then a point on the map, the radius then calculates X distance bewteewn each one? ..
|
Yes, initially I had a similar idea. I've spent the last night (5 bloody hours !!) to get a general placement script working.
But the trouble is that the script editor allows only integers between -999,999,999 and 1,410,065,407. You can imagine that basic maths like trigonometric functions, powers, roots etc. are next to impossible.
I've managed to get this working in the early morning hours but there was a big problem: the script puts a heavy load on the program (lag, freeze even ctd) and inserting wait states to fix that made the script to run too long. So I've decided to dump it.
The above script is fast and light - a good compromise IMO.
| Quote: |
By the way, the link seems to fail at the moment. I will try later.
|
Yes, the upload has not yet arrived. Can't be long but if you want it right now then PM me your email and I'll send you the zip.
Cheers Euclid
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Cycrow Moderator (Script&Mod)


Joined: 15 Nov 2004 Posts: 19848 on topic Location: London

|
Posted: Thu, 12. Jan 06, 23:40 Post subject: |
|
|
| euclid wrote: |
| djssuk wrote: |
......How about the player specifying the X number of lazer towers and then a point on the map, the radius then calculates X distance bewteewn each one? ..
|
Yes, initially I had a similar idea. I've spent the last night (5 bloody hours !!) to get a general placement script working.
But the trouble is that the script editor allows only integers between -999,999,999 and 1,410,065,407. You can imagine that basic maths like trigonometric functions, powers, roots etc. are next to impossible.
I've managed to get this working in the early morning hours but there was a big problem: the script puts a heavy load on the program (lag, freeze even ctd) and inserting wait states to fix that made the script to run too long. So I've decided to dump it.
The above script is fast and light - a good compromise IMO.
| Quote: |
By the way, the link seems to fail at the moment. I will try later.
|
Yes, the upload has not yet arrived. Can't be long but if you want it right now then PM me your email and I'll send you the zip.
Cheers Euclid |
there are actually libriaries available to to do fixed point maths, theres the old X2 math library by reven, and AalaarDB has dont one for X3, there are also trigenomitry commands in the script engine, but it uses fixed point maths rather than floating points
as for the waits, e ven a wait of 1ms can help, as it adds an interupt point so other scripts can be run without blocking the game causing the freezeing
_________________ My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
euclid

Joined: 15 Feb 2004 Posts: 7213 on topic Location: Gower, South Wales

|
Posted: Fri, 13. Jan 06, 01:37 Post subject: |
|
|
| Cycrow wrote: |
...there are actually libriaries available to to do fixed point maths, theres the old X2 math library by reven, and AalaarDB has dont one for X3, there are also trigenomitry commands in the script engine, but it uses fixed point maths rather than floating points
as for the waits, e ven a wait of 1ms can help, as it adds an interupt point so other scripts can be run without blocking the game causing the freezeing |
Thanks for the info, Cycrow. Didn't know that 1ms can make that much of a difference. Will try that in my Fear-the-Sphere script (places LT's pseudo-uniformly on a sphere) which takes too much time to execute.
I know reven's libs and have downloaded AalaarDB's 3d-math lib. Also I have played with the built-in sine/cosine funtions but all this did not help very much. Guess it was my fault - first go in that direction
One big problem I have is the limited number rep (which makes, for example, a power series approximation very difficult). You not just have to check the upper rep limit but also the lower rep limit and that is time consuming.
A particular problem is to determine the plane perpendicular to a given direction. I've tried the buit-in trigs and then the 3d math lib functions. All results were to imprecise.
I'm working on a general solution for that.
BTW: the download link in my first post is now up and running . Big thanks again to ESD for hosting !
Cheers Euclid
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Cycrow Moderator (Script&Mod)


Joined: 15 Nov 2004 Posts: 19848 on topic Location: London

|
Posted: Fri, 13. Jan 06, 01:44 Post subject: |
|
|
yeah scripts work the same way as multithreading does
they appear to run simultaneous, but in actual fact, only 1 thread is being process at any given time.
so when u have a script running, no other scripts will get processed until that script has finished, and if it takes long to finish the game cant be updated which gives you the temporary freezing, to solve this, you have interrupts, which will alow the game engine to carry on updating without blocking, so when the script reaches an interupt, more of the game gets process then it returns back this scripts and continues
so even a short wait will allow other scripts and the game engine to inturupt when it needs to process something else, which prevents the freezing.
_________________ My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
RRRoamer
Joined: 21 Feb 2004 Posts: 324 on topic Location: New Mexico

|
Posted: Fri, 13. Jan 06, 03:30 Post subject: |
|
|
Actually, to be more specific, scripts run the same way a coopertive multitasking does.
_________________ --RRRoamer |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
euclid

Joined: 15 Feb 2004 Posts: 7213 on topic Location: Gower, South Wales

|
Posted: Fri, 13. Jan 06, 04:43 Post subject: |
|
|
In this case, wouldn't it be wise to use random waits rather than fixed values?
I think wait randomly between .... ms and ..... ms would reduce the probability to have no time gap at all.
This could happen if a large number of scripts are running using fixed wait states. Could explain some lag/freezing/ctd problems.
Cheers Euclid
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
ericbab
Joined: 06 Jul 2005 Posts: 68 on topic

|
Posted: Fri, 13. Jan 06, 05:02 Post subject: |
|
|
May, i Just State that you guys are GOds Among men, using the math leant yesterday, ToDAY!
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
BlueSwede
Joined: 07 May 2005 Posts: 243 on topic Location: Sweden

|
Posted: Fri, 13. Jan 06, 06:32 Post subject: |
|
|
Exactly how does I check I have any scripts that use "command_special_23 with tid 523"?
I checked that I didn't have any text file 447003 in my t folder
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
euclid

Joined: 15 Feb 2004 Posts: 7213 on topic Location: Gower, South Wales

|
Posted: Fri, 13. Jan 06, 12:16 Post subject: |
|
|
| BlueSwede wrote: |
Exactly how does I check I have any scripts that use "command_special_23 with tid 523"?
I checked that I didn't have any text file 447003 in my t folder |
Due to the list in the sticky these values are not yet been taken. So if you do not run any other (than in the com. script sticky) scripts then this should be fine.
Cheers Euclid
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
 |
|
|
|
|
|