Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Angry Lawyer

Pages: [1]
1
DF Modding / Dwarf Heightmap ported to HTML5
« on: July 17, 2012, 02:14:56 pm »
Hi folks.

Couple of years back I wrote a C# app for turning heightmaps into DF worlds. Well, it's 2012 now, so EVERYTHING SHOULD BE HTML5!

Behold, Dwarf Heightmap for the browser. Requires no installation - just a recent browser like Firefox, or Chrome, or (hopefully) the most recent versions of IE.



It's all written in CoffeeScript (just because), and it's MIT licensed, just in case you want to piss about with it.

Usage is simple - pick the type of data you want, hit the browse button, and pick an image. Fiddle with Offset and Ratio to affect the sea level and the contrast. Copy the output into world_gen.txt and get genning.

Go play with it HERE.
Get the source HERE.
Report bugs HERE, or in this thread.
Read a blog post about it HERE, if you're really bored.

Edit: I've just fixed a bug affecting exports - once GitHub regenerates the page it should work fine.

-Angry Lawyer

2
Now open-sourced! Download it here!

Hullo folks.

Thought I'd take a moment to show off my heightmap importing program for Dwarf Fortress - I should have it released in the week, barring no major bugs.

So, yeah, using this:



You import these:



And get this:



It handles all six fields you can draw in the map editor, and gives you tools to adjust contrast and stuff.  It also supports image resizing, in case your map is huge compared to what DF can handle (although it's advisable to resize before importing, because the code's pretty simplistic).

So, yeah, if you ever wanted to battle over the USA, have rainfall patterns in the shape of Jim Adkins' head, or simply create a more Earth-like temperature gradient, with equator and poles, this is the tool for you.

It can be downloaded at http://dffd.wimbli.com/file.php?id=389

This program requires .NET FRAMEWORK 2.0 TO RUN

How to use
  • Make sure you have one or more 24bit, preferably greyscale images (the program supports most standard formats such as BMP and JPG).  Paint.Net is a great tool to draw these, or you can download them from the Internet.  The program will dynamically resize the image for you, so it doesn't matter what size your original is - obviously, the bigger, the higher the detail's going to be.  Colour pictures can be used, but the height of each tile is set to be an average of R, G, and B, so this can have weird consequences.
  • Open the program, enter a map name into the "Map Name" box
  • Pick your chosen dimensions, and choose the type of heightmap you want to use, and hit "Open Heightmap File".  Find the relevant picture
  • The program calculates each pixel through the simple formula - ((average colour) * Ratio + Offset).  I've supplied some default arguments for these, to try and get the closest match to the default map editor settings, but dark or overly bright heightmaps might need these fiddled with.  If you don't like the end result, fiddle with these on your next runthrough.  For altitude, think of sea level as (100 - Offset) * Ratio - so adjust this number to around abouts the same as the darkest point of land in your image.
  • Press "Process" to convert the image and store it in temporary memory.  You can now import additional images for the various types, if you want
  • When you've got all of your maps imported, hit the "Commit to File" button, and find world_gen.txt - it's in the data\init directory of DF.  You might need to run the map editor at least once to have this file.
  • Assuming nothing went wrong, boot up DF, load the custom map settings, and select your new file!  You can now edit it further if you want to tweak some settings, or you can go generate it.  You might need to zero out the minimums in the advanced parameters, because imported heightmaps often don't have everything DF wants
  • Play the game.  Show me screenshots.  Send Toady money.

-Angry Lawyer

3
DF Modding / Interest in a language generator?
« on: April 16, 2008, 04:07:00 am »
Hi.  I'm Angry Lawyer.  Some of you might know me from that HL2 mod Zombie Master.

So, as part of my portfolio, I need to produce development tools.  What better game to develop tools for than Dwarf Fortress.  So then to find a niche.

Languages are a bastard to make for Dwarf Fortress, there's a whole lot of entries to type for.  So my plan was to produce a language generator that'll instantly fill out a language file based on some simple rules.

So, what I've currently programmed, in a horrible console app form:

- Program asks for a language name
- Program asks whether you want to give any letters increased or decreased chance of being picked.
- The program creates an arbitrary number of syllables, based on letter weighting.
- Program autodetects the language_words file thing
- Using these syllables, an entire language is written to a new file.

What doesn't yet happen:

- Manual tweaking of syllables
- Pretty interface
- Any error handling at all

Once I've got it to a more userfriendly state, does anyone want to use it?  And any suggestions of additional features?  Eventually, I plan to plug it into a random race generator, or something.

-Angry Lawyer


Pages: [1]