Disgrntld said:Looks really good, Swyter!
One small issue, though. From my understanding, the terrain code defines a procedurally-generated base terrain, call it A. The SCO file contains the modification terrain, B, that when added to A produces the final terrain, C. So, C = A + B.
With scoWriter, we can modify B. However, we want our heightmap to define C. Well that sounds simple enough to fix, we think. We'll just subtract A from the heightmap before we dump it in (B = heightmap - A && C = A + B => C = heightmap). Alas, that's the rub. We don't have A. It's generated by code we're not privy to. This mean that there will be small undulations in C.
I did think of a way around that, though. We use the Mount&Blade editor to flatten our terrain. These terrain modifications are stored in B, and the end result is B = -A. Then, instead of overwriting B with our heightmap, we _add_ our heightmap to the existing B (B = -A + heightmap && C = A + B => C = heightmap).
Basically, I think you should add the heightmap to existing B so people can feed in pre-flattened SCOs.
Thanks mate. Yours is the inspiration and a good part of the implementation.
I think that the terrain generator just uses some kind of perlin noise with the seeds provided, surely cmpxchg8b can help us with that one.
But what you're saying can be already done using the image editor itself. Photoshop and Gimp have additive and substantive layer modes, that you can use for that. Not only for giving your cousin's photo album a bloom effect.
______
Anyways, altering the terrain key for getting out the hills is trivial. Even more with the online, client-side tool I'm finishing right now:
Code:
http://mbcommands.ollclan.eu/terrain/terrainkey_cleanup.html
Just ensure you're using a HTML5 compatible browser. Firefox still doesn't supports sliders. It's read only at the moment.
If you know how to open the console (F12 + Esc in Chrome) it will show you a complete log of the decrypted key.