Results 1 to 7 of 7

Thread: ==The Battlefield Vegetation Project ==

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default ==The Battlefield Vegetation Project ==

    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:
    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
    }
    etc, etc.

    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:

    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
    }
    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.

    Now, how does this work?

    see this line first:

    ; This file contains the vegetation definitions; it gets parsed on application
    ; startup but is not otherwise referred to.
    ---Which means, that doing any editing to this file will not effect your game for now.

    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:

    So, 512 means one tile of the image is 512 metres across,
    ; and the density can be reduced by increasing the size.
    It refers to this:
    (example)\

    Code:
    vegetation default_forest_winter
    {
        layout 384 forest_layout.tga
       etc, etc.
    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.

    So as you change that number to a higher or lower, you can control the trees' (or rocks or shrubs) density on the battlefield.
    Code:
    height_range 0.8 1.2
    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.

    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!

  2. #2

    Default

    well, my veggie-generation worked and some trees were added to make some variety.

    The other factor I was checking out was the grass. It is very easy to modify the length/density/thickness of the grass by changing the values in the descr_grass.txt .

    Here some pictures with some extra trees around, + cleared out some previously forested areas to have more space to fight and changed the length of the grass.

    now the arcani can really hide in the tall grass:




    Notice how it switches from short grass to very tall (to the right), kinda giving the effect of a wet area, notice the additional trees mixed in:




    made the grass longer here too... (mediterranian)

  3. #3
    Pent uP Rage's Avatar Tech *********
    Join Date
    Oct 2004
    Location
    Las Vegas
    Posts
    1,842

    Default

    That's pretty sweet. Would there be any way to trigger the longer grass to be shorter as an army marches over it? Like say, trampled grass?
    If not, that's a pretty nice mod either way.

    Also, what kind of fps hit(if any) did you see? I notice I lose a few frames when I turn grass on.

    under the patronage of Emperor Dimitricus, son of the Black Prince
    Before you post, see if your question has already been answered
    here

  4. #4
    plasticfigurine's Avatar Ducenarius
    Join Date
    Aug 2004
    Location
    Harrisonburg, VA, US
    Posts
    905

    Default

    Question...What height did you have the grass in the pic with the arcani?
    Last edited by plasticfigurine; January 02, 2006 at 05:00 AM.

  5. #5
    Average British Student
    Join Date
    Mar 2005
    Location
    England
    Posts
    2,908

    Default

    Quote Originally Posted by Pent uP Rage
    That's pretty sweet. Would there be any way to trigger the longer grass to be shorter as an army marches over it? Like say, trampled grass?
    If not, that's a pretty nice mod either way.

    Also, what kind of fps hit(if any) did you see? I notice I lose a few frames when I turn grass on.
    FPS hit not that bad,

    Archer I knew you could change grass length and thickness but never tried descr_vegetation.txt looks good might try edit descr_vegetation.txt tonight

  6. #6

    Default

    Quote Originally Posted by Pent uP Rage
    Would there be any way to trigger the longer grass to be shorter as an army marches over it? Like say, trampled grass?

    I think, there is a way...grass is being *trampeled* by elephants and chariots (light troops can no more hide in the trampeled gras). But if you gave the normal soldiers the ability to trample the gras there wouldn't be any gras left after 5 minutes...also the light troops would trample the gras, they want to hide in

    EDIT: i have created a jungle tree now, but when i zoom out it looks like the old "deep forest tree" and the shadows are the old ones, too

    EDIT: Yeah!! it works now!!
    Last edited by Prof; January 03, 2006 at 04:18 PM.
    Prof's Mods (Attila Mods)
    Creator of Polemarchia: Total War
    Under the patronace of Epistolary Richard
    <- Now with Attila screens

  7. #7

    Default Re: ==The Battlefield Vegetation Project ==

    question is density 1 dense grass and 99 sparse grass or is 99 dense grass and 1 sparse grass
    Sorry for my English...

    top 10 favourite mods: RTRVII, RSII, 300WOS, LOTRTW, FATW, HCT, EB, ROP, ARISTEIA, IBFD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •