Page 2 of 4

Re: Factions OXP

Posted: Tue May 31, 2011 8:03 am
by m4r35n357
Eric Walch wrote:
I now downloaded the oxp. You have no reference to the hoft-nellie at all, so the above reported missing link is not from your oxp.

The way you use the giant-rays seems no real problem with the original intention. You create a clash between system types. Than it would be logical for the commies to deploy their Giant Ray there. However, it is a carrier and your used AI is not suited for carriers. When one defender requests docking, it will become a sitting duck.
But the original AI of the Giant Ray has a similar problem because in the attack state it also can't handle docking requests. I think it now, in commies.oxp, uses a very, very old verion of the route1patrolAI.
Thanks for your comments Eric, I think you appreciate that the tricky bit from my POV has to get the AI working, and to do this it has been helpful to have ships that can be distinguished from each other. Now the basic AI is working, I can step back and look at the ship situation, possibly flesh out the back story and the other "minor" details in a more leisurely fashion.

For general info, I've pared back the shipdata.plist to remove a lot of stuff that wasn't being used at all, and some stuff that I didn't mean to expose . . . oops! I'll put it out later today I hope.

Re: Factions OXP

Posted: Tue May 31, 2011 8:52 am
by m4r35n357
Version 1.5, removed unused shipdata entries

http://www.box.net/shared/igplbq3cls

Re: Factions OXP

Posted: Tue May 31, 2011 10:05 am
by Commander McLane
m4r35n357 wrote:
Now the basic AI is working...
Eric's point is that for the Giant Ray your basic AI is not working, at least not perfectly. The basic AI can and will lead into a situation where the Giant Ray will stop fighting or defending itself, just hanging around dead in space, unable to respond to attacks. At that point the other factions will wipe it out.

This is a special situation which only occurs for dockable ships (= carriers), and it doesn't need to occur all the time. But it can occur. The ship's AI can be prepared for this situation, but your AI just happens to not be prepared for it (and the original Giant Ray AI from Commies.oxp isn't, too).

Re: Factions OXP

Posted: Tue May 31, 2011 10:28 am
by m4r35n357
Commander McLane wrote:
m4r35n357 wrote:
Now the basic AI is working...
Eric's point is that for the Giant Ray your basic AI is not working, at least not perfectly. The basic AI can and will lead into a situation where the Giant Ray will stop fighting or defending itself, just hanging around dead in space, unable to respond to attacks. At that point the other factions will wipe it out.

This is a special situation which only occurs for dockable ships (= carriers), and it doesn't need to occur all the time. But it can occur. The ship's AI can be prepared for this situation, but your AI just happens to not be prepared for it (and the original Giant Ray AI from Commies.oxp isn't, too).
I'm talking about the factions.js AI here, which is shared by all the ships, and works for me. The Giant Ray is another matter entirely since I've only just added it. BTW it _does_ fight via my AI; I've seen the plasma balls, and I've also logged the kills it makes. Any effect like you describe will be shared by ALL other ships since they all share the same AI. I don't understand your negativity here . . . perhaps you could attempt to point me in the "right" direction?

Re: Factions OXP

Posted: Tue May 31, 2011 11:06 am
by Eric Walch
m4r35n357 wrote:
The Giant Ray is another matter entirely since I've only just added it. BTW it _does_ fight via my AI; I've seen the plasma balls, and I've also logged the kills it makes. Any effect like you describe will be shared by ALL other ships since they all share the same AI. I don't understand your negativity here . . . perhaps you could attempt to point me in the "right" direction?
Problem is that the Giant Ray is a carrier. So it might launch defenders to help him. When those defenders have killed their target, they might request docking permission with their mother. One of the nasty things of Oolite is that when a ship asks for docking permission, the carrier always switches to performStop mode, even when it was attacking.

One thing that can be done about it is to add a line

Code: Select all

"DOCKING_REQUESTED" = ("setAITo: receiveDockingAI.plist"); 
to all normal states to handle the docking. And in the attack state add something like:

Code: Select all

"DOCKING_REQUESTED" = (scanForHostiles , groupAttackTarget); 
This will generate a new found_target and sends all group members to it. That way any docking ship will head for the target again. At least when their Ai support groupAttack commands.

The non-carrier ships will have no problem with the added "DOCKING_REQUESTED" line

Re: Factions OXP

Posted: Tue May 31, 2011 11:10 am
by Commander McLane
@ Maresnest: Where do you see negativity?

Eric wrote very precisely about a possible issue, already indicating the way to go for a positive solution, and I just spent two paragraphs of pointing-in-the-right-direction in my own words. (EDIT: and now Eric has stepped in with even more detailed explanations.) There's not a dot of negativity in either post, except in your reaction.

It is possible, though, that the problem never actually will surface:
Eric Walch wrote:
However, it is a carrier and your used AI is not suited for carriers. When one defender requests docking, it will become a sitting duck.
If your AI doesn't take carriers into account, chances are that it also doesn't launch defenders. In that case no defender can request docking in the first place, and the problem won't occur.

The Giant Rays in Commies don't seem to launch defense ships either (at least the specimen I just performed two tests with didn't).

Re: Factions OXP

Posted: Tue May 31, 2011 11:14 am
by m4r35n357
Eric Walch wrote:
Problem is that the Giant Ray is a carrier. So it might launch defenders to help him. When those defenders have killed their target, they might request docking permission with their mother. One of the nasty things of Oolite is that when a ship asks for docking permission, the carrier always switches to performStop mode, even when it was attacking.

One thing that can be done about it is to add a line

Code: Select all

"DOCKING_REQUESTED" = ("setAITo: receiveDockingAI.plist"); 
to all normal states to handle the docking. And in the attack state add something like:

Code: Select all

"DOCKING_REQUESTED" = (scanForHostiles , groupAttackTarget); 
This will generate a new found_target and sends all group members to it. That way any docking ship will head for the target again. At least when their Ai support groupAttack commands.

The non-carrier ships will have no problem with the added "DOCKING_REQUESTED" line
Thanks Eric! I've already had to deal with escorts, and having working defenders too would be cool. Off to the workshop . . . .

Re: Factions OXP

Posted: Tue May 31, 2011 11:18 am
by Eric Walch
Commander McLane wrote:
The Giant Rays in Commies don't seem to launch defense ships either (at least the specimen I just performed two tests with didn't).
That is the problem with some oxps. Somehow I assume they are all tested before release. :wink: . The Giant Ray has defense ships defined, but you are right, they will never be launched at all. The whole AI for this carrier in commies is a joke and not even written for witchspace, even when the ships are exclusively added there.

Re: Factions OXP

Posted: Tue May 31, 2011 11:35 am
by m4r35n357
Eric Walch wrote:
Commander McLane wrote:
The Giant Rays in Commies don't seem to launch defense ships either (at least the specimen I just performed two tests with didn't).
That is the problem with some oxps. Somehow I assume they are all tested before release. :wink: . The Giant Ray has defense ships defined, but you are right, they will never be launched at all. The whole AI for this carrier in commies is a joke and not even written for witchspace, even when the ships are exclusively added there.
I hope I can deal with that by launching them myself.

Re: Factions OXP

Posted: Tue May 31, 2011 4:56 pm
by CommonSenseOTB
Commander McLane wrote:
Eric Walch wrote:
I think it now, in commies.oxp, uses a very, very old verion of the route1patrolAI.
I guess so, given that Commies is around virtually unchanged for ages, while at the same time you have really pushed forward Oolite's AIs. :D
Speaking of AI's is it planned to have the core game take advantage of the interaction of AI with the ships' scripts or is that to be oxp only? Perhaps this would be a way to add difficulty level into the game. :wink:

Re: Factions OXP

Posted: Tue May 31, 2011 5:54 pm
by Commander McLane
CommonSenseOTB wrote:
Speaking of AI's is it planned to have the core game take advantage of the interaction of AI with the ships' scripts or is that to be oxp only? Perhaps this would be a way to add difficulty level into the game. :wink:
In the long run (read: Oolite 2) the current AIs will be completely replaced with JS-script-based AIs.

In the short run ordinary ships don't have elaborated ship scripts. They all use the oolite default script, which at this point only converts script-actions to JS. And their usual behaviours are covered by the AI mechanism quite nicely.

Of course you are free to monkey patch the default script if you want to do something beyond the normal AI behaviours. That's how for instance NPC-shields.oxp works.

Re: Factions OXP

Posted: Tue May 31, 2011 6:15 pm
by m4r35n357
Done quite a bit of testing this afternoon, and got defenders to launch & join battle, but to be honest it was really difficult to verify, seeking out the rays and watching them over & over again. Docking would be even more difficult to observe, and considering we are in the midst of a pitched battle I doubt it would even be attempted.
I'm tempted to just give them a couple of escorts, the player will never know the difference.
Can anyone think of a motivation to do this, because I'm starting to lose mine? I just don't think it adds anything to the experience.

Re: Factions OXP

Posted: Wed Jun 01, 2011 1:13 pm
by JazHaz
Eric Walch wrote:
Problem is that the Giant Ray is a carrier. So it might launch defenders to help him. When those defenders have killed their target, they might request docking permission with their mother. One of the nasty things of Oolite is that when a ship asks for docking permission, the carrier always switches to performStop mode, even when it was attacking.

One thing that can be done about it is to add a line

Code: Select all

"DOCKING_REQUESTED" = ("setAITo: receiveDockingAI.plist"); 
to all normal states to handle the docking. And in the attack state add something like:

Code: Select all

"DOCKING_REQUESTED" = (scanForHostiles , groupAttackTarget); 
This will generate a new found_target and sends all group members to it. That way any docking ship will head for the target again. At least when their Ai support groupAttack commands.

The non-carrier ships will have no problem with the added "DOCKING_REQUESTED" line
Could you have the carrier set Docking Refused when the scanForHostiles is positive? That way docking could proceed when at green status and refused when in action?

Oh, and hi btw! :)

Re: Factions OXP

Posted: Wed Jun 01, 2011 1:46 pm
by Smivs
Hi JazHaz, how are you doing?

Re: Factions OXP

Posted: Mon Jun 13, 2011 11:02 am
by m4r35n357
Latest version 1.6

http://www.box.net/shared/zifk36gz08km0o1lpr22

Changes:
- Add comms messages to other faction members when the player attacks
- Eliminate possibility of "friendly fire" incidents between plasma-equipped ships
- Number of participating factions (2-4) now depends on tech level
- Somtimes there is no battle, but hopefully not often enough to be annoying ;)
- Various default shipdata.plist changes, edit these if you don't like my choices!