Jump to content

[REL] KAM's GTA Scripts (2018) / UPD: 31.05.2020 /


gold_fish

Recommended Posts

1 hour ago, Einheit-101 said:

You fixed the bug!! I can now export the pistol perfectly fine and surely all other models affected by this bug.
What did cause it? What is a mixed polygon?

mixed polygon - polygons that snap , making the model look torn

sorry for my English

 

later I will try to fix this problem so that the script itself can cure the model mesh

 

Edited by gold_fish
  • Like 1
Link to comment
Share on other sites

14 minutes ago, Strs said:

last time i install 3dsmax 2020 idk why this happend https://imgur.com/1aKPNbl now again i install 3dsmax 2017 but same broblem https://imgur.com/1aKPNbl guys help me someone knows this 

 

Show a screenshot of the script interface, with what settings do you import the model?

Send your model to me in private messages I will try to figure it out

Link to comment
Share on other sites

7 hours ago, Cap'n_Cook said:

work in 3Ds Max 2021?

 

  

 

On 5/16/2020 at 9:06 AM, Tut Greco said:

I have tested your script with Max 2021 and it imports as expected. I haven't tested it thoroughly, but it looks to work just fine.

 

Link to comment
Share on other sites

UPDATE

v 0.3.7

added:
- returned function to import data from IDE

fixed:
 - saving settings in the DFF IO script interface

 

Additionally:
 - additional tools have been added to the GTA Tools menu (for a list of all available tools in the KAM script, click here https://vk.com/page-99725313_54168827 )

 

download https://drive.google.com/open?id=1hjKlZzNjxilEBfDGrSIN2iJF-1xSwVxU

or https://yadi.sk/d/DQMt4tMM3TTV5e

UPOC8eqkaxI.jpg

Link to comment
Share on other sites

2 hours ago, bobaggiustatutto said:

Tried this script and it worked fine the first couple of days but now I'm greeted by this everytime I start 3ds max 2021

https://i.imgur.com/iirtA51.png

 

run 3d max as administrator

Link to comment
Share on other sites

bobaggiustatutto
12 minutes ago, gold_fish said:

run 3d max as administrator

Thanks a lot!

Link to comment
Share on other sites

chaosbginwenrealityend

Thank you @gold_fish for these wonderful scripts and your dedication to make something better. For with out them; it would not be readily possible for me to bring SAxVCxLC a better LC port and will see to it that you're on the credits list. I run these scripts on 3dsmax 2010 with no service packs and seem to work just fine.

 

The second to the last page/ page 55 is where I start to show screen shots of progress if you would like have a look. The 'prelit tool' is what I've used heavily because gta3 .dffs don't have night vertex colors.

 

The only minor little thing I found is that your map import don't seem to retain model ID info. in object properties > user defined after import. Kams would have: ID = 14550 or whatever ID that came from the .ipl. No biggie. I only had to do a very small hand full of IDing objects. This is only needed when 'export by .ipl' is used.

 

There are some things I still have to do manually like ped attractors. To make these I import the object that I want to make a ped attractor or I mostly make these in a scene I have already. I need a floor for the ped to stand on if the object doesn't have one so I create a plane and put it where the ped would stand in game. I then create omnis and position them where the ped will animate adding 1 to the Z axis because peds have their pivot points in the center. I then link all the omnies to the object and open 'motion' tab and I get the xyz coords from there; (it won't show correctly in the viewport coords if the object is not at x0 y0 z0) clicking on each omni and getting coords while hand editing in notepad++. 3dsmax is not very friendly when it comes to rotations as far as information goes so I just use the only 3 numerals behind decimal provided and add zeros to make 6. There is an option in Max to set the motion controller to radians or quaternions but it don't seem to work; at least not how I would come to expect so I made a cheat sheet of SA rotations that I compiled from ped attractor studies and just add accordingly to what I found. Using this work flow yields me perfectly working ped attractors every time but it is very time consuming. Having a 'look direction' that shows the entire rotation with all 3 sections (9 numbers) in 3dsmax would be so handy. I also tested exporting a .sae from Dexxs SA_effects script then decompile and copying rotation info but this don't always work well. I then unlink the omnis if the object is going to be used in game.

 

I then use SA2dfx by DK22Pac to compile the .txt to .2dfx for import with RWAnalyze. Here is a sample of what that looks like. I don't know if these could be done with a .max script but food for thought. They are not linked by dummies; you just add them in a .2dfx section in the .dff. The position (xyz) and rotation (radians?) is relative to the objects pivot point and must be 6 numerals after the decimal. The rotation equates to the peds looking direction so the first one the ped is facing south. As far as I can tell, all 9 numbers are used in a combination that creates the direction. In Sanny Builder speak it is the same as the peds z angle so the first one is 180 degrees more or less.

 

Spoiler

NumEntries       6
######################### 1 #########################
2dfxType         PED_ATTRACTOR
Position         -19.691000 30.656000 -19.022000           
Type             PED_LOOK_AT_ATTRACTOR
Rotation         0.000000 -1.000000 0.000051  0.000000 -1.000000 0.000051  0.000000 1.000000 -0.000051
ExternalScript   -
ExistingProb     75
Unknown1         0
Unknown2         0
######################### 2 #########################
2dfxType         PED_ATTRACTOR
Position         -19.884000 23.406000 -19.022000           
Type             PED_LOOK_AT_ATTRACTOR
Rotation         1.000000 0.000000 0.000000  1.000000 0.000000 0.000000  -1.000000 0.000000 0.000000
ExternalScript   -
ExistingProb     75
Unknown1         0
Unknown2         0
######################### 3 #########################
2dfxType         PED_ATTRACTOR
Position         -19.594000 -41.615000 -19.022000           
Type             PED_LOOK_AT_ATTRACTOR
Rotation         1.000000 0.000000 0.000000  1.000000 0.000000 0.000000  -1.000000 0.000000 0.000000
ExternalScript   -
ExistingProb     75
Unknown1         0
Unknown2         0
######################### 4 #########################
2dfxType         PED_ATTRACTOR
Position         19.528000 -38.950000 -19.022000           
Type             PED_LOOK_AT_ATTRACTOR
Rotation         -1.000000 0.000000 0.000000  -1.000000 0.000000 0.000000  1.000000 0.000000 0.000000
ExternalScript   -
ExistingProb     75
Unknown1         0
Unknown2         0
######################### 5 #########################
2dfxType         PED_ATTRACTOR
Position         19.677000 -12.331000 -19.022000           
Type             PED_LOOK_AT_ATTRACTOR
Rotation         -1.000000 0.000000 0.000000  -1.000000 0.000000 0.000000  1.000000 0.000000 0.000000
ExternalScript   -
ExistingProb     75
Unknown1         0
Unknown2         0
######################### 6 #########################
2dfxType         PED_ATTRACTOR
Position         19.878000 23.825000 -19.022000           
Type             PED_LOOK_AT_ATTRACTOR
Rotation         -1.000000 0.000000 0.000000  -1.000000 0.000000 0.000000  1.000000 0.000000 0.000000
ExternalScript   -
ExistingProb     75
Unknown1         0
Unknown2         0

 

It would be sweet if at some point scrolling text/marquee could be possible and/or implemented in your scripts as this would make the new port more complete. These are on the airport, used cars sign in Portland, and also on Broadway in gta3. SA also uses them like in the casinos. I don't have a .dff handy as I'm on my linux partition right now and don't remember which ones contained it but can provide one if needed. I studied these to see how they work but unfortunately, I have insufficient .dff structure knowledge; however, there does seem to be some verbiage relating to marqees in the 2dfx section of the .dff if I remember. I don't know if this would be the same as UVanimation.

 

Again, thank you so much for all these wonderful tools you have provided us and thank you for all your dedication.

Link to comment
Share on other sites

14 hours ago, chaosbginwenrealityend said:

Thank you @gold_fish for these wonderful scripts and your dedication to make something better. For with out them; it would not be readily possible for me to bring SAxVCxLC a better LC port and will see to it that you're on the credits list. I run these scripts on 3dsmax 2010 with no service packs and seem to work just fine.

 

The second to the last page/ page 55 is where I start to show screen shots of progress if you would like have a look. The 'prelit tool' is what I've used heavily because gta3 .dffs don't have night vertex colors.

Thank you, I am very pleased that the tools help someone in a lot of routine work. 😀

 

In the future I will try to add tools for exporting all types of 2dfx, as soon as there is free time.

If there are any requests for scripts, please contact, maybe I can write individual scripts for you, but then again, if I have free time, my contacts for communication:

VK https://vk.com/vk.goldfish

diskord goldfish#3816

telegramm Голд Фиш

[email protected]

 

Good luck in the development of the mod!

Edited by gold_fish
Link to comment
Share on other sites

there is a problem when i align pivot to center from the hierarchy menu  here is a video https://streamable.com/k5caup

Link to comment
Share on other sites

1 hour ago, mea said:

there is a problem when i align pivot to center from the hierarchy menu  here is a video https://streamable.com/k5caup

Sorry, the link is not working.

Link to comment
Share on other sites

2DFX doesn't work with Max 2021. Reports "-- Unknown property: "LSflags1" in Rollout:DFF2dfx" when trying to change the flags. 

 

Exporting to .dff without 2dfx works fine. Doesn't work with 2dfx though.

Link to comment
Share on other sites

On 3/24/2018 at 5:41 PM, gold_fish said:

This script was tested in 3ds max 2009 and 2012, 2017 and 2020

Now i tested it on 3DS Max 2021, and it works fine, so maybe add it to the list

Link to comment
Share on other sites

On 6/6/2020 at 10:54 AM, Tut Greco said:

2DFX doesn't work with Max 2021. Reports "-- Unknown property: "LSflags1" in Rollout:DFF2dfx" when trying to change the flags. 

 

Exporting to .dff without 2dfx works fine. Doesn't work with 2dfx though.

replace this file in Scripts\GTA_Tools (GF) and check again

 

https://download.ru/files/D8ZByWBZ

Link to comment
Share on other sites

4 hours ago, gold_fish said:

replace this file in Scripts\GTA_Tools (GF) and check again

 

https://download.ru/files/D8ZByWBZ

Thanks. Are you able to upload it somewhere else. For some reason it's blocked on my end. Discord is pretty good as temporary file host, just drag it into your server, copy link and paste it here.

Link to comment
Share on other sites

Hi there, i'd like to know how to implement a specular map when exporting stuff, because i tried to edit some models that look brighter and have light reflections in-game (they have a specular mapping texture in the weapon's TXD file) but they look darker and have no reflections anymore after editing and re-exporting the files to .DFF

Link to comment
Share on other sites

7 hours ago, Bane712 said:

Hi there, i'd like to know how to implement a specular map when exporting stuff, because i tried to edit some models that look brighter and have light reflections in-game (they have a specular mapping texture in the weapon's TXD file) but they look darker and have no reflections anymore after editing and re-exporting the files to .DFF

Make sure that your 2nd uv channel is intact and that your material has the specular (env) map plugged into the envmap slot. The darkness could be a result of you using modulate material color on export, or having a lower diffuse or ambient value in the material.

 

Please provide a .max scene or some images showing your material and export settings if the above has no effect.

Link to comment
Share on other sites

@Tut Greco write about the test result

Edited by gold_fish
Link to comment
Share on other sites

1 hour ago, gold_fish said:

@Tut Greco write about the test result

It works now. Exporting to .dff doesn't. Importing the .dff back (a simple cube, given GTA material) simply imports a dummy.

 

No I'm mistaken. It imports a dummy instead of the mesh. The child of the dummy is another dummy which was the 2dfx light.

The mesh itself is imported separate. Like so.

unknown.png

Edited by Tut Greco
Link to comment
Share on other sites

47 minutes ago, Tut Greco said:

It works now. Exporting to .dff doesn't. Importing the .dff back (a simple cube, given GTA material) simply imports a dummy.

 

No I'm mistaken. It imports a dummy instead of the mesh. The child of the dummy is another dummy which was the 2dfx light.

The mesh itself is imported separate. Like so.

unknown.png

I understand you, in the near future I will install 2021 3ds max and check it

  • Like 2
Link to comment
Share on other sites

Einheit-101

UV Fix destroys most meshes, it looks like a broken mesh that has no "UV Fix" applied.
Also, exported DFF files are very large compared to the ones exported by rwio. Is there a way to compress the DFFs more? UV Fix seems to compress them very well, but the meshes get destroyed in that process...
Try to export this gun with UV Fix ticked, you will see that its completely broken when importing it again, using "Mesh Fix" does not work:
https://www.dropbox.com/s/mysi9pmij80x0zc/gun.max?dl=0

Some models get corrupted more than others and i even have 1 model that exported just fine with UV Fix (And it was 2/3 reduced in file size!)

JCBo82s.png

Link to comment
Share on other sites

4 hours ago, Einheit-101 said:

UV Fix destroys most meshes, it looks like a broken mesh that has no "UV Fix" applied.
Also, exported DFF files are very large compared to the ones exported by rwio. Is there a way to compress the DFFs more? UV Fix seems to compress them very well, but the meshes get destroyed in that process...
Try to export this gun with UV Fix ticked, you will see that its completely broken when importing it again, using "Mesh Fix" does not work:
https://www.dropbox.com/s/mysi9pmij80x0zc/gun.max?dl=0

Some models get corrupted more than others and i even have 1 model that exported just fine with UV Fix (And it was 2/3 reduced in file size!)

JCBo82s.png

 

 

Set an automatic smoothing group to all polygons of the model and repeat the export without uv fix (uv fix should be used as a last resort, it is not intended to reduce weight, besides, a file size of a few kilobytes does not solve anything, I think you should not worry about it)
Another way to reduce the file size, in the unwrap uvw modifier, select and weld all the vertices with the weld tool, it should help you

Edited by gold_fish
Link to comment
Share on other sites

Einheit-101

Thank you, i just welded the UV vertices of my weapon and the file size dropped from 1,2MB to just 600KB (!), thats insane!
And yes, unfortunately size matters. I am creating a MTA server and players will have to download these models before they can play. Bigger download = more players leaving because of long wait.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 3 Users Currently Viewing
    0 members, 0 Anonymous, 3 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.