Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: T-Man on July 06, 2010, 07:37:28 am

Title: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: T-Man on July 06, 2010, 07:37:28 am
Heya. If your accepting them at the moment, have a couple of requests i wanted to pass by the FSO coders, for features on Freespace's loadout menu that i feel would benefit some of the projects in development at the moment;

The first one is the big request; it may prove helpfull for some projects, and i can think of a few further features that might be possible through it if it proved implimentable;

But yeah, just some ideas if you're accepting them. Thanks for ya time.

T-Man
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: headdie on July 06, 2010, 07:49:57 am
Heya. If your accepting them at the moment, have a couple of requests i wanted to pass by the FSO coders, for features on Freespace's loadout menu that i feel would benefit some of the projects in development at the moment;
Hard-wired weapons: There's been a few ships appearing this lately (such as the Wraith (http://www.hard-light.net/wiki/index.php/FTF_Wraith), and most notably the Wing Commander ships) which have primary cannons integrated into the ship, as in part of its systems and so supposedly unremovable. Would it be possible to give modders the ability to mark banks as 'hard-wired', so if the player enters weapon loadout he can perhaps see the hard-wired weapons (with an icon beside them, or perhaps in a different corner of the loadout image) and select them to look at the weapon's stats, but can't remove or replace the weapon? Among other things, it would allow WCSaga to have players selecting their secondaries without having to give them the ability to choose primaries.[/li][/list]
this can be achieved in the ship table by defining weapons per bank rather than generally so instead of allowed pbank ("--" "---" "----" ) you use allowed pbank ("--") ("---") ("----") for a 3 bank fighter this would force bank 1  to use -- bank 2 to use --- and bank three to use ----

Quote
Ammo Count for primaries: Would it be possible to code in a note of how much ammo a primary bank carries for a ballistic weapon (like it does with secondaries)? Its not overtly important but some players of mods like TVWP might apprechiate knowing while they're choosing their loadouts.[/li][/list]
if you are on about in hud in mission this is already implemented since 3.6.10, if on about in the loadout screen this would be cool

Quote
Forced weapon choices (so a FREDer can have the weapon choice in a bank on a ship locked for just that mission)[/li][/list]
this is done by checking the scramble box in the fred mission spec option and is a retail feature from the original freespace and used in a number of missions

Quote
Perhaps a Boolean logic system that can check if specific weapons have been mounted, and stop the player if they havent (so if they needed a disruptor for example and hadn't mounted one on any ships and tried to commit, it wouldn't let you and pop-up saying "You need a disruptor or Adv. disruptor on at least one ship" or something like that). Another unimportant one (as most people get the idea from briefings) but ya never know; i bet at least one person somewhere has accidently gone into a mission without a needed weapon! :lol:[/li][/list]

I like this idea
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: chief1983 on July 06, 2010, 09:42:02 am
The only loophole with the first part of the solution is that they can still remove a primary altogether.  However, if they remove _all_ primaries, I don't believe they'll be able to start the mission.  They could still remove 2 of 3 though, so there's that.

If a fighter's loadout is entirely predetermined, can't you just prevent access to the weapon loadout screen altogether?  Or are things like secondaries still customizable?
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: T-Man on July 06, 2010, 10:28:19 am
this can be achieved in the ship table by defining weapons per bank rather than generally so instead of allowed pbank ("--" "---" "----" ) you use allowed pbank ("--") ("---") ("----") for a 3 bank fighter this would force bank 1  to use -- bank 2 to use --- and bank three to use ----
That is true, my worry was, as Chief said, you can still remove the supposedly hard-wired weapon, but i confess that a) that's probably not worth the work to fix it and b) i'm a bit of a perfectionist when it comes to stuff like this. :lol:

Quote
if you are on about in hud in mission this is already implemented since 3.6.10, if on about in the loadout screen this would be cool
I do mean on the loadout screen itself. At the moment you can only find out your primaries ammo when you go into the game.

Quote
this is done by checking the scramble box in the fred mission spec option and is a retail feature from the original freespace and used in a number of missions
If a fighter's loadout is entirely predetermined, can't you just prevent access to the weapon loadout screen altogether?  Or are things like secondaries still customizable?
Scramble and red alert can be used to achieve the same effect, but using those lock all primaries and all secondaries, and prevent the player reaching the loadout menu. In Wing Commander if i remember right your guns were fixed but missile hardpoints were variable (other games, like Starlancer, were the same), so i suspect WC Saga will want this kind of feature at some point, as might others (i recall someone is working on a present day fighter mod for Freespace somewhere too). Some info-hog, always-read-the-manual-first players (such as me :o) might also like to still read the loadout area stats and ammo counts on the weapons they are being forced to mount, or in the case of the WC system, have the one in-game chance outside the tech room to read the specs on the guns their fighter has mounted.

Additionally, you might only want a single bank to be locked, but let the player choose weapons for the others (if they're testing a prototype weapon, for example).

I admit that in hindsight these issues are a lot more trivial then i first thought. However, the matter of locking primaries while allowing secondaries, if i remember right, may be vital for WC Saga to keep to WC gameplay, and may be wanted by other mods in future (especially if they want to do exterior mounted secondaries).
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: Angelus on July 06, 2010, 10:33:43 am

I admit that in hindsight these issues are a lot more trivial then i first thought. However, the matter of locking primaries while allowing secondaries, if i remember right, may be vital for WC Saga to keep to WC gameplay, and may be wanted by other mods in future (especially if they want to do exterior mounted secondaries).

Iirc, the WC team codes it's own stuff. Chances are that this might be coded by them, and made public after the release of WC.
I'd like this feature in the SCP builds, though.
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: headdie on July 06, 2010, 10:41:37 am
sorry t-man, rather arrogant misunderstanding on my part.  indeed it would be useful to be able to lock off individual weapons from either the tables or fred
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: T-Man on July 06, 2010, 10:46:32 am
sorry t-man, rather arrogant misunderstanding on my part.  indeed it would be useful to be able to lock off individual weapons from either the tables or fred

No apology necessary mate; i'm crud at describing things sometimes. :D
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: chief1983 on July 06, 2010, 11:13:05 am
Again, at this point you can restrict individual hardpoints to just one allowed weapon.  The only thing it allows you to do currently is un-equip a slot altogether.  This could be related to simply unplugging the hardmounted weapon on the fighter though, without actually removing it.  It doesn't sound like there's a feature to code here that's really needed, but if someone does want to make it behave closer to ideal I won't stop them.
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: karajorma on July 07, 2010, 05:11:36 am
I would like to point out that if anyone implements this stuff and forgets to bother/check multiplayer I will kick their arse and yank the code. :p
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: Aardwolf on July 10, 2010, 12:13:18 am
"Stockpiles invisible if zero" - like how it works with ships?

Also, keeping the player from changing a specific ship... isn't that exactly what the 'locked' flag does? (one of the items in ship-->misc., iirc) One of the items in the Ship --> Initial Status editor.
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: T-Man on July 10, 2010, 03:20:57 am
I would like to point out that if anyone implements this stuff and forgets to bother/check multiplayer I will kick their arse and yank the code. :p
:shaking: ...Noted... :lol:

"Stockpiles invisible if zero" - like how it works with ships?
Yep (just realised that). Perhaps the code can be transferred somehow? :)

Quote
Also, keeping the player from changing a specific ship... isn't that exactly what the 'locked' flag does?
Yes it does, but it locks the entire ship, preventing all primaries and secondaries from being chosen. The system i'm requesting would only lock specific banks on a ship (perhaps through a symbol or command in the table entry, or another option in FRED), so the player could still choose banks that arn't locked (so for example, a ship's primaries might be locked but its secondaries still selectable). Also by locking the banks in the ship table instead of in FRED the player would still be able to choose a different ship if he wanted, and only those that needed banks locked for whatever reason would be locked. Something similar can sort of be achieved by making only one or two weapons fit in the bank, but the player can still remove it, and people might want the banks to be selectable in other instances.

Admittedly it would be a very complex system; part of me doubts its even implimentable at all now i think about it. The other two (loadout gun ammo count/invisible zero pools) should be a bit more feasible though if the coders did decide to give them a go.

Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: karajorma on July 10, 2010, 11:52:01 am
I would like to point out that if anyone implements this stuff and forgets to bother/check multiplayer I will kick their arse and yank the code. :p
:shaking: ...Noted... :lol:

That doesn't really apply to you. Not unless you're planning to join the SCP anyway. :p
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: Qent on July 10, 2010, 02:51:20 pm
For "locking" primary banks by allowing only one weapon, what about permitting the weapon to be removed altogether, but restoring it at the beginning of the mission with a SEXP?
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: headdie on July 10, 2010, 02:56:12 pm
that would work, check the ship type and use the sexp that changes the mounted weapon to the appropriate ones
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: Nuke on July 11, 2010, 01:49:55 am
i wouldnt mind being able to specify an ammo limit in the mission specs. say you have a mission where there is limited ammunition available, so ships equiped would only allow you to have some percentage of ammunition available at launch, say 20%. if rearming is available then only 20% of your ammunition is restored. then say your mission is raiding an ammo dump. you find crates full of ammo and capture them. then after that you can rearm to 100 (probibly through a change ammo available sexp). you could probibly tie it into campaign variables so that you can place random targets of opportunity throughout a campaign which directly affects the ammount of ammo available.
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: FUBAR-BDHR on July 12, 2010, 12:16:30 am
Problem with that is there is that there is already a bug in the loadout code that causes issues if ships can't be loaded with full banks.  Yes it's in Mantis. 
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: Iss Mneur on July 12, 2010, 12:50:22 am
FUBAR: Mantis number if you please?
Title: Re: Loadout menu Requests: Hard-wired primaries & Primary ammo count?
Post by: FUBAR-BDHR on July 12, 2010, 01:30:43 am
Asking a lot of a Drunk this time of night and I only have 75 to go through but I'll give you 2.

http://scp.indiegames.us/mantis/view.php?id=1904
http://scp.indiegames.us/mantis/view.php?id=1871