Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
  Welcome to our forum.

FFDS Home | TIPS Section | Tutorials Section | Resources Section | Utilities Section

Military | FSDS | Jetliners | Real Planes Section | Gmax | Rotorcraft | Business | Civilian

  HomeHelpSearchLoginRegister  
 
 
Page Index Toggle Pages: 1
Send Topic Print
FSDS 3.5 FSX  Using Attachpoints for Nav Ligh (Read 2909 times)
21st Mar, 2010 at 11:38am

Spad54   Offline
Polygon Twister
Golden Age Simulations
USA

Gender: male
Posts: 93
**
 
I'm sure others know this but I figured I share my discovery for today. The problem I faced was mounting a white nav light on the top of a rudder and

having the light effect move with the rudder movement. I knew that using the attachpoint method was the key. This solution may already be posted, but having been unable to find,  I have worked through it by reading various postings of various forums, I figured it couldn't hurt to post it here. It worked for me.   To do this I added the following text to the PartsDataDef file in FSDS 3.5:

attachpt_light_nav_1 <?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint  name="attachpt_light_nav_1">

<AttachedObject> <Effect effectName="fx_navred" effectParams=""/> </AttachedObject>  </Attachpoint> <Visibility name="nav_light"> </Visibility>

</FSMakeMdlData>

attachpt_light_nav_2      <?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint  name="attachpt_light_nav_2">

<AttachedObject> <Effect effectName="fx_navgre" effectParams=""/> </AttachedObject>  </Attachpoint> <Visibility name="nav_light"> </Visibility>

</FSMakeMdlData>

attachpt_light_nav_3      <?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint  name="attachpt_light_nav_3">

<AttachedObject> <Effect effectName="fx_navwhi" effectParams=""/> </AttachedObject>  </Attachpoint> <Visibility name="nav_light"> </Visibility>

</FSMakeMdlData>

Having done that I added this entries to the modeldef.xml file

<PartInfo>
     <Name>nav_light</Name>
          <AnimLength>100</AnimLength>
          <Visibility>
          <Parameter>
     <Code>
       (A:LIGHT NAV,number) 1 == (A:ELECTRICAL BATTERY BUS VOLTAGE, volts) 7 >
       and if{ 1 } els{ 0 }
       </Code>
     </Parameter>
     </Visibility>
</PartInfo> 

I then created a poly naming it attachpt_light_nav_3 and made it a child of the nav light part on the rudder that being a child of the rudder itself.  Once

compiled the result was as I desired and that was that. (Hint: the Y axis points in the direction OPPOSITE of the beam)

I'm certainly not bright enough to have figured this out alone and wish to thank the design communitymembers on various forums, especially Wozza, that helped me piece it together

together.
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #1 - 21st Mar, 2010 at 1:41pm

DaveNunez   Offline
Inspecteur des Polygonnes
Seattle, Washington

Gender: male
Posts: 504
*****
 
If you are using FSDSxTweak, all you need to do is create a part called _attachfx_effect_landing (which can be added at any point in the hierarchy), and then pass your model through FSDSxTweak before compiling with XtoMdl.

You can add any other effects (smoke, other lights, etc) in a similar way.

Easy huh? Wink
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register&&Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
&&
IP Logged
 
Reply #2 - 21st Mar, 2010 at 3:55pm

Spad54   Offline
Polygon Twister
Golden Age Simulations
USA

Gender: male
Posts: 93
**
 
I am using Tweak, but unfamiliar with the technique of passing the model through Tweak before Xtomdl.  Normally I get the model all compiled and tweak it at the end.  Odd that when I did that with this project after compiling it, the exterior model went kattywonkus and part reverted to the CG.  Could that be because I used the attach point method?  Please elaborate on the Tweak "first" the XtoMdl method  Thanks
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #3 - 22nd Mar, 2010 at 4:56am

DaveNunez   Offline
Inspecteur des Polygonnes
Seattle, Washington

Gender: male
Posts: 504
*****
 
If you are using the plugin to do your tweaking, then you are using the method I describe (basically get FSDS to produce _temp.x, then tweak that, and then compile the tweaked .x file).

The error with parts all going to the origin seems odd - could it be that you had a typo in the name of the attached part? Also, you should be using a newer version of FSDSxTweak for this to work (I forget exactly which version, but the latest, 2.8, does it).
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register&&Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
&&
IP Logged
 
Reply #4 - 2nd Jul, 2010 at 6:47am

anthony31   Offline
Point Pusher
I Love FFDS!

Posts: 28
*
 
I just thought I'd add want I know about using partdatadefs to add attachpoints in FSDS (picked up from various posts in these forums) for future reference. I know Dave's marvellous FSDSxTweak program includes attachpoints but I've never managed to get them to work with FSDSxTweak (probably operator error Smiley ) so I find using partdatadefs easier for me.

First off you need to create a text file called Partdatadefs.txt in the FSDS_V3.5 root directory. This file does not exist so you need to create it. You then add an attachpt_? name with the xml blob after it (I will get onto the exact spacing later as it is vital).

Here are some example lines. The SDK contains more xml blobs under the .x file format section.


Finally I have found that the last line in the file should not end with a carriage return. Another case of the fnicky nature of partdatadefs.

Code:
attachpt_landing_1	<?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Attachpoint name="attachpt_landing_1"> <AttachedObject> <Effect effectName="fx_landing" effectParams=""/> </AttachedObject> </Attachpoint> <Visibility name="A2002_VisiLanding"> </Visibility>  



Code:
attachpt_StrutLNC	<?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <NoCrash/> </FSMakeMdlData> 



Code:
attachpt_BagSmall	<?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <Visibility name="a2002_BagSmall"> </Visibility> </FSMakeMdlData> 



Code:
attachpt_a2002_FlapsUp	<?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <MouseRect name="a2002_FlapsUp"> </MouseRect> </FSMakeMdlData> 



The attachpt name must be unique.

There is also some conjecture about the number of spaces between the attachpt name and the <?xml version .... line. I have read that some say it should be exactly 6 spaces but I have found that for me there should be no spaces but one tab. This formatting seems to be the major problem with any failure to get FSDS to read the file.

Also make sure that you upper and lower case matches in the Visibility name and mouserect names. Again this is vital to get the case correct.

Hope this helps





 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print