Plundering ammo

Ok, I'm trying to make an outfit that can be plundered from disabled ships.

I figure this can be accomplished by making the outfit in question also be ammo for a weapon.
Then I make sure both the disabled ship and the player have this invisible weapon. (And the AI ship have some ammo for it, of course)

I have the weapon set to never be fired by AI, and also fired only with KeyCarried (which never exists)

The problem is, is that the ammo never shows up, in the plunder dialog.
I have double checked that all the index numbers and stuff are correct.

Any ideas why this isn't working?

In both Override and Nova, the player requires the appropriate weapon to plunder ammunition of a respective type. This is to prevent nonsense such as having the option of stealing fighters without having the prerequisite bay, and whatnot.

You might have better luck by making all ships of that type not assigned solely to defense fleet duty being regenerating përs ships, which give an invisible, auto-aborting mission when your board the craft, that grants you the outfit in question.

@desprez, on Feb 27 2008, 08:39 PM, said in Plundering ammo:

I have the weapon set to never be fired by AI, and also fired only with KeyCarried (which never exists)

If you uncheck these, is the ammo plunderable?
If you uncheck the first but leave the second? Vice versa?

@-visitor-, on Feb 28 2008, 02:16 AM, said in Plundering ammo:

In both Override and Nova, the player requires the appropriate weapon to plunder ammunition of a respective type. This is to prevent nonsense such as having the option of stealing fighters without having the prerequisite bay, and whatnot.

You might have better luck by making all ships of that type not assigned solely to defense fleet duty being regenerating përs ships, which give an invisible, auto-aborting mission when your board the craft, that grants you the outfit in question.

I have made sure both the player and the AI ship have the weapon. (The player has no ammo for it, but that shouldn't matter, no?)

The pers thing might be unworkable because this will apply to a whole class of ships, not just a special one or two.

Quaanol said:

If you uncheck these, is the ammo plunderable?
If you uncheck the first but leave the second? Vice versa?

Didn't work.

Also, I tried upping the ammo to 20, just in case low numbers (like 1 or 2) cause no ammo to be available. That didn't seem to have any effect either.

May be slightly off-topic...

I've always noticed how in EVC I could steal tons of Lightnings for my Kestrel, but I can't even steal a single fighter from a carrier in EVO or EVN, though I had the correct bays and room for more.

Is the outfit in question set as ammo for the weapon in its first ModType field?

@qaanol, on Feb 28 2008, 03:51 AM, said in Plundering ammo:

Is the outfit in question set as ammo for the weapon in its first ModType field?

Yes.
I'm not sure you can even enter weapons and ammo in the other fields.

Can you post the plug?

Imagine if you made an outfit that allowed you to plunder weapons, radars, fighters, and, if you have enough of this outfit, the actual bays. I'd be next to impossible, if not already, but it'd be cool.

Back on topic, posting the plug would be a good idea.

Ok, I think I have it nailed down. I'll have to do some cross-checking to be sure, but here's my theory.

I think the index number is playing a part here.
There happen to be some other ammo using dummy weapons that these ships have in common - and they usually have no ammo in them.
What I think Nova does is check for common weapons in index order. The first matching set it gets to, it puts in the plunder dialog. If there happens to be no ammo for it, then you get nothing.

This newest weapon happened to come after the others, and when I re-organized the weapon to be 128 (and edited the ship and outfits as well), it started working all of a sudden.

I could post the plug, but I'd have to make some serious changes for everything to make sense.

Well, I'm no longer wholly convinced it was a lower numbered weapon.
Upon further examination, there was only one potential interfering weapon, and moving it to a higher index didn't fix it.
Nevertheless, moving the plunderable weapon to 128 has fixed the problem.

In addition, I have found that the AI ship can have 0 of the weapon and 1 ammo, and you are still able to plunder it.

@desprez, on Feb 28 2008, 01:14 AM, said in Plundering ammo:

In addition, I have found that the AI ship can have 0 of the weapon and 1 ammo, and you are still able to plunder it.

That is extremely useful to me.

@qaanol, on Feb 28 2008, 03:35 PM, said in Plundering ammo:

That is extremely useful to me.

Yes, it is.
Among other things, it makes it so that the weapon and ammo don't show up in the ship info in the shipyard.
This is if the stock weapon has a 0 but with some ammo. Also makes it so the weapon can't fire without having to use the KeyCarried, or 'AI doesn't use' flags.
I don't know if plundering works if the ammo is granted via the stock outfits, probably not.

Also, it makes it so certain ships can plunder another but not vice versa.
If ship A has 1 weap with 0 ammo, and
ship B has 0 weap with 1 ammo.

Ship A can plunder the ammo from ship B, but ship B can't plunder ship A.
This is absolutely perfect for what I wanted to accomplish.

Let me give an example of something that may help, related to index numbers in weäp resources.

If you take the time to examine the weäp resources of EVN, you will find that there is a separate weäp resource for the Wraithii Cannon for every faction and mission string that uses it. However, there is only one outfit resource of Wraithii. All the weäp resources are set to AmmoType of 17, which I think is the index number of Wraithii. This allows all of the weĺp resources to use the same ammo.

However, this does not work so well in plugs. In beta-testing Nebula (which ended up lame anyway, because of file corruption... I still have my stable dev files, and I should post them somewhere...), I found that the Federation Special Forces Wraithii outfit would not display how many Wraithii my SF ship already had, and buying Wraithii did not increase the count of available Wraithii. The weäp resource had AmmoType of 17, just like the stock Nova, but it didn't work. Finally, I changed the AmmoType to 248, Which was the index number of the weäp resource (Index number = ID number - 128). The Weäp resource ID was 376. Anyways, this is what I found out from the EV Bible to explain this.

Quote

AmmoType: What kind of ammo the weapon uses:
-1 Ignored (unlimited ammo)

0-255 Draws ammo from this type of weapon. (Usually, if your Hector Cannon was of ID 131, you'd set the AmmoType to 3 so it'd use Hector Birdseed Pellets or whatever. However, you could conceivably set it to use ammo from another weapon's supply by setting the AmmoType to something else.)

-999 Ship is destroyed when weapon is fired

-1000 & below Weapon uses abs(AmmoType+1000)/10 units of fuel per shot. (example: -1005 = 0.5 units per shot)

As I interpret this, you should always set the Ammotype of a weäp resource that uses an outfit resource for ammo to the weĺp resource's index number. As the EV Bible states, if the ID of the Hector cannon is 131, you would set the AmmoType to 3. To cue the correct outfit for the ammo, you merely need to set the outfit as ammo for the correct weäp resource in the ModVal field. Needless to say, this fixed the Wraithii bug, and the outfit worked smoothly after that.

I'm not sure if this is exactly what you want, but it may be useful if you ever find that your ammo outfits aren't working right.

Stealing a fighter bay would be like stealing a mouth. Wouldn't work.

@phlogios, on Feb 28 2008, 05:20 PM, said in Plundering ammo:

Stealing a fighter bay would be like stealing a mouth. Wouldn't work.

Unless it's an underslung fighter rack.

@phlogios, on Feb 28 2008, 11:20 PM, said in Plundering ammo:

Stealing a fighter bay would be like stealing a mouth. Wouldn't work.

Who's talking about stealing bays?

Oh, hehheh, sorry.

Hm, some interesting information here. One thing I've been wanting to do in EVO is allow plundering of Rockets after making them shared by both the Rocket Launcher and the Rocket Turret (by default they use separate ammo types). I gave up after I (incorrectly?) determined that ammo could only be plundered if both the player and the AI ship had the primary weapon for that ammo type. Do you have a solution for this?