Ambrosia Garden Archive
    • EV Nova: weap resource question...


      ammunition-based weapons...

      Hi, I remember seeing topics in the past about weapons that use multiple ammunition types but never stuck around to find out if someone actually succeeded at doing this. I was wondering if it is possible with today's knowledge of the Nova engine, if so, how is it achieved?

      If it isn't possible, what's the best alternative to simulate this effect?

      The reason for this question is that I'm working on the Wing Commander TC and in the later games, you can choose your missile load-out, that indicates that the missile hardpoints are universal, such as today's aircraft. I want to get as close to the WC universe as I can get... already have the 815 systems programmed into the plug-in, incase someone cares about the progress...

      Thanks in advance,
      Eric, lead-programmer of the Wing Commander TC

    • I think it would be limited to a few ammo choices, but then again, I've never tried this. I know that one type of ammo can be assigned to multiple missile launchers, though. Sorry if this wasn't helpful at all. :unsure: And you have 815 systems! Way to go! What about graphics, and the storyline?

    • You can do it, sort of. You just run into issues with rates of fire. All you need to do is give the player invisible launchers for each type of missile they could fire. The big problem for your situation is that there's no good way to control max ammo amounts.

      Unfortunately, no easy fix exists for the wing commander missile hardpoint issue. I can propose a solution, though, based off what I'm doing with fighter bays in SS. Here's what I'd do:
      1. Make an invisible token outfit "Missile Hardpoint Token".
      2. Make an weapon for each type of missile that has a max ammo count of 1, The ROF issues can sort of be solved by making these secondary weapons- the player will have to cycle to each missile type, slowing down the launch rate.
      3. Make an outfit for these weapons called "Missile Type X Launching/Mounting Hardware", that deletes a token OnPurchase, and grants one onSell, with an availability that you must have a token available. Make them cheap.

      Now, what happens is that the player can tune their missile loadout by buying the correct mounting hardware for the missiles they want, can only by X number of missiles, and only fire them so fast. It's slightly clunky but works fine, and people LOVE customizing all aspects of their ships in my experience.

    • Thanks Anaxagoras, no graphics work yet... most graphics artists need a hefty proof that a TC isn't going to become vaporware before commiting... usually that means an almost completed TC 🙂 As for the story line, the missions aren't going to be worked in until more of the base resources have been created. I'm currently working on the Ships, Weapons and Outfits. I intend to have the full Wing Commander storyline as follows:

      Wing Commander
      Wing Commander Secret Missions 1 & 2
      Wing Commander 2
      Wing Commander 2 Secret Operations 1 & 2
      Wing Commander Privateer
      Wing Commander 3
      Wing Commander 4
      Wing Commander Prophecy
      Wing Commander Secret Ops
      Privateer 2

      I also intend to have a few sub-plots, side-quests and random missions throughout that. You can play Confed or Kilrathi... or any of the major players in the game (border worlds, nephilim, retros, mandarines, pirates, hunters, privateers, etc...)

      I only have the ships of Wing Commander 1 through to Wing Commander 2 and it's already 61 ships...

      now, Masamune,

      Thanks for the idea, I had a similar idea brewing around in my head, creating a "hardpoint" outfit that would come automatically with the purchase of a missile or something like that... I'll give yours a try and see wich is more compatible with my tc... I have to remember that 256 weapon types and 512 outfit types MIGHT not fit all stuff I need if I'm not careful.

      I have the same problem going for fighter launch bays... that's where the major player of my weapon and outfit resources is going to be, there are alot of fighter types in wing commander... if you count all the variations that have been seen in the games... I was hoping to find a way to put 1 bay for all of a single type of ships (all 3 variations of hornets for the hornet bay etc) but so far that doesn't look like a possibility.

      Thanks again

      Eric.

    • I've just tested out a solution to this. So far it seems to be working fine except for one problem: My crons only fire every two days.
      Is there no way to make a cron fire every day?

    • Does anyone know anything about this? Is it a bug? According to the bible if you set the preholdoff, duration, and postholdoff to zero then the cron should activate, start, end, and deactivate all on the same day. Yet in all my testing, making a cron like this which is always available 100% of the time gives you an event which repeats itself only every two days, not every one day as I would expect.

    • The ammo for illegal radar missiles is interchangeable with regular radar missile launchers, and vice versa. Same with the IR missiles. I have found that it is a good way to get a lot of ammo. Is there some special reason that this works?

      This post has been edited by erikthered : 16 November 2004 - 02:19 AM

    • Yeah, they both point to the same weapon. You're firing exactly the same ammo whether you've bought the illegal kind or not.

      Okay, I've done some more testing and I'm pretty sure this is a bug.
      The OnEnd script will run every day if set up the way I described, but the OnStart will only run every two days. This would seem to mean that the cron ends twice as many times as it starts. Huh?

    • Guy: This topic from about a year ago should explain the problem. In a nutshell, we've been told that setting the duration, pre and post-holdoffs all to zero is wrong.

      This post has been edited by slouch : 16 November 2004 - 12:13 PM

    • Ah, okay, thanks. I also noticed that bunch of crons in my pilot log with huge negative duration counters. Are those supposed to be there?
      I worked around the issue in the opposite way to Azratax by moving my strings to the OnEnd field. Now it works! Multiple ammo types for one weapon, while maintaining a maximum total ammo for the weapon. Are you still interested Angel Raptor?

    • Guy, on Nov 16 2004, 07:27 PM, said:

      Ah, okay, thanks. I also noticed that bunch of crons in my pilot log with huge negative duration counters. Are those supposed to be there?
      I worked around the issue in the opposite way to Azratax by moving my strings to the OnEnd field. Now it works! Multiple ammo types for one weapon, while maintaining a maximum total ammo for the weapon. Are you still interested Angel Raptor?
      View Post

      Indeed I am, give me the details and I'll see if I can get it working in my plug-in...

    • Okay, here's the plug with a read me.

      (edit: removed - see below for rev B)

      This post has been edited by Guy : 22 March 2010 - 06:07 AM

    • That's a really slick way of pulling this off, Guy. Nice use of the iterative crons.

      There are a couple of problems, though:

      1. This only works if the player hyperjumps after firing the ammo. If the player lands after using the ammo, but before making a hyperjump, time will not have passed and the crons will not have a chance to fire. So, the player will not have been given the available slot outfit, and will not be able to immediately buy more ammo. They would need to take off and land a second time for it to work. You would have to figure out a way to make time pass when the player lands, not just when they take off or hyperjump.

      2. If the AI uses these weapon/ammo types they would need to be non-boardable. If they weren't, the player would be able to plunder ammo from a disabled vessel, and ultimately corrupt the whole counting method. The crons would wind up giving the player more available slot type outfits than they are supposed to have.

    • Thanks, Slouch.

      1. Yeah, I noted that in one of the descriptions. If someone was smart enough they could probably come up with a different method using missions and bit counters that fire when you land.
        Or I suppose you could just add a mission that starts and auto-aborts whenever you land, advancing the date by 1 day. Would that make the crons fire?

      2. Ah, didn't think of that. Maybe you could give the AI ships different weapons. I'll think about a fix.
        (EDIT)Okay, I think that's easy enough. It'll just require 1 more cron per ammo type. I'll post a new version later.

      This post has been edited by Guy : 17 November 2004 - 04:53 PM

    • I was wondering also, is it possible to force a weapon (such as a fighter bay) to change the ammunition?

      (Example)
      My capital ship possesses a Hornet bay, Scimitar bay, Rapier II bay and Raptor bay... but you've gotten pretty far in the wing commander 1 missions and the newer versions of those 4 fighters have come out already for sale... but this renders the fighters in the bays obsolete. Can the Hornet bay be made to recognize mk II hornets as ammunition without creating a whole new weapon resource for it? (Cause with the number of fighters in this game, a fighter bay for every fighter type and version will be too much for the limited number of weapons allowed...)

    • Here's the new version. Available Slots will also be updated if you capture additional ammo, but more importantly it will be updated as soon as you land. Just as long as you don't mind that visiting a planet now takes two days instead of one.
      (edit) This has been superseded by simpler methods.

      I don't think you can get away with using less weapon resources than fighter types, Maniac Angel Raptor.

      Here's the description of the method...

      This method describes the ability to use multiple ammo types with one "universal" launcher, while maintaining a maximum total ammo for the weapon. Useful for something, I'm sure. Unfortunately it seems to be NOT useful for fighter bays, as the game gets confused when you have fighters deployed.

      Resources this method requires:
      1 weap, 4 crons, and 4 outfs (1 launcher, 1 ammo, and 2 counters) for each type of ammo for the universal launcher.
      1 misn, and 1 additional outf.

      The first launcher outfit we will call the "UniversalLauncher". This is the weapon you can buy along with any of the ammo outfits (call these "Type1Ammo", "Type2Ammo", etc). The additional outfit will be called "AvailableSlots" - every ship will come with a set number of these which represents the total amount of ammo that ship can hold. The silent mission will advance the date every time you land so that the crons may fire before you visit the outfitter.

      The UniversalLauncher will grant launchers for all the other ammo types when you buy it. The ammo outfits will each grant a corresponding CounterA and remove an AvailableSlot. When you use up some ammo you end up with "excess" of the corresponding CounterA, but no more AvailableSlots. When you capture additional ammo you end up with more ammo than the CounterA and more AvailableSlots than you should have. The difference between the ammo and the CounterA is used to "repair" the AvailableSlots as soon as you land via a trio of crons for each ammo type:

      Cron1A fires first, iteratively removing a unit of Type1Ammo and a Counter1A while granting a Counter1B, until you run out of either Type1Ammo or Counter1A. (Type1Ammo and Counter1A are "moved" to Counter1B, leaving the difference).

      If you ran out of Type1Ammo, Cron1B fires next, iteratively removing a Counter1A while granting an available slot, until you have no more Counter1A. (The excess Counter1A is turned into available slots).

      If you ran out of Counter1A, Cron1C fires instead, iteratively removing a Type1Ammo and an available slot while granting a Counter1B, until you have no more Type1Ammo. ( The additional Type1Ammo is added to Counter1B and subtracted from available slots).

      Lastly Cron1D fires, iteratively removing a Counter1B while granting a Counter1A and a unit of Type1Ammo, until you have no more Counter1B. (Counter1B is restored to Type1Ammo and Counter1A).

      Additional groups of 4 crons repeat the process for each remaining ammo type.

      Notes:
      The ncb strings in the crons need to be in the OnEnd field in order for them to fire every day.
      A weapon outfit which grants another outfit OnPurchase must also grant itself, otherwise you'll only get the outfit it grants.
      Crons must be ID'd in order so that they fire in order.

      This post has been edited by Guy : 26 August 2012 - 10:23 PM

    • @masamune, on Nov 2 2004, 05:42 AM, said in EV Nova: weap resource question...:

      You can do it, sort of. You just run into issues with rates of fire. All you need to do is give the player invisible launchers for each type of missile they could fire. The big problem for your situation is that there's no good way to control max ammo amounts.

      Unfortunately, no easy fix exists for the wing commander missile hardpoint issue. I can propose a solution, though, based off what I'm doing with fighter bays in SS. Here's what I'd do:
      1. Make an invisible token outfit "Missile Hardpoint Token".
      2. Make an weapon for each type of missile that has a max ammo count of 1, The ROF issues can sort of be solved by making these secondary weapons- the player will have to cycle to each missile type, slowing down the launch rate.
      3. Make an outfit for these weapons called "Missile Type X Launching/Mounting Hardware", that deletes a token OnPurchase, and grants one onSell, with an availability that you must have a token available. Make them cheap.

      Now, what happens is that the player can tune their missile loadout by buying the correct mounting hardware for the missiles they want, can only by X number of missiles, and only fire them so fast. It's slightly clunky but works fine, and people LOVE customizing all aspects of their ships in my experience.

      Alternative Solution - allows for four different ammos on a single secondary weapon, firing one type at a time

      1. Create a Weapon for each different ammo you want. Title them the same but add " - (AmmoNameHere)"

      ie

      • Missile Launcher - IR
      • Missile Launcher - Radar
      • Missile Launcher - Pursuit

      2. Create the Ammos as normal

      3. Create an outfit that adds all your launchers together. Thus the max of 4 - outfits only hold different 4 items.

      4. Create ammo outfits (you could even create a outfit that adds ammo for all 4 at once.

      I hope I have helped:D

    • No you haven't. This topic is 2 years old and the people who created it are unlikely to see this.

    • Furthermore, outfits can only specify one weapon or ammo. The remaining functions can only be used for other things. The solution to this part is very easy but it is impossible to bind multiple weapons to a single secondary weapon slot. Lastly, while such a feature might be cool, this does not in fact solve the original problem.

    • @philipw, on Aug 21 2006, 03:07 PM, said in EV Nova: weap resource question...:

      <snip>

      Um...
      You didn't actually read the thread, did you? The question was how to set up a weapon such that alll ammunition outfits added together can never exceed a certain number. What you have there will simply add a single normal weapon. Not only will it not cap the total ammunition, it won't even give the player four weapons. As the Nova Bible says, "The only restriction on ModType2-4 is that you shouldn’t use it for weapons or ammo (modtypes 1 or 3).".

      Please read the question, and test your answer, before trying to solve these old plug-in design problems.

      (EDIT) Beaten while I typed my credentials! 🙂

      Edwards, creator of the Rotating Systems, and Visibly Rotating Turrets hacks, and the initial discoverer of In-Flight Time Progression.

      This post has been edited by Edwards : 21 August 2006 - 07:16 PM