AMG for dummies

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

AMG for dummies

Post by Adamo »

help!
I want to draw Alternate Monster Graphics, but I don`t know how.. :oops: I need a "step-by-step" instruction, how to do this..
Wchich application do I have to use to transform .bmp into .bin file? Do I have to draw each monster position (front, side, back, attack) separately on four bitmaps, of together in one big bitmap?

Thanx for help!
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Hi Adamo!
You draw with GIMP?

The way I do it:

I load the dmextracted knight picture (front/attack/side/back) into gimp.
this way you have the palette, .


Then open up champion picture in gimp. This way you can select
there all colours of dungeon master; the knight has no green , so
get green from champion portraits.et cetera

You use .bin files? I think when using gimp, you can
save as .bmp and it should be a bitmap then..
("can't handle transparency", click ok)

the idea of drawing all monster positions together in one big bitmap is fine, you can then copy parts and paste into the respective
front side back attack bitmaps.
(sometimes monsters ,as you know, have no side.bmp)
I would load an existing .bmp file and resize the canvas to make it larger.

For me , opening up a new file gets wrong palette and so on.

I have until now , just opened an existing monster
pic and then changed it to what I wanted it to be.
(no change of size ; do not know how )
only swap existing monsters. . I choose what would be the same
like knight and then draw alternate knight graphic ..

then you copy finished (knight side attack ..)graphic into extract folder of dmextract, create a
graphics.dat, copy it into csbwintest folder and test the
new creature. Preferrably with magic boxes, from different
distances and when it gets darker.

You realise the shadow is not correct or that you have made the monster too small, just doesn't look right.
draw new monster, make it broader and try to get the shadow
right.No shadow good. wrong shadow is somewhat
better (It could have sth. to do with how near wallside, height and angles)
hope this could help you !
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

thanx Zooom!

I use background tool now for changing .bmp to .bin (Atari bitplane format) file (GIMP cannot do this).
But how to use these .bin images in practice?
Do I have to import them by CSBgrapher to CSBgraphics.dat?
Which colour to use for the tranparency? the same one, that original image does?
How the engine knows height/width of the image?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Adamo wrote: I use background tool now for changing .bmp to .bin (Atari bitplane format) file (GIMP cannot do this).
Could you tell what you do?
what is this background tool?
I thought gimp could convert .bin to .bmp;
I seldom make new file and then convert , I just use existing one
Adamo wrote:But how to use these .bin images in practice?
I cannot tell. I think .bin is same as .bmp ; you just draw and
then convert??
Adamo wrote:Do I have to import them by CSBgrapher to CSBgraphics.dat?
How about if you would change them by saving as .bmp?
then use create.bat of dmextract tool to create a graphics.dat
Adamo wrote:Which colour to use for the tranparency? the same one, that original image does?
I would use same one like original image, if you just change the
image. If you put other colours in the creature , you could have
to switch colours..based on what creature you start loading in the dungeon level first.. there are plenty of posts on this forum, addmittedly,it is too much for me to search,find and remember
Adamo wrote:How the engine knows height/width of the image?
This is something I do not know for sure. surprise surprise ;) Maybe there is
sth. in file 0058 or what it is called of the french guy charlatan
that you have to hexedit and get coordinates properly.
the image has to be multiples of 16s. 16 32 48 pixels..etc.
I would also like to know how width is changed.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Zoom, you are misunderstanding adamo's question. CSBwin allows you to create alternate images (3 additional sets) for each monster type. Thus you could have a boss trolin, guard trolins, undead trolins and normal trolins. Or a rat, a hellhound, a large snake and a small trolin.

It's the same monster, but with different skins. CSBwin then uses a graphics number (0 - 3) in the monster info to know which type to draw. This is new to CSBwin (asked for by zyx to create more creature variety in conflux i believe, but very handy)

Adamo, PLEASE look at the documentation paul has provided, he has answered all of this at the very start of this doc
Each such set of graphics is described in a section of the CSBgraphics.dat file. The CSBgraphics.dat 'ID' is equal to the numeric Monster Type multiplied by three plus the 'Alternate Graphic Number' minus 1. For example, Alternate Graphics 1, 2, and 3 for a Screamer will be contained in CSBgraphics.dat ID numbers 18, 19, and 20
And has a demonstration package here

If I remember correctly, so apologies if this is wrong, you add the .bin files as you would add any other file into the CSBgraphics.dat using the newest version of the CSBgraphics.exe editor which is in the linked file above
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

Could you tell what you do?
what is this background tool?
It`s a little application by (??? Charlatan ???). You just load a .bmp image into the "Background tool" and then save it as .bin fie. GIMP canot save anything as a .bin image (Atari "internal" bitplane format). GIMP, as probably other programs, can only load .bin file as a bitmap, but not properly; if you do this, you`ll se only black lines in the image.
I think CSBgraphics.dat needs pictures in .bin format, that`s why I have to use that tool.

ok, suppose, I have pictures of creatures in .bin format. What to do next? Import them to CSBgraphics.dat ? Do I need some additional code, like it was with additional wallsets (for custom wallsets it was "skin.bin", "walls.bin" and "64skincode.bin")?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Double posted - so posting again hoping you will see the above reply
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

oh I missed your post Beo. :oops: Thanx for the answer!
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

thanx Beo! I`ve read Paul`s docs. But I`m confused with the code.. to be honest, this seems to be a black magic for me. I don`t know how to use it in practice (sorry for my ignorance, but I`m not a programmer..) and where to put that code. Do I have to modify skins.bin file (wchich I already use for custom wallsets) or to make a new one? I opened Zyx`s CSBgraphics.dat file, but I didn`t found anything special, that would contain the code for custom creatures.

Besides, do I need to put all of the creature positions (frront, side, back, attac) into one big pictue?*

* - I cannot open additional monster images by background tool, because there appears an error ("division by zero"), and when I export it by CSBgrapher in .bmp format, the image cannot be shown.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

The documentation tells a lot about how alternate monster graphics work internally, but very little about how to actually use them. It's good to know the graphics are organized in this certain way, but where is there a utility to help users organize them in this way? For example, the doc tells nothing about how to load and save the graphics.

Trying to open the Alt Monster Graphics example in CSBgraphics works, but the "Alternate Monster Graphics" entry, when extracted, produces a .bmp that can't be opened by anything. It does nothing to shed light on what exactly needs to go into a proper alternate monster graphics set.

I'm assuming that it's more than just a flat bitmap, the docs imply that there is some sort of data structure being saved here (that's why the bitmap produced is worthless, too, probably)-- I believe Adamo's question is how to edit this data structure, and convert it to/from more familiar file formats.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Thanks for pointing me there beo ;)
I can only second Sophia and Adamo.

An example would be cool, how to get alternate monster
graphics right.
( let's say there are four alternate screamer graphics,
attack , side , front and back) Would they all have the same
monster ID , and as Adamo asked would they have to be in
one big file?

What has to be done to get these alternate views to work with
csbwin ? I entered(from the .zip file of beo)
the side.bin as alternate screamer graphic ID 19 and attack.bin
as ID 20 and csbwin crashed. Very likely because of width and height issues.

Maybe someone could shed some light on these please
as far as I have realised, you need them :
byte offsets
flags
graphicOffsets[10]
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Zyx certainly did a lot of this. Perhaps he
can shed light on how he managed to do it.
Anyone else accomplished this?

I know of no tools other than a hex editor. I
designed the file format and the engine to
use it. But I never used it myself so I would have
to start from scratch to actually do something. :?

I was hoping one of the 'Tool Experts' out there
in DM Land would step forward. It ain't easy
to get it all right by simply typing in numbers.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

My computer is dead and I don't have access anymore to my tools. However I think I was using ADGE to produce the files containing the new monsters.
With ADGE, it wasn't more difficult than changing existing monsters of the graphics.dat.

Maybe it was an unreleased version. We should ask Rain about this.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

In the meantime someone could move the thread to :
"Editors and Tools (DMute, DM Builder, ADGE, etc.)"
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

No, as this is the CSBwin and CSBuild forum - it's of no use splitting these up as they are intrinsically linked
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

hmm.. Then can I download the unreleased ADGE version somewhere? I guess it`s somewhere in rain`s site, but I don`t have access. I was searching on Kentaro`s site, but it`s not there.
Maybe someone`s got it on HD?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

That would have been zyx before the comp crash and rain I guess : (
User avatar
rain`
Artisan
Posts: 164
Joined: Sat Feb 19, 2005 11:44 pm

Post by rain` »

http://www.uwm.edu/~pjgross/adgev04b4.zip

That is the 'official' unreleased adge I sent to zyx and a few others to test out the new AMG creation features I had. There are probably alot of issues.

I know for a fact the BPI mask editing is 100% nonfunctional and if you try to use it you will probably crash your system, but other than that it should be suffice to your needs.

I do still have the source code, but I have no intentions on continueing. It is in visual basic, and i hate visual basic =[.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Does this happen to others, too?
adgev04b4 wrote: Run-time error '429':
ActiveX component can't create object

(ADGE Candy04b_2x is running fine)
(installed and registered both)
(Microsoft ActiveX Control Pad)
( & Reg_Candydll.bat)



Concerning the AMG demo, from beo' s link further up:

there seems to be a x/y coordinate issue with amg.
screamer in disguise, 2 steps away:
left is adge, right is amg csbwin demo

http://www.pc-aladdin.de/blup/compare.bmp
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

thanx rain` ! :)

I`ve got the same error as Zooom - what to do now? :?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
rain`
Artisan
Posts: 164
Joined: Sat Feb 19, 2005 11:44 pm

Post by rain` »

Dunno, when does it happen? :P
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Oh. I totally forgot to say thanks! :shock: :oops:

rain', thanks man! :o

The error messages occur when doing:

File/open
Bpimasks/ open bpimask
Alternate Monster Graphics/open AMG
Alternate Monster Graphics/new AMG/ import file button
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

The missing component is for the open file dialog. I already had this problem and solved it by installing visual basic!

Maybe the file is something like comm***.dll? Rain, why don't you use the wizard of VB6 to create a distribution setup? (distributions include all the needed components)
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

installed an express vb something trial one month version, et voilà!
Adge works , but I did not succeed in making a working amg yet..

http://www.pc-aladdin.de/blup/vexirindx.bmp
this is another thing i wanted to show:
left is the vexirk pic that is normally one step away,
looks like a rat? -on the right is the normal vexirk pic.

Sometimes( here it was in the corridor in the amg demo (beo'slink);
the vexirk is displayed correctly.
but sometimes it isn't like in the link
http://www.pc-aladdin.de/blup/compare.bmp
left is the supposed adge placement of vexirk , right displays demo

What could be the reasons for x/y offset fault?
Sometimes it kind of works , sometimes not..
kentaro-k.21
Artisan
Posts: 178
Joined: Wed Dec 17, 2003 1:39 am
Location: Osaka, Japan
Contact:

Post by kentaro-k.21 »

hi.

Adamo:
thanks to visit my site!
i can supply an experimental tool for AMG feature if you don't still find a tool for AMG conversion.
however the tool must be inconvenience if you hope practical use, because i wrote it only for evaluation of AMG capacity. i can publish if you would like to try anyway.
kentaro-k.21
Artisan
Posts: 178
Joined: Wed Dec 17, 2003 1:39 am
Location: Osaka, Japan
Contact:

Post by kentaro-k.21 »

here is an example, instruction, and tools for AMG creation.

(link removed. check later post for newer vesion)

hope it benefits.
thanks

EDIT: removed link to old version.
Last edited by kentaro-k.21 on Sat Aug 05, 2006 2:44 pm, edited 1 time in total.
kentaro-k.21
Artisan
Posts: 178
Joined: Wed Dec 17, 2003 1:39 am
Location: Osaka, Japan
Contact:

Post by kentaro-k.21 »

on 26 i said i didn't t want to publish the tool, because there was no story for the tool. i thought i can publish it if any reasons meet.
although it looks clearly made-up story below, i wanted any prompts to do something for AMG.

i have selected "Ant" for example theme of AMG included in the tool.
i don't do insect watching in general. it is an my experiment to convert real being captured in photo into dungeon creature.
in saturday i have placed some pieces of sugar on the house yard to attract the ants. the sugar was almost enclosed by many ants in 20 minutes. i shot their activity into photo data. then import it to PC. select 4 ant figures, then tweak photo, split the specific ant figure from photo by hand work. it was little bit fun work for me.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

HELP!!
I`m stuck with the work, because I cannot make AMG creatures. I cannot use Kentaro`s tools: when I want to make a .bin file, there appears errors. I did everything said in instruction (edited a bant.ini file).
The errors are: "error, fail load bitmap" or "error, front picture must be specified", when I start using "convert-and-import" tool. However, Kentaro`s example works correctly! Strange; I`m sure I edited .ini file fine, pictures are made and named correctly and .ini file is edited correctly too.

I cannot use ADGE (latest, "inreleased" version), because there appears the same error Zooom told about (this is: "error. ActiveX component cant create object"). What application/ component/ DLL do I have to download & install to make unreleased ADGE working on my computer? Zoooom, could you give me the link to that "vb express something" free trial that you`ve downloaded, wchich caused your ADGE working ?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Hi Adamo.

Here is the link(I think it is the correct one, I could not really
find the link anymore, I used initially, and it was german anyway.
Probably you do not meet the minimum requirements of computer
power. Besides it takes ages to install and you can only use it
a short time, so maybe someone has a better alternative??)
http://msdn.microsoft.com/vstudio/express/vb/download/

You should be able however, to use import/export feature of ADGE.
THe latest working version for me was ADGE_Candy04b_2x.exe!
I think you do not use it??link is on last page here:
http://www.dungeon-master.com/forum/vie ... sc&start=0
(to find it :
Kentaro wrote:
fixed ver is avail for DL (Candy04b_2x). include only bin files (removed src due to almost out of free space of my filesite). if someone needs source files to be DL ask me.

you can export as bmp file in ADGE, I just checked with stonegolem front picture, saved into work directory as:
0471 [Creature 09 (Front)] Stone Golem.bmp.
then enter Kentaro's tool, load the stonegolem and then I saved
" save as "and named it as AMG, .bin was already specified there. Reloaded fine. So you need no .bin files, just bmp from adge.If you want to make new one(new bmp) load
stonegolem front picture into gimp and change that.
The advance tweaking technique of kentaro, I do not know
how he done it with his ants, so probably, again, there is
a better tactic/approach to new monster picture bmp!
note: it was new empty monster AMG, just had a golem front picture, nothing else. Front picture has always to be specified. Does that help??
( don't panic ;) ) btw, kentaro thanks for the tool :)
kentaro-k.21
Artisan
Posts: 178
Joined: Wed Dec 17, 2003 1:39 am
Location: Osaka, Japan
Contact:

Post by kentaro-k.21 »

hi.
Run-time error '429':
ActiveX component can't create object
The error messages occur when doing:

File/open
in my hunch, your copy of official ADGE may miss COMDLG32.OCX, which performs open dialogue feature. my unofficial Candy04b_2x version includes COMDLG32.OCX as redistributable files. plz try it.

Adamo:
inform me your Windows OS version. i suspect some code (to resolve filepath) may perform infunctional in Windows 95,98 or ME. it needs to be fixed. i tested all tools on Windows XP.
perhaps your problem'll be fixed in next version. plz be patient until next version! :oops:


(fyi) error list and error possibilities:
error message starts with "*ERR* ...".

front picture must be specified.
・ini file doesn't exist.
・ini file misses "front=..." line.
open output file for writing.
・the output AMG binary file is protected.
front and back pic has to be same size.
・limitation of AMG feature.
fail load bitmap.
・the input image file is non Windows Bitmap (xxx.bmp) file.
・image file not found.
your bitmap has to be either 4bpp or 8bpp.
・limitation of tool. decrease the color depth of input image, up to 8bpp.
your bitmap is too large to convert. must be (width<=255) and (height<=255).
・limitation of AMG feature.
out of memory?
・maybe out of memory.
file write failed.
・no more free disk space or quota?
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”