Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MAFIA II - melee weapons
#61
Any more progress?
#62
I got this message from Andrashi on YouTube

[Image: beztytuu1oi.jpg]
#63
lightingft:37n6qm0n Wrote: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 ;-)
#64
MetalCat:1rzof2pm Wrote:
lightingft:1rzof2pm Wrote: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!
#65
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:
Mafia II melee weapons with LUA - BETA
#66
MetalCat:1b57lhue Wrote: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:
Mafia II melee weapons with LUA - BETA
COOL!!!!!!!!!!!!!!!!!
#67
I hope that we will be able o use it ???
#68
That's good to see - I think we would be able to use it soon  8) 8)
#69
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!
#70
lightingft:1puyou68 Wrote: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. ;-)
#71
MetalCat:ljvqz2hi Wrote:
lightingft:ljvqz2hi Wrote: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
#72
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.
#73
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  Wink . 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  Tongue

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.  Wink

Best regards, Andrashi
#74
Welcome, my friend  8) I'm glad you finally joined us  Smile Things with melee weapons have changed a lot last time.

+1
#75
Do you think your instructions could be applied in-game ?  8)
#76
Welcome back Andrashi! We've waited a while to see you here, thank you so very much for joining this site, I will also say that I love the ROTH mod, fantastic work.
#77
Thank you, andrashi... We will take care of it...

People! I will throw here link to our melee weapons, so if you find something interesting, post it here...

http://www.ulozto.sk/11456782/miimwlua-rar
#78
to bad it don't work

my PC just don't start the game
#79
crazypreacher:spqf2ks8 Wrote:to bad it don't work

my PC just don't start the game

E? WTF? That is bad... Very bad...It works for me perfectly...Why?
#80
I don't know i play with all legal games  not torrents


Forum Jump:


Users browsing this thread: 1 Guest(s)