Jump to content

Weapon Icons?


Ratte

Recommended Posts

I try to get a weapon icon ingame. I followed the tutorial by GRIN but first nothing is showed in planning phase and second the game chrashes without error message if I start playing.

Could the diesel file cause problems? In it I have just the main_body linked to the align dummy (for that weapon there is no scope or gl) or is a need for skinning and skin_root?

Link to comment
Share on other sites

Nah, aslong as you have the main_body linked to the align dummy the .diesel file should be alright.

What other things than the hud model have you included though?

You will need to create a hud_***.xml file in the same location as the hud_***.diesel file. Look at what's in one of the original files there to see what it should contain.

You also need a reference to the main_body inside your ***_common.xml file and probably in the ***_mag_common.xml file aswell.

The u_***.xml file also needs to point towards your new hud icon.

Link to comment
Share on other sites

Ok, i checked all the things that you mentioned but there is no change :wall:

In 3ds max -->7<-- I did it so:

nzciylseda.jpg

This is the hud_MG3.xml:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<dynamic_object>

<diesel file="/data/objects/gui/hud/weapons/hud_MG3.diesel" orientation_object="align" materials="/data/objects/gui/hud/materials.xml"/>

<object name="align"/>

<object name="main_body"/>

</dynamic_object>

This is the entry in the data/units/interface/u_hud.xml

<unit type="interface_element" name="hud_MG3" slot="30">

<model file="\gui\hud\weapons\hud_MG3.xml"/>

</unit>

I have changed the line in the units/weapons/u_MG3.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<units>

<xdefine name="MG3( name_ext )">

<unit type="weapon" name="MG3$name_ext" slot="12">

<model file="/weapons/MG3/MG3$name_ext.xml"/>

<depends_on unit="MG3_mag$name_ext"/>

<script_class name="base" class="BulletWeapon"/>

<stats block="base_data"/>

<stats block="weapon_data">

<var name="ammo_type" value="762"/>

<var name="length_from_root" value="75"/>

<var name="clip_max" value="120"/>

<var name="owner_align" value="primary_align"/>

<var name="public_name" value="MG3"/>

<var name="anim_name" value="saw"/>

<var name="hud_name" value="MG3"/>

<var name="animated_mag" value="true"/>

<var name="network_id" value="2"/>

Also the entry in the lib/managers/xml/weapon_data.xml

<weapon_data unit="MG3" name="MG3" weapon_id="42" inventory_slot="primary" gui_unit="MG3" price="800" damage="2" player_weapon="1" grenade="0" cal="762" wizby="2">

<stats caliber="7.62 x 51 mm" rpm="1200" velocity="840 m/s" firemodes="FA" capacity="120" info="info_MG3" />

<bar_stats accuracy="0.2" stability="0.3" weight="9" impact="0.7" />

<mods front="false" top="false" bottom="false">

</mods>

</weapon_data>

Last I checked the reference to the main_body inside the MG3_common.xml file and in the MG3_mag_common.xml file.

But this is the result: <_<

ubpzvjqeon.jpg

I want to check the folder structure and xml´s, so I replaced the hud-diesel file with the existing one of the saw ---> and the icon is shown (that means my hud diesel is wrong) BUT if I want to start playing, in that moment I spawn, the game chrashes with no error message (that means bad xml´s)

I cannot find these failures

:wall::wall::wall::wall::wall:

Still very thankful for help

note: It´s a fine MG :rolleyes:

Link to comment
Share on other sites

Alright, first of all I wouldn't recommend using the original model as your hud model. Open the template hud model provided with the GRAW 1.35 patch and check how that one was made.

When I made mine I simply just reused that template and push/pulled verts untill the scar instead resembled what I was aiming at.

Secondly, if it shows up ok in the GRAW loadout but crashes the game when you start it's likely to be something messed up with your lods.

Link to comment
Share on other sites

  • 2 weeks later...

Alright, first of all I wouldn't recommend using the original model as your hud model. Open the template hud model provided with the GRAW 1.35 patch and check how that one was made.

When I made mine I simply just reused that template and push/pulled verts untill the scar instead resembled what I was aiming at.

Secondly, if it shows up ok in the GRAW loadout but crashes the game when you start it's likely to be something messed up with your lods.

Ok, thanks. I do so like you mentioned and it looks good in the loadout screen. But now there is the hud_icon of the scar light in the weapon status menue (after spawn). I dont know what the problem could be. Is there something wrong in the hud_***.diesel? because I used the scar model provided by GRIN. Or have I change some lines in the xmls?

I have to append that I never solve the problem with the crash when I start playing, I just add my weapon to brezzies mod and the crash appears no more.

What do you mean with the lods? 3ds max told me no errors.

Edited by Ratte
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...