0
MetalCat

MAFIA II - melee weapons

Recommended Posts

Maybe you know, dandwell, how to make them working ? BTW, I've seen your videos and I have few questions.

 

1 - How did you make that new combination (it's known for me as it was used by Chinese) ?

 

 

2 - How did you shoot from the car as a passenger ? And how did you open the Stadium area in 0:41 ?

 

 

3 - How did you make new home ? 2:22 on video, marked by green key.

 

 

 

I'll sub your channel some time.

 

+1

Share this post


Link to post
Share on other sites

Unfortunately yet hasn't found as

to add the weapon what was not

hidden and didn't break game, but

I try wait for news ;)

Share this post


Link to post
Share on other sites

All greetings here that I have

achieved friends, I from Russian if

that

O_O Hope we will get melee weapons functioning, this is amazing!

Share this post


Link to post
Share on other sites

How did you shoot from the car as a passenger ? And how did you open the Stadium area in 0:41 ?

Spoiler for Hiden:

What about shooting,This is my modification, but this is another topic for discussion will be,stadium is not open UTB simple icon

Share this post


Link to post
Share on other sites

Progress!

 

 

That I made too. I think that you ve just change animation styles in ingame.sds and changed config/anim2styles (or something like that), did you?

Share this post


Link to post
Share on other sites

Any more progress?

 

Yes we are working on it... I do not understand LUA so much, so I have asked author of some videos (not andrashi!). He have done it and he is going to send it to me ;-)

Share this post


Link to post
Share on other sites

Any more progress?

 

Yes we are working on it... I do not understand LUA so much, so I have asked author of some videos (not andrashi!). He have done it and he is going to send it to me ;-)

Hell yeah, great to know!

Share this post


Link to post
Share on other sites

So, my German colleague send me free ride with melee weapons and now I am getting to work...I have look at it when I played it and send it on youtube:

Share this post


Link to post
Share on other sites

So, my German colleague send me free ride with melee weapons and now I am getting to work...I have look at it when I played it and send it on youtube:

COOL!!!!!!!!!!!!!!!!!

Share this post


Link to post
Share on other sites

One thing - will we be able to use it in missions? Atleast in some? Ofcourse that's not nescessary but would be even more aweomse! Or will it only be in FreeRide? P.S. I hope this really becomes a big success. It's weird seeing Cops in Ch6 with batons and in Ch8 Steve, Marty, Joe with baseball bats, and you can't even use it, this mod will be AwEsOmE!

Share this post


Link to post
Share on other sites

One thing - will we be able to use it in missions? Atleast in some? Ofcourse that's not nescessary but would be even more aweomse! Or will it only be in FreeRide? P.S. I hope this really becomes a big success. It's weird seeing Cops in Ch6 with batons and in Ch8 Steve, Marty, Joe with baseball bats, and you can't even use it, this mod will be AwEsOmE!

Yes, we want to activate it in story, too. But now we must solve problem of using them. ;-)

Share this post


Link to post
Share on other sites

One thing - will we be able to use it in missions? Atleast in some? Ofcourse that's not nescessary but would be even more aweomse! Or will it only be in FreeRide? P.S. I hope this really becomes a big success. It's weird seeing Cops in Ch6 with batons and in Ch8 Steve, Marty, Joe with baseball bats, and you can't even use it, this mod will be AwEsOmE!

Yes, we want to activate it in story, too. But now we must solve problem of using them. ;-)

 

That will probably be the best mod for Mafia 2Ãâà 8) +1

Share this post


Link to post
Share on other sites

INSANE work so far MetalCat, I believe though I know why in the vid the guy does a freak gun draw anim when you show the blade to him, I think because the NPC is searching for a knife, but since the game has edited a blade from NPC inventory out, the action is not available to the NPC, so he keeps drawing a gun in rotation form until he gets his knife wich is not there, so he continues in a loop with a gun draw.

Share this post


Link to post
Share on other sites

Hi fellow modders and Mafia II fans,

 

INTRODUCTION, skip if you are not interested

 

 

Allow me to briefly introduce myself and then we'll get to the business. The name is Andrashi, I am from Czechoslovakia and I have always been quite keen about Mafia and its sucessor, Mafia II. I have followed Mafia II since its announcement and felt enraged when cuts began, mainly in close combat part (see THIS 2K FORUM THREAD). Being a fan of unarmed brawling, it was decided that this matter was worth investigating. Result of the search were interesting enough to be worth posting in form of a pair of videos. Outrage followed, then everything went calm, apart from occasional comment like "F##K 2K" posted under one of these.

 

About a month ago I started getting e-mails how to mod in these melee weapons. I am currently studying Master's degree of Microelectronics and Technology, so answers had to wait. Of course that led to nice secondary effects like another messages sent from the questioner, saying warm and pleasant things like "You greedy bastard, keep that melee s##t in your @$$ if you think you are so good you don't have to respond me anymore."

 

Well OK, still I tried to respond in my spare time. But then it happened. During last few days I got quite a number of e-mails on this topic, so I went to have a look "why". And that's when I came over this thread, only to learn that all you guys were asking me and posting here my answers as if it mattered whether one of you asks or another ;D .

 

 

Now let's get to business. First of all, let's have a look at animations sets of our beloved melee weapons.

 

 

KNIFE

moveset number: 35 (0x23)

missing moves: All three counterattacks and all their hit responses (both normal and stun types)

 

BATON / NIGHTSTICK

moveset number: 36 (0x24)

missing moves: none, this set is complete

 

BASEBALL BAT

moveset number: 37 (0x25)

missing moves: light punch combo, also block animation is pretty much unpolished

 

CHAIR

moveset number: 73 (0x49)

missing moves: all, this animset is a relic from development

 

BARREL

moveset number: 74 (0x4A)

missing moves: all, this animset is a relic from development

 

Grabs are behaving always the same as for unarmed melee. Finisher for low stun (enemy slumps on ground) is always standard melee kick. For some unknown reason, standing melee weapon stun finishers mess the camera for a few first times they are used (camera goes to the ground). After some time everything gets miraculously fixed and from that point during melee weapons finishers the camera behaves normally.

 

Clever animation set parenting can help with getting rid of some shortcomings. For example, when baton moveset is made to be a parent for Baseball bat moveset, then Baseball bat light puch combo copies Baton light punch combo. Looks better than Baseball bat empty hands light punch combo in my opinion.

 

Sidenote: as you all can see, Mr. VÃÆávra was not lying back in 2007. There was really planned rich brawl with usage of environment.

 

 

Now what about actual weapons?

 

 

In Mafia II there are two files named Table_0 which have something to do with melee weapons.

 

One is in "Tables.sds" and contains weapons.tbl datatable. Within this table various firearm parameters can be tweaked - ammunition, rate of fire, muzzle effect, type of projectile, kickback etc. Of course empty hands and melee weapons are listed as well so...so nothingÃâà ;) . As far as I know, empty hands and melee weapons have their entry in this table only because each weapon has to have a weapons.tbl table entry. Which leads me to a curious question - can anybody try to add some "ammunition" to a melee weapon and observe the results? Maybe we are closer to having melee weapons than we thinkÃâà :P

 

Anyway, still there is one curious flag in weapons.tbl. If a firearm is set a certain flag and then is fired at some wall, it leaves not bulletholes, but blunt weapon scratches. Interesting, eh? I think melee weapons and overall melee combat was originally meant to be "free to use anywhere". Decision to have duels was probably made later in the development.

 

 

The second Table_0 in question is in "Ingame.sds" and contains Human_Items.tbl and contains all itemsÃâà which can be attached to human characters. Of course that also means melee weapons. This table is quite important because it shows us something pretty interesting: engine of Mafia II probably works with some internal values (number most likely) which represent all of these items. So even if c1911 is completely tweaked and modded to look and behave like Thompson1928, the icon of c1911 stays because it is slot 4 in Ingame.sds.

 

Such a discovery is important, because it means certain item slots can be "special". Yes, for example empty hands, which are currently the only human "item" allowed to enter melee duel. What if at some point of development melee weapons were given such a privilege as well? Can it be that melee weapons are now simply excluded from such a condition? Or it can be similar, but in fact opposite: what if items have their internal hardcoded status (empty hands, firearm, melee weapon, decorative item) and then there is some condition that only empty hands are allowed to enter melee duel. And what if we expand this condition once again that not only empty hands, but also melee weapons can enter melee duel?

 

 

Which options we modders have if we want to reimplement melee weapons back again?

 

 

Now, what are our options if we want to bring melee weapons back and NOT break something else in the progress? Switching movesets by hand in files is maybe a fun, but fixes nothing. We don't need to switch movesets in files, we need the GAME ITSELF to switch movesets dynamically, based on a weapon in hand. Or at least fake such a process.

 

Generally, there are according to my knowledge two ways we can try:

 

1.)

The best would be if we could somehow get past the condition which makes melee weapons unable to operate in close combat. This condition WAS NOT always active as you can see for example in this video (delete away the letter X): Xhttp://www.youtube.com/watch?v=omY93dIH8pc#t=05m03s. Question is whether we are powerful enough to find this condition and change it. If it is in some global LUA file (some general settings which are loaded when the game starts) then we may stand a chance. But if it is on code-level (somewhere in Mafia II.exe), then this way is screwed unless we have some Neo within our ranks.

 

2.)

Second way is to keep empty hands as the only weapon which can enter duel, but then use LUA scripting to change the animset and to fake in melee weapon into the hand. Changing animation moveset can be done via "SetAnimStyle". I personally tested it, it works well. Still there is an issue of the weapon itself missing in the hand. Can you remember the level "Room Service"? Vito drags some bucket through half the mission. This bucket is in fact some "actor item". Can you remember Francezka's sidemission and Erik being smashed by a bottle? The same "actor item" mechnics are used. This "actor item" is first registered ("RegisterActorItem"), then attached to Vito's hand ("ActorItemTo Hands"). If the same can be done for melee weapon model (spawn it as actor item, then attach it to Vito's hand), then we can go round the empty hands check and fake in melee weapon in hand. Next tweak the damage via SetDamageMultiplier and here you go with almost fully functional melee weapon. Almost, because I guess you cannot force it out of hand, since there is in fact no melee weapon present.

 

Remember, this method may work, but it utilizes "empty hands" human item with faked melee weapon model in hand, changed animation moveset and modified damage multiplier. It may work, it may work not.

 

 

Conclusion

 

 

In my opinion (based on my current knowledge) there are no other ways how to bring back fully operational melee weapons than the two mentioned above. If I knew any trick how to modify melee weapons back, do you guys really think I would sit on it and not implement it into RotH mod?Ãâà ;D But I hope now you all can see that I am not hiding anything away from you all. I just don't fell like shouting "LOOK I CAN MAYBE BRING BACK MELEE WEAPONS, I'M SO GOOD !!!" when in fact I have only theses and nothing to show. Oh, and the tiny little peeble thing named "real life" called right now, it wants me back immediately.Ãâà ;)

 

 

 

Best regards, Andrashi

Share this post


Link to post
Share on other sites

Welcome, my friendÃâà 8) I'm glad you finally joined usÃâà :) Things with melee weapons have changed a lot last time.

 

+1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0