Mount&Blade Cartographer | Just my own spin-off...

Users who are viewing this thread

Swyter

Grandmaster Knight

__________________________________________________________
/ __ ___ ___ ____ ___ ___ ___ ___ __ ___ ___ \
/ / /_ / /__/ / / / / _ /__/ /__/ /__/ /__/ /__ /__/ /
/ /__ / / / \ / /__/ /__/ / \ / / / / / /__ / \ /
\__________________________________________________________/

[your mount&blade strategic map editor of choice]


About this appl.
----------------

Currently in mature stage, this tiny program allows to position world parties/cities
in real-time and modify the mesh and materials of the map using third party 3D modeling tools.

Originally created for the Star Wars Conquest mod <http://getconquest.net>


The instructions
----------------

I took some time to write a really comprehensive manual for all levels that works like a quick
start guide, including download. Encompassing most of the functions into a clear,
short but sweet, tutorial-esque text that will cover most of
your questions and initial doubts.

It's full of images, and conveniently structured. You can find here:

<https://bitbucket.org/Swyter/cartographer/wiki/Home>


Download it here
----------------

If you just want to jump right into the program knowing what to do, here are the links:

- Latest version:
<https://bitbucket.org/Swyter/cartographer/downloads/swycartographer-2014.05.22.zip>

- Full download archive right here, with all the released versions nicely sorted:
<https://bitbucket.org/Swyter/cartographer/downloads>


Acknowledgements
----------------

It's written in Lua <http://lua.org/> and uses LuaJit as runtime. Providing a
great speed enhancement that equals native C/C++ code.

Loads common image/texture types though a tiny lib called SOIL <http://lonesock.net/soil.html>,
based on stb_image <http://nothings.org/> but with DDS/DXT1-3-5 support.

OpenGL and GLFW FFI bindings are provided by LuJGL <https://github.com/ColonelThirtyTwo/LuJGL>

That's it.


Today tried both of the new map editors and neither the XNA implementation nor the Java one worked for me.
As I'm currently interested in learning OpenGL and programming in Lua is fun, not like any old school heavies I decided to make my very own light implementation of a Mount&Blade Strategic Map loader.


I'm having a fun time optimizing my own code (pretty challenging :razz:) so the map gets parsed and the mesh built in less than 1.763 secs, moreover, having an stable framerate, that's even more than the game itself can say.

Features:
Code:
~ Extremely fast initialization and rendering.
~ Wireframe / Flat shading view.
~ Intuitive and easy to use.
~ Basic WASD + Arrows + Mouse Scroll + Screen Borders camera movement
~ Minimalistic, clean, compatible Lua code.
~ [s]Colored geometry by terrain.[/s]  <- Have to re-implement this one, disappeared due the loader rewrite

To do Tomorrow:
Code:
~ Make the colored terrain to work again.
~ Finish the camera code and zoom.
~ DDS loader. Check if OpenGL extensions works with LuaGL. So I can do GPU DXT1/5 decompression.
~ Make the main code public and editable as independent .lua file.
~ Yet more cleanup.

[i][SIZE=16px][font=georgia]Showcase:[/font][/SIZE][/i]
As always, usability and eye-candy goes first.


Just a quick icon (Click to enlarge):
[IMG]http://i.imgur.com/NI9rg.png[/IMG]


And a screeny:
[IMG]http://i.imgur.com/Jpeca.png[/IMG]

[i][SIZE=16px][font=georgia]Download test platform:[/font][/SIZE][/i]
And the omnipresent download link:
[tt][url=http://www.mediafire.com/?u3zxpq7o4z9tt1d]http://www.mediafire.com/?u3zxpq7o4z9tt1d[/url]

[!] Don't forget that this is an afternoon work so the existing code is pretty tested and stable (worked with every map I've found so far),
but there's very few to see apart from the map geometry itself, due the... pretty early stage, you know.



Let me know if you want further updates with more stuff.
Have fun

--swy
 
Last edited:
Looks awesome!  I was waiting for this!  :smile:  You beat my XNA one.  :razz:  I like the idea of open source! 
 
And here we go! Some more progress...

I had a funny time while doing all the triangular normals code. Also added cute colors and OBJ export. Isn't bad for a couple of hours.
And hey!... Now it looks like Minecraft more than Mount&Blade.  :smile:  What else you want?

xi5qI.png



I'll post a link soon.
 
Wow, soon we'll have more of these than we have mods! ha ha  :razz:  About time some of us worked on this, map variety in Warband is far overdue.  My only regret is that we're all using different languages, so it's harder to collaborate.

Wait - by the way, did you try the recent version of the Java editor?  I haven't gotten any reports of issues with the new engine.
 
Bloodpass said:
Ikaguia said:
nice work switer.
When I first read this I thought it was a kind of scene editor outside of the Game.
Hmm, that might be nice actually!
I've thought about wiritng one, but in the end I decided it'd be too much work for a lazy-ass like me. :lol:
You have to parse the .sco file, generate a scene based on the code from M&B and last, but not least, implement the functions needed to actually edit anything.
 
Yeah, but if you didn't have to deal with the awful memory leaks and the ability for copy and paste, etc... :razz: 
 
Lumos said:
I've thought about wiritng one, but in the end I decided it'd be too much work for a lazy-ass like me. :lol:
You have to parse the .sco file, generate a scene based on the code from M&B and last, but not least, implement the functions needed to actually edit anything.
I don't think we'll ever see external scene editors.
Parsing the SCO file is easy, but generating the basic scene from the code in the same way the engine does... well, good luck with that.
 
cmpxchg8b said:
I don't think we'll ever see external scene editors.
Parsing the SCO file is easy, but generating the basic scene from the code in the same way the engine does... well, good luck with that.

And rendering the strat map (with simple color shading) is easy too.  (This might be good for a "roffle" but just playing around and to learn, I've actually implemented simple rendering of the M&B strat map in 3 different engines prior to the one I'm using now, across 3 different languages/platforms--Flash, Python, Java.)  But Bioxx and I are having a heck of a time imitating the game's rendering of the strat map (I do enjoy the challenge), and it may not be possible to get it exactly the same in every circumstance - however we can still try.

I think the Java implementation (well, it runs off OpenGL) is pretty close other than the lack of shadows (which I still intend to improve on).  So if our progress is any indicator, we could probably get a scene editor "close enough" to the game's appearance for it to be useful, IMO.  I'm not telling anyone what to do (and certainly more editor options is better than fewer) but rather than creating a 3rd implementation of a map editor it might be worthwhile for one of us to give a scene editor a shot... although I've no idea personally what the complications would be, or how such a tool would function.
 
What do we really need from a scene editor though? We don't need perfect rendering: better transforming tools and object placement tools would work just fine.
 
MadocComadrin said:
What do we really need from a scene editor though? We don't need perfect rendering: better transforming tools and object placement tools would work just fine.

Making an external scene editor is pretty impractical, and if you ask me, a bit silly. First of all, when you supply a terrain code, the engine has a noise generator that makes the wavy terrain with the encoded characteristics, over that virgin terrain the SCO is read and acts as diff of vertex height, plus adding props and stuff.

That's a long way that starts by using IDA and taking an eye to the algorithm, trying later to reconstruct it, and implement a BRF and a text loader (using ioBRF lib from mtarini and DevIL for DDS loading). And finally creating a cool renderer that doesn't even supports original shaders. That's like emulating half of the game.

cmpxchg8b is your best bet, he can hook the editor functionalities with the WSE, same that he's currently doing with the opcode pool.
So you can get instance duplication (sprop copy-paste) and so in a short time.

Have fun.
 
Swyter said:
Making an external scene editor is pretty impractical, and if you ask me, a bit silly. First of all, when you supply a terrain code, the engine has a noise generator that makes the wavy terrain with the encoded characteristics, over that virgin terrain the SCO is read and acts as diff of vertex height, plus adding props and stuff.
I know, I learned that much just by poking around the SCO format in notepad++. Also, I think you may be giving the terrain generator too much credit.
 
Awesome, really cool! I have one suggestion, how about at some stage adding an option to make the mesh transparent and add an image plane option? That'd be very handy when creating a mesh from a map.

Good work as usual Swyter, peace.
 
Well, a year182 days later here I am again. Got interested in creating my own mapping tool from the ground up, this time because we needed it for Star Wars Conquest, as individually moving 200 planets while being lore accurate and gameplay savvy isn't that fun.

As I don't want to create a new thread, and the software is called exactly the same, with the difference of not sharing a line of code, I'll just reuse this thingie.

First off, I've been working on it like a week or so. It's pretty fast and completely written in Lua, but not ready for public consumption, yet.

Already does stuff, like previewing with a good navigation system and loading real M&B bitmap fonts.
Loads and saves from/to standard
Code:
Map.txt
files and imports/exports from/to Wavefront OBJ in native and reversed coord systems.

If you've been using the existing toolsets you often find that the model is vertically rotated 90 deg. Well, cartographer already solves that while providing some goodies.

What this is probably going to be doing soon:
+Accurate preview, faceted,  untextured, still pretty rendering.
+Pick, drag and move parties and locations in realtime from the map. Will be saving to
Code:
module_parties.py
only.
+OBJ Exporter and importer so the mesh can be edited with a specific software like Blender, is silly to reinvent the wheel.
+Detect existing Mount&Blade installations and use its resources.
+Lean and easily modifiable

What isn't going to be/ doing:
+Edit the map directly, leveling, tweaks.
+Texturing it with materials.
+Have expensive shaders for uber-awesomenessism-mation
+Be slow and heavy
+Closed source
+Compiled

The repository is open for anyone, hosted at Bitbucket, uses Mercurial, feel free to send patches:
Code:
http://dev.getconquest.net/cartographer


Aaand... cute image as it looks right now:
189329001342700366.png
 
So will this make it easier for us to create maps and stuff, I hope so as the edges in the tokyo map I did were all messed up and the rivers looked edgy and really bad. I see in the image on the first post that the rivers are proper so I that I will be able to make the map better.
 
Back
Top Bottom