Requested by Randy.Introduction
Quick and easy way of adding a portal (or any other custom model) as a functioning medkit on GunZ. This tutorial is completely done client sided. I do not have any server files to use on showing any more work on this -- Don't ask me how I can add them into shop and anything server related!
Server: CreativeGunZPreparing & Setting Files
Get the portal files from /model.mrs/worlditem
Create a new folder inside model/weapon/, name it "fun" (end result: model/weapon/fun/)
Put the portal files inside said folder. The files are:
ef_portal.elu - model itself
ef_portal.elu.ani - animation file
ef_portal.bmp.dds - texture
XML Changes
Now that you have the files all set, it's time for some xml changes.
Open up zitem.xml (system.mrs), put the following item in:
Code:
<ITEM id="2300" name="Portal Medkit" mesh_name="portal" totalpoint="0" type="custom" res_sex="a" res_level="0" slot="custom" weapon="medkit" weight="1" bt_price="0" delay="150" damage="0" ctrl_ability="0" magazine="15" reloadtime="10" slug_output="false" gadget_id="0" hp="0" ap="0" maxwt="0" sf="0" fr="0" cr="0" pr="0" lr="0" color="#FFFFFFFF" image_id="3" bullet_image_id="0" magazine_image_id="0" desc="Hey look! It's a portal!" snd_fire="we_grenade_fire" maxbullet="5" />
Remember to change the item id number!
Save, and close zitem.xml.
Open up weapons.xml (model.mrs/weapon.xml), and put in the following code:
Code:
<!-- Custom Portal Model -->
<AddWeaponElu name="portal" weapon_motion_type = "8" weapon_type = "11" >
<AddBaseModel name="portal" filename="model/weapon/fun/ef_portal.elu" />
</AddWeaponElu>
Save & close.
Time for the last file, open worlditem.xml (system.mrs), and put the following codes in:
Code:
<AddWorldItemElu name ="portal">
<AddBaseModel name ="portal" filename="model/weapon/fun/ef_portal.elu"/>
<AddAnimation name="play" filename="model/weapon/fun/ef_portal.elu.ani" motion_type="0" motion_loop_type="loop" />
</AddWorldItemElu>
Scroll down to the part where you need to give it the stats, add these in:
Code:
<WORLDITEM id="100" name="portal">
<TYPE>hp</TYPE>
<AMOUNT>125</AMOUNT>
<MODELNAME>portal</MODELNAME>
</WORLDITEM>
Note: remember to use a new WORLDITEM id number.
Save, pack, and test them out.Result



Posted for those who don't know how to add custom models. I know there are some of you out there. You can also change the .ELU files and use other models, for example: Superion Medkits, as silly as that may seem.
Questions? Suggestions? Errors? PM or write in this thread. I have not tested out this tutorial, this was all due to experimentation.