Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Spoon on June 24, 2009, 01:23:26 pm

Title: quick question regarding corkscrew flag
Post by: Spoon on June 24, 2009, 01:23:26 pm
Does anyone have an example table entry for me with corkscrew working?
Just adding the corkscrew flag works but I have no idea where I can to fit in the parameters as shown here http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Corkscrew:
I always get an error when I do and a forum search revealed me nothing.
(I guess that a bit of a problem with all table entries, its often hard to tell what goes where without breaking the 'correct order')
Title: Re: quick question regarding corkscrew flag
Post by: Mobius on June 24, 2009, 01:38:53 pm
Straight from INFASA, but with proper censoring:

Quote
$Name: Something
+Title: XSTR("GTM-XX Something", -1)
+Description:
XSTR("A Weapon, Like Many Others", -1)
$end_multi_text
+Tech Title: XSTR("GTM-XX Something", -1)
+Tech Anim: techdefault
+Tech Description:
XSTR( "Do you really want to know?.", -1)
$end_multi_text
$Model File: classified.pof

[...]

$FlyBySnd: -1
$Rearm Rate: 0.02
$Flags: ( "in tech database" "Big Ship" "Huge" "Bomb" "Corkscrew" )
$Trail:
+Start Width: 0.5
+End Width: 3.0
+Start Alpha: 1.0
+End Alpha: 0.03
+Max Life: 1.5
+Bitmap: MissileTrail04
$Icon: iconshocker
$Anim: mdefaultea
$Impact Explosion: ExpMissileHit1
$Impact Explosion Radius: 25.0
$Corkscrew:
 +Num Fired: number
 +Radius: number.0
 +Fire Delay: number
 +Counter rotate: 1
 +Twist: 1


Title: Re: quick question regarding corkscrew flag
Post by: Spoon on June 24, 2009, 01:44:56 pm
Thanks Mobius, that did it.
Title: Re: quick question regarding corkscrew flag
Post by: Qent on June 24, 2009, 02:08:08 pm
I guess that a bit of a problem with all table entries, its often hard to tell what goes where without breaking the 'correct order'
Generally, if you put entries in the same order as they appear in the wiki, you'll be fine.
Title: Re: quick question regarding corkscrew flag
Post by: Droid803 on June 24, 2009, 02:21:19 pm
Yeah, I just follow the order in the wiki. Haven't really ran into any problems that way.
Title: Re: quick question regarding corkscrew flag
Post by: Spoon on June 24, 2009, 02:29:34 pm
I was starting to doubt the wiki order (cause I was sure I placed it correctly) but with help from the example here, I figured out that the actual flaw was in the parameters I typed down.
It's just that the error message was not really telling me much. So I was looking at the wrong thing to fix.

Fun fact, if you give the tempest the corkscrew parameter (probably the case for all not homing secondaries) it will shoot straight down for some reason.
Title: Re: quick question regarding corkscrew flag
Post by: Mobius on June 25, 2009, 12:15:15 pm
Values are very important... they can even cause crashes. Some parameters are supposed to be written using the "x.x" formula while others should be written using the "x" formula. It took me a few minutes to get that table entry working...
Title: Re: quick question regarding corkscrew flag
Post by: Droid803 on June 25, 2009, 02:17:58 pm
Well, the wiki does say stuff about it like "float" "value" or "integer", which gives you SOME idea of what usually goes there, but often it's not explained very well...
Title: Re: quick question regarding corkscrew flag
Post by: Wanderer on June 26, 2009, 03:33:11 am
Something being a float (ie. floating point value) just defines it as a (rational) number which may have decimal point in it should the number require them. It does NOT require them to have decimal points. Integers however don't really understand the decimal points being what they are... that is integers.

For moar reference...
   http://en.wikipedia.org/wiki/Floating_point
   http://en.wikipedia.org/wiki/Integer_(computer_science)
Title: Re: quick question regarding corkscrew flag
Post by: Droid803 on June 26, 2009, 04:34:14 pm
Yeah, that's what I meant.
If you know what a FLOAT or an INT is, then you'd know how to format it, however, not everyone knows what it is.
Those references should probably be linked somewhere (or just be mentioned in the article).