Announcement

If you are having trouble logging in, please reset your password.
If you are not getting an activation email, please check your spam or
use the "Contact Us" to contact an admin.
#90 December 03, 2011, 04:04:25 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Quote<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="1326" data-ipsquote-contentclass="forums_Topic"><div>



Yeah I know  <img src="/wp-content/uploads/invision_emoticons/smile.png" alt="" data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/smile@2x.png 2x" width="20" height="20">  Hey, MetalCat, will it work on updated Mafia 2 later?








 




I don̫̉t know...You can ask: http://mafiascene.net/profile/?u=350




He has done LUAÃâà script. Ask him.







</div></blockquote>

 




MaybeÃâà  <img src="/wp-content/uploads/invision_emoticons/tongue.png" alt="" data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/tongue@2x.png 2x" width="20" height="20">

#91 December 03, 2011, 09:25:00 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Update


 




Making melee weapons fully working via their respective weapons/items is in my opinion highly unprobable.


 




<div class="ipsSpoiler_header">



 




I downloaded Skidrow version for research purposes (I have my own legal copy of Special Extended Edition).Ãâà Applied mafiaII.exe and free ride from you guys, SuperMcTiger/MetalCat. Other other files from your package were not used.


 




Results of experiments unfortunately confirm my theories. Melee weapons are taken as normal weapon slots. That means you can for example change "Pendrek" (baton) into Thompson1928 and it will work (only the HUD icon of the baton stays). However, I haven't found a way how to force the engine into accepting these items as melee weapons.


 




Table entry "Prazdne ruce" ("Empty hands") in human_items and for example table entry "Pendrek" ("Baton") in the same table have the exactly same flag bits - only the one is set, and that is "small firearm". Yes, "Prazdne ruce" has "small firearm" flag set. Surprisingly, police does not recognize "Prazdne ruce" as an offence and there is no ammo counter visible when player has "Prazdne ruce" as a currently held weapon. On the other hand, Baton is recognized as a "small firearm" and has ammo counter visible. That means human item of index 0 (Prazdne ruce) is treated somehow special by Mafia II engine, whereas melee weapons are treated as standard weapon-type items.


 




Conclusion is not pleasant - this way of restoring melee weapons would be the best, but unfortunately, we cannot do it unless somebody reverse-engineers MafiaII.exe and changes/writes in some neccessary code.


 




</div>

 


 


 




Making melee weapons somehow working via LUA scripting is plausible.


 




<div class="ipsSpoiler_header">



 




The key is this LUA command: SetAnimStyle(selector, AnimSet)




There is OnEvent in Freeride, which is triggered each time some event calls. One of the events is "push the enemy" event (so far I don't know exactly how to detect it).




If we find how to detect the "Push the enemy" event, then we can add multi-choice menu (similar to police bribing menu) and according to the chosen response we can change Vito's moveset and damage multiplier to fake a selected melee weapon. Big issue of this way is no model of the wepon being present in hands. However that can by maybe cicuuvised by using RegisterActorItem(float, float) and ActorItemToHands (UNTESTED SO FAR) Question is wheter is is doable.


 




</div>

 


 




Andrashi

#92 December 18, 2011, 06:46:58 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Update


 




Another update, mainly focused on the matter of Actor entities.


 




<div class="ipsSpoiler_header">



 




Melee duel with "invisible cold weapons" was sucessfully emulated via Lua scripting. Still pretty basic, but looks OK nevertheless.


 




"Actor item" mechanics were looked into. So far no success, but interesting discoveries. In Mafia II, designer defines actors (entities to be used) in the "Actors" file in the *.SDS. Actors can be:




[ul]




  • Script




  • Human entity




  • Item entity




  • Particle entity




  • [/ul]




    Counting out Script and Particle entities, Human and Item "actors" are referencing actual models i.e. "CITGA3" (regular gangster from his .sds file) or "Palka" (baseball bat from weapons.sds file). Actor has its unique name given by the designer and contains the name of the referenced model as well (duh).




    In Lua scripting, actors are then referenced by their name. That is why are mission-specific enemy entities referenced in Lua scripts by strange names. So when for example "sp1d0" (fictional name) is called, engine has it listed as a Human actor entity which references CITGA3 model. Thus such an actor is known and can be operated with (given weapons, set aggresivity etc).


     




    Exact structure of actor profiles is so far not completely known due to low amount of time available for research. If anybody can fill us up (means if anybody already messed with Actors), it would be helpful. If structure of Actors profiles is decrypted, in theory we, modders, can start creating our own missions with unique mission specific NPCs. Of course so far only within freeraid_main.sds file.


     


     


     




    As a side effect of this research, during the inspection of a file named something like "02-foundry.sds" (in "Script" folder), number of sc_ animations were found (these are the anims used with AnimPlay). From names of them it looks like one of my early theses is correct - instead of plain CrazyHorse destruction, there was probably (still not certain) supposed to be a large melee brawl, ending in a CrazyHorse destruction and Greasers packing off to foundry (where shootout occured).


     




    </div>

     

#93 December 18, 2011, 12:29:03 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Hi




I have not quite understood




but I know the name of the entity and the "StreamMapLine" has activated for:


 




-Entity arcade




-Entity Clemente slaughter




-Entity constructionsite




-Entity Distilery (B of Jimmy)




-Entity Fondry














-Entity Chinese Restaurant









-Entity mansion














-Entity Observatory




-Entity Prison














-Entity Sea Gift


 


 




-Entity Cathouse JA




-Entity supermarket JA




-Entity JA












 


 




I would make a topic soon

#94 December 31, 2011, 09:10:11 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
[youtube:3nu2xkn2]
[/youtube:3nu2xkn2]


 




Look what I found on youtube

#95 December 31, 2011, 09:23:26 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
That is progress... But as you can see, Vito own two knives and to fully function (I can not think of another word...) we have to own only one...I think, that he changed something like "Prazdne ruce" (fists) to "Knife"... I saw it once before... But thumb up   :cool:  


 




I asked him that he donÃâôt want to join our "team"   :cool:  and now I am waiting for a respond...Hope that he will accept...    

#96 December 31, 2011, 10:43:18 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Look what I found on Youtube it's an exclusive preview of the combat Mafia 2 directly from the developers at 2K I think that in fact the entire combat system was functional but the developers have changed the combat system so that it was not possible to get the full version of the game




There is

#97 December 31, 2011, 11:54:55 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
That video looked brill from the russion melee video, it appears as the days past the closer we're getting to the day of when Melee weapons will function once again in Mafia II. Thank you guys so much for everything you do thus far.

#98 January 02, 2012, 09:35:30 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
<div></div>

 




<div class="ipsSpoiler_header">

Bugs, bugs, bugs...For now, anyway


</div>

 




Mafia1860 found lots of animations of melee weapons and scripted it. Thank you   <img src="/wp-content/uploads/invision_emoticons/wink.png" alt="" data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/wink@2x.png 2x" width="20" height="20">  :







<pre class="ipsCode">ply=game.game:GetActivePlayer()

ply:SetControlStyle(enums.ControlStyle.LOCKED)

DelayBuffer:Insert(function(l_1_0)ply:AnimPlay("35-CC_BIGHIT1-B", false)end,{l_1_0},100,1,false)

DelayBuffer:Insert(function(l_1_0)ply:AnimPlay("35-CC_BIGHIT1_DAMAGE-A", false)end,{l_1_0},2000,1,false)

DelayBuffer:Insert(function(l_1_0)ply:AnimPlay("35-CC_BIGHIT1_DAMAGE-B", false)end,{l_1_0},5000,1,false)

DelayBuffer:Insert(function(l_1_0)ply:AnimPlay("35-CC_BREATH-A", false)end,{l_1_0},8000,1,false)

DelayBuffer:Insert(function(l_1_0)ply:AnimPlay("35-CC_BREATH-B", false)end,{l_1_0},10000,1,false)

DelayBuffer:Insert(function(l_1_0)ply:AnimPlay("35-CC_EVADE_L-A", false)end,{l_1_0},12500,1,false)

DelayBuffer:Insert(function(l_1_0)ply:AnimPlay("35-CC_EVADE_L-B", false)end,{l_1_0},15000,1,false)

DelayBuffer:Insert(function(l_1_0)ply:SetControlStyle(enums.ControlStyle.FREE)end,{l_1_0},18500,1,false)</pre>

#99 January 02, 2012, 11:40:23 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
I like to watch the melee weapon anim video's, I really hope within 1-2 months from now we have a full on mod like the ROTH mod but with Melee weapons, for those of you that do not know the ROTH mod, it is by Andrashi it stands for Reminiscence Of The Hype Mod. If you wish to checkout the ROTH mod by Andrashi, click the link below...


 




Reminiscence of the hype V1.0

#100 January 03, 2012, 12:13:25 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
The script from the video is done together indiscriminately. There's a lot more codes.  :woohoo:


 


 




Sorry for my bad English ??:

#101 January 06, 2012, 08:39:57 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
My apologies for non constructive topic reply.


 




At risk of sounding too harsh - CAN WE PLEASE FINALLY STOP WITH THIS SILLINESS?




I made a few posts about melee weapons, their animations and overall our chances of bringing back melee weapons.




Posts are seeimgly ignored, because I did not backed them with nice YouTube videos, right?


 




Sigh, so...if Mafia1860 found anything new, then how did I managed to write post Post 1820, second paragraph? Ah yes, I forgot to add YouTube video, right? OK, so let's fix it. Here is a nice eye candy video which tells us nothing about how to achieve what we want but looks pretty cool]aaa[/url]


</div>

 




And here's one outrageous new discovery - Joe's melee animations are those which have prefix "39-" in basic_anims2.sds. What a big surprise, given the fact Joe's moveset is labeled as set 39 in animengine_groups and the fact this is known since summer 2010's demo. Seriously, can we start massively celebrating because I claim to be the first one to mention it? Oh I forgot to add another eye candy YouTube video, now everybody will ignore the post. Wait wait, here you go:


 




<div class="ipsSpoiler_header">

aaa


</div>

 


 




OK, I hope the message is clear now. We need to move FORWARD if we want  to have fully working melee weapons, not to stay at one place and glorificate everybody who can alter a few numbers in a HEXeditor. As I already wrote (post was ignored, no fancy YouTube video, I know): since melee weapons slots are disabed via engine and the only weapon slot which works for close combat is slot "Prazdne ruce", there is the only way to have melee weapons back - LUA script and actor items. However, I am yet to discover how to add actor item to .sds structure. So far my knowledge is incomplete and all of my attempts are crashing down the game. But that means THIS is the issue we should be intensely investigating right now. Not "how to change a few numbers with HEXeditor", but "How to add CrashObject entity to freeraid_main.sds file".


 




Cheers, Andrashi


 


 




P.S.: I also found a way how to make A.I. enemies break away from grabs and with some other changes A.I. can even reverse grab you! But you know, no YouTube video, so feel free to ignore this PostScriptum.[/size]

#102 January 08, 2012, 03:01:59 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
??? ????????  ??? ??? Andrashi ??  ??? ? ?  ??? ??  ???   ??? ???  ??? ??!

#103 January 08, 2012, 03:12:54 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Very interesting post Andrashi, I would agree with it, with all due respect to the other modders of course.


 




Btw, do you plan to edit or create a new ROTH mod? I REALLY love that mod, just the player camera is way too close when walking around, I love the cover system camera.


 




Also my most favourite moment of your mod, is I got approached by a cop, and he asked me for my license! Because I had a gun in my hand, that is just like the GDS 09 video, well done man, well done.

#104 January 16, 2012, 05:47:19 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Hi there again, fellow mobsters.


 




zahar999:  ??? ????.  ??? ???  ???   ??? ??.


 




For everyone: Work continues on reverse engineering of the Actor file. Actor file is closely related with FrameNameTable and with those funky buffer and vertex files. Now just figure out how all this is related and we can give it a try.


 




In the meantime, we can play with a nice workaround. We already know that Vito can perform melee animation sets via LUA command SetAnimStyle. But with no weapon in hand, right? Well today I rediscovered (post-mortem credits to S0beit and MafiaEmpire.com) one quite useful LUA command: ModelToHands. It does exactly how it sounds - it adds chosen weapon model to each hand. Rest of the description in the spoiler.


 




<div class="ipsSpoiler_header">



 




So for example if you want to use baseball bat in close combat without breaking any other gameplay mechanic, do this:




[ol]




  • Modify melee animsets file in ingame.sds, add melee weapons animstyles under "melee" branch. My apologies, at time of writing this post I am away from modding PC, so no closer info. For example give the name "BatStyle" to the Baseball bat animation set (set 37).




  • In LUA file (freeride), add a function which is for example called each time Vito is attacked. Place two crucial commands inside this function:




  • [ul]




  • game.game:GetActivePlayer():SetAnimStyle("melee","BatStyle")




  • game.game:GetActivePlayer():ModelToHands(true, -1, 32)




  • [/ul]




    [/li]




  • Test it in the game. When the function is called, you should get model in hand (seemingly no animstyle change). The model may be wrongly oriented, but will be there. Good. Go and make melee mayhem. Model fixes itself upon entering another close combat duel and furthermore, change of animstyles takes place, so you can finally beat your victim with a bat like a bo...like a Mafia wiseguy   :cool:  




  • [/ol]


     




    </div>

     


     


     




    REMEMBER: The way described above is just a placeholder. Goal is a full imiation of close combat weapons mechanics, that means ability to drop weapons in combat when being knocked down and ability to pick them up again. And for that kind of behavior, only Actor items can help us.


     




    Have fun, Andrashi