Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: ZeroCooL on July 21, 2010, 04:46:27 pm

Title: Beams question
Post by: ZeroCooL on July 21, 2010, 04:46:27 pm
hello people, I wanted to ask you a question

how do I create a new type of beam

we know that there is a type 1, type 2, type 3 and type 4

You can create other types? for other uses?


regards
Title: Re: Beams question
Post by: Woolie Wool on July 21, 2010, 05:17:10 pm
No. They are hardcoded.
Title: Re: Beams question
Post by: ZeroCooL on July 21, 2010, 05:41:57 pm
No. They are hardcoded.
hardcoded = untouchable?

ok


Thanks!

Title: Re: Beams question
Post by: The E on July 21, 2010, 05:56:42 pm
No, hardcoded means it's an engine limitation, and seeing as there really is no need for more beam types (not to mention that it's relatively non-trivial to add new types), the probability of a coder trying to code a new one is very small, especially if it's not requested by one of the bigger projects.
Title: Re: Beams question
Post by: Colonol Dekker on July 21, 2010, 06:16:32 pm
Heavy strobe arc lightning flux rainbow beam cannon ftw. Type 11 (Secret beam ssshhhhhhhh)
Title: Re: Beams question
Post by: ZeroCooL on July 21, 2010, 06:18:56 pm
or whether it is better to forget my Beam reflected and jumps from one ship to another  :lol:

thanks  
Title: Re: Beams question
Post by: Droid803 on July 21, 2010, 07:38:35 pm
Hack it with FRED, you could...
As in, you'd have to make it  a completely scripted combat sequence but bouncing beam doesn't sound impossible to do.
Title: Re: Beams question
Post by: Trivial Psychic on July 22, 2010, 08:42:22 am
hello people, I wanted to ask you a question
how do I create a new type of beam
we know that there is a type 1, type 2, type 3 and type 4
You can create other types? for other uses?
regards
You forgot type 0
0 = Standard
1 = slash
2 = targeting (for subspace bombs)
3 = multi-shot (AAA)
4 = fires only straight ahead (used for some RBCs)

Actually, I can foresee a couple more beam types, mainly for fighter-mounted, though the first one could simply be made into a modification of type 0

5 = beam with non-fixed duration

Tables determine warmup and cooldown time and sounds, as well the sound for the beam when firing, but the actual duration of the beam depends on how long the player keeps the fire button down, and how much weapon energy the ship has.  Basically, beam stops if the player releases the fire button, or if the ship's weapon energy is depleted.  Could possibly be done by introducing this behavior to type 0, when the duration time is set to -1.

6 = chargeable

In this version, the amount of damage the weapon can do per spot depends on how long the fire button is depressed.  Brief taps of the fire button will produce individual beam shots, with a table defined minimum damage.  If you hold down the fire button, it will continue to charge up the beam but not fire it, until you release the button, at which time a beam with a greater per-shot damage value will fire.  Tables would define the maximum and minimum damage, how much weapon energy it sucks for the minimum pulse, and how much it sucks per second of charge time. Tables could also perhaps define a figure on minimum and maximum beam duration, so the quick-fire shots might only last 0.25 seconds, while a full-charge shot would last 1 second.  Might also be beneficial if it could be made to enable lock-targeting like a turret.

Just some ideas.
Title: Re: Beams question
Post by: Spoon on July 22, 2010, 09:18:20 am
I like those ideas  :nod:
Title: Re: Beams question
Post by: S-99 on August 01, 2010, 04:19:14 am
beam type six sounds more manageable.
Title: Re: Beams question
Post by: Trivial Psychic on August 01, 2010, 07:49:13 am
But probably more difficult to code.
Title: Re: Beams question
Post by: The E on August 01, 2010, 07:51:47 am
The problem is that the AI would have no clue whatsoever regarding the use of these weapons. So that would have to be coded in as well.
Title: Re: Beams question
Post by: Droid803 on August 01, 2010, 12:37:58 pm
You could be lazy and just make the sub-types of type 0 and type 4 beams respectively, and then specify a "default duration" which the AI would use...then the AI should just treat them as those two types of beams, which they already know how to use.
Title: Re: Beams question
Post by: Trivial Psychic on August 01, 2010, 03:10:22 pm
Are AI pilots subject to weapon energy levels?
Title: Re: Beams question
Post by: sigtau on August 01, 2010, 10:32:28 pm
Are AI pilots subject to weapon energy levels?

Yeah, but they usually fire in bursts, so it doesn't necessarily show as much.  Dunno if Fury AI fires in bursts, though.
Title: Re: Beams question
Post by: Bobboau on August 02, 2010, 01:30:45 am
The problem is that the AI would have no clue whatsoever regarding the use of these weapons. So that would have to be coded in as well.
you are assuming they have much clue now.
Title: Re: Beams question
Post by: Droid803 on August 02, 2010, 12:16:56 pm
Oh right, I needed to make a separate version of the fighter with fighterbeams, mounting them as turrets (instead of primary banks) for the AI to use them properly XD.
Title: Re: Beams question
Post by: S-99 on August 02, 2010, 09:50:36 pm
That's a pretty cool workaround actually.