Reply To: MAFIA II – melee weapons

Home / Forums / Modders Corner / Mafia Editing / Mafia Mod Request / MAFIA II – melee weapons / Reply To: MAFIA II – melee weapons

Bank Notes: 480
December 18, 2011 at 6:46 am #9005

Update

 

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

 

 

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