[Script/Mod] Cosmic Events - CONCEPT STAGE
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 30
- Joined: Fri, 19. Mar 10, 11:18
[Script/Mod] Cosmic Events - CONCEPT STAGE
Cosmic Events - CONCEPT STAGE
Introduction:
After watching the recent Perseid meteor shower, I gave some thought to the fact that this sort of thing could be made possible in X3. With the addition of satellites and comets, I could make a script/mod.
I happened to talk this through with EmperorJon, who I see has already set up his idea after our very fruitful few minutes of discussion on DevChat, so consider this to be it's sister (brother!) thread. Fasteroid - Featuring the Reaper! - by EmperorJon
Anyway, here are my ideas and suggestions so far.
What this script/mod aims to achieve:
This is a script/mod that will aim to create and simulate events like comets passing near sectors, meteor showers (might need to be near planets?), distant satellites passing in orbits (or the illusion of this.) and give the impression of having very distant ships, or dots that look like distant ships, passing 'between sectors'. Why? Just because It'll look nice!
N.B: As this will be my first script/mod, I will require quite a lot of help from others. Everyone is welcome to chip in on this one, as I have a feeling that those of you who aren't happy with the current sector backgrounds, may wish to add some of your own ideas to make your X3 life a bit more cheery background wise!
How could this be done:
Well, this could be achieved in a few different ways for each part needed.
For the comets:
These comets could be just an M5, modified to have a higher glow that normal, so that we can see this comet regardless of the suns in sectors. It'll also need a bright, near white particle trail. These would be spawned far out in a sector at randomized coordinates. These coordinates would need to be limited in some form, to stop the comets from wiping out other ships in the main area of sectors.
For the meteor showers:
The meteor showers could be more problematic, as they would need to be very fast moving, and more importantly, extremely short-lived. A possibility, as suggested by EmperorJon, is to use multiple LT's with specialized bullets (like FAA, but with a white, longer life trail, slightly slower and with no explosion at the end?)
For the satellites:
The satellites can be one of two different things. Either a distant lit M5, as the comets, or an actual Advanced Satellite, at a distance, but given coordinates to move over a pre-defined set of coordinates.
For the distant ships:
These could be made by reusing some of the script for the comets, but giving them less or no particle trial.
What to do next:
At current I'm just considering the possibilities and problems involved. But everyone is more than welcome to make suggestions!
N.B 2: I won't be able to give this topic my full attention all of the time as I have other work that should be finished soon, so stuff may take a while for me to reply to, thanks,
R.D
Introduction:
After watching the recent Perseid meteor shower, I gave some thought to the fact that this sort of thing could be made possible in X3. With the addition of satellites and comets, I could make a script/mod.
I happened to talk this through with EmperorJon, who I see has already set up his idea after our very fruitful few minutes of discussion on DevChat, so consider this to be it's sister (brother!) thread. Fasteroid - Featuring the Reaper! - by EmperorJon
Anyway, here are my ideas and suggestions so far.
What this script/mod aims to achieve:
This is a script/mod that will aim to create and simulate events like comets passing near sectors, meteor showers (might need to be near planets?), distant satellites passing in orbits (or the illusion of this.) and give the impression of having very distant ships, or dots that look like distant ships, passing 'between sectors'. Why? Just because It'll look nice!
N.B: As this will be my first script/mod, I will require quite a lot of help from others. Everyone is welcome to chip in on this one, as I have a feeling that those of you who aren't happy with the current sector backgrounds, may wish to add some of your own ideas to make your X3 life a bit more cheery background wise!
How could this be done:
Well, this could be achieved in a few different ways for each part needed.
For the comets:
These comets could be just an M5, modified to have a higher glow that normal, so that we can see this comet regardless of the suns in sectors. It'll also need a bright, near white particle trail. These would be spawned far out in a sector at randomized coordinates. These coordinates would need to be limited in some form, to stop the comets from wiping out other ships in the main area of sectors.
For the meteor showers:
The meteor showers could be more problematic, as they would need to be very fast moving, and more importantly, extremely short-lived. A possibility, as suggested by EmperorJon, is to use multiple LT's with specialized bullets (like FAA, but with a white, longer life trail, slightly slower and with no explosion at the end?)
For the satellites:
The satellites can be one of two different things. Either a distant lit M5, as the comets, or an actual Advanced Satellite, at a distance, but given coordinates to move over a pre-defined set of coordinates.
For the distant ships:
These could be made by reusing some of the script for the comets, but giving them less or no particle trial.
What to do next:
At current I'm just considering the possibilities and problems involved. But everyone is more than welcome to make suggestions!
N.B 2: I won't be able to give this topic my full attention all of the time as I have other work that should be finished soon, so stuff may take a while for me to reply to, thanks,
R.D
Last edited by Remover_Dave on Sat, 14. Aug 10, 16:49, edited 3 times in total.
Cosmic Events - CONCEPT STAGE
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
-
- Posts: 30
- Joined: Fri, 19. Mar 10, 11:18
{Reserved}
Last edited by Remover_Dave on Sat, 14. Aug 10, 16:29, edited 1 time in total.
Cosmic Events - CONCEPT STAGE
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Missiles already have nice trails and are visible over long distances.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 9378
- Joined: Mon, 29. Dec 08, 20:58
-
- Posts: 30
- Joined: Fri, 19. Mar 10, 11:18
Thanks, I've put a link in for you.EmperorJon wrote:As a note, the Fasteroid idea did come around from this conversation.
Btw, I'm amazed how quickly you got your idea up and running. I was like, "Yeh, I'll think about getting that up and running tomorrow," and I came and sat down at my computer and found that you had not only got a topic up and running, but also had a beta out via email by an hour after.

I've been thinking about the meteor showers, and thought that if those random coordinates did come into alignment with a planet, then the meteorite (AKA: fast M5) would have a nice, small explosion as it entered the atmosphere!
Last edited by Remover_Dave on Sat, 14. Aug 10, 17:00, edited 1 time in total.
Cosmic Events - CONCEPT STAGE
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
-
- Posts: 9378
- Joined: Mon, 29. Dec 08, 20:58
-
- Posts: 30
- Joined: Fri, 19. Mar 10, 11:18
But you still did manage to get something working that I never would have thought of making.
Still think that Fasteroids should come with the Jaws theme tune.
Plus the, "Is it a plane, is it a bird... no IT'S A HOMING ASTEROID." 
Still think that Fasteroids should come with the Jaws theme tune.


Cosmic Events - CONCEPT STAGE
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
-
- Posts: 9378
- Joined: Mon, 29. Dec 08, 20:58
-
- Posts: 30
- Joined: Fri, 19. Mar 10, 11:18
Sorry for the delay, I wasn't able to update 'cause I was on holiday.
@Gazz: Good point, I think missiles would be the easiest and most effective option, but I can't remember if you can 'launch' them without a ship, we'll see if that will work later on.
Right, I've got started on the comet script first, but have already got stuck on a few things.
The script so far, should wait a set time (from instantaneous activation, to a three minute wait. (this wait will be extended after I know it all works and I've stopped messing about.)) Then it will generate all the coordinates needed for the object placement. It will then find the sector that PLAYERSHIP is in. And that's where it all stops:
Problem 1:
I've got the when and the how,
but can't remember how to get the where or the what.
The first problem I've got is that of the where. The script will only be active IS, but I need to tell it where IS is: where the PLAYERSHIP is. I've put,
but I know that this won't do the trick.
Problem 2:
Secondly is the what,
This is all I've come up with. It should be a Banshee missile, but I suspect that it won't spawn with that command.
Help would be very much appreciated,
R.D.
@Gazz: Good point, I think missiles would be the easiest and most effective option, but I can't remember if you can 'launch' them without a ship, we'll see if that will work later on.
Right, I've got started on the comet script first, but have already got stuck on a few things.
The script so far, should wait a set time (from instantaneous activation, to a three minute wait. (this wait will be extended after I know it all works and I've stopped messing about.)) Then it will generate all the coordinates needed for the object placement. It will then find the sector that PLAYERSHIP is in. And that's where it all stops:
Problem 1:
I've got the when and the how,
Code: Select all
@ = wait randomly from 0 to 180000 ms
$coordinatesx = = random value from -110000 to 110000 - 1
$coordinatesy = = random value from -110000 to 110000 - 1
$coordinatesz = = random value from -60000 to 60000 – 1
$strength = = random value from 0 to 4 - 1
The first problem I've got is that of the where. The script will only be active IS, but I need to tell it where IS is: where the PLAYERSHIP is. I've put,
Code: Select all
$where = find ship: sector=[PLAYERSHIP] class or type=[PLAYERSHIP] race=[OWNER]
Problem 2:
Secondly is the what,
Code: Select all
$comet = create flying ware: maintype=6553 subtype=26 count=$strength sector=$where x=$coordinatesx y=$coordinatesy z=$coordinatesz selfdestruct=null
Help would be very much appreciated,
R.D.
Cosmic Events - CONCEPT STAGE
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
-
- Posts: 1962
- Joined: Tue, 8. Jan 08, 18:19
sector=[PLAYERSHIP] is the first mistake. [PLAYERSHIP] is not a sector, but the players ship.$where = find ship: sector=[PLAYERSHIP] class or type=[PLAYERSHIP] race=[OWNER]
The second mistake is type=[PLAYERSHIP], because [PLAYERSHIP] is not a ship type (like Argon Nova), but the players ship.
The third mistake is race=[OWNER].
At least I highly doubt, that you know what it is doing. It would work, if the script was running on an object. In that case [OWNER] is the race of that object. If the script is running globally (which I assume) [OWNER] is null.
The last and biggest mistake, is that the command does something different than you expect: It returns a ship, which suits the given criteria. So to get playerships sector, simply do the following:
Code: Select all
$where = [PLAYERSHIP] -> get sector
The only error here is, that you swapped the main- and the subtype.Code: Select all
$comet = create flying ware: maintype=6553 subtype=26 count=$strength sector=$where x=$coordinatesx y=$coordinatesy z=$coordinatesz selfdestruct=null
Besides, this command will spawn a cargo box and not a flying rocket. If you want a flying rocket, you'll have to spawn a ship and let that ship fire the rocket.
Greetings,
ScRaT
-
- Posts: 30
- Joined: Fri, 19. Mar 10, 11:18
Yup, that seems like a complete and utter failure on my behalf!ScRaT_GER wrote:sector=[PLAYERSHIP] is the first mistake. [PLAYERSHIP] is not a sector, but the players ship.$where = find ship: sector=[PLAYERSHIP] class or type=[PLAYERSHIP] race=[OWNER]
The second mistake is type=[PLAYERSHIP], because [PLAYERSHIP] is not a ship type (like Argon Nova), but the players ship.
The third mistake is race=[OWNER]. At least I highly doubt, that you know what it is doing.

OK, I just made an assumption that if [PLAYERSHIP] was entered into those fields, then the sector would be where the player is. That was a stab in the dark.

Yes, that makes much more sense. It also simplifies matters as well!The last and biggest mistake, is that the command does something different than you expect: It returns a ship, which suits the given criteria. So to get playerships sector, simply do the following:Code: Select all
$where = [PLAYERSHIP] -> get sector
As for this bit,
OK, that was silly of me to assume I could launch missiles from thin air. What I would ask though, is if there is a way of achieving the desired effect, or if someone has any ideas as to how I can get these "Comets" into existence. I suspect that there are a multitude of ways that this could be done, but as you highlighted earlier, I am hopeless at any scripting beyond that of your simple day-to-day stuff. But at least I do know what I want to achieve.The only error here is, that you swapped the main- and the subtype.Code: Select all
$comet = create flying ware: maintype=6553 subtype=26 count=$strength sector=$where x=$coordinatesx y=$coordinatesy z=$coordinatesz selfdestruct=null
Besides, this command will spawn a cargo box and not a flying rocket. If you want a flying rocket, you'll have to spawn a ship and let that ship fire the rocket.
Any ideas?
R.D.
Cosmic Events - CONCEPT STAGE
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
-
- Posts: 1962
- Joined: Tue, 8. Jan 08, 18:19
At the moment. You just need some more experience, that's all.but as you highlighted earlier, I am hopeless at any scripting beyond that of your simple day-to-day stuff.
I never did anything comparable, but the missiles seemed to be a quite good approach.What I would ask though, is if there is a way of achieving the desired effect, or if someone has any ideas as to how I can get these "Comets" into existence.
Since you are considering to make a mod (and not only a script) you might create new missiles, whose bodies are small rocks, with the appropriate trails. Of course this only makes sense, if the rocks are going to be near enough to be seen at all.
Anyways, you'd first have to write a script which performs the task of shooting some missiles parallel (not really a problem).
Greetings,
ScRaT
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
If you can't script a missile to launch without a ship, why don't you script a ship to launch it?
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 30
- Joined: Fri, 19. Mar 10, 11:18
Right, it should look like this now:
That gets you all of the placement stuff. From there I will need a create ship line, and a script for the commands of the ship.
Does anyone have any pointers for a line that stops the script running more than once each sector?
After that I will want to have a tidy-script to mop up any stray ships when [PLAYERSHIP] leaves the sector.
I'll ponder over that for the moment, but if anyone sees a better way, then put it in the pan!
R.D.
ScRaT_GER
Tbh, a stat modded Kestrel would be sufficient to launch those, as it could be made to be so fast as to P2P jump around. I could also get the coords to be limited to further out in the sector as well, so nothing of the creation of the rock is seen.
EDIT: @Gazz: Sorry, you just got there before me!
Yes creating a ship to launch it would be ideal. However, I would have no clue what I would need to ask the ship to do yet.
Code: Select all
= wait randomly from 0 to 180000 ms
$coordinatesx = = random value from -110000 to 110000 - 1
$coordinatesy = = random value from -110000 to 110000 - 1
$coordinatesz = = random value from -60000 to 60000 - 1
$where = [PLAYERSHIP] -> get sector
$strength = = random value from 0 to 4 - 1
Does anyone have any pointers for a line that stops the script running more than once each sector?
After that I will want to have a tidy-script to mop up any stray ships when [PLAYERSHIP] leaves the sector.
I'll ponder over that for the moment, but if anyone sees a better way, then put it in the pan!
R.D.
ScRaT_GER
Yes, I'd want fast missiles (1000ms could look right.) and I could use one of the small rocks that already exist in the game if I can get to them.Since you are considering to make a mod (and not only a script) you might create new missiles, whose bodies are small rocks, with the appropriate trails. Of course this only makes sense, if the rocks are going to be near enough to be seen at all.
Anyways, you'd first have to write a script which performs the task of shooting some missiles parallel (not really a problem)
Tbh, a stat modded Kestrel would be sufficient to launch those, as it could be made to be so fast as to P2P jump around. I could also get the coords to be limited to further out in the sector as well, so nothing of the creation of the rock is seen.
EDIT: @Gazz: Sorry, you just got there before me!

Yes creating a ship to launch it would be ideal. However, I would have no clue what I would need to ask the ship to do yet.
Last edited by Remover_Dave on Sat, 21. Aug 10, 22:00, edited 1 time in total.
Cosmic Events - CONCEPT STAGE
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Just wait for a sector change.Remover_Dave wrote:Does anyone have any pointers for a line that stops the script running more than once each sector?
Sector = Playership, get sector
player.sector = Sector
while Sector = player.sector
wait
Sector = Playership, get sector
end
That way you don't need any complicated oranisation scheme, like recording which event is currently going on in what sector.
Nothing.Remover_Dave wrote:Yes creating a ship to launch it would be ideal. However, I would have no clue what I would need to ask the ship to do yet.
You can execute the missile launch instruction right from your control script.
It may not be standard procedure but you can fire the missiles/lasers of Ship A from a script that runs on a different object or on none at all.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 30
- Joined: Fri, 19. Mar 10, 11:18
Simple. Good.Gazz wrote:Just wait for a sector change.Remover_Dave wrote:Does anyone have any pointers for a line that stops the script running more than once each sector?
Sector = Playership, get sector
player.sector = Sector
while Sector = player.sector
wait
Sector = Playership, get sector
end
That way you don't need any complicated oranisation scheme, like recording which event is currently going on in what sector.
And the launch execute can be done easily.
This looks like a mod now, so I'll change tact slightly as concerns to my goals. So I'll sleep on this one.
Thanks for your help so far!
R.D.
Cosmic Events - CONCEPT STAGE
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Well, judging by your script examples I figured that the complicated schemes would have to wait a bit. =P
Tangible results are better than having it scripted in a cool way.
The Ring of Fire was my first real Reunin script and omygawd is that code a mess.
And people are still using it quite happily in TC because it works. =P
Tangible results are better than having it scripted in a cool way.
The Ring of Fire was my first real Reunin script and omygawd is that code a mess.
And people are still using it quite happily in TC because it works. =P
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 795
- Joined: Fri, 4. Sep 09, 02:35
-
- Posts: 30
- Joined: Fri, 19. Mar 10, 11:18
I quite agree.Gazz wrote:Well, judging by your script examples I figured that the complicated schemes would have to wait a bit. =P
Tangible results are better than having it scripted in a cool way. =P

I'm keeping up the scripting for this, but I might have to put some of it on hold 'till Thursday/Friday this week. Stuff to do, people to see... you know the drill.

So long as I can keep this ticking over in the background, I could be making some progress soon ish.
The new version of the comet script now works, thanks to your help.

Cosmic Events - CONCEPT STAGE
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
"It's not the destination that matters. It's the change of scene." Brian Eno.
"For the world to be interesting, you have to be manipulating it all the time." Brian Eno.
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Hmm. A shooting star (missile) burning up in a planetary atmosphere?
(or close enough to it to look like it)
Should be rather common in rocky sectors like Kingdoms End.
There's an instruction to get the planet array from a sector - and thereby their positions.
Don't think the suns are detectable like that and besides, it would be far trickier to align the comet's tail the right way when in space.
(or close enough to it to look like it)
Should be rather common in rocky sectors like Kingdoms End.
There's an instruction to get the planet array from a sector - and thereby their positions.
Don't think the suns are detectable like that and besides, it would be far trickier to align the comet's tail the right way when in space.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.