翔鹰帝国网|帝国时代论坛|帝国时代系列|神话时代
 找回密码
 注册翔鹰会员(昵称)
搜索
查看: 4813|回复: 10

[交流] Genie 1资料

 关闭 [复制链接]

73

主题

5

精华

4950

积分

圣徒

耕战
315
鹰币
385290
天龙币
0
回帖
2437

翔鹰建站十周年纪念章特级帝国勋章特级嘉禾勋章蛟龙勋章十字军勋章

附庸关系0
发表于 2010-2-21 00:57:20 | 显示全部楼层 |阅读模式
英文资料,但是语法不难,大部分是代码,对照G1生成的文件再加上一点点耐心的话很容易懂,当然,欢迎热心肠的人汉化
虽然比G1方便的工具很多,但我认为,解剖帝国2,还就是要用G1
同时,目前G1也是唯一一个可以连接Data也DRS的工具
这些资料对别的工具也是不错的参考
(资料不知谁是原创。。。希望不是狂)

科技

This page contains information for editing the technology data in Age of Kings: The Conquerors. The data structures will be given in two formats, the GeniEd
Beta format, and hex editing format (C-Style Syntax). Tools that will be needed for this can be found under the external links section.

Research Structure
This section will describe the first part of the technology data, known as the research data. This data tells what the technology requires, what it costs,
what civilizations have it available, where it is researched, what its name is, what its description is, how long it takes to research, what techage ID will
be used, whether it is an age technology(like Imperial Age), what icon it will have, what button slot it will show up in, and what its internal name will be.
The structure is stored in the data file as follows:
struct genie_tech
{
        short required_techs[6];
        struct
        {
                short resource;
                short amount;
                char used;
        } costs[3];
        short required_count;
        short civ;
        short full_tech_mode;
        short unit_id;
        short lang_name;
        short lang_desc;
        short time;
        short effect_id;
        short age_tech; //0 for non-age tech
        short icon;
        char button_location;
        long pointers[3]; //last is unused, its always -1
        short name_len;
        char name[name_len];
};
GeniEd beta represents the structure for editing as follows:
research_#_required_tech: -1 -1 -1 -1 -1 -1
research_#_cost1_type: -1
research_#_cost1_amount: -1
research_#_cost1_used: 0
research_#_cost2_type: -1
research_#_cost2_amount: -1
research_#_cost2_used: 0
research_#_cost3_type: -1
research_#_cost3_amount: -1
research_#_cost3_used: 0
research_#_required_tech_amount: 0
research_#_civ: -1 0
research_#_location: -1
research_#_description: 0
research_#_help: 0
research_#_time: 0
research_#_effect: -1
research_#_unknown01: 0
research_#_icon: -1
research_#_button: 0
research_#_pointer: -1 -1 -1
research_#_name1_length: 0
research_#_name1:
Required Technologies
These hold the Research IDs of the technologies that are required in order for this technology to appear.


Costs
These hold the values that determine the cost of the technology. The first value contains a Resource ID. The second value contains the cost amount. The third
value is a boolean that determines whether the cost is used (1) or not (0).


Required Technology Count
This holds the number of required technologies used. It ranges from 0 to 6. This does not specify the number of required techs set, but the minimum required.
You could have 6 required techs, but require that only two of them be researched.


Civilization
This controls what civilization gets this technology. It is a Civilization ID, or -1 if unused.


Full Tech Mode
This tells whether this technology is available in Full Tech Tree Mode. It is set to 0 for disabled in Full Tech Mode, and 1 for enabled in Full Tech Tree
Mode.


Location
This controls where the technology will appear. It is a Unit ID.


Name/Description
Although the GeniEd Beta calls this the description, it is actually the name of the technology. It is the index in the Language File that holds the name.


Description/Help
Although the GeniEd Beta calls this the help, it would be better termed as the description. It is also an index in the Language File.


Research Time
This holds the number of game seconds that this technology takes to finish being researched.


Effect Slot ID
This holds Techage ID (the second part of the technology data) that corresponds to this data.


Age Tech
This determines whether this technology is an age tech (like Imperial Age) or if it is a regular technology. It is 0 for regular and 2 for age.


Icon
This holds the Icon ID for this technology. It is the frame number of the graphic in the icon.slp minus 1.


Button
This contains the Button ID for this technology. It tells where the button will show up on the unit where it is researched.


Pointers
These numbers point to something (I don't know what). The first number is 100,000 plus the Language FIle ID for the name/description. The second number is
149,000 plus the Language File ID for the description/help. The third number has been -1 in every technology so far.


Internal Name
The name length is equal to the length of the name plus 1. The name follows immediately after the length value, and is just plain text.
Techage Structure
This section describes the second part of the technology data, known as the techage or "CHUN4" data. These structures define the effects for the above
technology structures.
Their structure in the data file is as follows:
struct techage
{
        char name[31]; //Always "CHUN4", but can be anything up to 30 characters
        short effect_count;
}
struct effect
{
        char type;
        short a;
        short b;
        short c;
        float d;
};
GeniEd Beta represents them for editing as follows:
techage_#_name: CHUN4
techage_#_count: 0
techage_#_#_type: -1
techage_#_#_unit: -1
techage_#_#_class: -1
techage_#_#_attribute: -1
techage_#_#_amount: 0

Name
This is considered the name of the technology and is always equal to CHUN4. This can be set to anything, since it is unused by the game. You could use this
to find the techage slot quicker.


Effect Count
This tells how many effects there are going to be.


Effects
This is a list of the various effect types. Types 101 - 103 are generally used only in technology trees, and 103 only works in this fashion. The values when
an attribute is unused are as follows:
Attribute A: -1
Attribute B: -1
Attribute C: -1
Attribute D: 0
Type 0 - Attribute Modifier (Set)
Used to change unit or class attributes by setting them to a certain value.
Type: 0
Attribute A: If set, this is a Unit ID. If unused, a Class ID must be specified in Attribute B
Attribute B: See above
Attribute C: Attribute ID
Attribute D: Value to set
Type 1 - Resource Modifier (Increase/Decrease/Set)
Used to modify values stored by the game about the player.
Type: 1
Attribute A: Resource ID to modify
Attribute B: 0 (Set) or 1 (Increase/Decrease)
Attribute C: Unused
Attribute D: Value to modifiy by

Type 2 - Enable/Disable Unit
Used to make units buildable or unbuildable.
Type: 2
Attribute A: The Unit ID to enable/disable
Attribute B: 0 (Disable) or 1 (Enable)
Attribute C: Unused
Attribute D: Unused

Type 3 - Upgrade Unit
Used to upgrade an existing unit into a different unit.
Type: 3
Attribute A: Unit ID to upgrade
Attribute B: Target Unit ID
Attribute C: Unused
Attribute D: Unused

Type 4 - Attribute Modifier (Increase/Decrease)
Used to change unit or class attributes by addition or subtraction.
Type: 4
Attribute A: If set, this is a Unit ID. If unset, a Class ID must be specified in Attribute B
Attribute B: See above
Attribute C: Attribute ID
Attribute D: Value to modify by (negative or positive)
Type 5 - Attribute Modifier (Multiply)
Used to change unit or class attributes by multiplication.
Type: 5
Attribute A: If set, this is a Unit ID. If unset, a Class ID must be speicified in Attribute B
Attribute B: See above
Attribute C: Attribute ID
Attribute D: Value to multiply by

Type 6 - Resource Modifier (Multiply)
Used to modify values stored by the game about the player.
Type: 6
Attribute A: Resource ID
Attribute B: Unused
Attribute C: Unused
Attribute D: Value to multiply by

Type 101 - Technology Cost Modifier (Increase/Decrease/Set)
Used to change the cost of a technology for a given civilization.
Type: 101
Attribute A: Research ID
Attribute B: Resource ID
Attribute C: 0 (Set) or 1 (Addition)
Attribute D: Value to modify by (negative or positive) or set
Type 102 - Disable Technology
Used to disable a technology for a given civilization.
Type: 102
Attribute A: Unused
Attribute B: Unused
Attribute C: Unused
Attribute D: Research ID
Type 103 - Technology Research Time Modifier (Increase/Decrease/Set)
Used to change the Research Time of a technology for a given civilization.
Note: Only works in Technology Trees
Type: 103
Attribute A: Research ID
Attribute B: Unused
Attribute C: 0 (Set) or 1 (Increase/Decrease)
Attribute D: Value to modify by (negative or positive) or set
ID Lists
This is an alphebetized list of the various IDs used when editing technologies. Some are still incomplete. If anyone wants to update or add them, feel free,
or you can email the information to sbkroger77 (at) yahoo (dot) ca.


Attribute IDs
0 Hit Points
1 Line of Sight
2 Garrison
3 Unit Size Radius 1
4 Unit Size Radius 2
5 Movement Speed
6 Garrison Recovery Rate
7 Unknown?
8 Armor
9 Attack
10 Attack Reloading Time
11 Percent Accuracy
12 Range
13 Working Rate
14 Resource Carriage
15 Unknown?
16 Unknown?
17 Unknown Building Mode
18 Unknown?
19 Projectile Unit Intelligent Accuracy (Boolean)
20 Minimum Range
21 Population Support
22 Blast Radius (Area Damage)
23 Search Radius
80 Boarding Energy Reload Speed
100 Resource Cost
101 Creation Time
102 Number of Garrison Arrows
103 Food Cost
104 Wood Cost
105 Stone Cost
106 Gold Cost
107 OREX Cost?
108 Healing Rate
Note: For attributes 8 (Armour) and 9 (Attack) the change value needs to be set to (Change Value) + (256 * Armour/Attack ID)
Button IDs
Page 1:
Decimal:                          Hex:
+-------------------------+        +--------------------------+
| 01 | 02 | 03 | 04 | 05 |         | 01 | 02 | 03 | 04 | 05 |
|-----|----|-----|-----|-----|         |-----|-----|-----|-----|-----|
| 06 | 07 | 08 | 09 | 10 |   or   | 06 | 07 | 08 | 09 | 0A |
|-----|----|-----|-----|-----|         |-----|-----|-----|-----|-----|
| 11 | 12 | 13 | 14 | 15 |         | 0B | 0C | 0D | 0E | 0F |
+-------------------------+        +--------------------------+
Page 2:
Decimal:                          Hex:
+-------------------------+       +-------------------------+
| 21 | 22 | 23 | 24 | 25 |        | 15 | 16 | 17 | 18 | 19 |
|-----|-----|----|-----|-----|        |-----|-----|-----|------|---|
| 26 | 27 | 28 | 29 | 30 |   or  | 1A | 1B | 1C | 1D | 1E |
|-----|-----|----|-----|-----|        |-----|-----|-----|-----|----|
| 31 | 32 | 33 | 34 | 35 |        | 1F | 20 | 21 | 22 | 23 |
+-------------------------+       +------------------------+
Note: Enabling page-changing functions is still unknown, and requires unit editing.


Icon IDs
0 Crop Rotation
1 Heavy Plow
2 Horse Collar
3 Banking
4 Cartography
5 Sappers
6 Loom
7 Coinage
8 Way Galley
9 Cannon Galleon
10 Husbandry
11 Faith
12 Chemistry
13 Masonry
14 Architecture
15 Gold Mining
16 Keep
17 Forging
18 Iron Casting
19 Spies/Trason
20
21 Blast Furnace
22 Chain Mail Armor
23 Chain Barding Armor
24 Hand Cannoneer
25 Ballistics
26 Bombard Cannon
27 Capped Ram
28 Elite Skirmisher
29 Crossbowman
30 Feudal Age
31 Castle Age
32 Imperial Age
33 Axe(?)
34 Fletching
35 Bodkin Arrow
36 Pikeman
37 Bracer
38 Heavy Scorpion
39 Heavy Demolition Ship
40 Fast Fire Ship
41 Beta Longboat(?)
42 Hand Cart
43 Light Cavalry
44 Champion
45 Paladin
46 Fortified Wall
47 Bombard Tower
48 Long Swordsman
49 Padded Archer Armor
50 Leather Archer Armor
51 Ring Archer Armor
52 Heavy Cavalry Archer
53 Two-Handed Swordsman
54 Arbalest
55 Heavy Camel
56 Trebuchet
57 Onager
58 Guilds
59 Galleon
60 Treadmill Crane
61 Murder Holes
62 Gold Shafting Mining
63 Scale Mail Armor
64 Plate Mail Armor
65 Plate Barding Armor
66 Scale Barding Armor
67 Tracking
68 Scorpion
69 Town Watch
70 Double-Bit Axe
71 Bow Saw
72
73 Fervor
74
75
76 Guard Tower
77 Compassing(?)
78 Cavalier
79 Wheelbarrow
80 Squires
81 Two-Man Saw
82 Block Printing
83 Sanctity
84 Illumination
85 Man-at-Arms
86 Capped Ram
87 Stone Mining
88 Stone Shaft Mining
89 Town Partol
90
91 Conscription
92 Redemption
93 Atonement
94
95 Strange Ship(?)
96 Siege Onager
97 Shipwright
98 Careening
99 Dry Dock
100 Elite Cannon Galleon
101 Siege Engineers
102 Broken Wall(?)
103 Hoardings
104 Heated Shot
105 Elite Unique Units
106 Halberdier
107 Unique Technology
108 Heresy
109 Theocracy
110 Bloodlines
111 Parthian Tactics
112 Thumbring
113 Caravan
114 Herbal Medicine
115 Elite Eagle Warriors
116 Sign
117 Cancel

Useful Information
Civilization Technology Trees
These are the Techage IDs for the civilization technology trees.
254 Britons
255 Japanese
256 Byzantines
257 Chinese
258 Franks
259 Goths
260 Persians
261 Saracens
262 Tuetons
263 Turks
275 Celts
276 Vikings
277 Mongols
348 Gaia
446 Spanish
447 Aztec
448 Huns
449 Mayans
504 Koreans

[ 本帖最后由 王文祎 于 2010-2-21 02:49 编辑 ]

点评

猜對一半, 因為這堆英文已經是另外轉載我英文原文的  发表于 2011-10-19 02:18

评分

参与人数 1耕战 +150 收起 理由
_MZR_阔比多华 + 150 精品文章

查看全部评分

基本不管事,半月上一次。
什么事找我都是真没用。


回复

使用道具 举报

73

主题

5

精华

4950

积分

圣徒

耕战
315
鹰币
385290
天龙币
0
回帖
2437

翔鹰建站十周年纪念章特级帝国勋章特级嘉禾勋章蛟龙勋章十字军勋章

附庸关系0
 楼主| 发表于 2010-2-21 01:07:58 | 显示全部楼层
文明:


The civilization data structure used by Genie is as follows:
struct genie_civilization
{
        char one;  //always 1
        char name1[20];
        short resource_length;
        short techtree; //CHUN4 id
        
        /* only in version 5.7+ */
        short teambonus;

        /* only in version 5.9 */
        char name2[20];
        short unknown03[4];

        float resource_data[resource_length];
        char graphicsset;
        short unit_count;
        long    unit_offsets[unit_count];
};
Immediately following the structure are the unit structures for the civilization.

name1
This is an internal name for the civilization, though in Age of Empires II it is the same as the
language name used in-game (with the exception of the Teutons, which are called "Germans"). The
property containing the language file ID has not been located as of writing.
resource_length
This is the number of resources defined for this civilization.
techtree
The technology tree for a civilization is stored in a CHUN4 tech effect structure. This member
contains the index of the effect.
teambonus
This is the CHUN4 ID that contains the effects used as a team bonus.
unit_count
This number of units defined for this civilization.
unit_offsets
The file offset of each unit structure. Units that do not exist, have an offset of zero.
AOK Civilization IDs
0 Gaia
1 Britons
2 Franks
3 Goths
4 Tuetons
5 Japanese
6 Chinese
7 Byzantines
8 Persians
9 Saracens
10 Turks
11 Vikings
12 Mongols
13 Celts
14 Spanish
15 Aztecs
16 Mayans
17 Huns
18 Koreans

[ 本帖最后由 王文祎 于 2010-2-21 01:27 编辑 ]
基本不管事,半月上一次。
什么事找我都是真没用。


回复

使用道具 举报

73

主题

5

精华

4950

积分

圣徒

耕战
315
鹰币
385290
天龙币
0
回帖
2437

翔鹰建站十周年纪念章特级帝国勋章特级嘉禾勋章蛟龙勋章十字军勋章

附庸关系0
 楼主| 发表于 2010-2-21 01:08:21 | 显示全部楼层
单位

Here is the (incomplete) structure that Genie uses to store its unit data (using C syntax). A 'g' preceding a variable means that it refers to a graphic, 's' means that it is the resource ID for a string, 'snd' means that it refers to a sound, 'u' refers to another unit index, and "len" means that it is the length of a string of the same name. "Unused" variables have had a value of -1 in all units investigated so far.
struct UnitData
{
        char metatype;
        short lenInternalName;
        short typeid;
        short sName;
        short sTrain;
        short class;
        short gStanding;
        short unused1;
        short gDying;
        short unused2;
        char unk3;
        short hp;
        float los;
        char garrison;
        float sizex, sizey;
        float hpbar1;
        short sndCreation;
        short unk5;
        short uDead;
        short unk6;
        short icon;
        bool hide;
        short unk7[6];
        float eselx, esely;
        bool unk8;
        bool fog;
        short terrain;
        bool fly;
        short rescarry;
        float unk9;
        char unk10;
        float unk11;
        char unk12[17];
        char mask;
        char unk13[2];
        char ua;
        char civ;
        char unk14[2];
        bool hideHpbar;
        char unk15;
        float selx, sely;
        float hpbar2;
        res1 storage[3];

        char grDamage_count;
        damage grDamage[grDamage_count];
        short sndSelect;
        short sndSelect2; //unused, but probably original use
        short unk16;
        char *internalName[lenInternalName];
        /* These next four values are only present in version 5.9 of the datafiles */
        short lenName2;
        char* name2;
        short unitline_id;
        char mintechlevel;
        short id2, id3;
        /* Only present if metatype is not 10 */
        float speed;
};
/* Only present if metatype >= 30 */
struct UnitData2
{
        short grWalk;
        short grWalk2;
        float unknown19_02;
        char unknown19_03;
        short uTrack;
        char unknown19_05;
        float unknown19_06[2];
        char unknown19_07[9];
        float unknown19_08;
        char unknown19_09[4];
};
/* Only present if metatype >= 60 */
struct UnitData3
{ /* Size: 40 */
        short unknown20;
        float search_radius;
        float workrate;
        char unknown22[4];
        char villager_mode;
        short sound_move;
        short sound_stop;
        char unknown24;
        short unknown25;
        short   attacks_length;
        short   attacks[attacks_length];
        short   armors_length;
        short   armors[armors_length];
        short   unknown27;
        float   range_max;
        float   radius;
        float   reload1;
        short   unit_projectile;
        char    accuracy;
        short   unknown32;
        short   delay;
        float   dis1, dis2, dis3;
        char    unknown32b;
        float   range_min;
        float   grrate; //garrison recovery rate
        short   graphic_attack;
        short   displayed_armour;
        short   displayed_attack;
        float   displayed_range;
        float   reload2;
};
It is also convenient to define other structures that are used for resource data.
struct res1
{
        short type;
        float amount;
        bool enabled;
};
struct res2
{
        short type, amount, enabled;
};
struct damage
{
        short graphic;
        short when;
        char unknown;
};

Common properties
All units have these values in their structure.
metatype
This value is the overall type associated with the unit that affects its property set. Possible values follow.
10: These are the most basic units, including only rubble and flares. Their only difference from metatype 20 units is the lack of movement speed.
20: The same as metatype 10 except the units have a movement speed. The metatype contains mostly flags, so the purpose of the movement speed property is unknown.
25: Contains only one unit in AOK, DOPL (id 243). There is no difference in properties from metatype 20.
30: Dead units. It seems to be unused in SWGB as units just explode and do not leave carcasses.
40: Unused in AOK. No information available.
60: Projectiles.
70: Living units.
80: Buildings.
typeid
Also referred to as the "unit constant." Each unit (Militia, Man-at-Arms, etc.) has this as a unique identifier. The game uses this both internally and for storage in saved games and scenario files.
sName
The name of the unit displayed in-game.
class
This is the class the unit is part of, which gives it certain properties. See AOK:List of units for AoK classes.
gStanding
The graphic displayed when the unit is in the default state (standing).
gDying
The graphic displayed while the unit is dying. (This is not to be confused with the dead unit.)
unk3
This byte has had a value of 0 in every unit investigated so far.
hp
Unit's hitpoints.
los
Unit's default line of sight.
garrison
Maximum number of units that can be garrisonned at the same time.
sizex, sizey
These two values control the size of a unit, which determines the area taken by the unit. No other unit can move into the taken area with the exception of flying units. Most units have equal x and y dimensions, but some gates and bridges do not.
hpbar1
Height of hitpoints bar?
sndCreation
Sound played when unit is created.
uDead
Genie creates the specified unit when this one dies. Almost every unit has a dead body unit associated with it, contributing a fair amount to the size of the data file.
icon
This is the icon associated with the unit. Genie displays this icon in the bottom panel both when the unit is selected and when building a unit.
hide
This boolean determines whether the unit is "hidden" in the editor, meaning that it cannot be placed.
eselx, esely
These values determine the size of the selection circle or square of the unit in the scenario editor.
fog
This boolean determines whether the unit is visible (non-zero) or invisible (zero) under fog-of-war.
terrain
This short determines what terrain restrictions are imposed on the unit. Known values are:
0x00 All Terrains
0x01 Shoreline
0x02 Water
0x03 Water (for ships)
0x04 Open Ground (used for buildings)
0x05 Nowhere
0x06 Light Water (used for buildings such as docks)
0x07 Ground
0x08 Non-ice ground
0x0B Nature Ground (for trees)
0x0D Water (for Great fish)
0x0F Water (for nets, Transport Ships)
0x10 Grass and Shoreline only (gates and walls)
0x13 Water, no ice (used for fish)
fly
This boolean determines whether the unit can "fly" over other units. Used for birds and FLDOG in AoK.
rescarry
Determines what resources the unit can carry. (?)
hideHpbar
This boolean determines whether genie hides the unit's hp bar, primarily used for trees. The standard non-zero value seems to be 2, so more investigation is required.
selx, sely
These values determine the size of the selection circle or square of the unit during gameplay.
storage[3]
These structures are used for the resource costs of a unit. The three games usually use the third cost for population (that is, every "living" unit costs 1 population).
grDamage
These structures define damage graphics (flames) for buildings.
sndSelect
The identified sound will be played when a player selects the unit.
unk16
This value was previously labeled as a sound index, but is probably not.
internalName
A name used to identify the unit internally. Genie displays this name if the unit's language string is unavailable.
id2, id3
These identifiers are duplicates of typeid. Their use is unknown.
speed
Note: This property is only present if the metatype is not 10.
The unit's movement speed.
uTrack
The specified unit is created as the tracks of the unit. This is used for trade carts and for the fire ship projectiles (the flames).
villager_mode
This is a boolean value determining whether the unit switches villager types.
accuracy
Percentage value determining probability of an attack hitting.
grrate
Garrison recovery rate.
To be continued...
(没看到下文)

[ 本帖最后由 王文祎 于 2010-2-21 01:33 编辑 ]
基本不管事,半月上一次。
什么事找我都是真没用。


回复

使用道具 举报

73

主题

5

精华

4950

积分

圣徒

耕战
315
鹰币
385290
天龙币
0
回帖
2437

翔鹰建站十周年纪念章特级帝国勋章特级嘉禾勋章蛟龙勋章十字军勋章

附庸关系0
 楼主| 发表于 2010-2-21 01:12:58 | 显示全部楼层
图像

Genie graphic data, like sound data, has an "intermediary" data structure instead of units
accessing the graphic resources in the DRS file directly. Ensemble Studios' primary reason for
this data appears to be for the storage of frame and angle numbers, though much of the data's use
is unknown. Another advantage of this setup is that the graphic data does not have to be
duplicated for units that look alike (such as all civilization's champions), though some duplicate
data appears to exist.
The data structure
Here are the C-style structures Genie uses for its graphic data:
struct genie_graphic
{
        char name1[21];
        char name2[13];
        hort slp;
        short unused1;        //always 0 (or -1 if graphic is unused)
        char unused2;         //always 0
        char unknown2;
        char unknown3;
        short unknown4;
        char replay;
        long unknown5;
        long unknown6;
        short link_count;
        short sound;
        char extras;
        short frame_count;
        short angle_count;
        float unknown7a;
        float frame_delay;
        float unknown7c;
        char unknown7d;
        short id;
        char type;
        char on_building;
};
struct genie_graphiclink
{
        short graphic_id;
        long  unused1;        //always 0
        short unused2;        //always 0
        short dx, dy;
        short unused3;        //always -1
        short unused4;        //always 0
};
struct genie_graphicextra
{
        short unknown9[6];
};
The graphicdelta structures immediately follow the primary structure, then the graphicextra
structures follow that. There appears to be one graphicextra structure per angle.
name1, name2
These two name strings appear to be equal in all graphics, so the second one's use is unknown.
Like the genie unit's internal name value, they are heavily abbreviated, such as "ARRG2NNE"
meaning "Archery Range Fuedal Age (North) European".
slp_id
The SLP resource ID that contains the images used.
unknown2
Possible values: 0, 1, or 2.
unknown4
Possible values: -1 or 10 (or 0 if graphic is unused).
link_count
The number of genie_graphiclink structures that follow.
frame_count
The number of frames per angle.
angle_count
The number of angles stored in the SLP and also the number of "extra" structures if graphic.extras
is non-zero. Most moving units have 8. Note that there are not usually this many angles in the
SLP, the game engine flips some of the graphics to produce the missing angles.
frame_delay
The time delay between each frame.
id
The id of this graphic slot used by both units and the graphic links.
on_building
This seems to be a boolean indicating whether it is an on-building graphic (such as flames or
ice).
link.graphic_id
This value refers to another graphic structure in the datafile, sometimes for shadows and
sometimes for the combination of multiple graphics in one (ie, damage flames). More investigation
is needed.
link.dx, link.dy
These values are the x and y distances from the hotspot of the linking graphic to the linked
graphics. These relative positions are used primarily for on-building graphics such as flames and
snow but sometimes for shadows as well.
Naming
As mentioned above, Ensemble Studios uses very compact internal names. Buildings start with the
unit's internal name (such as "ARRG" for "Archery Range"), followed by the age (1-4), shadow
information (N for no shadow, 1 for shadow), and then the culture:
E for Eastern/Northern European
W for Western European
M for Middle East
F for Far East
X for South American (Expansion pack)
For example, "ARRG2NNE" is the Feudal Age Archery Range for Eastern Europe, and "ARRG2N0E" is its
shadow (which, in this case, does not exist).
Units also start with the internal name, followed by an underscore and then the action being
performed:
AN for Attacking
DN for Dying
FN for Fidgeting
SN for Rotting (spoiling?)
WN for Walking
CN for Carrying (villagers)
As in the case of buildings (see above), the N is replaced by a number for shadows.

[ 本帖最后由 王文祎 于 2010-2-22 12:51 编辑 ]
基本不管事,半月上一次。
什么事找我都是真没用。


回复

使用道具 举报

73

主题

5

精华

4950

积分

圣徒

耕战
315
鹰币
385290
天龙币
0
回帖
2437

翔鹰建站十周年纪念章特级帝国勋章特级嘉禾勋章蛟龙勋章十字军勋章

附庸关系0
 楼主| 发表于 2010-2-21 01:15:42 | 显示全部楼层
声音

Like the graphic data, objects that use sounds (such as units) do not directly access the sound
resources from the DRS file. Instead, the main datafile contains sound "slots" or indexes used by
the units that in turn access the sound resources themselves. Ensemble Studios most likely set
Genie up this way to make different sounds associated with the same action. An example is
selecting a horse unit, one out of a possible three sounds will play.
Here is the C-style structure used for the sounds:
struct genie_sound
{
        long id;
        short item_count;
        long unknown1; //always 300000
};
struct genie_sounditem
{
        char filename[13];
        long id_resource;
        short probability, civ, unknown2;
};
The genie_sounditems structures directly follow the genie_sound structures.

id
The identifying number used throughout the rest of the datafile.
filename
The filename of the Wave file referenced by the item. MP3 playback might be possible, but has not
been tested yet.
id_resource
The resource ID of the sound file in the DRS file.
probability
The probability out of 100 that this item will be played. Naturally, the acceptable range for this
value is 1-100.
   .

[ 本帖最后由 王文祎 于 2010-2-21 01:39 编辑 ]
基本不管事,半月上一次。
什么事找我都是真没用。


回复

使用道具 举报

73

主题

5

精华

4950

积分

圣徒

耕战
315
鹰币
385290
天龙币
0
回帖
2437

翔鹰建站十周年纪念章特级帝国勋章特级嘉禾勋章蛟龙勋章十字军勋章

附庸关系0
 楼主| 发表于 2010-2-21 01:16:01 | 显示全部楼层
SLP文件(这个我没看懂)

Genie uses the SLP format to store its graphics. The reason behind the name "SLP" is unknown, but
it is known that Ensemble Studios used the name internally because each file has the string
"ArtDesk 1.00 SLP Writer" embedded in it. The format allows for special features such as player
colors, but is a bit dated when compared to the possibilities modern standards (such as PNG)
allow. Following is a description of the format.
Data format
The first item in an SLP file is the header, of the following format:
struct file_header
{
        char  version[4];
        long  num_frames;
        char  comment[24];
};
version: Given as a string, usually "2.0N".
num_frames: The total number of frames in the SLP.
comment: The above string "ArtDesk 1.00 SLP Writer".
Following is frame information, one of the following structures for each frame (see num_frames
above):
struct frame_info
{
        unsigned long cmd_table_offset;
        unsigned long outline_table_offset;
        unsigned long palette_offset;
        unsigned long properties;
        long width;
        long height;
        long hotspot_x;
        long hotspot_y;
};
properties: This value is suspected to change which palette the SLP uses, but the possible options
seem to be the same so this has never been confirmed.
hotspot_x, hotspot_y: These points set the hotspot of a frame, which is the "center" of the unit.
A unit's coordinates in a scenario specify the location of this pixel.
Per-frame data
The following data are repeated as a whole for each frame.
The first data are edge structures, one for each row. To conserve disk space, commands (see below)
are only included for the necessary area, and these edges specify the blank space surrounding a
unit.
struct rowedge
{
        short left, right;
};
Following are an array of longs, specifying the offset for the commands (see below) for each row.
These are not actually necessary as the commands can be read sequentially, but can be used for
checking purposes.
After the array is the command data itself. Each command is a single-byte integer followed by
command-specific data. To make the data very compact, the command byte sometimes also contains the
command-specific data. For example, the Color List command (0x00) only uses the least-significant
bits to specify the command type and the rest of the byte is the number of palette indices to
follow.
The following are the known commands:
Value  Command name  Pixel count  Description  
0x00  Color list  >>2  An array of palette indices. This is about as bitmap as it gets in SLPs.  
0x01  Skip  >>2 or next  The specified number of pixels are transparent.  
0x02  Big color list  >>4 * 256 and next  An array of palette indexes. Supports a greater number
of pixels than the above color list.  
0x03  Big skip  >>4 * 256 and next  The specified number of pixels are transparent. Supports a
greater number of pixels than the above skip.  
0x06  Player color list  >>4 or next  An array of player color indexes. The actual palette index
is given by adding ([player number] * 16) + 16 to these values.  
0x07  Fill  >>4 or next  Fills the specified number of pixels with the following palette index.  
0x0A  Player color fill  >>4 or next  Same as above, but using the player color formula (see
Player color list).  
0x0B  Shadow transparent  >>4 or next  Specifies the shadow for a unit, but most SLPs do not use
this.  
0x0E  Shadow player  next  Unknown.  
0x0F  End of row  0  Specifies the end of commands for this row.  
0x4E  Outline  1  When normally drawing a unit, this single pixel acts normally. When the unit is
behind something, this pixel is replaced with the player color.  
0x5E  Outline span  next  Same function as above, but supports multiple pixels.  
Possible pixel count values:
Next byte: Stored in the next byte.
>>2: Command byte right-shifted 2 bits.
>>4 or next: Either the command byte right-shifted 4 bits or in the next byte if the former is 0.
>>2 or next: Either the command byte right-shifted 2 bits or in the next byte if the former is 0.
>>2 * 256 and next: The command byte right-shifted 2 bits and then added to the next byte's value.
>>4 * 256 and next: The command byte right-shifted 4 bits and then added to the next byte's value.

[ 本帖最后由 王文祎 于 2010-2-21 01:40 编辑 ]
基本不管事,半月上一次。
什么事找我都是真没用。


回复

使用道具 举报

73

主题

5

精华

4950

积分

圣徒

耕战
315
鹰币
385290
天龙币
0
回帖
2437

翔鹰建站十周年纪念章特级帝国勋章特级嘉禾勋章蛟龙勋章十字军勋章

附庸关系0
 楼主| 发表于 2010-2-21 01:16:45 | 显示全部楼层
地形

Terrain data is stored in the following structure:
struct genie_terrain
{
        short unknown1, unknown2;
        char name1[TERRAIN_NAME1_SIZE];
        char name2[TERRAIN_NAME2_SIZE];
        long slp_id;
        long unused1; //always 0
        long unknown3;
        long unknown4;
        long unknown5;
        long color;
        char unknown6[TERRAIN_UNKWN_SIZE];
};
name1, name2
These are two internal names for the terrain. Both names are 13 bytes in AOK and 17 in SWGB.
unknown4
Dominance of the terrain. Higher values dominate any values that are less, e.g. one tile Leaves on Grass will almost be not visible, as the Grass blends into the Leaves. One tile Road on Grass however will be visible, as it blends into the surrounding tiles.
unknown5
Defines which blending mode should be used for this terrain. (0-7 are used by the game).
color
These are three indices and a zero and should not be taken has RGB values.
unknown6
Completely uncharted territory. All that is known is that it is 382 bytes in AOK and 406 bytes in SWGB. It has to do with tiles and which object (if any e.g. forest) should be placed in that terrain.

[ 本帖最后由 王文祎 于 2010-2-21 07:14 编辑 ]
基本不管事,半月上一次。
什么事找我都是真没用。


回复

使用道具 举报

73

主题

5

精华

4950

积分

圣徒

耕战
315
鹰币
385290
天龙币
0
回帖
2437

翔鹰建站十周年纪念章特级帝国勋章特级嘉禾勋章蛟龙勋章十字军勋章

附庸关系0
 楼主| 发表于 2010-2-21 06:50:43 | 显示全部楼层
如果觉得这样看不舒服的话,这里有txt格式的

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册翔鹰会员(昵称)

x
基本不管事,半月上一次。
什么事找我都是真没用。


回复

使用道具 举报

91

主题

2

精华

6941

积分

国王

耕战
915
鹰币
1159
天龙币
0
回帖
1623

三级翔鹰勋章

附庸关系0
发表于 2010-2-21 09:17:14 | 显示全部楼层
叫上楚邪王一起来看……                                   
回复

使用道具 举报

119

主题

3

精华

2万

积分

宗主教

耕战
4833
鹰币
25081
天龙币
0
回帖
1426

第一届暑假杯荣誉勋章二级帝国勋章

附庸关系3
发表于 2010-2-21 10:14:21 | 显示全部楼层
我用AGE……介面方便很多。

杯具,王君,救我啊
回复

使用道具 举报

73

主题

5

精华

4950

积分

圣徒

耕战
315
鹰币
385290
天龙币
0
回帖
2437

翔鹰建站十周年纪念章特级帝国勋章特级嘉禾勋章蛟龙勋章十字军勋章

附庸关系0
 楼主| 发表于 2010-3-20 12:35:26 | 显示全部楼层
Genied1中文化计划启动                   .
基本不管事,半月上一次。
什么事找我都是真没用。


回复

使用道具 举报

本版积分规则

排行榜|小黑屋|翔鹰帝国

GMT+8, 2024-12-26 02:07 , Processed in 0.161355 second(s), 130 queries , File On.

Powered by Hawk Studio  QS Security Corp.® Licensed

Copyright © 2001-2023, Hawkaoe.net All Rights Reserved

快速回复 返回顶部 返回列表