Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: Avatar on January 12, 2008, 06:36:12 PM

Title: So, mines don't use ammo?
Post by: Avatar on January 12, 2008, 06:36:12 PM
Is there a way to make a mine actually use the ammo it shows?  So far it looks like the only thing they respect is their lifespan... 

Am I missing something?  I need a mine that uses ammo...

-Av-
Title: Re: So, mines don't use ammo?
Post by: Steeveeo on January 12, 2008, 09:35:15 PM
What? Mines use ammo, unless you're using a modded version.

If its the latter, post the ODFs.
Title: Re: So, mines don't use ammo?
Post by: mrtwosheds on January 12, 2008, 09:36:30 PM
? Mines use ammo.
maxAmmo = 200
They use the ammo of the object that produces them, a ship, or a splinter etc
so if you want a splinter to only produce 1 mine you would give it maxAmmo = 200 as well
Title: Re: So, mines don't use ammo?
Post by: General BlackDragon on January 12, 2008, 10:03:36 PM
what you trying to make? i'll make it for you if it's a weapon :)
Title: Re: So, mines don't use ammo?
Post by: Avatar on January 13, 2008, 05:00:19 AM
I don't mean taking ammo to drop the mine...  I mean whatever ordnance the mine uses doesn't cost the mine itself any ammo.

Take the Solar Flare again as an example...  the 'flaremine.odf' costs you 100 to drop one:

[GameObjectClass]
geometryName = "igflar00.xsi"
classLabel = "flare"
scrapCost = 0
scrapValue = 0
maxHealth = 150
maxAmmo = 100
unitName = "Solar Flare"
heatSignature = 100.0

[MineClass]
lifeSpan = 10.0

[FlareMineClass]
payloadName = "flarepuff"
fireSound = "smine01.wav"
triggerDelay = 2.0
shotDelay = 0.02
shotVariance = 0.2
damageRadius = 20.0
damageValue(N) = 100 // none
damageValue(L) = 50 // light
damageValue(H) = 5 // heavy
damageValue(S) = 50 // standard
damageValue(D) = 100 // deflection
damageValue(A) = 5 // absorbtion
kickRadius = 20.0
kickVeloc = 0.2
kickOmega = 0.5


I guess that's the '100' shown as MaxAmmo for the mine.

The mine generates damage on it's own, plus uses 'flarepuff.odf' as an ordnance.  Those are the balls of fire it shoots straight up, which are actually bullets.

[OrdnanceClass]
classLabel = "bullet"

shotGeometry = NULL
shotRadius = 1.0
xplGround = "xflmhit"
xplVehicle = "xflmhit"
xplBuilding = "xflmhit"

renderName = "flarepuff.puff"
ammoCost = 25
lifeSpan = 1.0
shotSpeed = 50.0

damageValue(N) = 25
damageValue(L) = 5
damageValue(H) = 2
damageValue(S) = 10
damageValue(D) = 25
damageValue(A) = 2

[Puff]
renderBase = "draw_twirl"
textureName = "flame2.tga"
textureBlend = "one one modulate"
startColor = "255 255 255 128"
finishColor = "255 255 255 0"
startRadius = 1.0
finishRadius = 5.0
animateTime = 1.0


Each of these 'bullets' cost 25, as listed in "ammocost", but in actuality they're free to the mine.  The mine can pump out as many as it wants as long as it's alive, in this case 10 seconds.

So it's pumping out bullets but not paying for them by using ammo...  all it's doing is waiting to die...

What I'd like is a mine that uses ammo, so that a Service Truck could come along and 'recharge it'.  No, I can't just use a turret...  there can't be any AI process involved, it just needs to start shooting and keep shooting until it runs out of ammo.  Then along comes a Service Truck to refill it and it goes back to shooting.

See?  And I'm being stymied by the fact that to a mine the ordnance is free...

-Av-
Title: Re: So, mines don't use ammo?
Post by: mrtwosheds on January 13, 2008, 07:05:04 AM
QuoteWhat I'd like is a mine that uses ammo, so that a Service Truck could come along and 'recharge it'
I had to put serviceTruckAutoHeal = 0 on all of my mines to stop service trucks trying to heal them, because without it they would rush off away from the GT's into the fire-fight zone to heal mines and die. Nobody needs suicidal service trucks.
Title: Re: So, mines don't use ammo?
Post by: Avatar on January 13, 2008, 07:21:59 AM
Yes, but that's the health side of the mine which is handled normally.  It's the ammo side that's cheating, giving the mine free shots...

I understand that the intent was to allow mines to be dropped using normal amounts of ammo, and that charging the player for the total ammo a mine would use (like Splinter, for instance) would be kindof nuts and defeat part of the purpose of dropping mines...

It's just that it would be great for my purposes to have a mine that needed ammo to fire...  I'm disappointed that I can't make it work.

-Av-
Title: Re: So, mines don't use ammo?
Post by: mrtwosheds on January 13, 2008, 09:13:56 AM
Have you tried local ammo?
Service truck may need to be altered for it to heal, may have consequences.
Title: Re: So, mines don't use ammo?
Post by: Avatar on January 13, 2008, 10:57:04 AM
Well, when a weapon uses localammo it's part of the weapon itself (the 'g' file), not the ordnance.   Although, I guess a mine IS the weapon...  hmmm...  Guess I can try it.

***

Nope, localammo specified in the mine itself is ignored, and since a mine uses an ordnance and not a weapon looks like that's out.

I can sortof do what I want with a GT class object, but it won't just fire until it runs out of ammo...  it'll only be active when an enemy is nearby, which I was trying to avoid.   Darn...

-Av-
Title: Re: So, mines don't use ammo?
Post by: Nielk1 on January 13, 2008, 12:30:40 PM
Or a weapon mine with the same result.
Title: Re: So, mines don't use ammo?
Post by: Red Devil on January 13, 2008, 03:53:51 PM
Your GT is going to fire mines?   Talk about a minelayer.  :lol:
Title: Re: So, mines don't use ammo?
Post by: Avatar on January 13, 2008, 04:32:35 PM
Nonono...

I need continuous fire and GT's don't do that.   Nothing does that except mines, and they ignore ammo requirements for ordnance, so I'm SOL.  (not the Sun, either...)  :)

So, the next best thing is to set up my application as a GT or weaponmine, in which case it'll only fire when there's an enemy around.  I've done this before, using a GT with Archer AI so it activates even when an enemy isn't in line of site.

I'd MUCH rather set it up as a mine, though.  Still ticked that I can't make one use ammo.

-Av-
Title: Re: So, mines don't use ammo?
Post by: Nielk1 on January 13, 2008, 05:53:30 PM
Why not just use the lifespan? Or do you want the mine to be serviceable? What is going on?
Title: Re: So, mines don't use ammo?
Post by: Red Devil on January 13, 2008, 06:12:49 PM
Maybe you could set the triggerRadius to 1e6.
Title: Re: So, mines don't use ammo?
Post by: anomaly on January 13, 2008, 09:29:33 PM
Is it possible to place taps on a mine? If so, I have an idea in mind that would solve your problems.



Plus, there is always dll....
Title: Re: So, mines don't use ammo?
Post by: Avatar on January 14, 2008, 05:55:00 AM
Actually yes, I believe you can put a tap on a mine as it's really a building...  I've mulled how to go about it with a tap but don't see a way.  I'd be interested in your idea...

SO, to be clear.

I need a continuously firing whatever that eventually runs out of ammo and needs to be serviced.  Think of a SOLAR FLARE that pumps out fire until it runs out of ammo, and then needs something to come along and fill up the ammo again, at which point it goes back to pumping out fire.

Lifespan will not work, it needs to go back to it's job once it's filled back up again.

I've considered using the DLL to support this but the fun is doing it entirely in the engine if you can stabily do so...  the DLL can do anything so where's the fun in that?  :)

-Av-

Title: Re: So, mines don't use ammo?
Post by: Zero Angel on January 14, 2008, 06:35:03 AM
Exactly  :-D