Mod info: item_kinds1.txt

Users who are viewing this thread

Effidian

Recruit
In an attempt to break up the Attackable Peasants thread, I decided it might be good to make a post for each file that has been interpreted. That thread has information on hex editing and examples of how to change items, so if you have trouble read through it. (Page 6 & 7 have the editing info.)

Eventually, this stuff might go into its own forum. :wink:

0.632 changed the format of item_kinds1.txt as well as moved it to Mods/Native. Here is the new format:

Code:
great_lance heavy_lance 1077944350 201326848 1190 335544320 14876414720 10

name: great_lance
model: heavy_lance
data1: 1077944350
data2: 201326848
base cost: 1190
data3: 335544320
data4: 14876414720
modifiers: 10

data1 bits:
0: Unique
1: Melee
2: Can't be used to block
3: Polearm
4: can be found in stores
5:sad:unused)
6:sad:unused)
7:sad:unused)
8: Attach to left item
9: Attach to left hand
10: Attach to forearm
11: ? (only set on practice_bow)
12-19: type (see below)
20: (unused)
21: two handed
22: primary
23: secondary
24: protects legs
25: (unused)
26: (unused)
27: (unused)
28: consumable
29: Bonus against shields
30: Penalty with shield
31: Can't use on horse

type is an enum:
1 = horse
2 = weapon
5 = arrows
6 = bolts
7 = shield
8 = bow
9 = crossbow
a = thrown
b = goods
c = helmet
d = armor
e = boots

data2 is the capabilities:
Code:
itcf_thrust_onehanded                                = 0x0000000000000001
itcf_overswing_onehanded                             = 0x0000000000000002
itcf_slashright_onehanded                            = 0x0000000000000004
itcf_slashleft_onehanded                             = 0x0000000000000008
itcf_thrust_twohanded                                = 0x0000000000000010
itcf_overswing_twohanded                             = 0x0000000000000020
itcf_slashright_twohanded                            = 0x0000000000000040
itcf_slashleft_twohanded                             = 0x0000000000000080
itcf_thrust_polearm                                  = 0x0000000000000100
itcf_overswing_polearm                               = 0x0000000000000200
itcf_slashright_polearm                              = 0x0000000000000400
itcf_slashleft_polearm                               = 0x0000000000000800
itcf_shoot_bow                                       = 0x0000000000001000
itcf_shoot_javelin                                   = 0x0000000000002000
itcf_shoot_crossbow                                  = 0x0000000000004000
itcf_throw_stone                                     = 0x0000000000010000
itcf_throw_knife                                     = 0x0000000000020000
itcf_throw_axe                                       = 0x0000000000030000
itcf_throw_javelin                                   = 0x0000000000040000
itcf_ranged_mask                                     = 0x00000000000f0000
itcf_horseback_thrust_onehanded                      = 0x0000000000100000
itcf_horseback_overswing_right_onehanded             = 0x0000000000200000
itcf_horseback_overswing_left_onehanded              = 0x0000000000400000
itcf_horseback_slashright_onehanded                  = 0x0000000000800000
itcf_horseback_slashleft_onehanded                   = 0x0000000001000000
itcf_thrust_onehanded_lance                          = 0x0000000004000000
itcf_thrust_onehanded_lance_horseback                = 0x0000000008000000
itcf_parry_forward_onehanded                         = 0x0000010000000000
itcf_parry_up_onehanded                              = 0x0000020000000000
itcf_parry_right_onehanded                           = 0x0000040000000000
itcf_parry_left_onehanded                            = 0x0000080000000000
itcf_parry_forward_twohanded                         = 0x0000100000000000
itcf_parry_up_twohanded                              = 0x0000200000000000
itcf_parry_right_twohanded                           = 0x0000400000000000
itcf_parry_left_twohanded                            = 0x0000800000000000
itcf_parry_forward_polearm                           = 0x0001000000000000
itcf_parry_up_polearm                                = 0x0002000000000000
itcf_parry_right_polearm                             = 0x0004000000000000
itcf_parry_left_polearm                              = 0x0008000000000000
itcf_force_64_bits                                   = 0x8000000000000000

base cost is the item's base cost. This is affected by trade and maybe faction status. In a new game, the vendors in Zender sell items for about 160% of this value.

data3 bits:
0-7: head armor
8-15: body armor (or horse)
16-23: leg armor
24-31: weight in quarter units (divide by 4 to get weight)
32-39: requirement

The requirement is as follows:
bow = power draw
thrown = power throw
weapon = strength
horse = riding

data4 bits:
if weapon:
0-7: swing damage
8-15: other damage (thrust, bow, arrow, thrown)
16-17: swing damage type
18-19: damage type (thrust, thrown, bow)
20-27: reach / 2
28-35: speed
36-43: velocity (for ranged weapons)
44-51: quantity (food, ammo, etc)

damage types are 0 = cutting, 1 = piercing, 2 = blunt.

if shield then durability

if horse:
8-15: speed
16-23: maneuver
24-31: charge

modifiers is a bit mask that defines the applicable modifiers. Each bit designates one of the 24 modifiers that can be applied to the item. So for example, arrows have a value of 8388616 or 0x800008 which has bit 4 and 24 on. If you look in item_modifiers.txt the 4th modifier is "bent" and the 24th is "large_bag".
 
Do you think that the chance of an item appearing at a vendor, or as a reward from a battle, would be determined in the item_kinds file?
 
Somebody needs to write a tutorial on bitmasks.
There was some info in the other thread but I am not sure I got it right.
 
A quick Google turned up the following. There are many more, but these look promising.

http://www.semsim.com/ccna/tutorial/binary-hex/numbers.html

http://www.learn-c.com/data_lines.htm

http://picbasic.com/resources/articles/binarynumbers.htm
 
Nevermind I think I got it now.
We need a compilation on all information we got. I'd prefer that over a new thread for each file.

Can you change your topic name?
 
Esposito said:
Do you think that the chance of an item appearing at a vendor, or as a reward from a battle, would be determined in the item_kinds file?

I don't "think" so. I think the chance of an item having a modifier is in item_modifiers.txt, but the chance of an item showing up in a shop I'm not sure where that is. The only number it could be is the data2 value and I just don't think it is in there. Also, some shops have different items (mainly talking about goods here), so it may be dictated by something that defines the particular shop.
 
zwaps said:
Nevermind I think I got it now.
We need a compilation on all information we got. I'd prefer that over a new thread for each file.

Can you change your topic name?

The Attackable Peasants thread was kind of a compilation and I thought it was becoming unweildy. Especially since some of the data changed in the new version. I thought a thread per file would be better.

Change the topic name to what?
 
Good job as always Effidian!

The thread name is fine, but I think a modding forum would be nice. :wink:
 
Could be it has which texture to use in the mesh file. If we could figure that out, we could add new armor and weapon textures(since I've figured out how to add new textures in the materials.rsf).
 
I think bit 1 of data 1 controls the attack animation/method. I put a polearm value there for a knife and the knife did the couched attack raise/lower thing while I was riding. Not 100% but it seems likely.
 
Ancientwanker said:
I think bit 1 of data 1 controls the attack animation/method. I put a polearm value there for a knife and the knife did the couched attack raise/lower thing while I was riding. Not 100% but it seems likely.

I missed this post before. Do you mean the bit I've marked with "melee weapon (?)" ?
 
Here is something cool I found today. The "Quantity" field for crossbows is set to 1. If you set it to 2, it actually loads 2 bolts so you can fire twice without reloading between shots. I only tested with two, but it probably will work with higher values.
 
Well, the mafia mod guy is all set now.

All he needs is some mod tools to make a gun version of the xbow and some very tiny models for bolts. Some new sound effects and a way to explain why the guy has to bend over every 30 rounds to reload. Maybe hes got a hernia or keeps his ammo in his shoe.
 
how can I change the quantity of arrows you get per quiver? Say I wanted... 50 arrows per quiver, instead of 24? How could I change the damage around on things? I wanna learn some of this stuff :razz:
 
Back
Top Bottom