This description is converted into the html format from one contents of the http://rag.kstd.net/ and added some information. Since the layout might be collapsed, please set the fontsize in smaller or equal to the middle (small is recommended).
It is based on igun v0.11. There is possibility that the specification of igun will be changed in the igun v0.12, on which it is going to be attached. So please look over the document of igun.
Moreover, the description is based on the original research of the author. Even if the inconvenience is caused, the author deny all responsibility.
The software called igun and Plutinum is used for making an original map. It is designed with Plutinum, and converted to ragnarok map([gat] [gnd] [rsw]) by igun.
These software is essential to make it. Please download Plutinum from HyperDevice Software if you don't have. Since it is sure that you have igun when this it is seen, I will omit the distribution site.
Igun is a software produced by End_of_exam, which has a function that edit *rsw, convert [spr] [gnd] to [bmp], debugging client, and also converting map files.
Plutinum is general-purpose map editor for the game developer, produced by valencia. It is wonderful software not only in making original maps, but also in various purposes.
Plutinum については好きなフォルダ(デフォルトなら C:\program Files 等)に入れて置いてください。
igun も好きな場所で良いですが、コマンドプロンプトで操作する性質上できるだけ浅い階層にある方が作業がしやすいです。この解説では、c:\igun\ に置いてある物として解説していきます。
導入に関してはダウンロードした *.zip を解凍してコピーするだけなのでここで躓いているとこの先は非常に厄介です。
Texture is an image which is put on the surface of the polygon on the 3D graphics. You can imagine it is the pattern in the part of ground or irregularity.
The texture used for the map creation is 8bit (256 colors) or 24bit (16.77 million full-color colors) [bmp]. [tga] can be actually used for textures but it doesn't supported in current igun and Platinum. Please use only the alphanumeric character for the file name.
The first step of making maps is arranging the map chip that delimits the texture every 32x32 dots or 64x64 dots with Platinum. Though most of Gravity's map are created with 64x64 chips, but you can use 32x32 chips if you doesn't care image quality. When the texture cannot be made by yourself, let's produce the map by using the texture image taken out of data.grf.
I'll write notes when preparing textures. Since the chip at the upper left texture becomes a transparent chip, it is not possible to use it in the map, though it can be used on Plutinum. Therefore, the chip that wants to be used must not in the upper left cell.
At this time, if you put the blank of 64 or 32 dots on the top of the texture and enable "Cut top one line of the texture" option when converting, you can use whole area of the texture. Of course, when using this option, the chip in the blank area cannot used.
If the chip counts of both height and width directions are not in the 2n (2 to the nth power: 1,2,4,...), the separate line will be shown in the game fields. If you enable "Cut top one line of the texture" option, please make sure that the chips counts of height direction is 2n + 1 (after cutting top line of the texture, 2n chips both height and width directions).
The map chip can be arranged rotating by 90,180,270 degrees but it doesn't supported Platinum ver1.67f now. If you making good use of rotation, it is possible decreasing that the number of textures and less file size(unsupported).
Start Platinum and make a new project.
Input "Map width" and "Map height" fields the size of the map. 1x1 cells in the Platinum become 2x2 cells in the client. Therefore, the map size becomes twice: when producing 100x100 cells, it becomes 200x200 cells in the client.
Input "Parts width" and "Parts height" fields single chip size of the prepared texture(64 or 32 Pixels).
The data size is usually 8bits. The maximum size of the texture is shown in the following table.
Chip size | 64x64 | 32x32 |
Maximum size of the texture in 8bits | 1024x1024 | 512x512 |
Maximum size of the texture in 16bits | 16384x16384 | 8192x8192 |
基本的な操作は、チップウィンドウから配置するチップを選択し、ペンツールでマップ上に配置していく作業の繰り返しになります。この操作については直感でわかると思うので割愛します。
レイヤーについては、既に知っていないとわかりづらいと思いますが、レイヤーウィンドウでより↑の方にあるレイヤーが一番前面に表示され、変換もこの表示されるような形を使用します。
ちょうどセル画を重ねていく作業を思い浮かべてください。レイヤーウィンドウの↓のほうにあるレイヤーが底のセル画で、↑のレイヤーを順に重ねていきます。↑のレイヤーと↓のレイヤーでダブっている部分は、↑のレイヤーのものが優先され、↓のレイヤーの部分は実質無いものと同じになります。まずは地面を作っておき、別のレイヤーでマップ上にある物をデザインすると、後で編集も容易になります。特にレイヤーを分ける必要はありませんが、テクスチャを複数使う場合や、複雑なマップを作る場合にはレイヤーを上手く活用すると作業が格段にしやすくなるので、是非レイヤー機能を活用しましょう(後ほど説明するエキスパートモードの場合などレイヤーを分けないと混乱するかもしれません)。
レイヤーの数に制限は特に無いようですが、あまり多くなりすぎない方が良いでしょう。
マップを選択し、Delete キーを押すと、選択しているマップチップで選択範囲を埋めてくれます。
ペンツールで右クリックをすると、その場所に使用されているマップチップを選択したことになります。ペイントで言うスポイトツールのような挙動です。右クリックでドラッグをすると、範囲で選択できます。その後左クリックで選択した部分を貼り付けることができます。コピペを多用するよりも直感的にわかりやすいと思います。
また、このペンツールで右クリックドラッグにより範囲をコピーした場合、先ほどの範囲選択→Deleteの技でその選択した部分を並べてくれます。塗りつぶしでは一つのチップしか並べられないので、この機能を有効に活用して作業を簡略化していきましょう。
Next, set the height of cells. Please make the new layer named "_height," and put the height values. Since igun reads the height from "_height" layer when converting, if setting another names, it becomes a trouble that the value of height is not set.
How to set the height is choosing the chip from the chipset and arranging with the pen tool as well as making the map. At this time, chip number becomes the height. When the chip of 8 is set, the height of the cell is 8.
Though the texture is not needed when editing "_height" layer, you can use specific texture which shows the height by color for comprehensible work. If you enable "View -> Show Number" option, it becomes comprehensible by watching height values. The texture used here is not used when converting.
Setting the height is a kind of "practice makes perfect" things, as the author says.
You would understand rough height if referring this image. The map is 3D and the character is 2D. How to feel height is changing according to the angle of the camera. First, please try out changing the camera position on various height. By the way, my recommendation is that the stairs' stpes is 4 and dungeons' wall is 32. Please think respectively if the height of the floor (height of the base level) is not 0.
The value of height in normal mode is a height of the left-top side of each cells. If you want to make come up square, you must set same height in right, bottom, right-bottom and also certain cells. It ties the cells with the slope when height is not consecutive values.
Setting immovable cells is easier than the setting the height. Please make new layer named "_movable" as well as the height layers. It is work that selects from the chipset and arranges it.
Usually all chip number is 0: movable cells. Please set the chip number 1 to the immovable cells. Actually, nonzero cells become a immovable cells but I think there is no need to use another number and simply set to 1 is better. The texture is not used for map as well as "_height" layers.
The basic making of the map ends by this chapter. Save map data with [ppj] format and almost map design work is completed.
では、次に *.ppj をラグナロクのマップ形式に変換しましょう。ここで、igun を使用します。コマンドプロンプトでの作業なので慣れないと大変ですが、cygwin で athena を運営しているなら簡単です。
igun は C:\igun\ にあるとします( C:\igun\igun.exe )。まず準備として、*.ppj、そして製作に使ったテクスチャをigun.exeと同じフォルダに入れておきます。ここでは、testmap.ppj というマップファイルで、テクスチャには 01.bmp、02.bmp を使用したとします。
コマンドプロンプトを起動します。9x系ではMSDOSプロンプト、2k系ではアクセサリ→コマンドプロンプトで起動します。起動した状態ではカレントフォルダは C:\Documents and Settings\自分のログ名 になっているので(9x系はC:\?)、↓のように打ってigunのフォルダに移動します。
cd C: cd igun |
igun -map testmap.ppj |
In the formula of calculating height, there is no need to modify it. But you can edit height ratio by editing [multiple value].
[multiple value] * (value) + [addition value] |
設定を済ませ、OKを押すと変換が始まります。正常に変換されれば、igun フォルダ内に data フォルダが作成され、中には
testmap.rsw testmap.gnd testmap.gat texture\01.bmp texture\02.bmp texture\タッタタホナヘニ菎フスコ\testmap.bmp |
Next, decorating the map. The map that has been produced is only ground: there is no object and I think it is stark landscape. For making attractive maps, let's put objects and set lighting and water surface.
Before this, I want to add the explanation of the file used for ragnarok map.
[gat] : いわゆる地図。歩ける座標や高さなど。 [gnd] : マップのデザイン。使用するテクスチャの指定、見た目の構造。 [gat] と [gnd] で高さが違う場合、見た目は [gnd] 、キャラが歩く高さは [gat] が適用される。 これを利用すると、オブジェクト上を歩くときなどにオブジェクトの下に水があるなどを実現できる。 [rsw] : マップの装飾。水面の高さや照明の強さ(色)、オブジェクトの配置など。 [rsm] : 配置するオブジェクトファイル。 [bmp] : *.gnd、*.rsm に貼り付けるテクスチャファイル。 |
コマンドプロンプトを起動し、マップの変換のときと同じようにカレントフォルダを igun のフォルダに移動します。さっきは -map コマンドを使用しましたが、*.rsw の編集は -rsw によって行えます。
先ほど作成したマップの、*.rsw ファイルは data\testmap.rsw なので、
igun -rsw data\testmap.rsw |
igun -rsw |
The function of this software divides into roughly two parts: [Rsw Objects] (left side) and [Rsw Header] (right side). Objects can be arranged in [Rsw Objects] parts. First, I'll explain setting of the map.
Please look at [Rsw Header] on the right side. Water surface(sea, pond, etc) and lighting can be set here.
It is possible to think about the height of water surface by coordinates height of the map. However, the height is the downward axis as I said before. If you want to bring water surface height of 20.0 in Plutinum, please set -20.0 here. Of course, if you change the calculation formula of height when converting, please consider its settings.
Next, color of the water surface. There are 6 kinds of water surface as follows, lacking right side in the screen.
00 : Normal light colored water (Prontera) 01 : A little darker water 02 : Very light/tropical water (Jawaii) 03 : Very dark water (Culvert) 04 : Lava (Magma Dungeon) 05 : Dark/muddy water |
Amplitude: amplitude values generally ranging from 0. to 1., and more rarely 2. (new Payon) Phase: value rounded down to integer, then modulo 360 *. Phase between two wave updates. The closest to 180 this value is, the most instable the wave will roll. CurveLevel: value rounded down to integer *. Generally between 0 and 100, determines how much the water surface incurves. |
Strength of light is strength of the color of RGB respectively. If everything is set to 1.00, it becomes a white lighting of the ground. In a dark map such as dungeons, I recommend to set about 0.35.
The diffusion of light cannot be verified because it is unsupported in igun 0.11.
Then, I'll explain the arrangement of the object. Since cretaing new object isn't supported in present version, copy from [rsw] where the object already set up and paste it to the editing [rsw]. Please start new command prompt, and start rsw editor with existing [rsw].
Objects are defined in opened [rsw]. Select the object which wants to be set up, and click [Copy] button. Next, click [Paste] button in rsw editor making original map and the object to be added. Let's edit information (position, etc) according to the map.
Setting fields are as follows.
X | Y | Z | |
Position | 配置x座標 | 配置高さ座標 | 配置y座標 |
配置x座標はマップ上のx(横)座標、配置y座標はマップ上のy(縦)座標です。指定する数値についての詳細は↓で解説。オブジェクト底面の中心の座標で指定してください。 | Rotation | y軸方向傾き | 配置向き角度 | x軸方向傾き |
x軸方向傾きは右向き正、y軸方向は下向き正です。それぞれの数値は 0°〜360°で指定する。 | Size | 横幅 | 高さ | 厚さ |
*.rsmファイルのデフォルトのサイズが 1.00 です。割合で指定してください。 | |||
Layer | オブジェクトのラベルです。メモなどに使用可。 | ||
Rsm | *.rsmのファイル名。変更しないように。 | ||
Model | オブジェクトの名称?記述は自由だと思われるが、特に変更しないで良い。 |
In normal mode, the height can be set only left-top side of each cells. In expert mode, however, the height can be set at four points -- top-left, top-right, bottom-left and bottom-right -- of each cells. Moreover, a vertical texture can be set the cell whose height is not consecutive.
In the expert mode, information of one cell is expressed by four cells. Since the specification changes each kind of the layer, I'll explain each type of it.
In normal layer (map design), the even-numbered coordinates(2x, 2y) determine horizontal texture. (2x+1, 2y) and (2x, 2y+1) determine vertical textures. (2x+1, 2y+1) is not used. Please set vertical texture if the height is not consecutive. Otherwise, it becomes transparency wall. Moreover, the texture of (2x+1, 2y) is the right side texture of (2x,2y). So if you want to set left side texture, please set texture at (2x-1, 2y). The same is true of y axis, so please set texture not only (2x,2y+1) but also (2x, 2y-1).
There is no need to set vertical texture when height is not sequence and there is no problem if you set it: you can simplify operation by using fill tool.
When setting height layers (layer "_height"), the even-numbered coordinates (2x,2y) determine left-top height of the cell. Similarly, (2x+1,2y) determine right-top height of the cell, (2x,2y+1) determine left-bottom and (2x+1,2y+1) determine right-bottom. If height is different in four sides of chip, the chip becomes a slope. When height is not consecutive between two chips, it is necessary to set horizontal texture.
When setting immovable cells, it is used only the even-numbered coordinates (2x, 2y) and other cells is ignored.
エキスパートモードでは、通常モードで制作したマップはそのままで使えません。使うには使えますが、マップとしては成り立つ物にならないことがほとんどです。igun には、通常モードで制作したマップをエキスパート企画に変換する機能がありますので、この機能を使います。コマンドプロンプトで既に igun のフォルダがカレントフォルダになっているとして、次のコマンドを打ってください。もちろん、マップファイルの名称が違う場合は作ったファイルにあわせてください。
igun -ppj testmap.ppj |
I think it is difficult to describe in word, so please look at following image.
The figure is chip ID used by "_height" layer: the height of the cell. Even-numbered coordinates is blue purple and blue textures. In this situation, a blue part will lift compared with other parts.
Since the height is not consecutive, I set vertical red, the navy blue and dark green texture. Dark blue is side vertical texture, red is back and dark green is front. This figure create a box whose convex plane is the cell whose height is 32. It becomes following figure when seen from the client.
Change view point to back side
Though the expert mode has a complex specification, I think it is understandable if you accustom to it. It is necessary to use expert mode when you make the stairs and other complex maps. I hope you master it.
鉛直方向のテクスチャは、1マス分のテクスチャを引き伸ばすことになるので、画質が低くなります。本家のマップでは、壁に 64×256 ドットのテクスチャを当てている部分がありますが、これの実現について解説します。
まず、64×256 ドットのテクスチャを横に4つ並べて 256×256 のテクスチャを用意し、このテクスチャを 256×64 に縮小、または 256×64 に切り取って(元のデータは残しておくこと)、マップ製作を行ってください。マップの変換後、このテクスチャの画像を、元々用意していた縮小されていない *.bmp に置き換えます。そうすると、64×256 のテクスチャを鉛直方向に張ることが可能になります。
この仕組みは、マップのテクスチャは *.bmp の座標切り取りではなく、相対%座標の切り取りで行われているために起こります。256×64 のサイズで作った場合、ID:0 では (0%, 0%)-(25%, 100%)、ID:1 では (25%, 0%)-(50%, 100%)、…のように切り取って配置されます。よって、 *.bmp をマップ作成後に引き伸ばしても 100% といった数値が変わらないので、64×256 ドットのテクスチャを張ることができます。
ちなみに、チップ数が2の整数乗になるようにしないといけないのはこの仕様のためです。プログラムの内部では小数は無く、全て分数で表されます。しかもその分数は分母に2の整数乗しかつかえません。例えば、チップ数が3の場合、0.333333 も 1/3 も正確に算出できないため、線が入ってしまうわけです。
では、最後にエキスパートモードを使った階段を紹介します。
このような階段を作りたいと思います。解説画像を用意しましたので、こちらをダウンロードしてください。テクスチャは各自で用意してください。
解説画像では、わかりやすいように水平面のテクスチャを青紫、鉛直面のテクスチャを茶色で表しています。赤い数字は例の如く _height で使用しているチップID、つまり高さです。この解説の通りに作ると普通に歩く階段としては、段差がありすぎるので、自分で作る時は段差を少なくしてみる方が良いかもしれません。階段は横に斜めの坂をつけたりと応用ができますので、いろんな発想に挑戦してください。なお、SSでは少し↑で解説している 64×256 ドットのテクスチャを使用する技を使っています。どのように活用したかは各自で頭をひねって見ましょう。64×256 にこだわらなくても、例えば 64×128 や、64×196 といったものも使用できます。
この解説を作成するに当たって、igun 作者の End_of_exam 氏によるigun 説明書 [doc\index.html] と オリジナルマップ作成 [doc\gmap.html] 、また igun のソース [src\*.c src\*.h]を参考にさせていただきました。また、一部資料の和訳も氏による和訳を一部参考にしています。この場を借りてEnd_of_exam氏に感謝の意を表します。
また、私の制作したマップのデバッグと解析に協力してくれた友人にも、併せてお礼申し上げます。
最後まで読んでくれたあなたには、こちらをプレゼントします。私が制作の時に(たまに)使用している、高さフラグ、通行禁止フラグ設定のサポートBMPとミニマップ制作用のテクスチャです。
この解説では -map -rsw -ppj しか掲載していませんが、他にも *.spr を *.bmp に変換したり、*.act を *.avi に変換したり、*.bmp のビットレートを変換したりと使える機能が満載ですので、docの方にも目を通してみてください。
また、ファイル名の指定の部分に * または ? を使用すると、条件に適したファイル全てで処理を行います。例えば、igun -spr *.spr と指定すると、同じ階層にある *.spr 形式のファイルを全て *.bmp に変換します。オプションの組み合わせ方などによって機能はさらに増えますので、色々と試してみるのも楽しいです(私もやったこと無い組み合わせとかも多い)。
同じ言葉を繰り返したり〆が上手くいかないのは、まとめる能力に乏しい私の欠点です。ご了承ください。
この解説は http://rag.kstd.net/ に掲載したpukiwiki形式の解説をhtml形式に変換し、加筆修正を行ったものです。 本文に関する著作権は柳霜杞紗 [ Kisa Yanashimo ] が保持しています。また、当コンテンツの再利用(再転載・配布など)は、GPLに基づき許可します。 This manual is converted to html style from pukiwiki form (pablished on http://rag.kstd.net/), and retouched. The copyright of this manual is held by Kisa Yanashimo. If you want to reuse (re-reproduction, distribution, etc...) these contents, it is permitted based on GPL. C.O.M.A. ver 1.00 : 2005/04/07 begun to write the manual of igun C.O.M.A. ver 1.01 : 2005/04/10 writing is completed C.O.M.A. ver 1.10 : 2005/04/11 convert to html style, add & correction of description C.O.M.A. ver 1.11 : 2005/04/13 add & correction of description C.O.M.A. ver 1.12 : 2005/05/08 based on GPL, correction of description |