Jump to content
Sign in to follow this  
waffendennis

Custom roads

Recommended Posts

Well i have some Custom roads in-game and they work but!

The AI's dont use the Roads like the BIS roads and i have the Pathway LOD and thats placed good so can any 1 help me how to let it work in the cpp?

Share this post


Link to post
Share on other sites

U can try this;-

1. create face and texture in 0.00 lod

2. go to vertex properties and select 'on surface'

3. name the face 'road'

4. ignore geometry lod.

5. copy and paste 0.00lod onto roadway lod.

6. use cfg vehicle static object.

7. at the end after closing with the }; for cfgvehicle, add in another config - cfgsurface.

8. copy the cfg from BIS official cfg.

9. add in one more line - selection = road.

10. with that cfg, u should be able to hear sound when soldiers run on the road ingame.

ps. remember to keep size of road 64m - 80m

hope it helps.

Share this post


Link to post
Share on other sites
Guest

It's probably worth mentioning that all the sections of road that BIS made have four memory points (Memory LOD). there is one one each corner. From the Top view they are:

Top Left = LE

Top Right = PE

Bottom Left = LB

Bottom Right = PB

Also since Version 1.43 (6?) you can't get an addon to patch/modify the cfgSurfaces section of the config, so I would recommend naming your p3d file asfaltka*, silnice* or cesta* to take advantage of the existing cfgSurfaces (and whatever is buried away in the core of the game to do with those names....)

smile_o.gif

Share this post


Link to post
Share on other sites
phil and Leone had already explain everything about this crazy_o.gif

Well sorry, I can read the above, but I couldn't manage to get it working. So my (in my eyes reasonable) question is for a config.cpp for custom roads (I searched the forum and OPFEC, but didn't found anything appropriate).

Hope I didn't annoy you too much nosferatus mad_o.gif

Share this post


Link to post
Share on other sites

wow_o.gif why would you have any config for a road?You dont need one if you want to set in wrp-tool or visitor!And placing roads in the editor isnt very good i think.

What you need for a road is:

1. a resolution lod

2. a memory lod (with the points and selections named by leone)

3.a roadway lod(if you texture it with silnice or cesta texture to definie the roughness)

best thing is to take a BIS road,retexture it, binarize the model and place it with wrp-tool or visitor.After that you should get something like this:

bbstreet.jpg

Share this post


Link to post
Share on other sites

You may need a named selection, here's how to do it if you haven't already:

1)Load Oxygen

2)Make sure you are editing the resolution lod (ex: 0.000)

3)Left-click: Window->Named Selections, a box should now appear

4)Right-click in the box, and select "new"

5)In the name selection, type "class"

6)In the value selection, type "road"

Share this post


Link to post
Share on other sites

i have a question related to road detection...hope u dont mind i ask it here. i would like to know how can i make my addon detect the ground texture. i'll explain why... i'm making a snowboard, with a class motorcycle. so when it hits the road it goes 100km/h... totally nonsense crazy_o.gif . so what i need to know is how does an addon identify roads... my idea is making a script that searchs every 3seconds, what kind of ground its stepping.

if its snow ,no changes, then quit script...

if its road then engine=off or fuel=0.

so i need to know the exact name roads selection have on islands. or the usual name road textures uses...

hope u can understand and help me on this.

Share this post


Link to post
Share on other sites

Roads are in fact p3d models with textures applied.

There are many different road models and also many different textures for each.

I'm not sure you would be able to detect when you hit a road surface, maybe someone else knows different.

Planck

Share this post


Link to post
Share on other sites

i was guessing that plank...each island has its own texture names for roads. but there must be a common thing ( named propriertie?) that defines it as a road. otherwise how do vehicles react diferent when then moving on roads? (they go fast). i never unpboed an island, but maybe i'll try it, and maybe found the solution there. meanwhile if anyone now's the answer....

Share this post


Link to post
Share on other sites

Ahhhhhh.....named properties....

Roads have a least one:

class road

Planck

Share this post


Link to post
Share on other sites
Guest

From the main config.bin:

Quote[/b] ]class CfgSurfaces

{

class Default

{

access=2;

files="default";

rough=0.050000;

dust=5.000000;

soundEnviron="normalExt";

};

class Roadway

{

access=2;

files="silnice*";

rough=0.000001;

dust=1.000000;

soundEnviron="gravel";

};

etc...

}

The different speeds you are getting are because roadways have a rough value of zero (or close enough to...). As you can see default is much higher. smile_o.gif

Share this post


Link to post
Share on other sites

Does this mean that I can modify the cfgSurfaces section? Or are you just showing what the values are? So can I make my own roads and call them whatever I like or do I need to use the OFP names to get all the effects?

Share this post


Link to post
Share on other sites
Guest

cfgSurfaces section can't be added to or modified by an add-on (that's an anti-cheat measure). But if you are making a mod you can of course change it with a new main config.

Just posted it because someone asked about how vehicles know they are on roads and why they go faster.

Share this post


Link to post
Share on other sites
cfgSurfaces section can't be added to or modified by an add-on (that's an anti-cheat measure). But if you are making a mod you can of course change it with a new main config.

Now I must confess my ignorance. Do you mean by adding it into a config.cpp in the mod or by making a new config.bin in BIN? If you have to make a new config in BIN is that why people recomend reusing the old names? Are there other properties like this for roads I can't reach?

Share this post


Link to post
Share on other sites

I did some more checking and in config.bin under CfgSurfaces it mentions silnice* (as default), aslfalt* and cesta*. Even under the Res config.bin it does not mention the new roads asf, ces, and sil. Does this mean that it does not know about them or are they defined somewhere else?

How much leeway does the '*' give me? Can I have roads called silnice9m, silnice10m, ...? Or do I hit another limit somewhere?

What I want to do is create some more different types of roads, and have larger radii. This would be useful for real maps where the existing roads are to restricted.

Share this post


Link to post
Share on other sites

The cfgsurfaces refers to the texture names and that texture has to be on the model in the roadway lod of the road.

OFP seems to use that roadway lod to work out how to treat the surface, its how you can make decks with a metalic walking sounds using plechprolis (spelling likey off) in the roadway lod.

With my North Devon Terrain I have already trebled the number of road sections available including some at 5degree and 2 degree turns, further turns at increased and decreased radius, and shorter sections The visual lods have different textures more suitable for the location but the roadway lods still use silnice as it produces the right affect.

I dont believe the name matters as logn as your happy with it

Share this post


Link to post
Share on other sites

I am still a little confused. I thought cfgSurfaces seemed to refer to the actual road file names, but I see that the roadway lods of the silnice and sil roads contain a silnice component. But the asfaltka and asf roads don't have an asfaltka component in their roadway lod. Very strange.

I have also planned to do some more Swedish looking roads and was going to give them "better" names.

I liked the pictures of new terrain, but some of the older links are dead.

Share this post


Link to post
Share on other sites

I am currently in the middle of a server shift 50% complete, if the links has .co.uk in it you can change that bit to .net and it should work.

Only thing to mention is the new roads have not made it to screen yet..

Share this post


Link to post
Share on other sites
Guest

the changes would go in this file:

Quote[/b] ]X:\Program Files\Codemasters\OperationFlashpoint\MOD_NAME\Bin\config.cpp

As CBFASI points out, it refers to the texture, not the model name, though to be honest it's been so long since I played with this stuff I couldn't tell you if that's 100% right. But I trust him ;)

Just play around, see what works, what doesn't. A smart person will probably figure it out. ;)

Share this post


Link to post
Share on other sites

Hi all, I need help. I've retextured some of the road(res) sections and can see them ok in the game, but they are not showing up on the map as roads, is this a config related problem? I've also noticed I can move them around in buldozer, you can't do that with the original BIS roads. mad_o.gif

gcs00046ds.th.jpg

As you can see I've also got texture problems on some sections crazy_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×