Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: StargateSpankyHam on May 02, 2012, 04:10:05 pm

Title: Infinite Missile Ammunition?
Post by: StargateSpankyHam on May 02, 2012, 04:10:05 pm
I have made some rather nice-looking, player-usable plasma torpedoes - partially because the race in question is not going to have support ships available. I set the cargo size of the missiles to zero, and gave them an energy consumption when fired - but sadly, a finite number of missiles appear in the weapon loadout screen and in the cockpit.

Is there a way to give the player infinite secondary ammunition from within weapons.tbl? Or perhaps ships.tbl? I'd rather not have to resort to giving the player so many missiles that they would never conceivably run out.
Title: Re: Infinite Missile Ammunition?
Post by: Nuke on May 02, 2012, 05:42:04 pm
would be cool to have a feature where you set cargo size to -1 and it considers it infinite, or perhaps a flag.

barring source changes, you can write a script that sees if youre carrying a specific weapon, and simply reloads your ammo periodically.
Title: Re: Infinite Missile Ammunition?
Post by: Spoon on May 02, 2012, 05:49:07 pm
Energy consumption doesn't work for secondary weapons :(
Title: Re: Infinite Missile Ammunition?
Post by: General Battuta on May 02, 2012, 05:52:24 pm
Energy consumption doesn't work for secondary weapons :(

You can SEXP it to work!

(Scripting is probably better though)
Title: Re: Infinite Missile Ammunition?
Post by: Legate Damar on May 02, 2012, 05:57:20 pm
I was considering something like this eventually but I figured I would just do automatic reloads via SEXP
Title: Re: Infinite Missile Ammunition?
Post by: headdie on May 02, 2012, 06:15:20 pm
I know script/SEXP solution is possible, but would this be better "fixed" as to me it seems more like a bug?

I know it probably wont make 3.6.14 but it would be nice to see in the works
Title: Re: Infinite Missile Ammunition?
Post by: Nuke on May 02, 2012, 06:15:59 pm
sexps kinda lack the globalness of scripts though. unless you want to include the events in every mission. i suppose it would be possible to write a global events script. modders could export their sexps to a text file. and the script would load the file and append the events to the list. this would allow mods to run the same events for every mission without them clogging um the events list in fred. of course you need a scripter who has a better understanding of mission design than i do.
Title: Re: Infinite Missile Ammunition?
Post by: redsniper on May 03, 2012, 09:59:45 am
I thought the weapons had all been kind of... abstracted, so that you could use anything for anything. Guess not though. I seem to recall a coder saying we could "fire subachs out our ass" regarding countermeasures.
Title: Re: Infinite Missile Ammunition?
Post by: JGZinv on May 03, 2012, 12:45:59 pm
Yeah FringeSpace could eventually use this, particularly on energy based weps and it's one more thing
currently separating primaries and secondaries from having equal features...

So I'm for the idea of getting it fixed via scripting or whatever needs to be done.
Title: Re: Infinite Missile Ammunition?
Post by: TrashMan on May 03, 2012, 01:29:21 pm
Adjust cargo space so you cna carry 99999...you won't run out during a mission.
Alternatively, you cna have a SEXP re-load your ship.
Title: Re: Infinite Missile Ammunition?
Post by: Nuke on May 03, 2012, 02:19:31 pm
I thought the weapons had all been kind of... abstracted, so that you could use anything for anything. Guess not though. I seem to recall a coder saying we could "fire subachs out our ass" regarding countermeasures.

thats something ive advocated for a very long time. nukemod had something of a powered missile launch system, that used both energy and ammo to fire powerful dumbfire missiles at high velocity, but it was implemented as a primary. i wanted to give them limited homing abilities but you cant use those on primaries last i checked. i dont think ive changed the weapons any since 2006, aside from as yet to be released armor and balence tweaks.