Well, Happy New Year to everyone!
Looks like I'm spending my time home on this new year's eve, thanks to my busy-ex girfriend and my non-existing current girlfriend.![]()
Not to mention, the weather sucks outside, plus I don't feel like going anywhere. I think i'm just gonna have a few beers and since this year was one of my worst, I'll go watch the twilight zone marathon for the rest of the night.........after I show you something interesting.![]()
Well, where should I start with this off-topic intro, let's just jump straight at the project I have been working on a few hours now.
I'm kinda suprised, that no one really noticed (cared) about how easy it is to change the vegetation on the battlefield.
Let's open the descr_vegetation.txt:
let's just ignore the top lines and go here:
etc, etc.Code:; medi tree v1 model medi_tree_01 { level models_vegetation/medi_tree_v1.cas } ; medi tree v1 winter model medi_tree_01_winter { level models_vegetation/medi_tree_v1_winter.cas } ; medi tree v2 model medi_tree_02 { level models_vegetation/medi_tree_v2.cas }
Those lines describe the battlefield trees, appointing to a .cas file and giving them a name (ex:model medi_tree_01_winter), which will be used to generate the trees/rocks on the battlefield.
Let's see the next entries:
If you'd compare this to your entries, you'd notice that mine is different. I already added some extra rocks and put the "super_tree" (big pine tree) into the default_forest, which is what you see most of the time on the battlefield.Code:; Defaults vegetation default_forest { layout 384 forest_layout.tga radius 2 height_range 0.4 0.8 aspect_range 0.7 1.3 lod trees model medi_tree_01 model medi_tree_02 model rd_rock_01 model super_tree } vegetation default_forest_winter { layout 384 forest_layout.tga radius 2 height_range 0.4 0.8 aspect_range 0.7 1.3 lod trees model medi_tree_01_winter model medi_tree_02_winter model super_tree_winter }
Now, how does this work?
see this line first:
---Which means, that doing any editing to this file will not effect your game for now.; This file contains the vegetation definitions; it gets parsed on application
; startup but is not otherwise referred to.
What you have to do is, similar to the map generation process.
- There is a descr_vegetation.dat file, which is present in your data folder.
You need to delete this, or better, save it somewhere, because - from my experience - new vegetation generation (lol) not always work.
So once you would get rid of the .dat file, upon the start of RTW, the engine re-generates a new .dat file from the .txt file you just edited.
After the game starts, your 3D battlefield looks messed up, but no worries.
Exit the game and re-enter and your newly generated vegetation is ready (if you didn't CTD somewhere).
Problems:
You cannot enter too many tree/rock variants. The conical pine trees are broken, and they aren't included in any of the climates, because the .cas files are messed up.
On my version (that chunk of codes above) , I have large pine trees mixed with smallers trees and more rocks all around the battlefield.
What else can we do with this vegetation text file?
How about controlling the density of the trees ?
see this line:
It refers to this:So, 512 means one tile of the image is 512 metres across,
; and the density can be reduced by increasing the size.
(example)\
So, that means is 384 metres for one tile. The larger the number, the larger the distance between the trees, reducing the density. Smaller number yields a denser forest, the closer the trees are to each other.Code:vegetation default_forest_winter { layout 384 forest_layout.tga etc, etc.
So as you change that number to a higher or lower, you can control the trees' (or rocks or shrubs) density on the battlefield.
pretty straightforward for that one. Basically tells you what size the trees are in a given range. Changing those numbers (example: 0.5 - 1.5) would make the trees' size range from 0.5 to 1.5, giving a larger variety in sizes.Code:height_range 0.8 1.2
So what can we do with this "vegetation" controlling text file?
Yeah, generate new looking terrains for once, changing the variety of trees shown on the battlefield and adding new ones, which I haven't figured out how.
I'll be working on this aspect and see how fare it can go with this. ...![]()
I hope I was helpful here,
Good night and Good luck!




Reply With Quote











