DK22Pac Posted August 23, 2013 Share Posted August 23, 2013 (edited) Tools RwAnalyze 2dfx tool General information 2dfx is a section of .dff file in GTA:SA. This section allows attaching special things to models. In San Andreas we have 10 types of 2dfx effects. One of them can be added through .ide files only (furnitur 2dfx), so you couldn't put it into dff (it simply won't work). 2dfx section in RwAnalyze We can find this section (if it exists) in Clump->Geometry List->Geometry->Extension section. You can export/import this section by clicking RMB and selecting needed command. After you exported the section, it will have no extension. Add ".2dfx" extension to the name of the file, so we could use it in 2dfx tool. 2dfx tool This tool is very simple. It generates .txt file from .2dfx, and .2dfx files from .txt ones. So, if you want to edit original 2dfx section, you need: export original section to file, add ".2dfx" extension to file's name; put .2dfx file to "2dfx" folder; launch SA2dfx.exe tool; open generated .txt file (it will be placed in same, "2dfx" folder) and edit it; put edited .txt file to "txt" folder; launch SA2dfx.exe tool; get generated .2dfx file from "txt" folder and import it into dff with RwAnalyze. File structureText file starts with number of 2dfx effects in the section. NumEntries 12After this, effects are described.Each effect has its own format, but all of them start with this: 2dfxType LIGHTWhere "LIGHT" is effect type.Available types are: LIGHTPARTICLEPED_ATTRACTORSUNGLAREENEXROADSIGNSLOTMACHINEWHEELCOVERPOINTESCALATORAfter tool will read the effect type, it will select specific format read the information.LIGHT type This type is used to create a light. It consists of corona (2d sprite); shadow (projection on a ground); pointlight (dynamic light affects peds & vehicles). Format of this section: 2dfxType LIGHTPosition 2.468750 3.131592 4.541241Color 191 206 132 200CoronaFarClip 100.000000PointlightRange 18.000000CoronaSize 1.000000ShadowSize 8.000000CoronaShowMode DEFAULTCoronaReflection 0CoronaFlareType 0ShadowColorMP 40ShadowZDistance 0CoronaTexName coronastarShadowTexName shad_expFlags1 AT_NIGHTFlags2 -ViewVector 0 0 100I think most of parameter don't need additional explanation, we will look into some of them only.CoronaShowMode This param is like an additional type of light. DEFAULTRANDOM_FLASHINGRANDOM_FLASHIN_ALWAYS_AT_WET_WEATHERLIGHTS_ANIM_SPEED_4XLIGHTS_ANIM_SPEED_2XLIGHTS_ANIM_SPEED_1XALWAYS_AT_WET_WEATHERTRAFFICLIGHTTRAINCROSSLIGHTAT_RAIN_ONLY5S_ON_5S_OFF6S_ON_4S_OFF6S_ON_4S_OFF_2These are known modes. But you can also try unknown (put numbers 0-13 instead of text value).Flags1 CORONA_CHECK_OBSTACLESFOG_TYPE1FOG_TYPE2WITHOUT_CORONACORONA_ONLY_AT_LONG_DISTANCEAT_DAYAT_NIGHTBLINKING1 Flags2 CORONA_ONLY_FROM_BELOWBLINKING2UDPDATE_HEIGHT_ABOVE_GROUNDCHECK_DIRECTIONBLINKING3 Using flagsIf you want to use few flags, you need to separate them with "," symbol. If you don't want to use any of available flags, you must fill the field with symbol "-". For example, this Flags1 AT_DAY,AT_NIGHTWill make the light is working during hole day. PARTICLE Attaching particle effect. 2dfxType PARTICLEPosition 0.000000 0.000000 0.000000Name simplefx PED_ATTRACTORAttracting peds to model's object. 2dfxType PED_ATTRACTORPosition -0.572941 0.661896 0.030715Type PED_SEAT_ATTRACTORRotation -0.993852 0.006778 -0.110507 -0.993852 0.006778 -0.110507 0.995570 -0.009073 0.093582ExternalScript -ExistingProb 75Unknown1 0Unknown2 0Available types of attracting: PED_ATM_ATTRACTORPED_SEAT_ATTRACTORPED_PIZZA_ATTRACTORPED_PIZZA_ATTRACTORPED_SHELTER_ATTRACTORPED_TRIGGER_SCRIPT_ATTRACTORPED_LOOK_AT_ATTRACTORPED_SCRIPTED_ATTRACTORPED_PARK_ATTRACTORPED_STEP_ATTRACTORIf using type PED_TRIGGER_SCRIPT_ATTRACTOR, "ExternalScript" field must be filled with script name. SUNGLARE Simulating sun flare on a model with creating a corona. 2dfxType SUNGLAREPosition 0.000000 0.000000 0.000000 ENEXAttaches an enter-exip teleport to object ROADSIGN Attaches road sign text to object 2dfxType ROADSIGNPosition 1637.679321 -2063.918701 28.069563Size 5.000000 2.500000Rotation 48.999981 -90.000008 -90.000015NumLines 4SymbolsInLine 16Color WHITEText1 Bluffs_^_______Text2 Downtown_^_____Text3 Mulholland^____Text4 Vinewood_^_____ Color typesAttaches road sign text to object WHITEBLACKGREENRED SLOTMACHINEWHEELDefines slot machine wheel object in casino 2dfxType SLOTMACHINEWHEELPosition 0.074211 0.510475 0.921751WheelIndex 0 COVERPOINTA place where peds could cover while acting in firefight 2dfxType COVERPOINTPosition -0.637695 -12.929321 -4.864481XY -0.000001 -1.000000Type 1 ESCALATORAttaches an escalator stairs to object 2dfxType ESCALATORBasePosition -0.957153 6.627189 -3.237147BottomPosition -0.947021 4.526084 -3.237147TopPosition -0.980835 -4.370117 3.380810EndPosition -0.985107 -6.449219 3.380810Direction UP Direction types UPDOWN Edited March 3, 2015 by DK22Pac dekash27, LeonTheKiller, guard3 and 7 others 10 Link to comment Share on other sites More sharing options...
miclin Posted September 20, 2014 Share Posted September 20, 2014 (edited) Nice Tool and tutorial, thanks I have one problem. I can't get the trafficlights to work. Are they hardcoded to the models? Using the exact same 2dfx section of SA Trafficlights won't work on custom models. But making a own 2dfx section and replacing the satrafficlight with the custom model, works.. Edited September 20, 2014 by miclin Link to comment Share on other sites More sharing options...
TJGM Posted September 21, 2014 Share Posted September 21, 2014 Nice Tool and tutorial, thanks I have one problem. I can't get the trafficlights to work. Are they hardcoded to the models? Using the exact same 2dfx section of SA Trafficlights won't work on custom models. But making a own 2dfx section and replacing the satrafficlight with the custom model, works.. I'm pretty sure they're hardcoded. Link to comment Share on other sites More sharing options...
RestractPrime Posted March 26, 2015 Share Posted March 26, 2015 i has been follow your Tutorial @ZAZ , but why when i adding section it unknown ? http://gtaforums.com/topic/525891-lightobjects-and-objects-with-2dfx-effects/?do=findComment&comment=1067197872 Any one can help me ? Please fast repply , thank's for Tutorial btw Link to comment Share on other sites More sharing options...
Blackbird88 Posted March 26, 2015 Share Posted March 26, 2015 Because you are missing some additional stuff that was discovered. Add these to RW_secs.ini under # Miscellaneous: section 0253F2F8=2dfx0253F200=Atomic Visibility Distance0253F2FD=Breakable model0253F201=Clump Visibility Distance0253F2FE=Frame0253F2FA=Collision Model0253F202=Frame Visibility Distance0253F2FB=GTA HAnim0253F2FD=Mesh extension0253F2F9=Night Vertex Colors0253F2F3=Pipeline set0253F2FC=Reflection material0253F2F6=Specular Material0253F2F5=TexDictionary Link0253F2F4=Unused 50253F2F7=Unused 80253F2FF=Unused 16 RyanDri3957V, RestractPrime and Concavax 3 Link to comment Share on other sites More sharing options...
RestractPrime Posted March 27, 2015 Share Posted March 27, 2015 Because you are missing some additional stuff that was discovered. Add these to RW_secs.ini under # Miscellaneous: section 0253F2F8=2dfx0253F200=Atomic Visibility Distance0253F2FD=Breakable model0253F201=Clump Visibility Distance0253F2FE=Frame0253F2FA=Collision Model0253F202=Frame Visibility Distance0253F2FB=GTA HAnim0253F2FD=Mesh extension0253F2F9=Night Vertex Colors0253F2F3=Pipeline set0253F2FC=Reflection material0253F2F6=Specular Material0253F2F5=TexDictionary Link0253F2F4=Unused 50253F2F7=Unused 80253F2FF=Unused 16 Blackbird88 : Thank you Balckbird , i will test it , thank's for info Link to comment Share on other sites More sharing options...
RestractPrime Posted March 27, 2015 Share Posted March 27, 2015 Blackbird or any one , i have one question again :\ , add section has done , but why that name not same :\ ? that is problem or not at tutorial i saw 2dfx (R*) but at my RW just 2dfx Link to comment Share on other sites More sharing options...
Blackbird88 Posted March 27, 2015 Share Posted March 27, 2015 It's just a name. It doesn't matter. You can name it whatever you want RestractPrime 1 Link to comment Share on other sites More sharing options...
RestractPrime Posted March 27, 2015 Share Posted March 27, 2015 It's just a name. It doesn't matter. You can name it whatever you want thank's for info , it's work , now i can add 2dfx feature to my own models thank's for helped Link to comment Share on other sites More sharing options...
DK22Pac Posted March 29, 2015 Author Share Posted March 29, 2015 The tool was updated (3 weeks ago). Fixed problem with attractors (export), added more examples and a ReadMe file where all flags/constants are listed (most of them also have a description). pep legal and Concavax 2 Link to comment Share on other sites More sharing options...
pep legal Posted April 4, 2015 Share Posted April 4, 2015 (edited) Thanks for this update...I'm playing with that now, but I have a single (and old) question (maybe it's - or it is not - related to this topic) : ...inside that "additional stuff that was discovered" (like Blackbird said) is there any way to dynamically (in game) change texture of a model ? (preferably from a Cleo script) Even by using any 2dfx trick, I need to switch textures of a model acording to time of day (Now I'm switching models - dozens of them. Changing only texture would be more...elegant). Thanks. Edited April 4, 2015 by pep legal Link to comment Share on other sites More sharing options...
cj2000 Posted June 9, 2017 Share Posted June 9, 2017 PED_ATTRACTORAttracting peds to model's object. 2dfxType PED_ATTRACTORPosition -0.572941 0.661896 0.030715Type PED_SEAT_ATTRACTORRotation -0.993852 0.006778 -0.110507 -0.993852 0.006778 -0.110507 0.995570 -0.009073 0.093582ExternalScript -ExistingProb 75Unknown1 0Unknown2 0 What that Rotation should represent? The rotation matrix or euler angles? Link to comment Share on other sites More sharing options...
cj2000 Posted September 11, 2018 Share Posted September 11, 2018 Does that SUNGLARE effect realy exist in SA? Link to comment Share on other sites More sharing options...
DK22Pac Posted September 19, 2018 Author Share Posted September 19, 2018 On 6/9/2017 at 1:05 PM, cj2000 said: What that Rotation should represent? The rotation matrix or euler angles? It's not a matrix. Each 3 values represent a separated vector, one of them is used as direction, the second has something to do with peds' queue (can't remember exactly). On 9/11/2018 at 4:44 PM, cj2000 said: Does that SUNGLARE effect realy exist in SA? It was not present on original models AFAIK. Link to comment Share on other sites More sharing options...
cj2000 Posted September 20, 2018 Share Posted September 20, 2018 (edited) 13 hours ago, DK22Pac said: It's not a matrix. Each 3 values represent a separated vector, one of them is used as direction, the second has something to do with peds' queue (can't remember exactly). It was not present on original models AFAIK. I already know that ped effect not using matrix, but the first and second vector are containing the same values related to the rotation matrix. Send you PM, so posibly we can discus it there. Edited September 20, 2018 by cj2000 Link to comment Share on other sites More sharing options...
Akiri Posted June 8, 2019 Share Posted June 8, 2019 I exported the right section in RWanalyze but after using 2dfx tool,only one sentence in txt,https://cdn.discordapp.com/attachments/431585781681881128/586838671475474433/QQ20190608162803.png Link to comment Share on other sites More sharing options...
Leinad Posted June 11, 2019 Share Posted June 11, 2019 You have done an amazing job Dk22pac, I liked the result of using this tool Link to comment Share on other sites More sharing options...
Thewitch2456 Posted November 1, 2019 Share Posted November 1, 2019 sorry for bump but i can't figure out how to make night window for 3d model , it's seem like they using another texture plane to attach it on window and add some IDE , IPL file that i couldn't understand , so can you guys help me out for the finished my texture project ? hope you guys reply me, thank you so much if you read it Link to comment Share on other sites More sharing options...
Dmitrysass Posted April 17, 2020 Share Posted April 17, 2020 Nice tool Link to comment Share on other sites More sharing options...
chaosbginwenrealityend Posted March 12, 2021 Share Posted March 12, 2021 (edited) Thanks for this wonderful tool. It's been very helpful in projects such as SAxVCxLC. I found a bug when making escalators and thought I would report it - even if this tool is no longer being maintained at least this may help someone. This only happens with escalators. Nothing else so far. The tool correctly decompiles a .2dfx file weather exported by RWAnalyse or created with this tool, but after editing the text file; saving; then compile; it doesn't compile the correct entry for 'UP' so the end result is the escalator works perfectly DOWN - regardless of how many entries. I've attached a screen shot so you can see. I found the error by decompiling the edited .2dfx after compiled and noticed both entries were DOWN even though I had the first entry as UP. After finding this error, I opened the compiled .2dfx file in a hex editor and edited the highlighted byte from 00 to 01 and then it worked as expected. Again, thank you for this excellent tool. Spoiler [img]https://i.imgur.com/TL0LXIx.png[/img] working escalator after editing the above from 00 to 01 presumably 01 is UP and 00 is DOWN. This .2dfx has only 2 entries as you can see. [img]https://i.imgur.com/FmjScEg.jpg[/img] Edited March 12, 2021 by chaosbginwenrealityend Link to comment Share on other sites More sharing options...
IcarusMS Posted September 12, 2021 Share Posted September 12, 2021 My RW Analyze doesn't have the 2dfx even after adding it to the rw_secs.ini Link to comment Share on other sites More sharing options...
ZAZ Posted November 23, 2021 Share Posted November 23, 2021 On 9/12/2021 at 3:28 PM, IcarusMS said: My RW Analyze doesn't have the 2dfx even after adding it to the rw_secs.ini ~ Go to "Clump > Geometry List > Geometry > Extension" ~ Rightclick on "Extension" and add "Add Section" ~ Insert Section 0x253F2F8 activate 2. field and overwrite 0x03 with 0x253F2F8 it becomes Type 0x253F2F8 2dfx(R*) ~ then Rightclick on new section 2dfx(R*) and Import Section Data(file) breant55, IcarusMS and SomeGuy86 3 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
breant55 Posted January 18, 2022 Share Posted January 18, 2022 On 11/24/2021 at 2:30 AM, ZAZ said: ~ Go to "Clump > Geometry List > Geometry > Extension" ~ Rightclick on "Extension" and add "Add Section" ~ Insert Section 0x253F2F8 activate 2. field and overwrite 0x03 with 0x253F2F8 it becomes Type 0x253F2F8 2dfx(R*) ~ then Rightclick on new section 2dfx(R*) and Import Section Data(file) sir for used This tooll dff which folder i add and which folder txt lines Please help. Link to comment Share on other sites More sharing options...
ZAZ Posted January 18, 2022 Share Posted January 18, 2022 Download SA2dfx_tool_03.03.2015.zip Unpack SA2dfx_tool_03.03.2015.zip SA2dfx_tool_03.03.2015(main folder) -| --2dfx (subfolder) -- txt (subfolder) -- SA2dfx.exe (subfolder) 2dfx and (subfolder) txt must be stored in same (main)folder like SA2dfx.exe --------------------------------------------------------------- Clear the folders txt and 2dfx, so that both folders empty --------------------------------------------------------------- 1.) Convert 2dfx from dff to txt file: put 2dfx into 2dfx folder, doubleclick on SA2dfx.exe find txt inside txt folder --------------------------------------------------------------- 2.) Convert txt to 2dfx: put txt into txt folder, doubleclick on SA2dfx.exe find 2dfx inside 2dfx folder --------------------------------------------------------------- --------------------------------------------------------------- --------------------------------------------------------------- Example 1.) Convert 2dfx from dff to txt file: - Clear the folders txt and 2dfx, so that both folders empty - Open cj_t_ticket_ped.dff with RW Analyse - export the section of Extension that have 0x253F2F8 - save it as <anyname>.2dfx or rename it later so that it have file format *.2dfx - put <anyname>.2dfx into 2dfx folder - doubleclick on SA2dfx.exe find text based file.txt inside txt folder --------------------------------------------------------------- --------------------------------------------------------------- Example 2.) Convert txt to 2dfx: - Clear the folders txt and 2dfx, so that both folders empty - prepair textbased 2dfx_file.txt - put 2dfx_file.txt into txt folder - doubleclick on SA2dfx.exe - find 2dfx_file.2dfx inside 2dfx folder - Open *.dff with RW Analyse - import 2dfx_file.2dfx to the section of Extension that have 0x253F2F8 --------------------------------------------------------------- --------------------------------------------------------------- Example for textbased 2dfx_file.txt could be: NumEntries 2 ######################### 1 ######################### 2dfxType PED_ATTRACTOR Position 1.7 1.1 4.9 Type PED_SEAT_ATTRACTOR Rotation -0.000092 -1.000000 0.000000 -0.002005 0.999998 0.000000 0.000863 -1.000000 0.000000 ExternalScript - ExistingProb 75 Unknown1 0 Unknown2 0 ######################### 2 ######################### 2dfxType PED_ATTRACTOR Position -1.7 -1.1 4.9 Type PED_PARK_ATTRACTOR Rotation -0.000092 -1.000000 0.000000 -0.002005 0.999998 0.000000 0.000863 -1.000000 0.000000 ExternalScript - ExistingProb 75 Unknown1 0 Unknown2 0 the dff would spawn 2 peds, one ped sit, one ped lies like on beach breant55 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now