Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Turey on October 14, 2006, 04:11:29 pm
-
Could someone post an example of how the table entry is supposed to look when it works? It's not working for me with this:
$Thruster:
+Index: 1
+Used for: ( "Slide right" )
+Position: ( 10 0 0 )
+Normal: ( 1 0 0 )
+Texture: beam-green2
+Radius: 20
+Length: 70
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
also, do maneuvering thrusters require anything other than that entry in the ship table?
-
That's something I'd love to see, too :D
-
Does debug say anything?
Also try starting with index 0 instead of 1.
-
Does debug say anything?
Also try starting with index 0 instead of 1.
Debug screams about the index no matter what number I put in there.
Standard simply doesn't show the thruster.
EDIT: Does anyone know what the index is used for?
EDIT2: alright, i read through ship.cpp, and i fiound out that I can bypass the index check by setting it to -1.
However, this makes me feel uncomfortable, so i'd still like help with this.
-
What build are you using? Manouvering thrusters - in their current form - are a very recent addition
-
Hmm... from what I can see you're doing it right. Probably not a build thing; maneuvering thrusters have been in the code since April or so and haven't changed much since then. Odd about the index -- my test modular tables doesn't even have the index line and it works fine. Good thinking with the index check. Lemme dig into the code a bit...
Well it's a little confusing, but it may well be a bug. As far as I understand this area of the code, it looks like index is tested against ship->num_maneuvering, but I can't see where num_maneuvering gets set. So if you specify an index, num_maneuvering never goes above 0, but if you don't specify an index, it works as expected.
So I guess we need to drag WMCoolmon or somebody in here, somebody more familiar with this section than me anyway ;) We'll have narrowed the problem down for them at least. But for now I think you can skip the +Index line entirely.
-
I got those working by dropping index to -1... also note the typo i made while writing the wiki entry.. (+Length:)
EDIT: I noticed the same issue with the num_maneuvering.. and looking at the code decided it might be worth trying to set the index to -1... Perhaps the index value is only for making changes with modular tables to already existing maneuvering thrusters...
-
The following thrusters seem to cause an intermittent freeze:
$Thruster:
; +index: -1 ;1 Back Center Right
+Used for: ( "Forward" "Pitch up" "Pitch down" )
+Position: ( 5.5 0 -1 )
+Normal: ( .5 0 -.5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
$Thruster:
; +index: -1 ;2 Back Center Left
+Used for: ( "Forward" "Pitch up" "Pitch down" )
+Position: ( -5.5 0 -1 )
+Normal: ( -.5 0 -.5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
$Thruster:
; +index: -1 ;3 Back Top Right
+Used for: ( "Forward" "Bank right" "Slide down" "Slide left" "Pitch up" )
+Position: ( 5.5 .75 -1 )
+Normal: ( .5 .25 -.5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
$Thruster:
; +index: -1 ;4 Back Top Left
+Used for: ( "Forward" "Bank left" "Slide down" "Slide right" "Pitch up" )
+Position: ( -5.5 .75 -1 )
+Normal: ( -.5 .25 -.5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
$Thruster:
; +index: -1 ;5 Back Bottom Right
+Used for: ( "Forward" "Bank left" "Slide up" "Slide left" "Pitch down" )
+Position: ( 5.5 -.75 -1 )
+Normal: ( .5 -.25 -.5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
$Thruster:
; +index: -1 ;6 Back Bottom Left
+Used for: ( "Forward" "Bank right" "Slide up" "Slide right" "Pitch down" )
+Position: ( -5.5 -.75 -1 )
+Normal: ( -.5 -.25 -.5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
$Thruster:
; +index: -1 ;7 Front Top Right
+Used for: ( "Reverse" "Bank right" "Slide down" "Slide left" "Pitch down" )
+Position: ( 5.5 .75 1 )
+Normal: ( .5 .25 .5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
$Thruster:
; +index: -1 ;8 Front Top Left
+Used for: ( "Reverse" "Bank left" "Slide down" "Slide right" "Pitch down" )
+Position: ( -5.5 .75 1 )
+Normal: ( -.5 .25 .5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
$Thruster:
; +index: -1 ;9 Front Bottom Right
+Used for: ( "Reverse" "Bank left" "Slide up" "Slide left" "Pitch up" )
+Position: ( 5.5 -.75 1 )
+Normal: ( .5 -.25 .5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
$Thruster:
; +index: -1 ;10 Front Bottom Left
+Used for: ( "Reverse" "Bank right" "Slide up" "Slide right" "Pitch up" )
+Position: ( -5.5 -.75 1 )
+Normal: ( -.5 -.25 .5 )
+Texture: man_thruster
+Radius: .25
+Length: 10
+StartSnd: 132
+LoopSnd: 132
+StopSnd: 132
Help?
-
Dunno... my own test with similar setup had no issues at all
-
The BSG ships have no entry for index or the three sound entries at all. Try it without them and see if it works.
-
Here's a sample from the BSG tables:
$Thruster:
+Used for: ( "pitch down" "roll right" "slide left" "slide down" )
+Position: (0.4 .43 7.6)
+Normal: (0.4 .4 0.0)
+Texture: thrustjets
+Radius: 0.08
+Length: 0.8