Create custom road prefabs?
-
- Posts: 3
- Joined: 05 Mar 2013 00:11
Create custom road prefabs?
I have a question. Is it possible to create custom road prefabs? Do I have to use ZModeler2 and a hex editor to create it?
Re: Create custom road prefabs?
"Custom road prefabs"? Do you mean forks and crossings?
Prefabs consist of a 3D model (PMG and all the other files) plus a file describing all prefab parameters for interaction with "the world", called PDD files (PPD for newer games).
If you are keen on Zmodeler, you could create such models, in theory. But there is no visual PDD editor available. Doing it with a hex editor is not practicable. Even if you had the knowledge, it would be a nightmare to create PDD files from scratch.
Only chance is to make very limited changes to existing prefabs. But only if you exactly know what you are doing. Somewhere there is a tool named pddedit.exe to be found (sorry, no link), to change PDD sections into human-readable stuff, and back. But be warned: even this tool affords detailed knowledge of PDD internals.
Prefabs consist of a 3D model (PMG and all the other files) plus a file describing all prefab parameters for interaction with "the world", called PDD files (PPD for newer games).
If you are keen on Zmodeler, you could create such models, in theory. But there is no visual PDD editor available. Doing it with a hex editor is not practicable. Even if you had the knowledge, it would be a nightmare to create PDD files from scratch.
Only chance is to make very limited changes to existing prefabs. But only if you exactly know what you are doing. Somewhere there is a tool named pddedit.exe to be found (sorry, no link), to change PDD sections into human-readable stuff, and back. But be warned: even this tool affords detailed knowledge of PDD internals.
-
- Posts: 3
- Joined: 05 Mar 2013 00:11
Re: Create custom road prefabs?
Okay, when the prefab is imported into ZModeler2, I get a few parse errors in .mat files. When exported, and started the game, the textures are messed up for some reason.
Re: Create custom road prefabs?
Not for "some reason". The problem starts with " few parse errors in .mat files". Zmodeler is tested with vehicles only, the syntax of some material files for other models may slightly differ. Which means you have to learn and understand all of it, fix those buggers before final import, and re-apply some of that changes after export.MiddletonCounty wrote:Okay, when the prefab is imported into ZModeler2, I get a few parse errors in .mat files. When exported, and started the game, the textures are messed up for some reason.
If you want to learn some Zmodeler, fine, go ahead. Lot to learn, it isn't exactly the casual way.
But again, if your target is "creating prefabs", you are probably lost. This is not a task for beginners, but of course I don't know your technical background.
Cannot help you with Haulin, sorry, my experience is limited to ETS1, which is very different. But learning Zmodeler is 95% self-reliant anyway, searching, thinking, trial/error. Good luck.
- bang-setia
- Posts: 52
- Joined: 15 Jun 2013 15:23
- Location: indonesia
- Contact:
Re: Create custom road prefabs?
pddedit
- Attachments
-
[The extension rar has been deactivated and can no longer be displayed.]
-
- Posts: 19
- Joined: 20 Nov 2013 23:06
Re: Create custom road prefabs?
Yes, it is possible with the tool suggested above and blender(for finding vertex coords).
The PDD use's the coordinates from the Model's Origin.
If you open \def\world\roads.def and take the "City2" road for example.
You will notice that both lanes(left/right) are 4.5(meters).
So if we want to create a square out of this we would say
4.5m(left) + 4.5m(right) = 9.0m Width + 9.0m length = 9.0m sq
Open blender and make sure you are using the "Metric" units.
From top view(making sure the cursor is centered), Create a plane. With it selected in object mode, hit "N" on
your keyboard, this will bring up the properties panel.
Under "Diemensions" add the values 9.0m for the height, and 9.0m for the width
giving you 9.0m sq
X => 9.0m
Y => 9.0m
Z => 0.0m
Next add an edge loop directly down the center, this will leave you with two faces(both 4.5m in width).
To get the center of both lanes(to create the AI lines) its simple subdivision 4.5m / 2
left lane center : -2.25m
right lane center : 2.25m
We have enough information now to run a test.
Important Note: Where you offset the model from the Origin is crucial.
if you followed the steps, then the Origin should be in the center of the model. However you may want to move it for any number of reasons.
As the model currently is, when we go to create our nodes(green&red) our starting point will be from the center, so node[0] will be positioned at -4.5m on the Y axis, and Node[1] will be positioned at 4.5 on the Y axis, make sense ?
You now know your diemensions, so creating lines will work the same way.
Starting from the Origin, line[0] we need the AI to travel down the center of our 4.5m road, so our x axis is -2.25m, line[1] again from the center would be 2.25m
Any questions feel free to ask!
The PDD use's the coordinates from the Model's Origin.
If you open \def\world\roads.def and take the "City2" road for example.
You will notice that both lanes(left/right) are 4.5(meters).
So if we want to create a square out of this we would say
4.5m(left) + 4.5m(right) = 9.0m Width + 9.0m length = 9.0m sq
Open blender and make sure you are using the "Metric" units.
From top view(making sure the cursor is centered), Create a plane. With it selected in object mode, hit "N" on
your keyboard, this will bring up the properties panel.
Under "Diemensions" add the values 9.0m for the height, and 9.0m for the width
giving you 9.0m sq
X => 9.0m
Y => 9.0m
Z => 0.0m
Next add an edge loop directly down the center, this will leave you with two faces(both 4.5m in width).
To get the center of both lanes(to create the AI lines) its simple subdivision 4.5m / 2
left lane center : -2.25m
right lane center : 2.25m
We have enough information now to run a test.
Important Note: Where you offset the model from the Origin is crucial.
if you followed the steps, then the Origin should be in the center of the model. However you may want to move it for any number of reasons.
As the model currently is, when we go to create our nodes(green&red) our starting point will be from the center, so node[0] will be positioned at -4.5m on the Y axis, and Node[1] will be positioned at 4.5 on the Y axis, make sense ?
You now know your diemensions, so creating lines will work the same way.
Starting from the Origin, line[0] we need the AI to travel down the center of our 4.5m road, so our x axis is -2.25m, line[1] again from the center would be 2.25m
Any questions feel free to ask!
-
- Posts: 3
- Joined: 05 Mar 2013 00:11
Re: Create custom road prefabs?
I have a question. Does the Blender program can open up .pdd files to edit the AI travel lanes?
-
- Posts: 19
- Joined: 20 Nov 2013 23:06
Re: Create custom road prefabs?
No you can't.
You can use blender to work out the Coords you need though, I made a quick image to show you what way it could be used.
[ external image ]
You can use blender to work out the Coords you need though, I made a quick image to show you what way it could be used.
[ external image ]
Re: Create custom road prefabs?
Hydraulics, he's talking of Haulin, at least that's where here posted.
MiddletonCounty, I doubt that Blender will do you any good. Because there is no import/export possible for you, as far as I know. The filter plug-in by 50Keda that people are using here is for ETS 2.
18wos Haulin comes with PMG version 0x10, while ETS 2 (right now) is PMG version 0x13 (was 0x12 till 1.4).
If there is no other plugin-in for Blender I never heard of, the only way to handle such meshes is Zmodeler 2. Or may be ancient Zmodeler 1, I don't know that one.
Zmodeler 3 doesn't support the old stuff, I doubt it will read/write the Haulin PMG files. It will for sure not read a Haulin PDD, only the new PPD format.
So only way left is to fumble with an old Zmodeler, a hex editor, a calculator perhaps and pddedit. I've done so for ETS1, years ago, and it was no real fun. And I never created prefabs that way, just copied and changed some existing in a modest way.
MiddletonCounty, I doubt that Blender will do you any good. Because there is no import/export possible for you, as far as I know. The filter plug-in by 50Keda that people are using here is for ETS 2.
18wos Haulin comes with PMG version 0x10, while ETS 2 (right now) is PMG version 0x13 (was 0x12 till 1.4).
If there is no other plugin-in for Blender I never heard of, the only way to handle such meshes is Zmodeler 2. Or may be ancient Zmodeler 1, I don't know that one.
Zmodeler 3 doesn't support the old stuff, I doubt it will read/write the Haulin PMG files. It will for sure not read a Haulin PDD, only the new PPD format.
So only way left is to fumble with an old Zmodeler, a hex editor, a calculator perhaps and pddedit. I've done so for ETS1, years ago, and it was no real fun. And I never created prefabs that way, just copied and changed some existing in a modest way.
Who is online
Users browsing this forum: No registered users and 6 guests