Jump to content

[WIP|SRC|3DS]GTA V Map Helper (Maxscript)


Neos7

Recommended Posts

GTA V Map Helper by Neos7
v0.1

 

gtav_max_helper_preview.JPG

INSTALL:
Copy the folders "GTAV_Map_Helper" and "Startup" in the "scripts" folder of your 3ds Max. (usually "3dsmax\scripts\")
Run 3ds Max and the script will appear in your utilities.

 

USAGE:
Select geometries and click the export button.

If you have an error on startup about the assembly, right click on "Newtonsoft.Json.dll" located in the "scripts\GTAV_Map_Helper\" folder, go to Properties and unblock it or simply download it from Newtonsoft here:
https://github.com/JamesNK/Newtonsoft.Json/releases/latest

This maxscript allows you to export meta data to help loading maps/props in GTA V.
It allows to export:
.ytyp.xml
.ymap.xml
.json

I also included the .json support since this script is initially written to work with json only and I still find the json a good format to backup both entities and archetype in the same file.
You can also import a json to move/rotate geometries in scene, it will create instances for entities with the same name.(this feature will be extended to ymaps)

The .ytyp.xml and .ymap.xml files have fixed properties for now, the settings panel is just a placeholder until I finish it.
This script isn't complete but I've choosen to release it to have suggestions, feedbacks and help of course, I've started working on this just because I needed and I had no maxscript knowledge.

NOTE: This script doesn't export game models, you will still need a script like GIMS EVO to do that.

IMPORTANT: Because of its early state, I remember that you have to manually edit some properties:
1.textureDictionary/txdName tag for the archetypes, they are saved as "geometryname_ytd", I've added the "_ytd" so you can easily detect them with regex or what ever you wanna use.
2.lodDist in ymaps which is meant to be at least big as the radius of the archetype.

So to finish, this might be a incomplete sh*t for now but I hope it might help already,somehow.

People I would thanks:
3Doomer
Those 2 guys who keeps blaming what I don't do. <3

Source

Download (5Mods)
Download (Mirror)

Edited by Neos7
  • Like 2
Link to comment
Share on other sites

8kTX4Qb.png

HHnErXC.png


Link to comment
Share on other sites

8kTX4Qb.png

Read the description, it's windows locking the dll...

If you have an error on startup about the assembly, right click on "Newtonsoft.Json.dll" located in the "scripts\GTAV_Map_Helper\" folder, go to Properties and unblock it or simply download it from Newtonsoft here:

https://github.com/J...releases/latest

Link to comment
Share on other sites

MrGTAmodsgerman

 

8kTX4Qb.png

Read the description, it's windows locking the dll...

If you have an error on startup about the assembly, right click on "Newtonsoft.Json.dll" located in the "scripts\GTAV_Map_Helper\" folder, go to Properties and unblock it or simply download it from Newtonsoft here:

https://github.com/J...releases/latest

 

I get the same error after i tried that GitHub link

YxxGn3B.png

Link to comment
Share on other sites

I get the same error after i tried that GitHub link

YxxGn3B.png

 

Can you post me the log of the listener? (Press F11 in 3Ds then replicate the error)

Edited by Neos7
Link to comment
Share on other sites

Updated on github, download the update from there.

Even if you don't manage to load the json assembly should still be able to use the other features.

  • Like 1
Link to comment
Share on other sites

MrGTAmodsgerman

Updated on github, download the update from there.

Even if you don't manage to load the json assembly should still be able to use the other features.

It helped thanks, but now i get an message "First enable Json Core" What does that mean?

Link to comment
Share on other sites

click on the "enable json" i Made this temporary so the script still work and it reminds you to unlock the assembly

  • Like 1
Link to comment
Share on other sites

MrGTAmodsgerman

click on the "enable json" i Made this temporary so the script still work and it reminds you to unlock the assembly

O8w7Enr.png

Thats all i get, after i click ok, then i get the "Enable Json core" message again

And yea, i checked the properties, it have all rights to run

 

ps: how exactly will the json be imported? And what it have to do with the 3d models in my scene? Will the script reposition all current objects?

Edited by MrGTAmodsgerman
Link to comment
Share on other sites

 

click on the "enable json" i Made this temporary so the script still work and it reminds you to unlock the assembly

O8w7Enr.png

Thats all i get, after i click ok, then i get the "Enable Json core" message again

And yea, i checked the properties, it have all rights to run

 

ps: how exactly will the json be imported? And what it have to do with the 3d models in my scene? Will the script reposition all current objects?

 

it reads all the entities from the json and for each of them if there is a node in the scene with the same archetypeName then it will be moved and rotated(hierarchy children included), if you find an entity with the same name then it will Copy (instance) the node(and children) in the scene and will move/rotate it too with the new values.

 

if your scene hasn't any node with that archetypeName then it will write a log saying it's missing

 

Anyway i still don't know why you can't load the assembly, what does it say in the 3dsmax listener? Also could you post the folder containing the .dll and /or its properties window?

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

MrGTAmodsgerman

 

 

click on the "enable json" i Made this temporary so the script still work and it reminds you to unlock the assembly

O8w7Enr.png

Thats all i get, after i click ok, then i get the "Enable Json core" message again

And yea, i checked the properties, it have all rights to run

 

ps: how exactly will the json be imported? And what it have to do with the 3d models in my scene? Will the script reposition all current objects?

 

it reads all the entities from the json and for each of them if there is a node in the scene with the same archetypeName then it will be moved and rotated(hierarchy children included), if you find an entity with the same name then it will Copy (instance) the node(and children) in the scene and will move/rotate it too with the new values.

 

if your scene hasn't any node with that archetypeName then it will write a log saying it's missing

 

Anyway i still don't know why you can't load the assembly, what does it say in the 3dsmax listener? Also could you post the folder containing the .dll and /or it's properties window?

 

My Maxscript Listener window is empty, no error messages

xIYITTI.png

It seems like that the json script is not really running at all

Link to comment
Share on other sites

Try downloading it again from newtonsoft github. It will include assemblies for different .net versions. Download this and take the .dll from Bin\net35 or Bin\net20

(Remember to check if Windows locks it.)

 

Anyway I added a first version of water.xml exporter.
Usage: open the water.xml exporter set your parameters and click add to add the WaterQuad to the WaterData (if you enable CalmingQuad or WaveQuad they will be added too).
If you have one or more geometries selected (for example some planes) and click add, it will use add for each of them a WaterQuad using the bound of the geometries and the rest of the properties will be taken from the chosen settings.

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

MrGTAmodsgerman

Try downloading it again from newtonsoft github. It will include assemblies for different .net versions. Download this and take the .dll from Bin\net35 or Bin\net20

(Remember to check if Windows locks it.)

 

Anyway I added a first version of water.xml exporter.

Usage: open the water.xml exporter set your parameters and click add to add the WaterQuad to the WaterData (if you enable CalmingQuad or WaveQuad they will be added too).

If you have one or more geometries selected (for example some planes) and click add, it will use add for each of them a WaterQuad using the bound of the geometries and the rest of the properties will be taken from the chosen settings.

Thanks, now it run but after importing my json file i get this :/ I picked the 3.5 dll you mention

2xDihJs.png

 

ps: Can you also add an gta v grass tool? Because i want to map grass but i don't want to do it with a script, i want real grass mapping

Edited by MrGTAmodsgerman
Link to comment
Share on other sites

 

Try downloading it again from newtonsoft github. It will include assemblies for different .net versions. Download this and take the .dll from Bin\net35 or Bin\net20

(Remember to check if Windows locks it.)

 

Anyway I added a first version of water.xml exporter.

Usage: open the water.xml exporter set your parameters and click add to add the WaterQuad to the WaterData (if you enable CalmingQuad or WaveQuad they will be added too).

If you have one or more geometries selected (for example some planes) and click add, it will use add for each of them a WaterQuad using the bound of the geometries and the rest of the properties will be taken from the chosen settings.

Thanks, now it run but after importing my json file i get this :/ I picked the 3.5 dll you mention

2xDihJs.png

 

ps: Can you also add an gta v grass tool? Because i want to map grass but i don't want to do it with a script, i want real grass mapping

I think if you use a newer version of 3ds you will fix everything. I've tested it on 2016/2017/2018

I will add requirements in the first post asap.

 

about "grass" you mean the fur or the props?

 

EDIT: I've tested using the assembly for 2.0 on 3Ds Max 2016 and still works.

Also which OS do you have installed?

If you have Windows 10 check this: https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Windows-10-support-for-Autodesk-products.html

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

MrGTAmodsgerman

 

 

Try downloading it again from newtonsoft github. It will include assemblies for different .net versions. Download this and take the .dll from Bin\net35 or Bin\net20

(Remember to check if Windows locks it.)

 

Anyway I added a first version of water.xml exporter.

Usage: open the water.xml exporter set your parameters and click add to add the WaterQuad to the WaterData (if you enable CalmingQuad or WaveQuad they will be added too).

If you have one or more geometries selected (for example some planes) and click add, it will use add for each of them a WaterQuad using the bound of the geometries and the rest of the properties will be taken from the chosen settings.

Thanks, now it run but after importing my json file i get this :/ I picked the 3.5 dll you mention

2xDihJs.png

 

ps: Can you also add an gta v grass tool? Because i want to map grass but i don't want to do it with a script, i want real grass mapping

I think if you use a newer version of 3ds you will fix everything. I've tested it on 2016/2017/2018

I will add requirements in the first post asap.

 

about "grass" you mean the fur or the props?

 

EDIT: I've tested using the assembly for 2.0 on 3Ds Max 2016 and still works.

Also which OS do you have installed?

If you have Windows 10 check this: https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Windows-10-support-for-Autodesk-products.html

 

I am using 3Ds Max 2011 since it was new, could you please make it backwards compatible? GIMS EVO itself just have more problems with these newer versions you mention than my one.

 

And for the grass, i mean all types of grass we can map. Just GRASS_LONG, GRASS_MID GRASS_SHORT and so on. I think they are all props. But it would be very useful to have a tool for that, that also let us directly export the mapped grass with the right physical settings. Just like the vanilla map.

 

And i use Windows 8.1 64 bit, maybe i should use 2.0 instead of 3.5?

Link to comment
Share on other sites

 

 

 

Try downloading it again from newtonsoft github. It will include assemblies for different .net versions. Download this and take the .dll from Bin\net35 or Bin\net20

(Remember to check if Windows locks it.)

 

Anyway I added a first version of water.xml exporter.

Usage: open the water.xml exporter set your parameters and click add to add the WaterQuad to the WaterData (if you enable CalmingQuad or WaveQuad they will be added too).

If you have one or more geometries selected (for example some planes) and click add, it will use add for each of them a WaterQuad using the bound of the geometries and the rest of the properties will be taken from the chosen settings.

Thanks, now it run but after importing my json file i get this :/ I picked the 3.5 dll you mention

2xDihJs.png

 

ps: Can you also add an gta v grass tool? Because i want to map grass but i don't want to do it with a script, i want real grass mapping

I think if you use a newer version of 3ds you will fix everything. I've tested it on 2016/2017/2018

I will add requirements in the first post asap.

 

about "grass" you mean the fur or the props?

 

EDIT: I've tested using the assembly for 2.0 on 3Ds Max 2016 and still works.

Also which OS do you have installed?

If you have Windows 10 check this: https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Windows-10-support-for-Autodesk-products.html

 

I am using 3Ds Max 2011 since it was new, could you please make it backwards compatible? GIMS EVO itself just have more problems with these newer versions you mention than my one.

 

And for the grass, i mean all types of grass we can map. Just GRASS_LONG, GRASS_MID GRASS_SHORT and so on. I think they are all props. But it would be very useful to have a tool for that, that also let us directly export the mapped grass with the right physical settings. Just like the vanilla map.

 

And i use Windows 8.1 64 bit, maybe i should use 2.0 instead of 3.5?

I will see which is the problem and if I can do something editing the code. Anyway Gims evo works perfectly on 2016.

Also I don't get what do you mean with the grass thing, those names aren't just collisions id?

Link to comment
Share on other sites

MrGTAmodsgerman

 

 

 

 

Try downloading it again from newtonsoft github. It will include assemblies for different .net versions. Download this and take the .dll from Bin\net35 or Bin\net20

(Remember to check if Windows locks it.)

 

Anyway I added a first version of water.xml exporter.

Usage: open the water.xml exporter set your parameters and click add to add the WaterQuad to the WaterData (if you enable CalmingQuad or WaveQuad they will be added too).

If you have one or more geometries selected (for example some planes) and click add, it will use add for each of them a WaterQuad using the bound of the geometries and the rest of the properties will be taken from the chosen settings.

Thanks, now it run but after importing my json file i get this :/ I picked the 3.5 dll you mention

2xDihJs.png

 

ps: Can you also add an gta v grass tool? Because i want to map grass but i don't want to do it with a script, i want real grass mapping

I think if you use a newer version of 3ds you will fix everything. I've tested it on 2016/2017/2018

I will add requirements in the first post asap.

 

about "grass" you mean the fur or the props?

 

EDIT: I've tested using the assembly for 2.0 on 3Ds Max 2016 and still works.

Also which OS do you have installed?

If you have Windows 10 check this: https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Windows-10-support-for-Autodesk-products.html

 

I am using 3Ds Max 2011 since it was new, could you please make it backwards compatible? GIMS EVO itself just have more problems with these newer versions you mention than my one.

 

And for the grass, i mean all types of grass we can map. Just GRASS_LONG, GRASS_MID GRASS_SHORT and so on. I think they are all props. But it would be very useful to have a tool for that, that also let us directly export the mapped grass with the right physical settings. Just like the vanilla map.

 

And i use Windows 8.1 64 bit, maybe i should use 2.0 instead of 3.5?

I will see which is the problem and if I can do something editing the code. Anyway Gims evo works perfectly on 2016.

Also I don't get what do you mean with the grass thing, those names aren't just collisions id?

 

Ok thanks

 

_________________________________________________________________________________________________________________________________________________________

The grass is a group of mapped grass props like in GTA IV. The collision of the grass is affected by the map collision. It would be very cool if you could make a tool to map grass on our object that is like a brush tool if you know what i mean. The important thing on that is, the size of the object we get with this tool, should be the same like the result we get finally in the game. The coordinates should be the same. Ok i think you don't understand this, let me explain me in other words.

We all want to map grass right? There are different types of grass props, ok. We could do this with a script over the Map Editor script, yea. But that is sh*t. We want that in our static map files like original GTA V map parts.

 

But we also don't want to create new grass objects right? All we need is a easy tool that let us to create the coordinates of GTA V grass prop objects on our map to place the grass objects from the GTA V map object database. And the tool you have here should also export the grass with it, with all the important vegetation settings automaticly set that we need in our map files like all other archtypes and so on.

 

On the point: A visual grass placement tool like the MAP EDITOR script. The tool should let us place the GTA V grass props with a kind of brush tool.

And when we export our map file like you already working on, then you will also get the exported "placed grass props setting"

 

Sorry for my bad english, i hope i make it understandable with that.

 

There are different props of grass, we don't want to place every single grass prop by hand, thats why a paint tool would be useful for that. 3Ds Max already have some kind of object painting tools. Take a look at it

and also at

prop_veg_grass_01_a - d

 

prop_veg_grass_02_a and so on. I think there is a meta file for grass setting somewhere.

 

And try this tool

http://gtaforums.com/topic/882840-codewalker-3d-map-viewer-for-gtav/

I think that will help you to understand how the grass of GTA V work.

 

If you get that, then you could also add other vegetation props in the future i think

Edited by MrGTAmodsgerman
Link to comment
Share on other sites

I know how grass works, I didn't get what you wrote but I got it now, it's possible but requires time, not a priority atm.

  • Like 1
Link to comment
Share on other sites

MrGTAmodsgerman

I know how grass works, I didn't get what you wrote but I got it now, it's possible but requires time, not a priority atm.

Ok, good. lets see if you able to fix the main problem

Link to comment
Share on other sites

  • 3 months later...
MrGTAmodsgerman

I know how grass works, I didn't get what you wrote but I got it now, it's possible but requires time, not a priority atm.

Hey, i remade my windows. Now for some unkown reason the plugin works :D

But please update. Its so damn useful. Please let the Settings values to be saved for the current project session once its ready!

Edited by MrGTAmodsgerman
Link to comment
Share on other sites

  • 2 months later...

Current status: (download available on github)

Refactored exporter.

The exporters now allow you to collect data and export when finished. (should be faster)

Added an exporter for batches of instanced grass. (based on face selection)

Added an exporter for water.xml (wip)
Added an exporter for popzone.ipl (wip)
Added single rollouts for indipendent metadata creation.
Added some options to customize before exporting the metadata.

Things coming next:
Raw ymap and ytyp export.

Edited by Neos7
  • Like 2
Link to comment
Share on other sites

  • 2 years later...

hey,

 I got an error here is  picture: https://cdn.discordapp.com/attachments/453728170835705858/705138822303973527/2020-04-29_2.png

 

I hope you can help me,

thanks.

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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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