No death_actions with missiles
Moderators: winston, another_commander, Getafix
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
No death_actions with missiles
Working on Asteroid Storm I noticed an other problem with the changed code. The small asteroids used to head to the station with a missile script. When near the station they exploded and a death_action made that a new asteroid was added near the station to keep the flow of asteroids intact. Actually there were only a dozen of asteroids circling around.
With 1.72 this didn't happen anymore. The death_actions used to be called in the "becomeExplosion" itself. (in 1.70 it was still there). Since 1.71 or 1.72 the death_action is called sooner in the code before calling the "becomeExplosion" and the AI message "becomeExplosion" is not triggering this death_actions [and no shipDied()] anymore.
I had bypassed this problem by not exploding the small asteroids but let them hit the station wall. Even an easier way of destruction of the asteroids.
I think this can stay so, but than the wiki needs updated info that "becomeExplosion" won't trigger any death_actions anymore. (The AI script than just needs a "sendScriptMessage: shipDied" and this will even work when no js script is attached as it than will activate the default script)
With 1.72 this didn't happen anymore. The death_actions used to be called in the "becomeExplosion" itself. (in 1.70 it was still there). Since 1.71 or 1.72 the death_action is called sooner in the code before calling the "becomeExplosion" and the AI message "becomeExplosion" is not triggering this death_actions [and no shipDied()] anymore.
I had bypassed this problem by not exploding the small asteroids but let them hit the station wall. Even an easier way of destruction of the asteroids.
I think this can stay so, but than the wiki needs updated info that "becomeExplosion" won't trigger any death_actions anymore. (The AI script than just needs a "sendScriptMessage: shipDied" and this will even work when no js script is attached as it than will activate the default script)
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: No death_actions with missiles
I disagree. Scripted deaths (but not removals) should cause death actions to fire.Eric Walch wrote:I think this can stay so,
E-mail: [email protected]
-
- Dangerous
- Posts: 84
- Joined: Sun Apr 26, 2009 10:24 pm
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
No, it works mostly as it should. pre 1.72 triggered the death_actions from within the explosion routine. To be able to give a reason of death with the death_actions, 1.72 calls it sooner. Once in the function that generates energy damage and once the function that generates heat damage.Capt. Slog wrote:Is there a problem with death_actions?
However, the AI command "becomeExplosion" calls the explosion function directly and bypasses this way the death_actions that was now removed from this function.
For normal play no problem as only missiles blow themselves up and those don't use death_actions normally. (But the asteroids in asteroidStorm used both and stopped working as intended)
Ahruman is right that this should be altered for consistence. I don't think it is solved yet. Probably easiest solvable through the whitelist by transforming a becomeExplosion into a new function deathactionsAndExplosion. That saves renaming of the function itself throughout the whole code.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
-
- Dangerous
- Posts: 84
- Joined: Sun Apr 26, 2009 10:24 pm
Last edited by Capt. Slog on Fri May 29, 2009 10:29 pm, edited 3 times in total.
-
- Dangerous
- Posts: 84
- Joined: Sun Apr 26, 2009 10:24 pm
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
You should probably do something else as I read in the death_actions:Capt. Slog wrote:I think that this requires this message to be sent but no matter how slowly we kill Nellie, the ship on which he resides, allegedly, he never evacuates. I'll dig deeper.
Code: Select all
<key>death_actions</key>
<array>
<string>set: mission_hofd KURTZ_ESCAPED</string>
</array>
UPS-Courier & DeepSpacePirates & others at the box and some older versions
-
- Dangerous
- Posts: 84
- Joined: Sun Apr 26, 2009 10:24 pm
Yes I've docked twice, once to meet Kurtz and afterwards to see what happened (and top up with fuel and arms). I believe Tivva has done the same.Eric Walch wrote:You should probably do something else as I read in the death_actions:Have you considered docking with the target carrier?Code: Select all
<key>death_actions</key> <array> <string>set: mission_hofd KURTZ_ESCAPED</string> </array>
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Oolite 1.55 had a typo in its flasher definitions of escape-pods. This one has the same typo. I'm always curious why people keep copying stuff from other oxp's when similar stuff s also in oolite itself.Capt. Slog wrote:Yes I've docked twice, once to meet Kurtz and afterwards to see what happened (and top up with fuel and arms). I believe Tivva has done the same.
When you copy the lines of the 3 flashers from oolites own escapepod into GN it will work as expected. But that is only cosmetic. When the error is logged it just means the flasher is removed.
Your solution with the mission is quite easy. --- [edited out a possible mission spoiler] --- This is a very frustrating bug when working with carriers. It results in blocking the launches until all escorts of completely unrelated ships have arrived. This can take ages as they all start from the main station.
I have made a AI fix for that in New 1.72 AI's. It contains a bad fix for this specific problem as it introduces other potential anomalies. But those new bugs are only theoretical, the current bug is solved. I assume it is fixed proper in the code itself in 1.73.
Last edited by Eric Walch on Fri Jun 05, 2009 9:22 am, edited 1 time in total.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Above message is not the reason Galactic Navy does not work.
Looking how Math defined his ships, I think the whole oxp is broken when you have the newer behemoth.oxp installed. It uses like_ship definitions, however, the newer behemoth.oxp uses JS ship scripts. When those scripts are present any death_action or launch_action is ignored. For most ships Math sets a specific AI with launch_actions for his Behemoth clones. Now the ships just use the original behemoth.AI and ignore his specific AI's. Same for death_actions. They are just ignored.
In order to work you must delete all JS scripts. Looks difficult as there are none defined in this oxp itself. But you can do that by adding an empty script entry:
to all ships that use a like_ship reference to an existing behemoth and contain death_or launch_actions. I tested it. With above key added the nelie-behemoth immediately starts attacking the player and uses the default ship script.
PS. I only have version 2.5. The current version seems to be 4.0. So I don't know if above also applies for 4.0.
Looking how Math defined his ships, I think the whole oxp is broken when you have the newer behemoth.oxp installed. It uses like_ship definitions, however, the newer behemoth.oxp uses JS ship scripts. When those scripts are present any death_action or launch_action is ignored. For most ships Math sets a specific AI with launch_actions for his Behemoth clones. Now the ships just use the original behemoth.AI and ignore his specific AI's. Same for death_actions. They are just ignored.
In order to work you must delete all JS scripts. Looks difficult as there are none defined in this oxp itself. But you can do that by adding an empty script entry:
Code: Select all
<key>script</key>
<string></string>
PS. I only have version 2.5. The current version seems to be 4.0. So I don't know if above also applies for 4.0.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Actually, that's not it at all. The death of Nellie is supposed to spawn Kurtz's escape shuttle, which then must be destroyed to spawn Kurtz's escape pod.
However, there is no command to spawn the shuttle in Nellie's death actions.
Add the following line to Nellie's death actions and tell me what happens.
If that doesn't work, it probably is related to the JavaScripts.
However, there is no command to spawn the shuttle in Nellie's death actions.
Add the following line to Nellie's death actions and tell me what happens.
Code: Select all
<string>spawn: hofd-shuttle 1</string>
Dream as if you'll live forever
Live as if you'll die tomorrow
Live as if you'll die tomorrow
-
- Dangerous
- Posts: 84
- Joined: Sun Apr 26, 2009 10:24 pm
Nemoricus,
I think Matt tried to do this in the AI.
I think Matt tried to do this in the AI.
Code: Select all
"ATTACK_SHIP" = {
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
"ENERGY_LOW" = ("setStateTo: ABANDON_SHIP");
and
"ABANDON_SHIP" = {
ENTER = ("launchShipWithRole: hofd-shuttle", "setSpeedTo: 0.0", performIdle);
EXIT = ();
UPDATE = ();
};
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Yes, and it is working. I just tested it by adding nelie with the console. It launched a shuttle and when destroying the shuttle it spawned the pod that could be scooped.Capt. Slog wrote:Nemoricus,
I think Matt tried to do this in the AI.
UPS-Courier & DeepSpacePirates & others at the box and some older versions