Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: asyikarea51 on September 24, 2006, 03:35:25 am

Title: some suggestions, question? =X
Post by: asyikarea51 on September 24, 2006, 03:35:25 am
1) Would it be possible to add some code to weapons tagged as Ballistic, so that weapon ammo levels can be further fine-tuned via the Cargo Size tag, instead of relying on $PBank Capacity alone? Something like how the fine-tuning of the missile ammo is currently done?

2) Can sounds.tbl be expanded, or is it still locked to a certain number of entries? :blah:

3) Increase the number of allowed secondary weapon slots to 4? Since four slots work, but only with the switching bug I mentioned before. Anything more than 4 IMO doesn't look right in the current HUD anyway, while 4 primaries, on the other hand, will simply fire too slow unless someone wants to add code to override that...

If there's another way to do 1), I'd like to know how.

Also, how does one go around to doing different HUDs, possibly species/faction/race-specific? I was looking at a thread somewhere on this forum and it caught my interest. Hopefully it's not some complicated mumbo-jumbo that I can't understand... (though I guess it is, because the current HUD is already customisable in terms of colours... which might make things more difficult for the HUD maker perhaps?) :shaking:

Thanks, and please excuse any impoliteness... wanted to go straight-to-the-point sorta thing... :)
Title: Re: some suggestions, question? =X
Post by: Wanderer on September 24, 2006, 05:34:07 am
1) Ballistic primaries work just like secondaries, so cargo size can be - or rather... should always be - defined. Same goes with capacities.

2) You can add sounds to the sounds.tbl as long as you dont break the index numbering of the sounds.
Title: Re: some suggestions, question? =X
Post by: asyikarea51 on September 24, 2006, 11:53:54 pm
1) Ballistic primaries work just like secondaries, so cargo size can be - or rather... should always be - defined. Same goes with capacities.

I'm a bit blur as to what you mean here exactly... you mean I can already use Cargo size to get the ammo levels I want, in addition to $PBank Capacity?

I noticed the Nukemod demo's table doing this, but that mod's a lag monster on this old crate...

2) You can add sounds to the sounds.tbl as long as you dont break the index numbering of the sounds.

Just keep the previous entries in order, that it? :doubt: I think I tried this once, but the sound didn't play. I'll try again in a while though.

Clarifying...  :)
Title: Re: some suggestions, question? =X
Post by: karajorma on September 25, 2006, 12:47:18 am
I'm a bit blur as to what you mean here exactly... you mean I can already use Cargo size to get the ammo levels I want, in addition to $PBank Capacity?

If you want a ship to carry 100 rounds you can either have a PBank Capacity of 100 and a cargo size of 1 or a PBank Capacity of 1 and a cargo size of 1/100. The latter way is the correct way to do it though.
Title: Re: some suggestions, question? =X
Post by: asyikarea51 on September 25, 2006, 12:53:31 am
Ah. So for example, if I wanted 16 rounds in the correct method, I put "1" in $PBank Capacity and "0.0625" in Cargo size? (:lol: my math ain't the best XD)

Okay, I get the logic, it's not too different from missiles. Thanks. :)
Title: Re: some suggestions, question? =X
Post by: Wanderer on September 25, 2006, 03:40:48 am
btw...

If you want a ship to carry 100 rounds you can either have a PBank Capacity of 100 and a cargo size of 1 or a PBank Capacity of 1 and a cargo size of 1/100. The latter way is the correct way to do it though.
Why is the second way correct? AFAIK there was a problem with tbms (that has since been resolved) that dropped the capacity value to 1 but other than that i cant figure any reason to use capacity 1 and the cargo size as 1/(desired ammo capacity)... seems awfully backwards to me.
Title: Re: some suggestions, question? =X
Post by: asyikarea51 on September 25, 2006, 04:08:40 am
dropped the capacity value to 1

this doesn't sound good...  :doubt:
Title: Re: some suggestions, question? =X
Post by: Wanderer on September 25, 2006, 04:12:16 am
As said the bug was later fixed
Title: Re: some suggestions, question? =X
Post by: WMCoolmon on September 25, 2006, 04:15:35 am
3) Increase the number of allowed secondary weapon slots to 4? Since four slots work, but only with the switching bug I mentioned before. Anything more than 4 IMO doesn't look right in the current HUD anyway, while 4 primaries, on the other hand, will simply fire too slow unless someone wants to add code to override that...

I don't see any "switching bug" in the original post, can you give me a link to the mantis entry? (If it's not in mantis, put it in mantis, see the sticky at the top of this forum.)
Title: Re: some suggestions, question? =X
Post by: asyikarea51 on September 25, 2006, 08:11:09 am
It's not in Mantis because I'm using Hotmail.

The secondary weapon switching bug that I mentioned before is here: http://www.hard-light.net/forums/index.php/topic,41928.0.html

(Meh, message edited. Found the big chunk unnessary anyway. I'll suggest it next time...)
Title: Re: some suggestions, question? =X
Post by: Goober5000 on September 25, 2006, 02:49:15 pm
btw...

If you want a ship to carry 100 rounds you can either have a PBank Capacity of 100 and a cargo size of 1 or a PBank Capacity of 1 and a cargo size of 1/100. The latter way is the correct way to do it though.
Why is the second way correct? AFAIK there was a problem with tbms (that has since been resolved) that dropped the capacity value to 1 but other than that i cant figure any reason to use capacity 1 and the cargo size as 1/(desired ammo capacity)... seems awfully backwards to me.

Not when you realize the reason for it.  Ammo-based primaries usually come in magazines, and one magazine usually consists of 100 or so bullets.  So the proper method is to specify one magazine per bank.  If you have a really powerful fighter that can carry two magazines, you can increase it to 2 and you get double the number of bullets.
Title: Re: some suggestions, question? =X
Post by: brandx0 on September 25, 2006, 07:32:31 pm
Or you could go with the hundred capacity and 1 cargo size, and simply double it...

Really stating that "Ammo-based primaries usually come in magazines, and one magazine usually consists of 100 or so bullets" is entirely arbitrary.
Title: Re: some suggestions, question? =X
Post by: Wanderer on September 25, 2006, 11:00:18 pm
Besides... cannons come quite rarely with magazines (as clips) but rather with ammo bins (aka magazines) and autoloaders just like rapid fire missiles would do.
Title: Re: some suggestions, question? =X
Post by: WMCoolmon on September 26, 2006, 12:40:24 am
It's more forwards-compatible to think of it that way. It means that you could set up some kind of thing to automatically trigger a reload/fire wait when each 'magazine' is depleted. Doing it the other way around would make it a pain to calculate magazine sizes; you'd have to do the math for each weapon.
Title: Re: some suggestions, question? =X
Post by: asyikarea51 on September 26, 2006, 07:24:44 am
I never thought of the ballistic weapons in my canon having magazines, unless it's an infantry weapon.

More like, "ship has x amount of space for ammo". If the weapon uses a really big shell (ala pirate-style CANNONBALL LAUNCHER lmao), then the number of bullets would be less... so... that's the first... method?

:nervous:
Title: Re: some suggestions, question? =X
Post by: Herra Tohtori on September 26, 2006, 07:44:36 am
Oy.

How about cases flying from the weapons? They should get the fighter's velocity at the moment of shooting, plus the ejection velocity in which the gun slings them out - and some rotational velocity, if the guns work anything alike guns of these days... and why wouldn't they? Mechanics keeps the same from centuries to millennia.

The cases wouldn't need to be too long-lasting; it'd be nice to have the chance to have the cases forming a trail coming from the guns of the fighter/bomber. How much would, say, 20 low-poly cases slow the game?

Unless they use case collectors (or indeed caseless slugs) as in Maxim.

Would it be terribly non-canon to have a chance to make the Maxim have limited ammo? What would it involve? Creating wpn-tbm that would replace Maxim with a similarly statted, ballistic ammo weapon with ammo capacity?

If it's that simple, I will have to check it when I get home... :drevil:
Title: suggestions, questions? =X
Post by: asyikarea51 on September 26, 2006, 11:18:31 am
Speaking of the Maxim, is recoil judged by another factor in the tables?

I kind of need to know this one - I've got weapons which aren't generating enough recoil, and they're only recoiling a small while after I've already fired a long burst and let go of the trigger. But when I gave one of my anti-capital flak weapons the "shudder" tag (and used the cheat so that I could use the gun on a fighter), my screen shakes like :wtf: (the anti-cap weapon had a slow ROF though, so the screen shook like nuts after every shot fired).

(and I think a "capital only" tag or something like that would be useful so that I can make capships use this flakish weapon on other capital ships only... :nervous:)
Title: Re: some suggestions, question? =X
Post by: Wanderer on September 26, 2006, 12:01:05 pm
'Shudder' is afaik not related to other table data. Also AFAIK all weapons that have 'flak' flag deal only 5% of their normal damage to big ships... so anti-capship flak... well...

To set the AI to use that weapon only against larger vessels mark the weapon with 'huge' flag
Title: Re: some suggestions, question? =X
Post by: Goober5000 on September 26, 2006, 05:10:42 pm
Shudder is proportional to something.  Mass or damage most likely.
Title: Re: some suggestions, question? =X
Post by: Turey on September 26, 2006, 05:16:14 pm
Mass or damage most likely.

probably both. something akin to:
Shudder = (Damage*constant)/(Mass*constant);
Title: Re: some suggestions, question? =X
Post by: Goober5000 on September 27, 2006, 12:12:55 am
Code: [Select]
// calculate some arbitrary value between 100
// (mass * velocity) / 10
game_shudder_apply(500, (winfo_p->mass * winfo_p->max_speed) / 10.0f);

The first parameter is time (in milliseconds); the second is intensity.
Title: Re: some suggestions, question? =X
Post by: asyikarea51 on September 27, 2006, 12:27:08 am
I already have the "Huge" flag set.

I think the wiki guys need to improve the description there, because I was referring to it while making the table... it simply says, "Allows this weapon to do the final 10% damage to a ship with the "Big Damage" flag", but it makes no mention that the weapon would be used against big ships only...

The flak weapon's mass is 1.75, does 6000 damage (slightly less than a Helios bomb), blast force of 45, velocity 10,000. (Funny that beam weapons do waaay more damage on lesser numbers :wtf:, maybe it's because of the "flak" tag?) EDIT: ohwait, I didn't read Wanderer's post completely. :lol:

If Mass is proportional to shudder, then I've got a problem in that I can't set the mass too high on the weapons that I want to generate enough recoil. Otherwise other enemy fighters would be pushed around too much.

The weapons in my table that aren't generating enough recoil are ultra rapid-firing fighter-mounted lasers btw, and they're not supposed to have very high kinetic attributes ala Morning Star... :nervous:
Title: Re: some suggestions, question? =X
Post by: WMCoolmon on September 27, 2006, 08:40:08 pm
I think the wiki guys need to improve the description there, because I was referring to it while making the table... it simply says, "Allows this weapon to do the final 10% damage to a ship with the "Big Damage" flag", but it makes no mention that the weapon would be used against big ships only...

(http://fs2source.warpcore.org/temp/wmc/pleaseedit.gif)
Title: Re: some suggestions, question? =X
Post by: asyikarea51 on September 28, 2006, 02:10:09 am
:lol:

I thought registration was needed?

Didn't register myself lol. Point taken anyways, so thanks :)