[Guide] Functional Portal/Custom Medkits
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
http://i613.photobucket.com/albums/t...8-07-11-15.png
http://i613.photobucket.com/albums/t...8-07-13-71.png
http://i613.photobucket.com/albums/t...8-07-14-98.png
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.
Re: [Guide] Functional Portal/Custom Medkits
Re: [Guide] Functional Portal/Custom Medkits
Re: [Guide] Functional Portal/Custom Medkits
Always wondered how to do this, thanks for the tutorial, Styx.
Re: [Guide] Functional Portal/Custom Medkits
Really thanks for tutorial styx.
Re: [Guide] Functional Portal/Custom Medkits
-sigh- i knew this already, seriously this is kinda like a captain obvious post, if you see it has an animation then you include the animation with the file.
besides how hard is it to ctrl+f and look for where the med is called for in every file on the system.mrs
Re: [Guide] Functional Portal/Custom Medkits
Quote:
Originally Posted by
monckey100
-sigh- i knew this already, seriously this is kinda like a captain obvious post, if you see it has an animation then you include the animation with the file.
besides how hard is it to ctrl+f and look for where the med is called for in every file on the system.mrs
many beginners do not know this kinda stuff. Being in a community like this we are suppose to try to help others not just pshh I knew that.
Nice tut 'Styx keep it up
Re: [Guide] Functional Portal/Custom Medkits
Quote:
Originally Posted by
monckey100
-sigh- i knew this already, seriously this is kinda like a captain obvious post, if you see it has an animation then you include the animation with the file.
besides how hard is it to ctrl+f and look for where the med is called for in every file on the system.mrs
Yes, I know. But there are a few out there that don't know, so I decided to post it to the public.
Re: [Guide] Functional Portal/Custom Medkits
Re: [Guide] Functional Portal/Custom Medkits
Nice.
I remember I seen the Portals on Trinity Gunz, but they weren't meds, just for looks lol.
Interesting though.
Re: [Guide] Functional Portal/Custom Medkits
thanks lol I have learned more about adding iems :P
Re: [Guide] Functional Portal/Custom Medkits
Few month bump :D
But i have question and you have somethings wrong....
I tryed to make my customs meds and repairkits.
And i fails... of course i have few questiuons...
Quote:
<!-- Custom Portal Model -->
<AddWeaponElu name="portal" weapon_motion_type = "8" weapon_type = "11" >
<AddBaseModel name="medikit" filename="model/weapon/fun/ef_portal.elu" />
</AddWeaponElu>
Umm why there is medikit ? it should be portal i guess...
Next question...
Quote:
<WORLDITEM id="100" name="portal">
<TYPE>hp</TYPE>
<AMOUNT>125</AMOUNT>
<MODELNAME>portal</MODELNAME>
</WORLDITEM>
Why there is id 100 ?
100 is already used by normall medikit... and can you explain what is AMOUNT ?
And i must add my new custom medikit into zitem.xml ?
Re: [Guide] Functional Portal/Custom Medkits
Re: [Guide] Functional Portal/Custom Medkits
isnt possible to make the portal move you from place to place like rerespawning.. in other place when you get into your portal =] this idea is cool :D:D
Re: [Guide] Functional Portal/Custom Medkits
Quote:
Originally Posted by
CukieR
Few month bump :D
But i have question and you have somethings wrong....
I tryed to make my customs meds and repairkits.
And i fails... of course i have few questiuons...
Umm why there is medikit ? it should be portal i guess...
Next question...
Why there is id 100 ?
100 is already used by normall medikit... and can you explain what is AMOUNT ?
And i must add my new custom medikit into zitem.xml ?
First question: yes it should be 'portal', my mistake. Thanks for scoping that out.
Second question: IDs are different from server to server, depends on what ID you used and what you haven't already used. Just used a new ID code if you want to create a new separate medkit. AMOUNT = how much points it heals by (in the tutorial, the portal medkit heals 125 health points). The TYPE determines where the AMOUNT value goes into (TYPE = hp in tutorial).