Page 1 of 1

Subentities for player ship?

Posted: Thu Jan 11, 2007 8:27 pm
by ArkanoiD
Can a player ship have subentities with AI?

Posted: Thu Jan 11, 2007 8:49 pm
by LittleBear
Hmm an auto anti-pirate turret!

A sub-enentry turret but with a scanforship with role:pirate, set state to ATTACK ship AI. Only downside being it always fires on pirates even if they are not attacking you, forcing you into battle when you really wanted to let your shields build up!

Player subentries do have to have an AI (albiet they are given nullAI), don't know if anybody has tried giving them a different AI, but don't see why it shouldn't work.

I'll do a quick copy and paste of a Renegade Ship to a player-version and give the turrets pirateAI and see what happens...

Posted: Thu Jan 11, 2007 9:09 pm
by ArkanoiD
BTW does Asteroid Storm work on Linux properly now? I remember there were some problems with case sensitive filenames..

Posted: Thu Jan 11, 2007 9:45 pm
by LittleBear
Err it will do when I do a search and replace with six modles, to change .png to .PNG! But I haven't uploaded the fixed version yet (darn real world of criminal trials in way), will try to get round to putting up a fixed version next week. It should be an easy home fix, just a pain opening up the models dats and doing s&r, so haven't got round to it yet. :oops:

Posted: Thu Jan 11, 2007 11:15 pm
by Charlie
To be fair to LB some of my models were used in this .oxp & I'm pretty sure the 'case-bugs' were caused by me. :oops:

Turrets

Posted: Fri Jan 12, 2007 7:24 am
by Killer Wolf
"Only downside being it always fires on pirates even if they are not attacking you, forcing you into battle when you really wanted to let your shields build up! "

ah, but couldn't you have a keyboard command to activate the turret? kinda "If keystroke = "~" then set to attackshipAI ELSE set to nullAI" ?

Posted: Fri Jan 12, 2007 8:33 am
by DaddyHoggy
I think having the turrets auto attack pirates is a good ying/yang balance thing for having turrets that automatically attack pirates...

Sometimes its a good thing - sometimes its not!

Posted: Fri Jan 12, 2007 9:01 am
by Killer Wolf
do sub-ents like turrents drain from the players energy too? that might be an edded minus, if fitted.

i quite fancy building a battleship now, might be cool to script a mission w/ a Thargoid battle ship where you have to blow all the turrets off it so the military bombers can go in and torpedo it safely.

Posted: Fri Jan 12, 2007 4:25 pm
by Cmdr Wyvern
I think if we could have autoturrets on player ships that worked, then they should fire on all hostiles, not just pirates. After all, turrets that shot at pirates but ignored thargoids (or persuing cops and bounty hunters if you got into trouble) would be rather useless.
A scanforhostiles in the AI might work.

Posted: Fri Jan 12, 2007 9:55 pm
by Woof
what if you could buy the turret missles?

Posted: Sat Jan 13, 2007 2:06 pm
by LittleBear
Made a start on this:-

Image

Now the hard part is gonna be getting those turrets fireing!

If I can get this going, then the Auto-Turrets are gonna have some downsides. They'll chew up some cargo space and there gonna have a "bug" in them. Allthough most of the time, they'll auto-fire on a ship attacking you, somtimes they'll go wrong and open up on a police ship or station! :shock:

Posted: Sat Jan 13, 2007 2:30 pm
by LittleBear
Hmm.

Well those bolt on turrets attached to my python are swivelling (when I look at them in external views) as if they are looking for something to shoot at, but despite the 20 fat trade ships I've added nearby, they are not fireing. They have the normal entry for a turret (which works as a sub-entry on an NPC ship), but have pirateAI!

This is the entry for the turret:-

Code: Select all

<key>redturret</key>
   <dict>
	<key>energy_recharge_rate</key>
	<real>1.5</real>
	<key>max_energy</key>
	<real>200</real>
	<key>ai_type</key>
	<string>pirateAI.plist</string>
	<key>model</key>
	<string>bigship_turret.dat</string>
	<key>name</key>
	<string>Renegade Turret</string>
	<key>roles</key>
	<string>redturret</string>
	<key>thrust</key>
	<real>1</real>
	<key>weapon_energy</key>
	<real>20</real>
	<key>laser_color</key>
	<string>redColor</string>
	<key>setup_actions</key>
	<array>
	<string>initialiseTurret</string>
	</array>
	</dict>
EDIT : I took off the setup_actions and gave them a forward military laser and changed the AI to thargoid AI. They seem to be trying to attack by turning towards the non-Thargoid in front of me, but no joy getting them to actually fire!

Image

Any ideas?[/img]

Posted: Sat Jan 13, 2007 3:09 pm
by LittleBear
Bah!

Gave 'em my minesweeperAI (which I know works on an NPC sub-entry to knock out q-mines) and they failed to follow it.

I guess whist a sub-entry attached to a NPC can have an AI, anything attached to the player-entry cannot. :(

Posted: Sun Jan 14, 2007 11:38 pm
by Charlie
Hmmm, somewhat related issues have got me stuck with a couple of .oxp's :(

It does seem that some things that work on a ship that ought to work for a sub-entity don't, and the same for NPC vs Player ships. :(
I'm also finding this can be true for *AI.plist vs shipdata.plist ...bah!

An idea LB??

Rather than a sub-entity as a turret how about a minimal NPC ship with the turret attached to that..?
Then try to write an AI.plist for that NPC such that it follows your ship very closely?
Maybe not poss to keep it attached, but maybe a powered 'Turret-drone' that keeps a close escort?

This and a number of related ideas were to go into an ordinance.oxp but as usual my scripting isn't up to it :cry:
( I'll push that one out too once I've finally won my battle with other .oxp's I'm struggling to complete, but I suspect it may be redundant by then )