Results 1 to 10 of 10

Thread: Weather research thread

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Weather research thread

    I have been meaning to get around to this at some time, but I was prompted by Garniers thread about Kingdoms skies to go ahead and start on it. My goal here is a weather type for a fantasy mod like you see in the movies, funky cloud patterns that fly across the sky, rapidly changing weather types, lots of noise and random lightning strikes, totally unpredictable.

    While you cant assign more than one mesh to a pattern, you can create all types of new patterns, so you could basically have two patterns with two totally different meshes that are assigned by random. See Garnier's thread here. Eventually I will also include this in my Ultimate Docudemons.

    I have created one basic weather type called blight that is close to what I want for my fantasy mod, that will be used only on one climate where the Dark One lives. Eventually I will branch this out into 8 or 10 different weather types that rapidly shift during the course of battle, so you never know what you are going to get. If you want to check out the beta version of this then you need to drop the attached weather file into your mod/data folder and start a battle someplace in the unused1 climate. At this point I have not changed any of the vanilla meshes or textures, just matched them up in unique ways, so you only need the one file. Eventually I may try editing the meshes to get some different colors, but first I will work with just the text files. This was all done by editing weather_db.xml.


    Vanilla M2TW Meshes
    skydome.mesh, this is the only one used in the vanilla file
    skydome_night.mesh, unused in vanilla
    skydome_sunset_cloudy.mesh, unused in vanilla
    lightning_test.mesh, this one is pure black, like its name suggests it was probably only used to test how lightning looks without having any other graphics to distract you.

    Vanilla Patterns, you can add as many as you need up to whatever the hardcoded limit is, I havent hit that limit yet
    clear
    clear arid
    clear winter
    rain
    storm
    snow
    blizzard
    custom LF
    cloudy
    cloudy arid
    dusty
    cloudy winter
    light fog
    light fog winter
    heavy fog
    heavy fog winter
    france custom

    Vanilla Audio Types, you can change these by editing the mp3s and recompiling using the sound text files
    calm
    rain
    storm
    snow
    blizzard
    breezes
    gales
    wind

    Vanilla Period IDs, I dont think these can be changed, and are randomly assigned when the battle starts
    sunrise
    morning
    midday
    afternoon
    sunset
    night

    Vanilla Precipitations Types, havent figured out how to change these yet
    none
    rain
    snow
    dust

    Vanilla Precipitation Levels, havent figured out how to change these yet
    dry
    drizzle
    light
    heavy
    torrential

    Vanilla Wind Types, havent figured out how to change these yet
    wind
    breezes
    gusts
    gales

    Underneath the skydome_mesh there are two layers of clouds, a high layer and a low layer and a speed setting that controls how fast they move across the screen. The vanilla files use the same cloud types for both upper and lower. In my beta version I have used two different cloud types and set the X speed of one really fast, and the Y speed of the other really fast. The upper clouds fly across the screen in one direction, the lower clouds fly across the screen in the other direction. Screenshots dont do it justice you have to see it in action to appreciate it.

    <cloud id="high" texture="globallighting/cloudtile_sunset_cloudy.texture" speed_x="0.75" speed_y="0.0"/>
    <cloud id="low" texture="globallighting/cloudtile_stormy.texture" speed_x="0.004" speed_y="0.75"/>


    Event ID, used to change weather patterns during battle
    duration="90" transition="30" This is in seconds.

    fog min="-50" max="2000", min can be 0, max unkown, this seems to be distance in visibility

    bloom red="255" green="255" blue="255" select="15" intensity="150"
    Colors are obvious, have no idea what select and intensity do, I havent played with them yet.

    lighting data basically effects how much daylight is in the battle map, how bright things are. Be warned, some lighting types dont work right with some skydome_meshes, I loaded one up earlier and everything except the sky was completely red, ground, units, weapons, mounts, everything.

    phase1, phase 2, etc. I have taken it up to 8 phases on a single weather pattern.
    Last edited by GrnEyedDvl; November 09, 2007 at 07:48 PM. Reason: Added info

  2. #2
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Weather research thread

    Updated

  3. #3
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Weather research thread

    Updated

  4. #4
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: Weather research thread

    Vanilla Patterns, you can add as many as you need up to whatever the hardcoded limit is, I havent hit that limit yet
    I seem to be having a small problem with this. Do you have yours working for the location generated custom battles?

    I've added a new pattern which works fine to the extent that I can use it for the scenario battles by putting it as the weather type in the descr_battle.txt
    I can also change the types of weather assigned to each climate around and vary proportions in the weather_db.xml file. And also add my new weather pattern to a climate and it shows up fine in campaign map battles.

    But when I try and play custom battle that is in climate that has my new pattern (or even re-named old pattern, which I tried as test) it crashes with unspecified error as soon as I try and select the battle title from the CB screen.

    Any ideas? Is there anywhere else new pattern ID name would need to go???



    EDIT: aarggh nevermind - asking question made it click what problem was. Custom battle screen lists the actual available weather types for M2 climates (or tries to) - so it needed entry in expanded.txt - for new named pattern
    <pattern id="south average" audio_type="calm">
    you need entry in expanded.txt (converted from the strings bin file)
    {EMT_WEATHER_PATTERN_SOUTH_AVERAGE}Normal
    or similar.....

  5. #5
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Weather research thread

    I never tried it with custom battles, but glad you figured it out

    If I ever get around to creating custom battle locations I will definitely use the new patterns I made. This is one of the many things on the back burner for now though lol I havent finished my map yet, its about 75%. Too often I am working on one thing and have an idea about another, so I have probably 30 things going at once.

  6. #6
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: Weather research thread

    If you go back to work on weather you should set up custom battles just by adding new location (in whichever climate) to custom_locations.txt - having finally got that working I found its much better to test with than RTW, which had a somewhat random approach to what weather and time of day you were actually going to get. If you make new weather pattern you can actually specifically select it in the CB screen (hence my text problem) and select the time of day which corresponds to db file entry as well, makes it loads easier to see your effect in action.


    Having got that far I've been having fiddle with the lighting files to try and find the fog colour - mismatch of fog with certain skies was annoying me.

    If you look at Muizer's battlemap tutorial for details of a possible hex editor and way to set it up. Open the a lighting file in hex editor

    the four 'numbers' after the file name are BGR values in bite format followed by 255 which might be something to do with density.

    experiment with red fog

    what I was actually trying to do - get a slightly more co-ordinated fade off in distance colour

  7. #7
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Weather research thread

    I never thought about changing the fog colors. I did read through Muizers post before I messed with anything, but it was far more involved than I wanted to get at the time.

    You can also play with the bloom and intensity numbers to change how the fog looks. I think the bloom numbers change how light reflects off the fog, but I havent changed any of them yet, I was just changing cloud formations and weather patterns.

    I never tried it in RTW, but M2 is pretty easy to figure out what pattern you are going to get on the battlemap as it is all done by random percentages.

  8. #8

    Default Re: Weather research thread

    This is great!! Thanks!! + rep

  9. #9
    The Border Reiver's Avatar Artifex
    Patrician

    Join Date
    Feb 2006
    Location
    Australia
    Posts
    3,703

    Default Re: Weather research thread

    Well I'm glad this thread was rediscovered! Has anyone read a thread or worked out which files needs to be altered to make nights darker?

  10. #10
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Weather research thread

    Wow maka, that is some excellent looking fog. I'll try to find ways to incorporate it into our mod, hopefully others do too.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

Tags for this Thread

Posting Permissions

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