New missiles, bombs and equipment
Moderators: winston, another_commander
- wackyman465
- ---- E L I T E ----
- Posts: 831
- Joined: Thu Nov 06, 2008 10:15 pm
- Location: Currently hunting you down in an Imperial Courier
Re: ..
Try hereLestradae wrote:Missiles & Bombs 2.0 appears as 2.0, but the download link leads nowhere
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Commander McLane
- ---- 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:
Hi Ramirez!
You missed one in the renaming process:
it should be
You missed one in the renaming process:
In the rmb-chaff entry there is a like_ship you overlooked. Instead of[shipData.merge.failed]: ***** ERROR: one or more shipdata.plist entries have like_ship references that cannot be resolved: ("rmb-chaff")
Code: Select all
<key>like_ship</key>
<string>frag-particle</string>
Code: Select all
<key>like_ship</key>
<string>rmb-frag-particle</string>
Yes, chaff is working nicely. Apparently it never worked before as I did buy the dispenser without a free pylon, thus never receiving the first package at all. I thought the buyable packages would just be to reload the launcher, not to make the launchers functionality accessible. My mistake.Ramirez wrote:Thanks - I got a PM on that one yesterday so I've made the corrections and have re-uploaded v2.0. Hopefully it works OK now.
After updating, I did get that strange error message again, which you could not reproduce. Is anyone else seeing this upon cache rebuild?
Code: Select all
[plist.parse.foundation.failed]: Failed to parse AddOns/Missiles and Bombs v2.0.oxp/AIs/missileAI.plist as a property list using Foundation. Retrying using homebrew parser. WARNING: the homebrew parser is deprecated and will be removed in a future version of Oolite.
Parse failed at line 1 (char 16) - extra data after parsed string
[plist.homebrew.parseError]: Property list isn't in XML format, homebrew parser can't help you.
Screet
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Screet wrote:After updating, I did get that strange error message again, which you could not reproduce. Is anyone else seeing this upon cache rebuild?
However overwriting internal AI is a bad thing. When you install one oxp that overwrites something, there is probably no problem. But a problem arises when you install a second oxp that uses the same overwriting tactic. One of the two will lose than!
EDIT: After downloading 2.0 I see no error in that plist. My syntax checker says it is OK.
I see an other bug though. Ramires writes in the shaff script:
Code: Select all
if
(missionVariables.rmb_chaff_count == 0)
player.consoleMessage(expandDescription("Chaff exhausted."), 6)
missionVariables.rmb_chaff_loaded = "NO"
When writing it this way it will use the condition only for the one line preceding the if statement. The second line is always executed. Seeing the rest of the code this is not wanted. It should be:
Code: Select all
if
(missionVariables.rmb_chaff_count == 0)
{
player.consoleMessage(expandDescription("Chaff exhausted."), 6)
missionVariables.rmb_chaff_loaded = "NO"
}
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- 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:
This message was produced by an extra '}' (I think) in an older version of Missiles and Bombs. The bug is however no longer present in version 2.0.Screet wrote:After updating, I did get that strange error message again, which you could not reproduce. Is anyone else seeing this upon cache rebuild?
Looking at the file, I fail to understand what's causing this message. The missiles I've tried so far do work.Code: Select all
[plist.parse.foundation.failed]: Failed to parse AddOns/Missiles and Bombs v2.0.oxp/AIs/missileAI.plist as a property list using Foundation. Retrying using homebrew parser. WARNING: the homebrew parser is deprecated and will be removed in a future version of Oolite. Parse failed at line 1 (char 16) - extra data after parsed string [plist.homebrew.parseError]: Property list isn't in XML format, homebrew parser can't help you.
Probably another manifestation of your Vista Virtual Store problem?
That's what I checked first, it wasn't the problem. I had the same bug with the previous version and accidentally created a VS-copy then when I tried to replace the spaces with new ones, thinking that this might have been it, but it wasn't the cause either.Commander McLane wrote:Probably another manifestation of your Vista Virtual Store problem?
Screet
- Commander McLane
- ---- 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:
Thanks for the pointer on the chaff bug - I still have a bit of a blind spot when it comes to the curly brackets!
On the missile AI, is there a better way of going about this than overwriting files? It seemed like a quick and easy solution at the time but I know it can create clashes - I think Thargoid's missile rack OXP uses copies of the originals as well.
On the missile AI, is there a better way of going about this than overwriting files? It seemed like a quick and easy solution at the time but I know it can create clashes - I think Thargoid's missile rack OXP uses copies of the originals as well.
Download Resistance Commander plus many other exciting OXPs HERE
Mine use variants on the trunk missileAI (standard and hard), as the rack's missiles have shorter ranges (to stop the rack becoming too powerful). That range is dealt with in the AI, so they need new ones. If you look at the desiredRange checks, you'll see my numbers are smaller (20k vs 30k).
Whilst missile range is a function of the AI rather than of the shipdata I don't think there is any other way than to use an amended AI.
Whilst missile range is a function of the AI rather than of the shipdata I don't think there is any other way than to use an amended AI.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
A more foolproof method would be with a ship script. I didn't want to suggest that in the past because you were not using them. But I see you now started with JS and could use it with your chaff. Instead of changing the AI, you could let the shafflauncher scan for all missiles in an area of 25600 meters that have the shaffs mother as target. If found, use a random function to decide if you change targets to the chaff. The missile is in performIntercept and just will use this new target to head to.Ramirez wrote:On the missile AI, is there a better way of going about this than overwriting files? It seemed like a quick and easy solution at the time but I know it can create clashes - I think Thargoid's missile rack OXP uses copies of the originals as well.
e.g. when you remove the spawning from the AI and add the next code to your decrementChaff function I think it will work with a unmodified missileAI. It just scanns for all missiles in range heading for the chafflauncher owner. If found it switches the missile targets to one of the chaffs. (90% of them).
Code: Select all
var chaff = this.ship.spawn("rmb-chaff", 30)
function isHostileMissile(entity)
{
return (entity.isShip && entity.scanClass == "CLASS_MISSILE" && entity.target && entity.target == this.ship.owner);
}
var missiles = system.filteredEntities(this, isHostileMissile, this.ship, 25600)
for(var i=0; i<missiles.length; i++)
{
if(Math.random() < 0.9) missiles[i].target = chaff[i];
}
I realise that system.filteredEntities is very difficult to understand in the start, but is is a very powerful function to do a scan for very specific ships that are defined by the function isHostileMissile
UPS-Courier & DeepSpacePirates & others at the box and some older versions
I thought of ship scripts but only as a means to somehow switch the missile's AI dynamically. However that would have involved creating a like_ship in the shipdata and I'd still have the overwrite issues.
Scanning for missiles and changing their targets sounds like a v good suggestion, so I'll give it a go.
Scanning for missiles and changing their targets sounds like a v good suggestion, so I'll give it a go.
Download Resistance Commander plus many other exciting OXPs HERE