New missiles, bombs and equipment

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

Moderators: winston, another_commander

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Rather than using chaff to link the missile number with the chaff number, why not just replace the i there with a random number between 0-29? That would remove the over 30 missiles glitch, although I would agree the chances of that are remote (unless you get on the wrong side of a couple of Navy Constitutions at once).
Namttep
Dangerous
Dangerous
Posts: 69
Joined: Wed Nov 24, 2010 7:33 pm

Post by Namttep »

Love the Oxp, but seriously some of the missiles are way too expensive,

I would like to edit the prices, what do I need to do to do that?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Namttep wrote:
Love the Oxp, but seriously some of the missiles are way too expensive,

I would like to edit the prices, what do I need to do to do that?
Make a back-up copy of, and then edit the original of equipment.plist with your favourite text editor (presuming that isn't MS Notepad or MS Word etc). You'll find it in the config folder inside the .oxp folder.

The second number in each entry is the price of the piece of equipment in question (the first one is the tech level, or at least 1 less than the tech level as appearing in-game), or more exactly it is 10x the in-game price to allow for the 0.1 decimal place element.

If you screw up or things stop working, restore the file from the backup.

Once you're done, restart Oolite with shift pressed to clear the cache, then you should be on your way.
Namttep
Dangerous
Dangerous
Posts: 69
Joined: Wed Nov 24, 2010 7:33 pm

Post by Namttep »

As always thanks tharg

I NOW use notepad++ rather than MS notepad.


Thanks again
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: New missiles, bombs and equipment

Post by CommonSenseOTB »

Hopefully this is the right thread to post this.

I'm on the last shakedown testing of chupacabrahud and have the missiles and bombs v2.4 oxp in the addons. I never saw anything so must assume it was an npc using it on another npc. Got this in the log:

13:57:40.390 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (rmb-override-missile-script 3.0): TypeError: this.ship.target is null
13:57:40.390 [script.javaScript.exception.unexpectedType]: ../AddOns/Missiles and Bombs v2.4.oxp/Scripts/rmb-override-missile-script.js, line 9.

Adding code isValid to this script may solve the problem. Lately, I've noticed more of this type of problem. Perhaps it is time for all authors of missile oxps and other oxps that have code pertaining to targets to have another look at scripts that have not changed for a long time and place isValid code where needed. This includes my huds as well and will have to do more extensive testing looking for this potential problem.

Cheers. :)
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: New missiles, bombs and equipment

Post by Ramirez »

I completely forgot about this - clearly I haven't actually been playing Oolite enough recently, otherwise I would have noticed this.

So, I've updated Missiles & Bombs to v2.5 to include some minor changes to a couple of the scripts . I've done a bit of testing by firing missiles and then removing their targets via the console, and it seems the the log messages have stopped.
Download Resistance Commander plus many other exciting OXPs HERE
Post Reply