OOlite 1.70 and Asteroid Storm OXP: Mission solving itself
Moderators: winston, another_commander, Getafix
OOlite 1.70 and Asteroid Storm OXP: Mission solving itself
Hi.
After solving the Asteroid storm mission, I reloaded the old commander and just wanted to watch the show, i.e. seeing Leesti High being destroyed by the Asteroid. That did not happen. The Asteroid blew up and I was rewarded, just for waiting.... I tried 3 times.
Cheers!
Timm
After solving the Asteroid storm mission, I reloaded the old commander and just wanted to watch the show, i.e. seeing Leesti High being destroyed by the Asteroid. That did not happen. The Asteroid blew up and I was rewarded, just for waiting.... I tried 3 times.
Cheers!
Timm
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Hmm thats odd! The OXP checks by looking at whether the rock and station are dead. If the rock is dead and the station is alive then you are congratulated. This does mean that if the rock was killed by something other than you, then you would still be congratulated. The rock is on an intercept course with the station and I can't think of anything in Oolite that would kill it. If a load of NPC miners happened to be there then they might get it before you. It has a faily high shield (a full burst of military laser is required to destroy it). Did it just blow up on its own or did another ship shoot it? Or did it just get hit by a load of asteroids.
The rock has a vast "blast energy" (set by weapons_energy = 999999) so the blast is enough to destroy the station. I wrote this on 1.65 though, so perhaps something has changed.
EDIT:-
Hang on I gave it a bounty. This means NPC cops and navy vessels will view it as a "criminal" and fire at it. Could you check to see who is killing it (if anybody)!
The rock has a vast "blast energy" (set by weapons_energy = 999999) so the blast is enough to destroy the station. I wrote this on 1.65 though, so perhaps something has changed.
EDIT:-
Hang on I gave it a bounty. This means NPC cops and navy vessels will view it as a "criminal" and fire at it. Could you check to see who is killing it (if anybody)!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- Captain Hesperus
- Grand High Clock-Tower Poobah
- Posts: 2310
- Joined: Tue Sep 19, 2006 1:10 pm
- Location: Anywhere I can sell Trumbles.....
I believe that the missionscript actually rewrites the system so that when the asteroid hits the station it is destroyed AND remains destroyed. At least it did the first time I ran the mission.......Commander McLane wrote:I think main stations are indestructible in Oolite (can only be pushed out of place). Or did you replace it with a clone in the OXP (don't remember and too lazy to look it up)? If not, the station will never be destroyed by the asteroid.
Captain Hesperus
.....I said it before and I'll say it again, it wasn't my fault!
The truth, revealed!!
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Yeah. Its a clone, but only so I can give it Death Actions. If you hack a standard missile and change its weapons energy to 999999 it will blow up any station. This is how the gravition missile in assassins works. You cant use the gravition to blow up a station as its AI won't go to detonate unless its found the Balrog. But if you hacked it to a normal missileAI then it would. Tested it on main stations whilst developing! At least this worked on 1.65. Not sure about 1.70. The Balrog has energy 50,000 and recharge 100 so no laser can destroy it. It is destroyed on 1.70 (tested) by the missile, but the Balrog is a ship rather than stations. Perhaps main stations can't be destroyed on 1.70 but the could (with a cheaters missile) on 1.65.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Hmmm, nope, that station doesn't want to die...
The change must have happened some time ago, because I tried 1.68 just now, and the station didn't die there either...
After banging my head against this problem for a while, I finally figured out something that works!
@LB: I need to run some more tests, but if everything goes to plan, I should be sending you a shiny new version of asteroid storm, certified to work in 1.65 & in 1.70! All the (test) versions in between: I'm afraid it would take too much time to try and find a solution that works for them.
Cheers,
Kaks
The change must have happened some time ago, because I tried 1.68 just now, and the station didn't die there either...
After banging my head against this problem for a while, I finally figured out something that works!
@LB: I need to run some more tests, but if everything goes to plan, I should be sending you a shiny new version of asteroid storm, certified to work in 1.65 & in 1.70! All the (test) versions in between: I'm afraid it would take too much time to try and find a solution that works for them.
Cheers,
Kaks
I used the same clone station trick in Trident Down and I went through a phase where the replacement refused to appear. I think it may have had something to do with the roles - if in doubt, change the name of the clone station in the Asteroids OXP and see if it is appearing in game properly.
Download Resistance Commander plus many other exciting OXPs HERE
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
I don't think the role matters, its the fact that it IS the main station (set in planetinfo) rather than an extra station that may be the problem. I changed the <name> to "Lestsi High" whilst as was it and it shows on the ID computer as such, so the "cloning" seems sucessfull. If 1.70 main stations are hard-coded to be indistructable then it won't die. Even on 1.65 you could not destroy a main station with a q-mine but an weapons_energy of 9999999 was enough to blow them.
EDIT:-
This should fix the pesky station. Set the station to none in shipdata. The System will have no main station. Then add the station with AddShip in the place where the main station. It now won't be the main station so can be destroyed. It can even by q-mined (which would run the death actions whether the mission was playing or not) so you'd need to guard it with a minesweeper!
EDIT:-
This should fix the pesky station. Set the station to none in shipdata. The System will have no main station. Then add the station with AddShip in the place where the main station. It now won't be the main station so can be destroyed. It can even by q-mined (which would run the death actions whether the mission was playing or not) so you'd need to guard it with a minesweeper!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
When you look in the nova mission you see a command "blowUpStation". This one will blow up the main station. Even better: half a year ago I tried to blow up a rock Hermit with this command after launching. It didn't work, instead it blew up the main station. But because a system needs a mainstation, it made the rock hermit the main station were you could save a game etc. This all I tested way back on oolite 1.65
As far I know it is hardcoded that a main station is indestructible by firing. From the 1.70 code I read:
This is part of the takeEnergyDamage routine of the station entity. When I look in the 1.65 code, there is no own takeEnergyDamage routine in the station entity but instead it uses the same routine as all ships. But on second sight: The above check for main station is there placed in the ShipEntity.
Also in the takeScrapeDamage routine is a check for main station so it will not get damaged by impact.
I get a bad feeling: could it be that there in 1.65 always was a rock hermit that became the main station and not the added one? As last resort there are AI possibilities to blow up the station that bypass the check : scriptActonOnTarget: becomeExplosion or becomeEnergyBlast. (But this solution looks like cheating to me)
As far I know it is hardcoded that a main station is indestructible by firing. From the 1.70 code I read:
Code: Select all
// ...and this is the system's main station...
if (self == [UNIVERSE station])
{
// ...then get angry...
if (other && other->isShip)
{
[(ShipEntity*)other markAsOffender:96];
[self setPrimaryAggressor:other];
found_target = primaryAggressor;
}
[self increaseAlertLevel];
[self respondToAttackFrom:ent becauseOf:other];
// ...and don't blow up.
return;
Also in the takeScrapeDamage routine is a check for main station so it will not get damaged by impact.
I get a bad feeling: could it be that there in 1.65 always was a rock hermit that became the main station and not the added one? As last resort there are AI possibilities to blow up the station that bypass the check : scriptActonOnTarget: becomeExplosion or becomeEnergyBlast. (But this solution looks like cheating to me)
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
That'd do it! I'd forgoten about the blowUpStation.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
the station that wouldn't die
This is mad slightly annoying. blowUpStation doesn't seem to work either. is there a way to call a javascript function from within an AI script?
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
"sendScriptMessage: message"is there a way to call a javascript function from within an AI script?
message is the script filename
Strange as this is the way how the nova mission blows up the main station. I even thing this command is "created" for the nova mission. But it is a legacy command that only will work in the main script and the ships scripts. Not in the AI.blowUpStation doesn't seem to work either
Aha! I was calling blowUpStation from inside the AI (the death_actions in 1.70 are overridden when you attach a script to a ship)
On the plus side I've now got a very complex way of making 'a' station explode, on the minus side it's very complex. I'll see what I can do with sendScriptMessage!
Cheers,
Kaks
On the plus side I've now got a very complex way of making 'a' station explode, on the minus side it's very complex. I'll see what I can do with sendScriptMessage!
Cheers,
Kaks
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
try in JS: player.call("blowUpStation")Kaks wrote:Aha! I was calling blowUpStation from inside the AI (the death_actions in 1.70 are overridden when you attach a script to a ship)
----EDIT:
The legacy command: blowUpStation works perfectly for Asteroid storm under Oolite 1.70. I changed one AI state into
Code: Select all
DETONATE = {
ENTER = ("setDesiredRangeTo: 250.0", dealEnergyDamageWithinDesiredRange, becomeExplosion, "scriptActionOnTarget: blowUpStation");
EXIT = ();
UPDATE = ();
};
Doing this OXP I see things I can't remember from when I did it. In my memory the added asteroids were yellow dots and I can't remember the badrock being that big. This one was very slow and I am sure it used to be a very fast flying object were you had to react quickly. My oldest version on disk is V2 but maybe I even played an older one I by now deleted. V3 is surely more fun than that old version.
I used the changed script I published elsewhere. That is also working well.
Last edited by Eric Walch on Sat Feb 02, 2008 1:45 pm, edited 1 time in total.