Announcement

If you are having trouble logging in, please reset your password.
If that does not work, please use the "Contact Us" to contact an admin.

October 23, 2012, 11:15:07 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Hi, I wrote a short  " data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/smile@2x.png 2x" width="20" height="20">  tutorial, how to create valid destructible objects.


 




Requirements: Zmodeler, Mafia World Editor and some Hex Editor


 







 




At first, something about this objects:


 




These models have levels of destruction, which are stored in separate models with "_cn" suffix.




Eg: my_model.4ds - non destructed model




my_model_c1.4ds - first level of destructed model




my_model_c2.4ds - second level of destructed model




... to n as:




my_model_c<em>n</em>.4ds - n level of destructed model, where n is integer number greater than 0


 




In mission, model must be placed as Model Object and to it must be linked primitive collision(s) (eg. XTOO :cool:  with material 41. Then, on hit event, the model will be changed to ..._c1 and its subobjects will be physical.


 




Practise:




1. In Zmodeler create repaired model (objects can be merged to one) and export it into models folder.




Note: If you're changing some old model, which can has lightmap (eg. xbarel 1.4ds, etc.), change name of old object in the model.




2. Then create destroyed object (1st level) with separated parts to own objects in the model. Export model to models folder with same name and suffix _c1. If you're creating more levels, objects through the models must have identical names.




Note: dummies in the _cn models aren't importamt.




3. Open mission in Mafia World Editor and insert new Model into scene2.bin file.




4. Create XTOOB colision and link (Parent value) to Model object. Set material to 41.




5. Save mission and close MWE.




6. Then, you have to specify physics properties into _cn models for every object. Every object in the model can have parameters string, which is located behind object name. Before text string is byte with legth of follow string (hex value), which you have to correctly calculate (look at picture).


 




Follow list describes physics parameters:




Physics parameters are bordered by ; character.




Standard physics have three parameters: M, N and I




M: mass in kilograms




N: type of physics - some unknown values, like: 15, 17, 22, etc...




I: sound (identical as in BScriptView for Physical Objects)




- 0: grenade




- 1: box




- 2: barrel




- 3: recycle bin




- 4: sign




- 5: paper box




- 6: wood




- 7: metal plate




- 8: small gun 1




- 9: small gun 2




- 10: wood plank




- 11: metallic thing




- 12: big gun




- 13: light on car


 




Example: ;M200N22I13; with length: 0C (in hex)


 




There are some extra parameters:




X: special




- 1G: glass




- 1H: hydrant




- 1EF: explosive with fire and light




These params are alone in the definition, eg: ;X1G; ;X1EF; etc.




X with value destribes resistance on next destruction level, eg: ;X200M50I2N22+;




+ as suffix is obligatory to link model to next _cn level. Objects in the _cn models must have identical names.




. (dot) have unknown function




Z: object will be solid - without physics


 




At the end, some expamples of physics definitions:







<pre class="ipsCode">Model.object child       | raw hex data                               | length of string, string

@HQobr02.Box01           | 063B6E31355A3B                             | 06 ;n15Z;



busta_c1.Object01        | 103B583130304E31374D313030302E2B3B         | 10 ;X100N17M1000.+;

busta_c2.Box01           | 0B3B4D3130304E313749363B                   | 0B ;M100N17I6;

busta_c2.Object01        | 0A3B4D32304E313749363B                     | 0A ;M20N17I6;



dopravni5b.stozar        | 0A3B4D33354E323149343B                     | 0A ;M35N21I4;

dopravni5b.~~lamp1       | 0B564F4C422C307831392C4D                   | 0B VOLB,0x19,M



dopravni9B_c1.Cylinder01 | 0D3B4D31303030304E323249373B               | 0D ;M10000N22I7;

dopravni9B_c1.Mesh01     | 053B5831483B                               | 05 ;X1H;

dopravni9B_c1.Mesh02     | 0C3B4D3230304E32324931333B                 | 0C ;M200N22I13;



kos01_c1.odpadky01       | 0A3B4D33304E333349333B                     | 0A ;M30N33I3;



PHbox01.PHbox01          | 093B4D3135304E31353B                       | 09 ;M150N15;

PHbox01.Object01         | 053B5831473B                               | 05 ;X1G;

PHbox01.Object02         | 0A3B4D35304E313549313B                     | 0A ;M50N15I1;



popel01.popel01          | 0F3B583130304D3130304E323249323B           | 0F ;X100M100N22I2;

popel01_c1.popel01       | 0B3B4D3130304E323249323B                   | 0B ;M100N22I2;



xbarel 1_c1.barel 1      | 0F3B583230304D353049324E32322B3B           | 0F ;X200M50I2N22+;

xbarel 1_c2.barel 1      | 0A3B4D35304E323249323B                     | 0A ;M50N22I2;</pre>

#1 October 23, 2012, 12:11:38 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
very nice thanks alot   <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">

#2 October 23, 2012, 12:45:14 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
*sees a whole new future for Titanic Mod*      


 




This is not a little epic, this is awesome! (also your 4ds converter, great job! I hope textures won't crash using your tool)

#3 October 23, 2012, 07:32:43 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Thanks  <img src="/wp-content/uploads/invision_emoticons/biggrin.png" alt="" data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/biggrin@2x.png 2x" width="20" height="20">

#4 September 24, 2013, 02:13:45 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Hello, I have problem with sign. Material of collision is 41, code of object is ;M15N22I4; . But when I shoot to object, second part is still frozen in the air.


 




 


 




Screenshot:


 







 


 

#5 September 24, 2013, 06:23:49 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Quote<div>



Hello, I have problem with sign. Material of collision is 41, code of object is ;M15N22I4; . But when I shoot to object, second part is still frozen in the air.


 




 


 














</div>



Is it one object or two separate ones? the pole and the sign.


 


 

#6 September 25, 2013, 04:03:29 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Quote<div>



Is it one object or two separate ones? the pole and the sign.


 














</div>



It is one object. But when I shoot to part in the air, it falls down.


 

#7 September 25, 2013, 06:31:47 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Who can help me, please? <img src="/wp-content/uploads/invision_emoticons/sad.png" alt="" data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/sad@2x.png 2x" width="20" height="20">


 


 

#8 September 26, 2013, 02:12:33 AM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Quote<div>



Who can help me, please? <img src="/wp-content/uploads/invision_emoticons/sad.png" alt="" data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/sad@2x.png 2x" width="20" height="20">


 














</div>



 


 




I would try to pm boz about it


 

#9 September 28, 2013, 05:32:32 PM Last Edit: January 01, 1970, 12:00:00 AM by Guest
Quote<div>



I would try to pm boz about it


 














</div>



So what? <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">