Jump to content

How to create new vehicle mods


RingoD123

Recommended Posts

Just now, Harra said:

I see! I will be using the beta now. Any idea when it's officially released?

 

No idea, as soon as all the bugs etc have been quashed it will get pushed to the main public branch. There will be an announcement when that happens, but I couldn't tell you when that will be, depends on number of bugs and how easy they are to fix.

Link to comment
Share on other sites

2 minutes ago, RingoD123 said:

 

No idea, as soon as all the bugs etc have been quashed it will get pushed to the main public branch. There will be an announcement when that happens, but I couldn't tell you when that will be, depends on number of bugs and how easy they are to fix.

So now the mod works and it's in game but it's just a massive black object. I don't know what I did wrong ahaha

20180829170121_1.jpg

Link to comment
Share on other sites

15 minutes ago, Harra said:

So now the mod works and it's in game but it's just a massive black object. I don't know what I did wrong ahaha

20180829170121_1.jpg

 

I'm not a modeller so I have no idea, but i'm guessing it has to do with your textures and/or exported Vehicles_xxx .txt file.

Best advice I can give here is compare your mod to the included test mod and vanilla vehicles, make sure your converted text file has the correct name that your lua file is referencing etc as well as double checking your models faces are definitely triangulated before exporting as a .ply..

You could try using the test mod as a base and just replace its' textures and converted Vehicles_xxx.txt with your own (rename them to match the test mods).

Link to comment
Share on other sites

25 minutes ago, RingoD123 said:

 

I'm not a modeller so I have no idea, but i'm guessing it has to do with your textures and/or exported Vehicles_xxx .txt file.

Best advice I can give here is compare your mod to the included test mod and vanilla vehicles, make sure your converted text file has the correct name that your lua file is referencing etc as well as double checking your models faces are definitely triangulated before exporting as a .ply..

You could try using the test mod as a base and just replace its' textures and converted Vehicles_xxx.txt with your own (rename them to match the test mods).

nothing seems to work. The test mod is literally the same as mine and mine doesn't work. I've tried to reexport too.

Link to comment
Share on other sites

1 minute ago, Harra said:

nothing seems to work. The test mod is literally the same as mine and mine doesn't work. I've tried to reexport too.

zip up your mod and upload to a free file hosting site and send me the link (dm it to me if you like), i'll take a look when I have time and see if I can figure out what the problem is.

Link to comment
Share on other sites

9 minutes ago, RingoD123 said:

zip up your mod and upload to a free file hosting site and send me the link (dm it to me if you like), i'll take a look when I have time and see if I can figure out what the problem is.

sent!

Link to comment
Share on other sites

50 minutes ago, Harra said:

sent!

Replying here in case others come across same issue.

 

1) Check your scripts, any time you are referencing your textures in any of your scripts/code you are referencing "Vehicle_...." but all of your textures are named "Vehicles_...." so a big black square is appearing as the game is not finding your cars texture because of the name mismatch.

2) You have blank/white/transparent areas in your vehicles main texture (the shell png) , you want to bucket fill all white/transparent areas to be the same colour as the main colour of your vehicle so that no white/transparent areas are left on the texture (just like the example shell png in step 7 of the guide)

3) You will need to play around with the vehicles scale, extents, offsets etc in the vehicles script (in the scripts/vehicles folder) to get everything to be drawn in the correct places at the correct size etc.

Link to comment
Share on other sites

26 minutes ago, RingoD123 said:

Replying here in case others come across same issue.

 

1) Check your scripts, any time you are referencing your textures in any of your scripts/code you are referencing "Vehicle_...." but all of your textures are named "Vehicles_...." so a big black square is appearing as the game is not finding your cars texture because of the name mismatch.

2) You have blank/white/transparent areas in your vehicles main texture (the shell png) , you want to bucket fill all white/transparent areas to be the same colour as the main colour of your vehicle so that no white/transparent areas are left on the texture (just like the example shell png in step 7 of the guide)

3) You will need to play around with the vehicles scale, extents, offsets etc in the vehicles script (in the scripts/vehicles folder) to get everything to be drawn in the correct places at the correct size etc.

I see it all now, you're great help! I've fixed it and will be testing asap. Such a simple error i somehow made.

 

Edit: now i just see a large texture, is this due to the last step you said not being correct?

 

Do the color zones have to perfectly placed? I got lazy and used blocks instead of being precise with them. Is that how it all works? (and can i have overlapping color zones due to me not unwrapping the windows separate, etc)

 

20180829190155_1.jpg

Vehicle_MilitaryHumvee_Mask.png

Edited by Harra
Link to comment
Share on other sites

15 minutes ago, Harra said:

I see it all now, you're great help! I've fixed it and will be testing asap. Such a simple error i somehow made.

 

Edit: now i just see a large texture, I just cant seem to get it right.

20180829190155_1.jpg

 

First lower the scale to 1.0 or lower in your vehicles script.

You will then see that the shape is there but your vehicle was exported with an incorrect orientation so it is sitting on it's side and is facing sideways compared to its collision box.

humvee.jpg

Link to comment
Share on other sites

5 minutes ago, RingoD123 said:

 

First lower the scale to 1.0 in your vehicles script.

You will then see that the shape is there but your vehicle was exported with an incorrect orientation so it is sitting on it's side.

now it's like this :(

20180829191413_1.jpg

Link to comment
Share on other sites

27 minutes ago, Harra said:

now it's like this :(

20180829191413_1.jpg

 

Yeah like I said it looks as if it has been exported with incorrect orientations, im not a modeller but my guess is it needs rotated 90 degrees on both its x and z axis (or y and z etc) before being exported, try exporting with different orientations until you get it right.

You will then need to play around with the values in the vehicles script file such as the extents and offsets etc to match your vehicle, the best way to get this right is by looking at values of similar size vehicles and testing until it feels right.

 

And in regards to your vehicle mask, I would stick to using correct (or at least as close to correct as possible) shapes.

Link to comment
Share on other sites

22 minutes ago, RingoD123 said:

 

Yeah like I said it looks as if it has been exported with incorrect orientations, im not a modeller but my guess is it needs rotated 90 degrees on both its x and z axis before being exported, try exporting with different orientations until you get it right.

You will then need to play around with the values in the vehicles script file such as the extents and offsets etc to match your vehicle, the best way to get this right is by looking at values of similar size vehicles and testing until it feels right.

I've tried many orientations now and none are facing correctly. I'll have to leave it for a bit. Any other tips will help. For now, i'll leave it.

Link to comment
Share on other sites

9 minutes ago, Harra said:

I've tried many orientations now and none are facing correctly. I'll have to leave it for a bit. Any other tips will help. For now, i'll leave it.

No worries, when you try again make sure you are Applying your Transformations for rotation ( https://docs.blender.org/manual/en/dev/editors/3dview/object/editing/transform/clear_apply.html ) after making your changes and before exporting your model.

Link to comment
Share on other sites

Hey Harra, some more details on what RingoD said about the orientation. In blender, the model needs to be facing upward along the z access. The roof should be facing the positive direction of the y access and the bottom should be facing the negative direction (of the y access). I snapped a quick pic to show ya.

 

image.png.585f45b180e1a173d590c34b1c490e5b.png

 

I haven't messed with the scaling in the script in a while, but I think it changes the size of the tires, too, so it's probably better to resize it in blender. What I do is import one of the vanilla vehicles into blender alongside my model, resize mine, then export it. Try to place it as close to the center, too, it'll make getting the extents and stuff a lot easier. Definitely import one of the models to check it, man. It'll help with the orientation too. Good luck, dude!

Link to comment
Share on other sites

I dragged testing file testObject.ply onto the PZ_PLYtoPZconverter.exe
Then the following is my output:
Bigger window:
"Unhandled exception: System.FormanException: The input string had the wrong format.
 in System.Number.ParseSingle(lablabla)
 in PZ_PLYtoPZconverter.Program.Main(String[] args)"
Lesser window:
"Program doesn't work
Something led to crashing. asf."
image.thumb.png.8ee98c93286e0c14e540abe8e65640c6.png

Link to comment
Share on other sites

7 hours ago, FilibusterRhymes said:

Hey Harra, some more details on what RingoD said about the orientation. In blender, the model needs to be facing upward along the z access. The roof should be facing the positive direction of the y access and the bottom should be facing the negative direction (of the y access). I snapped a quick pic to show ya.

 

image.png.585f45b180e1a173d590c34b1c490e5b.png

 

I haven't messed with the scaling in the script in a while, but I think it changes the size of the tires, too, so it's probably better to resize it in blender. What I do is import one of the vanilla vehicles into blender alongside my model, resize mine, then export it. Try to place it as close to the center, too, it'll make getting the extents and stuff a lot easier. Definitely import one of the models to check it, man. It'll help with the orientation too. Good luck, dude!

I'll have to try that! Thanks!

Link to comment
Share on other sites

2 minutes ago, Harra said:

Are my textures okay by the way? I'm wondering if that makes a difference?

Hard to tell until your vehicle is oriented correctly, but they look ok, probably want to fix your vehicle mask though to be as close to the proper shapes as possible or you will most likely get some wierd overlapping/wrapping in places.

Once your vehicle is oriented like it should be it'll be a lot easier to tell what (if anything) you need to change on your shell texture and/or mask.

Link to comment
Share on other sites

3 minutes ago, RingoD123 said:

Hard to tell until your vehicle is oriented correctly, but they look ok, probably want to fix your vehicle mask though to be as close to the proper shapes as possible or you will most likely get some wierd overlapping/wrapping in places.

Once your vehicle is oriented like it should be it'll be a lot easier to tell what (if anything) you need to change on your shell texture and/or mask.

I've followed your apply step and did the orientation that another user suggested and got this: the shape is probably most distinguishable here aha...

20180830150854_1.jpg

Link to comment
Share on other sites

3 minutes ago, Harra said:

I've followed your apply step and did the orientation that another user suggested and got this: the shape is probably most distinguishable here aha...

20180830150854_1.jpg

As you can see from your picture your orientation is still incorrect, you need to try different orientations and apply them until your vehicle is the correct orientation in game, no point changing texture or anything else until you have this bit working properly.

 

And as Filibuster said, you probably want to edit your models scale so you dont neet to change the scale in script which will shrink your wheels.

Link to comment
Share on other sites

1 hour ago, ZaBrat said:

I dragged testing file testObject.ply onto the PZ_PLYtoPZconverter.exe
Then the following is my output:
Bigger window:
"Unhandled exception: System.FormanException: The input string had the wrong format.
 in System.Number.ParseSingle(lablabla)
 in PZ_PLYtoPZconverter.Program.Main(String[] args)"
Lesser window:
"Program doesn't work
Something led to crashing. asf."
image.thumb.png.8ee98c93286e0c14e540abe8e65640c6.png

Plz, help

Link to comment
Share on other sites

14 minutes ago, RingoD123 said:

As you can see from your picture your orientation is still incorrect, you need to try different orientations and apply them until your vehicle is the correct orientation in game, no point changing texture or anything else until you have this bit working properly.

I have the correct orientation it looks like, whats next? Also, the GUI and keys have weird names for some reason, i assume that's easy to fix?

20180830152735_1.jpg

Link to comment
Share on other sites

7 minutes ago, Harra said:

I have the correct orientation it looks like, whats next? Also, the GUI and keys have weird names for some reason, i assume that's easy to fix?

20180830152735_1.jpg

Once you have your correct orientation you will then need to edit your shell texture and or mask to get your texture applied to the correct parts.

I will say though that that orientation still looks off to me, unless the right side of your vehicle has a different shape to the left, as for the gui names, dont worry about that just yet.

Link to comment
Share on other sites

1 minute ago, RingoD123 said:

Once you have your correct orientation you will then need to edit your shell texture and or mask to get your texture applied to the correct parts.

Okay, the mask is definitely the culprit, i definitely shoulve taken some time with it instead of using the rectangle selection tool ahaha

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
×
×
  • Create New...