• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Modding storm engine sea parameters?

HawkerT

Sailor Apprentice
Storm Modder
Ahoy there mateys ... tis me first post at them here fine boards ... arrrrgh <img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />

First of all let me start by praising all the fine contributors lining up for some serious AOP modding.
Thank you to Cyberops for the wonderful supermod which is currently my mod of choice for AOP, excellent work!

Now to the beef ...

I really like the sea visuals of the storm engine however I would like it to fill more of my horizon. Let me try to explain ... and as they say ... a picture is worth more than a thousand words!

<img src="http://www.cmoc.dk/aopsea.jpg" border="0" alt="IPB Image" />

Now ... my current setting for the FarClipPlane parameter in engine.ini is 8000 but the issue is the same for the default 4000 (albeit a bit less) - The area of the sea around the ship on which the weather (waves) is applied or 'realized' as Akella call it in the script files, is only approximately 1000. This has an apparent visual effect on the sea i.e. the splitting of the sea as can be seen in the picture above, but also the effect of 'hiding' the hull of ships outside this 1000 mark which looks a bit cheasy even if one imagines that the earth curvature can hide ship hulls already at 1000 meters <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

So basically I would like to apply (or realize) the weather out to maybe 3000-4000 before seeing 'sea2' even though it will surely have an impact on framerates.

I <i>think</i> (hurt my head doing that) I have found the correct spot for tweaking the above, namely the WhrSea.C file. It contains the following parameters applied for various situations (based on player location sea, land etc.). The below extract I beleive is the one applied in the picture above.

Sea.LodScale = 8.0;
Sea.MaxVertices = 2000;
Sea.MaxIndices = 2600;
Sea.MaxWaveDistance = 1000.0;
Sea.MaxDim = 65536;
Sea.MinDim = 64;
Sea.GridStep = GridStepPC;

fMaxSeaHeight = 5.0;

Sea.Sea2.LodScale = 2.0;
Sea.Sea2.GridStep = 0.15;

I have tried tinkering with the more obvious of the parameters above but without anything working as in being actually applied! So my questions are:

1) Can the above be modded simply by fiddling with the parameters shown?
2) If so then what should I change?
3) If not then can it be done some other way? How?
4) I suspect it is all compiled into the WEATHER.dll and that it can only be changed via the source code and a recompile ... right?

I hope that I am not talking in shadows, making a fool of myself, and that some kind soul actually knows about the above.

Nirvana would of course be to have it all worked out and applied in the SuperMod via a selectable value during startup.

All the best
Frans
 
Well, I'd say you are on the right track, HookerT. The best bet would be to fiddle with the settings, keep a log of what you see different visually. Document it all and post here for everyone to learn from your findings.

Oh, and remember to start a new game once you have edited the the files. Loading from a saved game actually loads all the settings from that save state, and doesn't take into account any changes to the startup files.

Welcome to the crew and enjoy your time with us here at Pirates Ahoy!

Cap'n Drow
 
Thank you for the warm welcome Cap's Drow ... it's much appreciated <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

I have been studying the 'over the edge' issue a bit more and it is now obvious that a very real edge exists between the two parts of the 3D sea. So much so, that if you look closely when on the 3D sea with other ships, the other ships will quite literaly slide on and off the edge tilting either their heck or their bow 45 degrees into the air depending on direction of travel. My favorite is when enemies with good wind from astern speeds towards you from sea 2 onto sea 1, they will almost show the full buttom of the hull literally flying onto sea 1 ... surf's up Dude! This is apparant in all other wave conditions than completely calm sea.

I have tried to visualize the above with a drawing. I had my 6 year old son draw up a schematic ... or was it me? I forgot! <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" /> ... anyway here goes

<img src="http://www.cmoc.dk/aoplos.jpg" border="0" alt="IPB Image" />

As can hopefully be seen from the schematic ship 1 will have full LOS to ship 3's hull only when ship 3 has sailed far enough from the 'mighty edge of the world'. Sip 1 will only be able to see ship 2's mast, sail and riggings just after it has skidded of the edge.

Now, being a purebred Dane, and thus sporting gallons of viking blod, I can certainly appreciate the fact that the world is flat and that sailing over the edge is dangerous, but this being in another day and age ... well it just does not fell right!

Anyway! I have been trying hard to get the sea variables in the WhrSea.C file to solve the 'over the edge' issue. More spcifically I would like to move the edge further away ... at least out of possible engagement ranges ... and the farther the better with an eye to minimizing the rather cheasy looking (read: immersion killer) surfing the edge fenomenon.

Now, the only variables that seems to react in anyway to changes are the FogDensity and FogSeaDensity variables. But they are really not worth changing. They do however tell me that I have found the right spot and can be used for identifying the 'on land', 'near land' and 'on open sea' set of variables to change.

The 'height' of sea 1 is most likely controlled by the variable fMaxSeaHeight, which thus also controls the possible height of waves in the 3D sea. And the possible variables to control the sea 1 dimensions of the 3D sea are the Sea.MaxWaveDistance, Sea.MaxDim and Sea.MinDim variables. However as stated they do not react to simple changes, so I am not getting it or I am doing something wrong. I might also have to change other bounding sea variables for the changes to be feasible but I have not been able to find such ... BUGGER!

Now if we could only get this stuff reacting we could solve the 'over the edge' stuff but maybe also have rough seas near land and when looking at the sea from land. As it is now the sea is always completely calm in those situations.

I am sorry I was not able to solve it by simple means.

So I guess my next step will be to ask for help again ... here goes nothing ...

Dear Cyberops, if you read this please consider the above little issue when going through the code on your mighty SuperMod endeavour <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />

ARRGGHHHHH ... !!!
 
Interestin' stuff ye be ponderin' upon thar, HawkerT! <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" /> Cain't say anybody on de PotC moddin' bunch e'er seemed tew bring up dis issue, so ye may very quickly become de local expert! <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" /> Go fer it, matey! <img src="style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" />
 
<!--quoteo(post=169491:date=Nov 1 2006, 04:08 AM:name=Fred Bob)--><div class='quotetop'>QUOTE(Fred Bob @ Nov 1 2006, 04:08 AM) [snapback]169491[/snapback]</div><div class='quotemain'><!--quotec-->
... Go fer it, matey! <img src="style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->

Thank you Fred Bob ... I 'went fer it', tried and failed miserably! <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" /> ... the lesson is - never try! <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />

Anyway I am out of ideas. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

I identified the full call stack to the relevant sea parameters in WhrSea.c
<ul><li>InitInterface.c</li><li>Globals.c</li><li>Sea.c.sea_load()</li><li>Sea.c.CreateSeaEnvironment()</li><li>AISea.c.CreateSea()</li><li>AISea.c.MoveSeaToLayers()</li><li>WhrWeather.c.CreateWeather()</li><li>WhrWeather.c.CreateWeatherEnvironment()</li><li>WhrWeather.c.MoveWeatherToLayers()</li><li>WhrSea.c.WhrCreateSeaEnvironment()</li></ul>
It had some promise as some of the parameters are given global values already in Globals.c and some of the variables are defined and bounded already in Sea.c ... but no bloddy dice ... BUGGER!

I am afraid this goes both for the moving the 'surfing the edge' issue further away from eyesight, but also for changing seaheight (waves) when near land to get some rough sea there as well. I am more or less unable to get any positive reaction to value changes except for the two minor variables mentioned in my second post.

I am leaning more and more onto the assumption that the stuff I am trying to change is defined and frozen already when the sea object is instantiated using the CreateEntity(&Sea, "sea") procedure. However I can not find this procedure in the .c files so I assume it is embedded in one of the central dll's.

So my conclusion for now is that the source code and a recompile is needed to take this any further. I am hoping very much that I will be proven wrong by some of the gifted modders around here or that some of the modders with more skill than me can hack the dll's ... anyway I am left with hanging my hat onto that tiny hook for now!

Sorry for opening up this little can of worms and not being able to do anything about it ... <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />

CyberOps and crew ... I am cheering for you! <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />

All the best
Frans
 
Still, I'm pleased to hear you did trace things out pretty well. I would appreciate it if you would compile your findings, maybe comment some of what you figured out and shoot that info over to me as either a message or to an e-mail.

Cap'n Drow
 
Hey never sit down in sorrow, you did the best you could, i to am looking into it whenver i have the time to do so. Im expecting the rebuilding work in my home to be done within 1 week 2 at the most, taking a little longer but nothing i can do about it. Im also awaiting my new PC to come. Anyways, still wanted to say hats of to u for trying.
 
Thank you very much guys ... tis much appreciated <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />

I will try to write up what I know <img src="style_emoticons/<#EMO_DIR#>/type_1.gif" style="vertical-align:middle" emoid=":nk" border="0" alt="type_1.gif" /> and send it to you both. If nothing else it might spark the odd idea or two in your minds which might help a solution appear ... I hope so.

I will try to get it your way in the 'morrow ... <img src="style_emoticons/<#EMO_DIR#>/poet.gif" style="vertical-align:middle" emoid=":hmm" border="0" alt="poet.gif" />

Thank you and all the best
Frans
 
Excellent, you can reach me at lord_drow at hotmail dot com. For your future reference, Frans.

Cap'n Drow

P.S. That goes for anyone else that wants to correspond as well.
 
Okay Gents ... <img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />

PM with link to document should be in your PM inboxes ... please confirm! <img src="style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" />
Wanted to try the PM thingy ... but if it fails I will revert to email.

All the best
Frans
 
Thank you, Frans. Got the message, will peruse and comment as soon as I can.

Thanks again for sharing your research.

Cap'n Drow
 
Back
Top