Custom melee attack modes?

Yes. Look for races.txt in core\tables. Then edit it to your heart's content, keeping the same format. But IIRC new kick and punch weapon entities have to go in the respective folders i.e. entities\weapons\kicks and entities\weapons\punches to work properly.
 
I don't see the correlation between races.txt and punch and kick entities.

What bridges the gap?
 
IIRC it's linked by filename, minus the .ent, like the portraits.
punch_entities = {
"punchVersion0", // 0

punchVersion0 = core\entities\weapons\punches\punchVersion0.ent.
 
Forgive my ignorance, perhaps I'm missing something in plain sight, however I'm not seeing where explicitly race and these attack.ent files converge.
 
Make your new punch/kick weapon entity, or edit an existing one, save it in the appropriate folder. Either [mypath]/entities/weapons/punches or [mypath]/entities/weapons/kicks, then open up [mypath]/tables/races.txt.

At the top is the list of races, not important for now but take note of the race index number, ignore the usable races and min max stats, those are to do with character creation and multiplayer. Scroll down to the unarmed tables, if you are making a new kick scroll down to the unarmed kicks but otherwise it's the same as adding a new punch.

The first part is the list of punch weapon entities that the game will load up as default attacks, add your new attack to the list (before the bracket) keeping the same format. So you'd have something like;


"robotSuicide" // 23
"punchError", // 24
"punchError", // 25
"newPunch", //26

Next is the punch table this tells the game which race will use which attack and at what level.

It goes race (remember the race index from the list at the start), punch_entity (the weapon you've just added), level (the experience level the attack becomes available at), unarmed (the skill points needed for the attack to become available) and finally strength and agility (the stat requirements for the attack).


{ 0, 7, 16, 130, 5, 7}, // BOS

So 0 is the race index number for the default race BOS (human), 7 is the weapon punchversion7 (Haymaker & Piercing Strike), 16 is the minimum experience level, 130 the skill points needed, 5 the strength needed and 7 agility.

Once you've added you weapon entity to the punch (or kick) entities list then either edit the entries in the punch table for whichever race the attack is for, or add to the list.


{ 0, 0, 0, 0, 0, 0}, // BOS
{ 0, 1, 0, 55, 0, 6}, // BOS
{ 0, 26, 2, 55, 5, 6}, // BOS
{ 0, 2, 5, 75, 5, 7}, // BOS
{ 0, 3, 6, 75, 5, 6}, // BOS
{ 0, 4, 6, 75, 5, 7}, // BOS
{ 0, 5, 9, 100, 5, 7}, // BOS
{ 0, 6, 12, 115, 5, 7}, // BOS
{ 0, 7, 16, 130, 5, 7}, // BOS
 
Back
Top