Page 2 of 3

Re: [WIP]SunSkimmerPod OXP

Posted: Mon Mar 21, 2011 3:22 pm
by Okti
Kaks wrote:
Hmm, following Commander McLane's fine example, I haven't downloaded the WIP yet, but I do have a question: what happens if you're in a nova system?
Probably press space commander if you don't have enough fuel to jump to a system, or you don't have galactic hyperdrive. :D

Re: [WIP]SunSkimmerPod OXP

Posted: Mon Mar 21, 2011 4:03 pm
by Okti
Commander McLane wrote:
By the way, and because I've downloaded the OXP now:
  • When the player ship is docked, it still exists. Therefore your code would not remove the missile. I think it would get parked 1000 meters away from the station.
Here is the answer to Commander McLanes question.

Image

And After Launching from the station. :D

Image

Re: [WIP]SunSkimmerPod OXP

Posted: Mon Mar 21, 2011 4:22 pm
by Commander Ragugaki
Okti - great Screen Shots!

Says everything really - picture = 1000 words. :)

Re: [WIP]SunSkimmerPod OXP

Posted: Mon Mar 21, 2011 5:54 pm
by Okti
Version 0.9 Beta is released, and can be downloaded from my signature under other OXP's.

Changes.
1-requiresEmptyPylon added. And world script is removed.(Thanks Commander McLane)
2-Model and Texture changed.(Special Thanks To Smivs.)

Enjoy

Re: [WIP]SunSkimmerPod OXP

Posted: Mon Mar 21, 2011 7:28 pm
by Commander McLane
Okti wrote:
Commander McLane wrote:
By the way, and because I've downloaded the OXP now:
  • When the player ship is docked, it still exists. Therefore your code would not remove the missile. I think it would get parked 1000 meters away from the station.
Here is the answer to Commander McLanes question.
Just a suggestion: Personally I generally try to avoid to give the player commsMessages while he is docked. I think they don't really fit nice on the docked screens, and I also think that the player is occupied with the things he's doing inside the station, not what's happening in front of it (at least that's how it is for myself). I would therefore suggest to suppress the messages if docked. The missile would still be waiting outside, but silently.

You can achieve that by sending the messages from the script instead of the AI. And then you only need a simple condition:

Code: Select all

if(!player.ship.docked)
{
    this.ship.commsMessage("your message", player.ship);
}
One caveat, though: this won't work for the first message, because script-sent commsMessages only go to ships within scanner range.

However, they way your AI works, by targeting the player ship from outside scanner range and then sending the message doesn't feel actually right to me. It shouldn't be possible to target an entity outside scanner range, and it shouldn't be possible to send commsMessages to the other end of the system.

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Mon Mar 21, 2011 7:49 pm
by Okti
Hi Commander McLane,

As I mentioned before, this small OXP is not an essential to experienced commanders. Sun skimming is more efficient than using the sun skimmer pod.

And I do not expect a player wishes to dock with the main station of the system will use that equipment. :D

But it might be good solution for the bounty hunters or fugitives, in the first case locate pirates and kill them all, while the pod goes for sun skimming, and in the second case you have a way to refuel your ship before going to the main station which you can not use your docking computers.

The purpose of the OXP is to provide more options to the player, as well as to help me to understand AI's.

While testing the OXP I found that if player ship is in a position where the planet is between the sunskimmermissile, it can not reach the player at all.

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Mon Mar 21, 2011 8:00 pm
by Commander McLane
Okti wrote:
While testing the OXP I found that if player ship is in a position where the planet is between the sunskimmermissile, it can not reach the player at all.
It'll probably hit the planet. I can imagine two reasons for that:

1) the gotoWaypointAI isn't designed for circumnavigating planet-sized obstacles. It only corrects the course a little bit in order to avoid small obstacles, but can't manage to avoid the planet; or

2) the missile is too fast. When the obstacle is detected, a waypoint is set and gotoWaypointAI kicks in, it is already too late for course corrections, because the missile has already smashed into the planet.

You could try to check which is correct by logging the missile's AI messages.

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Mon Mar 21, 2011 9:22 pm
by Okti
Commander McLane wrote:
Okti wrote:
While testing the OXP I found that if player ship is in a position where the planet is between the sunskimmermissile, it can not reach the player at all.
It'll probably hit the planet. I can imagine two reasons for that:

1) the gotoWaypointAI isn't designed for circumnavigating planet-sized obstacles. It only corrects the course a little bit in order to avoid small obstacles, but can't manage to avoid the planet; or

2) the missile is too fast. When the obstacle is detected, a waypoint is set and gotoWaypointAI kicks in, it is already too late for course corrections, because the missile has already smashed into the planet.

You could try to check which is correct by logging the missile's AI messages.
It didn't hit the planet, But I don't think that discussion is valid for this OXP.

It did become an uncontrolledThargon about 300,000 kmtrs to the station. But I could still locate with LongRangeScanner :|

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Mon Mar 21, 2011 10:02 pm
by Thargoid
Ran out of fuel or exceeded it's AI-defined maximum range?

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Mon Mar 21, 2011 10:18 pm
by Okti
Thargoid wrote:
Ran out of fuel or exceeded it's AI-defined maximum range?
Sorry Thargoid, I could not get the question right, what do you mean?

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Mon Mar 21, 2011 10:34 pm
by Eric Walch
Commander McLane wrote:
1) the gotoWaypointAI isn't designed for circumnavigating planet-sized obstacles. It only corrects the course a little bit in order to avoid small obstacles, but can't manage to avoid the planet; or
gotoWaypointAI is very well able to travel around planets. (With setting correct ranges of course) I explicit tested it several times with Oolite 1.73, and don't think that anything has changed since. e.g. add a trader near the planet, at the opposite side of the station. It should find its way to the station. :D

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Mon Mar 21, 2011 10:51 pm
by Eric Walch
Okti wrote:
While testing the OXP I found that if player ship is in a position where the planet is between the sunskimmermissile, it can not reach the player at all.
This will probably happen with every condition that puts the missile in a gotoWaypointAI. The reason is that the missile it to fast for how the code was written. You now have:

Code: Select all

		"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
		"DESIRED_RANGE_ACHIEVED" = ("commsMessageByUnpiloted: Ready for pick-up.", becomeUncontrolledThargon);
		UPDATE = ("sendScriptMessage: locatePlayer", "pauseAI: 5.0");
When it returns from a gotoWaypointAI, the range is still 50 meter, triggering the DESIRED_RANGE_ACHIEVED quite soon. Normally the range is reset in UPDATE, but for fast ships UPDATE might come to late. Better add the line

Code: Select all

"RESTARTED" = ("setDesiredRangeTo: 1000.0");
That line makes sure that any previous range from the gotoWaypointAI is reset at the moment your AI takes over control again.

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Mon Mar 21, 2011 11:02 pm
by Okti
Eric Walch wrote:
Okti wrote:
While testing the OXP I found that if player ship is in a position where the planet is between the sunskimmermissile, it can not reach the player at all.
This will probably happen with every condition that puts the missile in a gotoWaypointAI. The reason is that the missile it to fast for how the code was written. You now have:

Code: Select all

 "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
"DESIRED_RANGE_ACHIEVED" = ("commsMessageByUnpiloted: Ready for pick-up.", becomeUncontrolledThargon);
UPDATE = ("sendScriptMessage: locatePlayer", "pauseAI: 5.0");
When it returns from a gotoWaypointAI, the range is still 50 meter, triggering the DESIRED_RANGE_ACHIEVED quite soon. Normally the range is reset in UPDATE, but for fast ships UPDATE might come to late. Better add the line

Code: Select all

"RESTARTED" = ("setDesiredRangeTo: 1000.0");
That line makes sure that any previous range from the gotoWaypointAI is reset at the moment your AI takes over control again.
Thanks Eric I will try your suggestion tomorrow morning.

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Tue Mar 22, 2011 3:00 pm
by Thargoid
Okti wrote:
Thargoid wrote:
Ran out of fuel or exceeded it's AI-defined maximum range?
Sorry Thargoid, I could not get the question right, what do you mean?
Missiles have a maximum range (set in their AI) - after they exceed that they explode. I was just wondering if that was happening in your case here?

Re: [Release]SunSkimmerPod OXP v.0.9

Posted: Tue Mar 22, 2011 3:08 pm
by Okti
Thargoid wrote:
Missiles have a maximum range (set in their AI) - after they exceed that they explode. I was just wondering if that was happening in your case here?
No it is not using missileAI, probably occured randomly, I could not create it again.