Quantcast

Jump to content

» «
Photo

[REL] Adopting Kams Scripts

39 replies to this topic
X-Seti
  • X-Seti

    .Retro mod developer. (Xenon Brothers)

  • Feroci
  • Joined: 28 Jun 2005
  • Mars
  • Contribution Award [Mods]

#1

Posted 14 September 2016 - 01:50 AM Edited by X-Seti, 26 December 2016 - 03:52 PM.

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.n...pted]X-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.

 

  • Wesser, pep legal, fastman92 and 10 others like this

Jestic
  • Jestic

    Chris

  • GTA Mods Staff
  • Joined: 16 Oct 2005
  • Netherlands
  • Helpfulness Award
    Contribution Award [Mods]
    Best Conversion 2014 [ViIV for GTANY Contribution]
    Best Map 2011 [IVSA]
    Modding Milestone [IVSA/Ped Paths]
    Best Map 2013 [ViceCityStories PC Edition][Contribution]

#2

Posted 14 September 2016 - 02:23 AM Edited by Jestic, 16 September 2016 - 10:58 PM.

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.

  • X-Seti, Jinx. and Sweet Bellic like this

Jinx.
  • Jinx.

    understandable have a good day

  • Facade Corporation
  • Joined: 15 Dec 2010
  • None
  • Best WIP Mod 2014 [Grand Theft Auto 3D]

#3

Posted 14 September 2016 - 05:19 AM

Now this is a pretty interesting project. Good luck :)
  • X-Seti and Sweet Bellic like this

Sweet Bellic
  • Sweet Bellic

    Soldier

  • BUSTED!
  • Joined: 22 Feb 2015
  • Finland

#4

Posted 14 September 2016 - 06:10 AM

Good luck on your project.
  • X-Seti likes this

Gramps
  • Gramps

    ★★★★★

  • GTA Mods Staff
  • Joined: 23 May 2008
  • New-Zealand
  • Helpfulness Award
    Contribution Award [Mods]

#5

Posted 14 September 2016 - 09:58 AM

 

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.

  • X-Seti, Silent and Sweet Bellic like this

X-Seti
  • X-Seti

    .Retro mod developer. (Xenon Brothers)

  • Feroci
  • Joined: 28 Jun 2005
  • Mars
  • Contribution Award [Mods]

#6

Posted 14 September 2016 - 10:56 AM Edited by X-Seti, 15 September 2016 - 09:55 AM.

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.

  • Gramps and Sweet Bellic like this

Choofy
  • Choofy

    Player Hater

  • Members
  • Joined: 21 Nov 2005

#7

Posted 15 September 2016 - 01:51 PM

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. =)

  • X-Seti and Mr. Jago like this

X-Seti
  • X-Seti

    .Retro mod developer. (Xenon Brothers)

  • Feroci
  • Joined: 28 Jun 2005
  • Mars
  • Contribution Award [Mods]

#8

Posted 15 September 2016 - 06:43 PM Edited by X-Seti, 15 September 2016 - 07:17 PM.

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

Choofy
  • Choofy

    Player Hater

  • Members
  • Joined: 21 Nov 2005

#9

Posted 16 September 2016 - 10:37 AM

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

  • alex8ball_BRATVA likes this

X-Seti
  • X-Seti

    .Retro mod developer. (Xenon Brothers)

  • Feroci
  • Joined: 28 Jun 2005
  • Mars
  • Contribution Award [Mods]

#10

Posted 16 September 2016 - 10:13 PM Edited by X-Seti, 06 October 2016 - 06:07 PM.

Download; http://www.ukscifi.n...pted]X-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.
  • Jinx. and goodidea82 like this

X-Seti
  • X-Seti

    .Retro mod developer. (Xenon Brothers)

  • Feroci
  • Joined: 28 Jun 2005
  • Mars
  • Contribution Award [Mods]

#11

Posted 21 September 2016 - 12:42 PM

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/

  • alex8ball_BRATVA likes this

Pauloso
  • Pauloso

    The Guy Who Lives Close There

  • Members
  • Joined: 16 Sep 2014
  • Brazil

#12

Posted 05 October 2016 - 05:02 PM

This Really Cool Bro.


X-Seti
  • X-Seti

    .Retro mod developer. (Xenon Brothers)

  • Feroci
  • Joined: 28 Jun 2005
  • Mars
  • Contribution Award [Mods]

#13

Posted 06 October 2016 - 06:09 PM

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

 

Updated first page with a download link.

  • Pauloso likes this

lpgunit
  • lpgunit

    It's L, as in Lpgunit, not I.

  • Feroci
  • Joined: 24 May 2008
  • Philippines

#14

Posted 08 October 2016 - 12:26 AM

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.

X-Seti
  • X-Seti

    .Retro mod developer. (Xenon Brothers)

  • Feroci
  • Joined: 28 Jun 2005
  • Mars
  • Contribution Award [Mods]

#15

Posted 08 October 2016 - 06:32 PM

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?


AVARITIA
  • AVARITIA

    𝓽𝓱𝓲𝓼 𝓲𝓼 ...

  • Members
  • Joined: 13 Mar 2015
  • Poland

#16

Posted 08 October 2016 - 08:30 PM

 

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 :)


TheHumanIsland
  • TheHumanIsland

    See The Eye

  • BUSTED!
  • Joined: 06 Mar 2016
  • United-States

#17

Posted 09 October 2016 - 04:16 AM

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.


X-Seti
  • X-Seti

    .Retro mod developer. (Xenon Brothers)

  • Feroci
  • Joined: 28 Jun 2005
  • Mars
  • Contribution Award [Mods]

#18

Posted 09 October 2016 - 06:03 AM Edited by X-Seti, 09 October 2016 - 07:01 AM.

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 xmod
fn 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()

lpgunit
  • lpgunit

    It's L, as in Lpgunit, not I.

  • Feroci
  • Joined: 24 May 2008
  • Philippines

#19

Posted 09 October 2016 - 08:52 AM

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.

Dyuha322
  • Dyuha322

    Дюха322

  • Members
  • Joined: 14 May 2016
  • Russia

#20

Posted 27 October 2016 - 08:42 AM Edited by Dyuha322, 27 October 2016 - 08:42 AM.

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.

  • alex8ball_BRATVA likes this

alex8ball_BRATVA
  • alex8ball_BRATVA

    Mark Chump

  • Members
  • Joined: 26 Oct 2012
  • None

#21

Posted 13 November 2016 - 09:13 AM

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


Vadim M.
  • Vadim M.

    Stay tuned

  • Members
  • Joined: 09 Sep 2008
  • Latvia

#22

Posted 04 December 2016 - 03:54 PM

Thanks for the work!


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#23

Posted 13 December 2016 - 03:37 PM

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


xiaogui319
  • xiaogui319

    Player Hater

  • Members
  • Joined: 03 Mar 2014
  • China

#24

Posted 17 December 2016 - 04:21 AM

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


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#25

Posted 19 December 2016 - 11:06 AM

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?


X-Seti
  • X-Seti

    .Retro mod developer. (Xenon Brothers)

  • Feroci
  • Joined: 28 Jun 2005
  • Mars
  • Contribution Award [Mods]

#26

Posted 22 December 2016 - 12:32 PM Edited by X-Seti, 22 December 2016 - 12:34 PM.

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.


goldfish777
  • goldfish777

    Player Hater

  • Members
  • Joined: 11 Aug 2015
  • Russia

#27

Posted 19 January 2017 - 10:56 PM

You can add export prelite night?

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#28

Posted 20 January 2017 - 10:47 AM

 

You can add export prelite night?

 

Deniskas script has already that feature.


deltaCJ
  • deltaCJ

    BUSTED!

  • Members
  • Joined: 27 Dec 2013
  • None

#29

Posted 12 April 2017 - 08:45 AM

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


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#30

Posted 13 April 2017 - 01:25 PM

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users