Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

      1. News
      2. Red Dead Online
      3. The Armadillo Inn *Spoilers*
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

X-Seti

[REL] Adopting Kams Scripts

Recommended Posts

X-Seti

adoptingkams.jpg

I have taken a brave step in adopting Kams scripts as I hope Kam himself will not mind. Normally I would ask permission before I take this kind of action. Nor do I want to take any credit either for doing this.
Atm: Admin - if you feel this action breaks GTAF rules then please lock this topic and I will cease any more development.

All I am doing here is updating the scripts for future use and adding some other handy scripts to aid in getting content cleanly out of 3dsmax and Into the game. GTAIII, VC and SA.

I need to seek permission from Dexx, Alax, Blastovs; DENISka

Waiting permission from DENISka;
I've checked over this export-dff and export.col and decided that if these scripts exist in Scripts/GTA-Tools then these would be an assets
Maxscript doesn't appear to support an IF Exists or fileexists; just to give a warning message box.


IF fexists $= (scriptspath+"\\GTA-TOOLs\\Export.dff" then messagebox "You must place DENISka's export.dff in scripts/gta-tools/ to use them." tooltip:"You must place DENISka's export.dff in scripts/gta-tools/ to use them." align:#center ) else (  try ( fileIn (scriptspath+"\\GTA_Tools\\export_DFF.ms") quiet:true) catch ())

There is fileIn but this only works to load dependances and if they don't exist halt the script with an error. there is also fn existFile fname = (gfiles fname).count != 0
I will try this later. Maxscript reminds me of Arexx with some syntax changes.

And maybe some others because I would like to look at other scripts to get ideas in how to improve Kams Scripts. I've been looking at a lot of scripts and code (if I would like to borrow code, I will ask)

Download; http://www.ukscifi.net/gtatools/Kams-Scripts-0.7%5BAdopted%5DX-Seti.rar
Beta sciprts: To be tested on a new 3dsmax scene only just to see what works for you. Please don't try this on your own mod.

Lets get down to it..

1. Issues importing, exporting with Kams scripts running 3dsmax on versions 2015+ and upwards where compatibility is an issue. (Unable to import maps using Map-IO)

2. There are issues exporting objects with an alpha texture channel, Materials (Textures) get messed up over the model faces. also some models made with Zmodellor don't load with the non-standard .dff error.

3. Pivot cords for newly created .dff models are not centred with the exported model. so we get wrong .IPL cords. Collision mesh with a badly aligned pivot that doesn't match the original model.

These problems only appear when exporting large maps. Old methods are to import each .dff and centre it, before exporting the .dff and .col once again. This can take a lot of time when your working with thousands of models.

Edit;
Automatically cut up large created meshes into smaller game ready models. hense the model pivots before export needs to be looked at.

4. Better material management, I would like to find a way to build the .txd from the pool of textures used for the selected models. Not sure if this is really possible. so I'm asking...?

5. Importing and Exporting Paths for GTAIII and VC. not just SA with the ability to rotate the map. paths or any other related game SCM / DAT / IPL file.

6. Favourite models section for generic objects. I am crap for remembering all the objects so trees, benches and lampposts could be picked from a handy list. (bookmark objects) whatever you want to call it.

7. Better .IDE (ID) file management for Map-IO, maybe a database of all model names and ID's used. This will allow us to see free unused ID's, ID or model name used elsewhere.

Using multiple .IDE files like me these little checks help and I can see a lot of other possibilities like a project tracking system for scratch made mods recording the first ever object exported to the last.

If you have read some of my older posts of how the RW engine reads .IPL and .IDE data, then there is no need for me to go babbling on about that here. so all I'll say is it helps to export the .IPL data in alphanumeric order. messy .IPL/ .COL/ .IMG files lead to engine slow downs.

So If you have had any other issues not listed above this is the place to write it down or if you happen to have any ideas put them here.

Edit;
8. 2dfx panel in Kams does not seem to work or not in the way I would expect.

I would pick an object then start plotting what 2dfx effects reside. then save back to .IDE

15sep.jpg
Beta scripts: To be tested on a new 3dsmax scene only just to see what works for you. Please don't try this on your own mod.

Change Log;

Day 1; 13Sep2016
Fixed alpha channel model exporting. Needs testing!
Cleaned up scripts and corrected some render flags (map-io)
Adjusted the dff version exporter (dff-io) to include RW3.4 and Bully.

Day 2; 14Sep2016
Added Fixpivot. This will center the pivots of all the objects in the scene
-----> Only seems to work on 3dsmax9.. looking for what has changed in maxscript for 3dsmax2014+.

This option is to be used with create .IPL entry list and before exporting IPL data, DFF and COL objects.
Added a new export by .IDE function that exports both model and texture data to .IDE file. This is to be loaded back in via .ide import to set the new IDs.
This also saves time other then using Get and Set options that are now only to modify ID entries.

Day 3; 15Sep2016
Changed to Map-IO layout to include;
Unique objects only option. This can be used before exporting the IDE entry list.
A better IDE exporter with the textures name entries automatically. added.

Day 4; 16Sep2016
Fixed exported .IDE function - wrong value leading to script to error out. (map-io)
Removed single export only warning pop up on mass export .dff - typing in if statement. (dff-io)
Beta scripts: To be tested on a new 3dsmax scene only just to see what works for you. Please don't try this on your own mod.

Edited by X-Seti

Share this post


Link to post
Share on other sites
Jestic

Atm: Admin - if you feel this action breaks GTAF rules then please lock this topic and I will cease any more development.

I think it's safe to say when someone (Kam) has been gone so long from the community he wouldn't mind people tampering with his old work.

Edited by Jestic

Share this post


Link to post
Share on other sites
Jinx.

Now this is a pretty interesting project. Good luck :)

Share this post


Link to post
Share on other sites
Sweet Bellic

Good luck on your project.

Share this post


Link to post
Share on other sites
Gramps

 

Atm: Admin - if you feel this action breaks GTAF rules then please lock this topic and I will cease any more development.

I think it's safe to say when someone (Kam) has been gone so long from the community he wouldn't mind people tempering with his old work.

 

I second this notion.

 

It has been one of those 'unwritten' rules for a while; where if a user dramatically edits someone elses mod; without the benefit of reputation, it is allowed.

 

Like for example, if Silent fixed all of the bugs in a certain Limit Adjuster, it'd be allowed.

Share this post


Link to post
Share on other sites
X-Seti

I've always been and said to others give credit where due, but these days I've been open source with everything.

 

My only wish really is more released open source tools /mods by others. I would like to think that what I've done today. someone can learn from tomorrow.. right!

 

Update; Pivot misalignment issues.

norvcgroundf.jpg

norvcprifene.jpg

Norvcringroade.jpg

 

Edit;

 

Pictures above shows the pivot misaligned in all 3 meshes. exported models and collisions did show the pivot in the middle of each mesh [x0, y0, z0] before being exported.

 

I did set the pivot [Effect pivot only] center to object and [allign to object] center to pivot in the heirarchy settings.

but this data isn't carried over. just ignored.

 

I did a lot last night researching the weird pivot behavour on export. Still haven't gotten to the bottom of why just yet.

 

That's about it. Look at the image above (first post) your notice some changes to the KAM panels.

Edited by X-Seti

Share this post


Link to post
Share on other sites
Choofy

I knew Kam well, he wouldn't mind. He would be happy that his work was updated (As they are incredible scripts) It will be nice to have them working on later versions of max. =)

Share this post


Link to post
Share on other sites
X-Seti

Continuing tests this time with 3dsmax9.

ranobjects.jpg
Setting up the scene with simple objects turning these to editible mesh. hirearchy panel -> Press Effect Pivot Only and then Affect Object Only -> Center to Object.

 

I continued to export the .cols and .dffs.

 

What happens next is interesting.

ranobj_box.jpg

Cube; Misaligned Pivot by Z axis.

 

ranobj_cone.jpg

Cone; Misaligned Pivot by Z axis.

 

ranobj_cyclinder.jpg

Cyclinder: Pivot on this object is currect

 

ranobj_geosphere.jpg

Geosphere; Pivot on this object is currect

 

ranobj_pyramid.jpg

Pyramid; Pivot on this object is currect

 

ranobj_sphere.jpg

Sphere; Pivot on this object is currect

 

ranobj_teapot.jpg

Teapot; Pivot on this object is currect

ranobj_torus.jpg

Torus; Pivot on this object is currect

 

ranobj_tube.jpg

Tube; Pivot here is wrong but hard to see as the axis is of by Z.

 

3 wrong out of 9. 3dxMax 2014 is where the pivot issues begin

 

I don't like odd results, I'll repeat this 3 times to see if this problem can be replicated. (yes it can)

 

So on 3dsmax 2014 this does not work. I am putting this out to the community.

 

Pivotfix.ms

	fn doResetXForm object =			(			if object == undefined or ((classOf object != Editable_Mesh) and (classOf object != Editable_Poly)) then return ok			if object == undefined then return ok			if object.mesh == undefined then return ok			if object.name == undefined then return ok       			s = "updating "+object.name   			local oldNormal = #()			for i=1 to object.numFaces do oldNormal[i] = getFaceNormal object i 			ResetPivot object			if classof object.baseobjectect != Editable_mesh then return ok 			local newNormal = #()			for i=1 to object.numFaces do newNormal[i] = getFaceNormal object i						if(isNormalFliped oldNormal newNormal) then meshOp.flipNormals object #{1..object.numFaces}			update object			)		for ent in geometry do 		doResetXForm ent		doAffectPivotOnly ent		doAffectObjectOnly ent
Edited by X-Seti

Share this post


Link to post
Share on other sites
Choofy

You should reupload the scripts as 'Kams updated by Seti' or something. (That way you can update the zip file and the link in OP to keep it all updated here, and easier for end user). I see the Gta Liberty City mod has been able to get the gta3 ide based paths working. Are you any good at menu interface? A button and this script added would be nice. (Now that it has some relevance) 1rtczn.jpg Kams Gta3 path I/O

Share this post


Link to post
Share on other sites
X-Seti

Download; http://www.ukscifi.net/gtatools/Kams-Scripts-0.6%5BAdopted%5DX-Seti.rar

Beta sciprts: To be tested on a new 3dsmax scene only just to see what works for you. Please don't try this on your own mod.

 

I am going to post all the updates and change log info on the first page of this thread.

All other goings on will be posted as normal.

Edited by X-Seti

Share this post


Link to post
Share on other sites
X-Seti

You should reupload the scripts as 'Kams updated by Seti' or something. (That way you can update the zip file and the link in OP to keep it all updated here, and easier for end user). I see the Gta Liberty City mod has been able to get the gta3 ide based paths working. Are you any good at menu interface? A button and this script added would be nice. (Now that it has some relevance) 1rtczn.jpg Kams Gta3 path I/O

 

I updated the file kams.....rar. add yes I can add buttons, I need the name of that script "example.ms" and this be placed in scripts/gta_tools/

Share this post


Link to post
Share on other sites
Pauloso

This Really Cool Bro.

Share this post


Link to post
Share on other sites
X-Seti

Thanks m8, i've been away for abit. I'll continue onwards next week.

 

Updated first page with a download link.

Share this post


Link to post
Share on other sites
lpgunit

 

Atm: Admin - if you feel this action breaks GTAF rules then please lock this topic and I will cease any more development.

I think it's safe to say when someone (Kam) has been gone so long from the community he wouldn't mind people tampering with his old work.

 

Hey, for as long as it's for the betterment of the modding community, I'm sure Kam himself won't mind.

 

And another thing... You think there's a fix or workaround for the UV seams issue? Whenever I export something to a DFF the script leaves seams where the UV coordinates end.

Share this post


Link to post
Share on other sites
X-Seti

This depends on how you apply the UV mapping?

 

I am aware of the face flip iisues so could I see some examples of the UV mapping issues on the exported .dff?

Share this post


Link to post
Share on other sites
AVARITIA

 

4. Better material management, I would like to find a way to build the .txd from the pool of textures used for the selected models. Not sure if this is really possible. so I'm asking...?

 

That would be epic! Amazing work btw :)!

Share this post


Link to post
Share on other sites
TheHumanIsland

I don't know if someone already told you, but after you center the pivot, reset xform. Just apply the modifier and collapse to it, you will see changes carry over then.

Share this post


Link to post
Share on other sites
X-Seti

I've added this into the scripts on export. DFF. COL and IPL data. but this depends on what version of 3dsmax people are using.

This never works for me as I have to reload each dff into a clean scene and save it before I make the collision. reloading IPL map-io objects back into 3dsmax sometimes ends up like a car crash.

 

 

Xform

obj = object()xmod = XForm()addModifier obj xmodfn movepivCenter piv pos = ( piv.gizmo.pos = piv.center = [0,0,0] piv.center = -((piv.gizmo.pos) += pos))movepivCenter xmod (getModContextBBoxMin obj xmod)

Collapse modifier.

fn collapseTo = ( for obj in selection do (  for i in obj.modifiers.count to 1 by -1 where   obj.modifiers[i] == modPanel.getCurrentObject() do (    maxops.CollapseNodeTo obj i off     exit    )  ) )collapseTo()

This script code changes all the time so what ends up in the scripts pretty much doesn't resemble anything above.

 

Multiple objects collapse.

fn collapseTo = (   O = OPanel.getCurrentObject()   for obj in selection do (     for i in obj.modifiers.count to 1 by -1 where       obj.modifiers[i] == O do (         maxops.CollapseNodeTo obj i off       exit       )    ) )collapseTo()
Edited by X-Seti

Share this post


Link to post
Share on other sites
lpgunit

This depends on how you apply the UV mapping?

 

I am aware of the face flip iisues so could I see some examples of the UV mapping issues on the exported .dff?

Probably, probably not as even those that are simply exported straight sans modifications end up with seams.

Share this post


Link to post
Share on other sites
Dyuha322

Hey. I am a developer and have recently encountered difficulties when importing models. Imports made one file. It is very inconvenient and time consuming.
I want to ask, what would you add Mass DFF Importer.

Edited by Dyuha322

Share this post


Link to post
Share on other sites
podbyrin

Yess! Mass dff export too. during exporting colls i need to set move to 0; 0; 0 and rotate to 0 0 0

Share this post


Link to post
Share on other sites
Vadim M.

Thanks for the work!

Share this post


Link to post
Share on other sites
cj2000

Some improovements to Kams script is really a great idea. But what about adding suport for UV2?

Share this post


Link to post
Share on other sites
xiaogui319

Why can't I download,Please use www.mediafire.com? ok

Share this post


Link to post
Share on other sites
cj2000

I knew Kam well, he wouldn't mind. He would be happy that his work was updated (As they are incredible scripts) It will be nice to have them working on later versions of max. =)

But why then he encrypted his scripts?

Share this post


Link to post
Share on other sites
X-Seti

It's true some of the scripts are encrypted and yes If I was able to ask Kam directly there wouldn't be an issue I'm sure. saying that I've taken a leap in doing this blindly.. I've clearly stated to the board Staff/ Admins from the first post that if for any reason there is a problem just lock the topic and give me a slap.

 

Someone jokingly said put me up for an ice bucket challenge if I was to break any more board rules but of course I would discontinue this and move onto something else.

Edited by X-Seti

Share this post


Link to post
Share on other sites
gold_fish

You can add export prelite night?

Share this post


Link to post
Share on other sites
cj2000

 

You can add export prelite night?

 

Deniskas script has already that feature.

Share this post


Link to post
Share on other sites
deltaCJ

You get word from DENISka? He fell off of GTA Forums and his Russian GTA Forum a while back...

Share this post


Link to post
Share on other sites
cj2000

You get word from DENISka? He fell off of GTA Forums and his Russian GTA Forum a while back...

As far I know, he left GTA modding.

Share this post


Link to post
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

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

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