The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Users browsing this thread: 1 Guest(s)
Spell Graphics Document

#1
Posts: 1,261
Threads: 250
Thanks Received: 11
Thanks Given: 7
Joined: Jun 2009
Status
Traitor
I'm still studying this, but a friend translated a conversation between me and SHALL. This is the key to actually importing spell graphics.
Japanese Log
Japanese Log Translated
Japanese
Code:
1 モンスター行動を2バイト命令に変更:”例;F0 EE EE EF→F0 FF EE 00 EE 00 EF 00”
2 魔法名を拡張           :”ファイアなどの名前”
3 魔法データを拡張         :”威力や命中率のデータ”
4 魔法メッセージを拡張       :”レベルが5の倍数にデスなどのメッセージ”
5 エフェクトデータの拡張      :”エフェクトパターンやパレットなどの設定”
6 エフェクト構成データ       :”エフェクトパターンの情報”
7 エフェクトのコマ設定拡張     :”エフェクトの種類とコマ数を設定”
8 エフェクトタイル構成拡張     :”コマで使用するタイルの作成”
9 エフェクトグラフィック読み込み拡張:”エフェクトのグラフィックを読み込むポインタ”
10 アニメーションオフセット拡張   :”エフェクトの動き”

English
Code:
1.  Convert monster actions to 2-byte instructions: “e.g. F0 EE EE EF→F0 FF EE 00 EE 00 EF 00”
2.  Extend magic names:                             “Fire, etc.”
3.  Extend magic data:                              “damage/hit value data”
4.  Extend magic messages:                          “Messages for Death, etc. where level is a multiple of 5”
5.  Extend effect data:                             “Settings for effect patterns, palettes, etc.”
6.  Effect composition data:                        “Effect pattern information”
7.  Extend effect frame settings:                   “Set kinds of effects and number of frames”
8.  Extend effect tile composition:                 “Make tiles used in frames”
9.  Extend effect graphic read-in:                  “The pointers it reads for effect graphics”
10. Extend animation offsets:                       “Effect movements”

0x107F8F: Magic graphic data
14 bytes per spell

Byte
00 01 Effect 1 number (from 000 to 2FF; no effect with FFFF)
02 03 Effect 2 number (same as above)
04 05 Effect 3 number (same as above)
06 Effect 1 palette
07 Effect 2 palette
08 Effect 3 palette
09 Effect sound
10 Unknown (for summon magic, selects summoned esper graphic)
11 12 Unknown
13 Wait

Among these, effect numbers select both effect properties and effect control
codes.
Code:
Example: Fire (107F8F-107F9C)
C1 00 FF FF FF FF 38 00 00 16 25 FF FF 10
C1 00      Effect 1 = 0C1
FF FF      No effect 2
FF FF      No effect 3
38         Effect 1 palette = 38
00         Effect 2 palette = 00 (none)
00         Effect 3 palette = 00 (none)
16         Effect sound 16
25         ??
FF FF      ??
10         Wait 10


0x14D000: Effect property
6 bytes per effect
(multiply effect number by 6 and add 14D000)

Byte
00 Animation frame number (selected from range 00-3F)
01 Number of image chipset to use
02 03 Animation pattern (set how to arrange image chip)
04 Effect width (00-10; 10 fills the screen)
05 Effect height (00-10; 10 fills the screen)

Code:
Example: Effect 0C1 (14D486-14D48B)
05 1C 4A 03 02 03
05          Frame #5
1C          Chipset number 1C
4A 03       Animation pattern 34A
02          W: 02
03          H: 03

0x120000: Image chip pointer
(Effect 3 only: 0x12C000-)

Multiply the image chipset number by 64 (40h) and add 120000 (or, for effect 3
only, 12C000). The length of the pointer data is 160 bytes for effects 1 and 2,
and 128 bytes for effect 3. The pointers are two-byte units.

Code:
Example: Chipset number 1C
1C * 40 + 120000 = 120700
That's the pointer.

* For effects 1 and 2
0x130000: Effect 1 and 2 image data
Multiply pointer value by 24 (18h) and add 130000 to get the image data offset.

Code:
Example: 50 02 (value 120700 from the previous example)
The pointer value is 250, so 250 * 18 = 3780
3780 + 130000 = 133780
The image data starts there.

The length of image data is 24 bytes; it is expanded from memory address
7FE400. From the header, 16 bytes are copied as-is, and the remaining 8 bytes
are alternated with zeroes.


Code:
Example: 6D FF F9 EF FD 6F ED FF EE F9 2F 7D FF ED FB ED
         EE AB EF FF FA BF FF FF
in which case, the data expanded in memory becomes:
         6D FF F9 EF FD 6F ED FF EE F9 2F 7D FF ED FB ED
         EE 00 AB 00 EF 00 FF 00 FA 00 BF 00 FF 00 FF 00

* For effect 3
0x187000: Effect 3 image data
Multiply pointer value by 16 (10h) and add 187000 to get image data offset.

Code:
Example: 46 04
The pointer value is 446, so 446 * 10 = 4460
4460 + 187000 = 18B460
That's where the image data starts.

The expanded memory address starts at 7FE400 just like effects 1 and 2, but effect 3's have 16-byte data, so they're copied as-is.

0x14DF36: Animation pattern offset
Multiply effect property's animation pattern value by 2 and add 14DF36 to get the entry point for the animation pattern.

The length read in is the effect property's animation frame number times 2.
(This is because there is one pointer per frame)

Code:
Example: 4A 03 (from effect 0C1, Fire's flames)
The value is 34A, so the offset is 34A * 2 + 14DF36 = 14E5CA
Effect 0C1's animation frame number is 5, so the data length is 10 bytes (5x2).
10 bytes starting from 14E5CA
E9 26 EB 26 F7 26 03 27 09 27

0x110000: Animation pattern
Add the value recorded in the animation pattern offset (14E5CA in the above
example) to 110000 to get the starting point.

In two byte values, the chip coordinates and chip number are described in that order. The rules are as below:
First, based on the effect property's width and height values, make a grid.

Example: For effect C1, width and height are 02 by 03, so the coordinates are basically:

00 10
01 11
02 12

Based on this, we describe the chip's arrangement.
Basically, we describe the chip in the order 00→10→01→11→02→12.

For example, for the arrangement is basically
00 09 10 0A 01 0B 11 0C 02 0D 12 0E

09 0A
0B 0C
0D 0E

This composes one frame.
If we reach where the coordinates end, or specify previous coordinates like 10→00, it ends.

Code:
Example: Effect 0C1
From the previous example, with pointers
E9 26 EB 26 F7 26 03 27 09 27
each respective frame's data offsets are
1126E9 (12 08)
1126EB (00 09 10 0A 01 0B 11 0C 02 0D 12 0E)
1126F7 (00 10 10 11 01 12 11 13 02 14 12 15)
112703 (10 17 11 0F 02 08)
112709 (11 16 02 16)

Arranging things according to the above example's coordinates, we get

null null
null null
null 08

[Image: ?plugin=ref&serial=71]


09 0A
0B 0C
0D 0E

[Image: ?plugin=ref&serial=72]


10 11
12 13
14 15

[Image: ?plugin=ref&serial=73]


null 17
null 0F
08 null

[Image: ?plugin=ref&serial=74]


null null
null 16
16 null


[Image: ?plugin=ref&serial=75]

And when we animate them, we get:
[Image: ?plugin=ref&serial=76]


0x11EAD8: Effect control code pointer
0x100000-0x1097FF Effect control codes
Multiply magic graphic data effect number by 2 and add 100000 to get the
control code offset.

Code:
Example: Effect 0C1
C1 * 2 + 11EAD8 = 11EC5A
11EC5A's value is 2A 5D, so the control code location beginst at 5D2A + 100000 = 105D2A

The control codes' details are mostly unknown:

C9 xx Play effect sound (takes precedence over that set in the magic graphics. 00 for none).
8B xx Use up to the XX-th frame of the animation pattern (starts from 00).
89 xx Pause xx units of time.
  Find
Quote  



Messages In This Thread
Spell Graphics Document - by Zeemis - 03-02-2011, 06:11 PM
RE: Spell Graphics Document - by Gi Nattak - 03-02-2011, 06:31 PM
RE: Spell Graphics Document - by Zeemis - 03-02-2011, 06:52 PM
RE: Spell Graphics Document - by Gi Nattak - 03-02-2011, 07:12 PM
RE: Spell Graphics Document - by Zeemis - 03-02-2011, 07:50 PM
RE: Spell Graphics Document - by DjinnAndTonic - 03-02-2011, 09:33 PM
RE: Spell Graphics Document - by Zeemis - 03-02-2011, 11:31 PM
RE: Spell Graphics Document - by DjinnAndTonic - 03-03-2011, 12:41 AM
RE: Spell Graphics Document - by Zeemis - 03-03-2011, 03:33 AM
RE: Spell Graphics Document - by madsiur - 01-20-2013, 01:48 PM
RE: Spell Graphics Document - by madsiur - 02-01-2013, 09:43 PM
RE: Spell Graphics Document - by Zeemis - 02-01-2013, 11:49 PM
RE: Spell Graphics Document - by madsiur - 06-21-2015, 04:48 PM
RE: Spell Graphics Document - by sleepydude - 09-11-2015, 07:22 PM
RE: Spell Graphics Document - by Everything - 09-19-2015, 11:07 AM
RE: Spell Graphics Document - by sleepydude - 09-21-2015, 05:14 PM
RE: Spell Graphics Document - by DrakeyC - 10-27-2022, 01:34 PM
RE: Spell Graphics Document - by Everything - 10-27-2022, 07:25 PM
RE: Spell Graphics Document - by DrakeyC - 10-27-2022, 09:52 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite