Page 1 of 1
Creating mounted laser subents
Posted: Tue Aug 31, 2010 1:41 am
by Mundane Soul
Now, I have been a fan of Oolite for about year now, and now I'm starting to mod myself. Now, looking at the wiki and I can't find anything on this. What I wanted to do is make something make something like the Rattle Cutter. I made the model myself and everything else already, I just need to figure this out. When I look at the Rattle Cutter, I can't find the roles or anything. Any help on this?
Posted: Tue Aug 31, 2010 7:13 am
by Thargoid
You need to set up the shipdata.plist, specifically the subentities key. They are separate entities which are joined to the main ship and which have their own forward and/or aft weaponry to enable multiple lasers in a given direction.
These can be either destructable or not independently of the main body of the ship by whatever setting you give the frangible key of the main body.
I'd suggest you have a good look at the shipdata.plist of the rattle cutter, and also the one for the main trunk itself to see how it all hangs together. Oh, and such weapon-equipped sub-entities don't work for player ships, currently those are single-weapon per view only.
<insert standard first post greeting here>
Posted: Tue Aug 31, 2010 9:21 pm
by Mundane Soul
I want to know how to script the subents themselves; I do know how to put it on my ship, like how to make it fire by itself. I look in the shipdata in both the ship and the subents and just all over the file. I don't know where to find the roles the subents use.
Posted: Tue Aug 31, 2010 9:26 pm
by Thargoid
You don't. All of the NPC ship's firing is controlled by it's AI - specifically the performAttack command therein.
All of that is solely under the AI's command, and cannot be scripted. The trunk code chooses when to fire its weapons and missiles, although missiles can be forced with the fireMissile command.
fireMissile has a javascript equivalent, but there isn't anything like that to script a laser fire (either on a main entity or a sub-ent).