Page 2 of 2

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Wed Mar 30, 2011 7:44 pm
by agentorangeguy
Ok downloading them now, i'll give them a shot, thanks!

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Sun Apr 24, 2011 9:22 pm
by agentorangeguy
this does work better by the way, i forgot to say so.

I'm just about finished with my new map, but i can't get smooth to work. Say my image was "test.bmp" and my mapping file was "test.txt". How would I use smooth.exe? what would be a typical command line?

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Mon Apr 25, 2011 12:57 pm
by artaxerxes
agentorangeguy wrote:

>Say my image was "test.bmp" and my mapping
> file was "test.txt". How would I use smooth.exe? what would
> be a typical command line?

It's quite easy:
smooth.exe -i test.bmp -c test.txt -o result.bmp

Now, what you must remember is that you need to use smooth BEFORE using mockup since smooth produces an image and mockup uses that image to create a u7map.

Artaxerxes

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Tue Apr 26, 2011 9:55 pm
by agentorangeguy
On randomizing colors for chunk variety, wouldn't it be easier (if possible) to fix mockup.exe to where your colors can be assinged more than one chunk, but it selects them by random? for example the mapping file would be:

0000ff CHUNK1, CHUNK2, CHUNK3, CHUNK4...etc...

where each instance of color 0000ff is replaced with a random chunk number from the list of chunks 1-4? Is that possible? I mean, wouldn't that be easier than having a buttload of colors on the map to represent different chunks like random forest chunks?

I used smooth but I'm not sure it did anything? it made me put semicolins in front of all colors, then it worked... but it didn't do anything that I'm aware of...

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Wed Apr 27, 2011 10:32 am
by artaxerxes
putting semicolons in front of each line effectively commented those lines, so it's normal it did nothing!

As for using mockup for what you described, I think it's better to stick to the Unix motto: do one thing but do it well (and play well with others).

Artaxerxes

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Thu Apr 28, 2011 3:19 pm
by agentorangeguy
I can't find any information how to actually run the smooth program or how to run the plugins to it. There is no documentation for it in the tools folder or anything. Is there a readme file anywhere with detailed steps on how to use smooth and its plugins? I'm not sure how to use smooth to where it makes a distinction between water and grass chunks, and so on. I've not found anything anywhere on how to use it, other than stuff that is probably way over my head... :D

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Thu Apr 28, 2011 4:15 pm
by luckyfish
The smooth readme from the source
Info on how to compile smooth is in the file INSTALL.
Info on the authors is in the file AUTHORS
ChangeLog contains the changes in reversed chronological order
This program is licenced under the GPL


smooth is a program used to help in the creation of maps for Exult
games. Exult is an engine to run Ultima 7 on modern hardware but can
run self-made games as well.

The creation of a map is a fairly complex thing to do, since the map
is 24576x24576 pixels. Fortunately, the map is made of reused chunks
which are squares of 128 pixels, so we need only a map of 192x192
chunk. There is a hard limit of chunks that can be used of 256. It
makes sense then to use an indexed image (less than 256 colours) with
reused colours, each representing a chunk and to convert this image
into a map, thanks to an association chunk colour. The tool to do
this is called mockup and can be found at:
http://si-french.sf.net/tools/

It is noteworthy that even creating such a map is a difficult
task. Either a lots of manual work in done on the image itself, or a
simple image is created, but the real map needs to be adjusted with
ExultStudio. In order to reduce this work and to automate tasks (thus
reducing errors), smooth has been created. smooth takes an image as
input and creates an image as output, making automatic changes thanks
to a config file. The changes that can be made for instance are:
* randomizing: to make a area (based on colour) appear in random colour
(from a pool set in the config file). Useful for forest for instance
* streamlining: transform a single colour representing a road into
adjusted colours to reflect the changes in direction. Usually, a chunk
for a east-west road piece is different than one for a north-south
piece.
* smoothlining: when 2 colours are beside each other, representing 2
chunk types, it is better if the transition from one to the other is
smooth. For instance, water and land would look better with a shore
between the two.

smooth uses a config file to know how to convert one colour into
another based on what is around or on what change to make.
Each section starts with [name]. A comment starts with a ';' or a '#'.
Each line in a section starts with the slave colour, that is, the
colour to transform into something else. This something else is found
somewhere in the rest of the line. Which one is picked depends on
which section it is in, and what the surrounding factors are or just
chance, as in the randomize section.

Most of the time, the order in which the colours are put in the config
file matter. If you happen to change the colours in the config file,
make sure you adapt accordingly the file "mapping.txt" from mockup.

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Sun May 01, 2011 8:14 pm
by agentorangeguy
I'm not having any luck with smooth... I am probably not getting my config file right.

So, when I do a config file it is separate from the mapping one for mockup correct? I made a seperate file but when I run it, it just returns [null] and actually creates an image, but it doesn't change it at all. I can't find an actual example config file for smooth. Can someone give me an example on how to make a config file smooth.exe?

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Mon May 02, 2011 11:10 am
by artaxerxes
Hi,

here is a sample config file, the one used to convert rough.bmp into smooth.bmp as seen in http://exult.svn.sourceforge.net/viewvc ... ls/smooth/

Code: Select all

# Config file for smooth
# each section starts with [pluginname]
# libsmooth_pluginname.so is consequently loaded
# comments start with # or ;
# empty lines are ignored
# "*" signifies whatever chunk. Used mostly for trigger.
# For instance, "[stream] slave * chunk1 ... chunk15" will replace slave by chunk1 or chunk2 ... or chunk15 no matter what trigger chunk is around
# while "[stream] slave master chunk1 ... chunk15" will replace slave by chunk1 or chunk2 ... or chunk15 only if it is beside trigger chunk

; colours used in rough.bmp: 725E0C 494949 878787 3C9134 102ABC 664747

# randomize replaces slave with one of master(s) chosen randomly
# format: slave (master)+

[randomize]
; we are allowed to replace slave by itself
3C9134 3C9134 931029 1B3D5F 349C1D

; but we are not obligated to do so
;102ABC F3FF1F 932029 1C3D5F 319C3D 654F2C


# stream replaces slave if beside trigger with one of masters chosen
# depending on position of other slaves around
# format: slave master 0 1-n 1-e 2-ne 1-s 2-ns 2-es 3-nes 1-w 2-nw 2-ew 3-new 2-sww 3-nsw 3-esw 4
# see README.Stream for more information

[stream]
; slave master 0 1-n 1-e 2-ne 1-s 2-ns 2-es 3-nes 1-w 2-nw 2-ew 3-new 2-sww 3-nsw 3-esw 4
; for water -- a bit of trigger will show on master so we must be sure
; slave is beside trigger
;000000 2340B3 101111 111112 111113 111114 111115 121111 121112 121113 121114 121115 121116 131111 131112 131113 131114 141111

; for large road -- we don't care what trigger is
;333333 * 601111 611112 611113 611114 611115 621111 621112 621113 621114 621115 621116 631111 631112 631113 631114 641111

;494949 * 010101 111111 212121 313131 414141 515151 616161 717171 818181 919191 A1A1A1 B1B1B1 C1C1C1 D1D1D1 E1E1E1 F1F1F1

494949 878787 010101 111111 212121 313131 414141 515151 616161 717171 818181 919191 A1A1A1 B1B1B1 C1C1C1 D1D1D1 E1E1E1 F1F1F1
# End of Config file - DO NOT REMOVE

This file should have been part of the repository but somehow didn't.

Artaxerxes

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Mon May 02, 2011 11:12 am
by Dominus
Will you add it, should I add it? If I, what name should it have or as an addendum to the readme?

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Mon May 02, 2011 2:28 pm
by artaxerxes
Dominus:
thanks for the offer. Sure, you can push it whenever you want. config.txt should be a good name for it.

Artaxerxes

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Mon May 02, 2011 9:47 pm
by agentorangeguy
I hope I'm not being a pain in the butt here, I appreciate everyone's help. Unfortunately the program doesn't seem to be working for me. when I run the command line: for example - smooth.exe -i input.bmp -c config.txt -o output.bmp it just returns " and nothing gets created. Has anyone tested this in Windows XP yet?

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Tue May 03, 2011 8:42 am
by Dominus
Can you try with the rough.bmp from the source? http://exult.svn.sourceforge.net/viewvc ... ision=4950

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Tue May 03, 2011 7:59 pm
by agentorangeguy
ok did that, and I realized i was using an older version of exult tools so I downloaded the latest tool set. I ran smooth along with the command line for rough.bmp and it didn't say this time and no error messages so it *appeared* to work... but I cannot find the output image anywhere. I did a search for the output file and found nothing. What do I do next?

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Tue May 03, 2011 10:48 pm
by Dominus
Use a full path for -o so you can be sure something happens or nothing happens ;)

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Tue May 03, 2011 11:06 pm
by agentorangeguy
I did, forgot to say so. Still nothing :/

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Tue May 03, 2011 11:27 pm
by Dominus
Next step is waiting for artaxerxes ;)
Maybe I'll havetime to play with it today on OS X.

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Wed May 04, 2011 10:42 am
by artaxerxes
It disturbingly sounds like the same issue as you had with mockup. Are there any stdout.txt or stderr.txt files in the directory that get refreshed every time you run the command? If so, could you post their content here?

thx
Artaxerxes

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Wed May 04, 2011 7:36 pm
by agentorangeguy
stderr.txt was created and all it says is (null).

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Thu May 05, 2011 4:27 pm
by agentorangeguy
Hopefully there is an easy fix for it?

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Thu May 05, 2011 5:21 pm
by artaxerxes
I don't know what to say, it seems like the same bug you experienced with mockup. I have to do some testing on my side to see whether Linux suffers the same issues.

thx
Artaxerxes

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Sun May 08, 2011 10:47 am
by agentorangeguy
Any luck with this yet?

Re: ANNOUNCEMENT: new tool for map making for Exult Studio

Posted: Fri May 20, 2011 2:52 pm
by artaxerxes
I'm having trouble running smooth on a newer machine. Compiling works fine, but I get:

Code: Select all

$ ./smooth -c ~/u6test.txt -i ~/ultima6.bmp -o ultima6.bmp
*** glibc detected *** ./smooth: invalid fastbin entry (free): 0x08407370 ***
Segmentation fault (core dumped)
not too sure what's going on here...

Artaxerxes