Swarm OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Swarm OXP

Post by Capt. Murphy »

Wil do Thargoid. Work has unfortnately got in the way of further investigation today but I intend to build a little test OXP to try logging an undefined variable in varoius circumstances to try and pin down the crash circumstances.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Swarm OXP

Post by Eric Walch »

Capt. Murphy wrote:
I notice that this.startWeave is called from the AI. I would hypothesis that the AI is loading and managing to send the sendScriptMessage: startWeave before this.shipSpawned() has fired some circumstances.
That is probably true. On adding ships, the ENTER message of the GLOBAL state is executed immediately. In most cases this message contains an instruction to go to another state. In that case, also the ENTER message of that state is immediately executed.

Only after all ships are added, updating of ships start. That means that only than the UPDATE messages in AI start and all ships receive an this.shipSpawned() event. In general, when you don't want that AI messages start immediately, you should not do things in the ENTER part of the first state, but in the UPDATE part. I am not sure when happens first on the first update: this.shipSpawned() or AI UPDATE
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2412
Joined: Mon May 31, 2010 11:11 pm

Re: Swarm OXP

Post by Switeck »

Thargoid wrote:
But you may be onto something with why I can't reproduce it, as my machine is lower power and has nowhere near that frame rate (I get max about 50, it's only a netbook). But it may be useful to the dev's for a possible underlying issue that is being highlighted here (and elsewhere).

For reference I've got a bug open on Berlios about this (bug 18485) - can you add your details to that please?
You mentioned having wormholes that did nothing and you could fly your ship through them...which typically only happened to me when there were NaN Thargoid Swarm ship/s in the system. It was a rare event, so at your lower framerate it may happen maybe once out of 10-20 instead of 1 out of 2-4 for me. :(
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Swarm OXP

Post by Capt. Murphy »

Thargoid wrote:
Also logging an undefined value like that definitely shouldn't cause a CTD.
For info - there appears to be a bug in the log command that manifests as a CTD when the messageClass is undefined. This is the construction that Switeck had used in the script.

https://bb.oolite.space/viewtopic.ph ... 7&p=164697
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
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: Swarm OXP

Post by Fatleaf »

Is there something wrong with the collision radius of this oxp. I was fighting a swarm drone and was flying up behind it, cloaked, intending to ram it but four times it bounced off me as if it was rubber without the collision sound and no damage.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Swarm OXP

Post by Thargoid »

Collision radii aren't modifiable by OXPs (aside from the size of the model itself of course).

I would guess that your combined speed wasn't fast enough to do damage, and you just "bounced off". If both you and the drone were heading in the same general direction, then your combined velocities would tend to cancel out rather than add, as in a normal head-on collision.
Post Reply