Attack/Combat Modes

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Attack/Combat Modes

Post by mandoman »

I have a ship with which I would like it to perform rather strangely. It's called Gyro, because it IS a gyro.....with lasers. I would like it to spin at a high rate of speed, firing all four weapons at the same time, and changing directions on a penny. I want it to be the enemy of everyone, and I mean everyone, including Thargoids, and Cylons, and whatever those Swarm bugs are. It will have a very low tolerance to attack, but it's speed, and quickness will make it hard to hit. It's accuracy will be low, when firing lasers, as it will just fire lasers at everything that moves (and some that don't). The lasers will be of the Pulse variety, but I want them to be able to fire continuously. In other words, this is a really strange alien ship that hates everyone, and will even inadvertently fire on it's own kind in it's frenzy. At this time, most of what I just listed is not possible, from what I understand from Fatleaf. Is there a possibility of making any of this type of behavior functional, like in an AI, or script? I've had another ship once before that I wanted to be able to do similar to this one, just not as crazy, and never did get it to function the way I wanted. Just asking. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Attack/Combat Modes

Post by Wildeblood »

An NPC ship that spins around as it flies is easy. I'll PM you an example. Making it shoot at things I don't know anything about.
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: Attack/Combat Modes

Post by Shipbuilder »

@Wildblood - I would also be interested in seeing the example enabling a ship to rotate while it is flying as I have a couple of ideas for future oxps.

Is this based on the rotational_velocity entry for sub-entities noted in the shipdata.plist document on the Wiki or is it a rotation of the main vessel ?

What sort of rotation can you achieve i.e. can you rotate a model around any axis or is the rotation limited to a single axis ?
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Attack/Combat Modes

Post by mandoman »

Wildeblood wrote:
An NPC ship that spins around as it flies is easy. I'll PM you an example. Making it shoot at things I don't know anything about.
I was wondering about that "rotational velocity" entry in shipdata.plist. Thanks. I'll have to study that script, too. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: Attack/Combat Modes

Post by Fatleaf »

mandoman wrote:
Wildeblood wrote:
An NPC ship that spins around as it flies is easy. I'll PM you an example. Making it shoot at things I don't know anything about.
I was wondering about that "rotational velocity" entry in shipdata.plist. Thanks. I'll have to study that script, too. :)
A good example of a subentity on a ship using that is the Caduceus engines. Look at the external view from behind and you will see them spin round the port one counter-clockwise the starboard clockwise (Or is that the other way round?!?!). They work quite well.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Attack/Combat Modes

Post by Wildeblood »

mandoman wrote:
I was wondering about that "rotational velocity" entry in shipdata.plist. Thanks. I'll have to study that script, too. :)
Yes, rotational velocity works on the main entity too. Mandoman, ignore that script - it's an old-style script, not javascript.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Attack/Combat Modes

Post by Thargoid »

Are you sure, because it certainly didn't used to in the past and the wiki only refers to using it with sub-ents. If that has been changed then it's new and docs need to be updated.

You can certainly spin a ship by script, but it usually just causes all sorts of weird flight paths as the ship always flies in the direction it's facing (unless you start playing with its velocity too).
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: Attack/Combat Modes

Post by Fatleaf »

Why not then just make a subentity of the ship spin but not the ship itself. And then make the main ship bit that the subent is attached to smaller and appear insignificant so the ship will have a stable flight path.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Attack/Combat Modes

Post by mandoman »

I'm not sure I'm interested in a stable flight path. These guys are loonies to any other species mind, including Thargoids (as hard as that is to believe). I kind of want it to go nuts. It should jump into any system, at random, and start spinning at high velocity, firing all weapons at anything, and everything. Chaotic? Yes, but that is the point. Gyros are chaotic unless strictly under control, and the beings flying these things are anything but under control. I haven't yet decided what they are, but I'm thinking on it. I want this ship to dart about, spinning at a blinding rate, firing all weapons at everything in site, and either getting blown out of space by some hot shot pilot, or smashing into an asteroid, ship, station, or Rock Hermit. I don't know if this will work, but it kind of takes the craziness of Thargoids up a notch. :D
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Attack/Combat Modes

Post by Wildeblood »

Thargoid wrote:
Are you sure, because it certainly didn't used to in the past and the wiki only refers to using it with sub-ents. If that has been changed then it's new and docs need to be updated.

You can certainly spin a ship by script, but it usually just causes all sorts of weird flight paths as the ship always flies in the direction it's facing (unless you start playing with its velocity too).
Let me clarify: it's not mine, so don't ask me for explanations, I just said I had an example of the sort of thing Mandoman was describing. It doesn't rotate smoothly about the z-axis as Shipbuilder wants, it whirls about chaotically, as Thargoid says. It's not done with sub-entities, it's not done by script, but by setting rotational velocity. Whether rotational velocity applies to a ship seems to depend on the AI in use: when this thing comes under the spell of docking.AI it stops whirling about. If you know which ship model I'm referring to, please don't mention it by name here.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Attack/Combat Modes

Post by Thargoid »

Fair enough, and thanks for the clarification.

It sounds like the AI command performTumble is involved, although that sets speed to zero. But possibly in combination with a script-set velocity it could give a moving and tumbling ship, but not one that can laser attack (as that needs performAttack).
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Re: Attack/Combat Modes

Post by Commander McLane »

I guess that the desired attack behaviour as outlined in the first post can't be achieved by normal AI behaviour anyway, but has to be somehow emulated through clever scripting.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Attack/Combat Modes

Post by mandoman »

Commander McLane wrote:
I guess that the desired attack behaviour as outlined in the first post can't be achieved by normal AI behaviour anyway, but has to be somehow emulated through clever scripting.
LOL!!! Okay, that counts me out. :lol:
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Attack/Combat Modes

Post by Tricky »

How about ship.orientation ? Like YAH billboard uses in it's script.

EDIT: Of course in this case you would use a frame callback to change the orientation a small random amount rather than following a towing ship.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Attack/Combat Modes

Post by Thargoid »

That's the spinning by script method I mentioned above, in more specific detail ;)
Post Reply