Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Modding, Customising, Editing » MDGuns and SMGuns (More workarounded than SOLVED, but..) (New weapon shows no inventory/ground pictures.)
MDGuns and SMGuns (More workarounded than SOLVED, but..)[message #365992] Tue, 26 March 2024 19:58 Go to next message
Marcus is currently offline Marcus

 
Messages:109
Registered:November 2014
I managed to put a first test weapon in game, I can order it from Bobby Ray's (new graphic is shown), I can get it and shoot it but it shows no graphics in my inventory or on the ground (in this case I get a nada item). Now, I triple checked everything and mdgunsns and smguns do contain the new images. So, do I need to edit more files? Op xml ones? Any help is appreciated, thx.

[Updated on: Tue, 26 March 2024 22:56]

Report message to a moderator

Sergeant
Re: MDGuns and SMGuns[message #365994 is a reply to message #365992] Tue, 26 March 2024 21:12 Go to previous messageGo to next message
Kitty

 
Messages:466
Registered:October 2017
Location: Germany
Did you add the graphic number for your new weapon in items.xml?

If it's a weapon, we talk about mdguns.sti and smguns.sti

in there, your new weapon image will be at an index

that number goes into the tag <ubGraphicNum> of that item in items.xml

for guns that's only  <ubGraphicNum>

(use no graphic-type-tag for guns, that's only for non-gun items)

i.e. item 347, the AK-47, has

<ubGraphicNum>136</ubGraphicNum>

so the graphic for that weapon is at index 136 inside mdguns.sti (and smguns.sti)

------


if it would be another kind of item, two tags are needed

<ubGraphicType> and  <ubGraphicNum>

where type refers to which pItem.sti it belongs to

i.e. item 1030, Scope 4x, has

<ubGraphicType>1</ubGraphicType>
<ubGraphicNum>545</ubGraphicNum>

so its md-graphics are in mdp1Items.sti

and its sm-graphics are in smp1Items.sti

at index 545 of that sti

and so on

EDIT:

thinking again, if the weapon graphic is hsown at BR, you do already have an index-number filled in there

so, hm.

next I can think of is that you may not have used the same index-nr?

like, used index-nr XYZ for BigItems, but maybe index-nr ABC at md and sm?

it must be the same

[Updated on: Tue, 26 March 2024 21:30]




How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
Re: MDGuns and SMGuns[message #365995 is a reply to message #365994] Tue, 26 March 2024 21:29 Go to previous messageGo to next message
Marcus is currently offline Marcus

 
Messages:109
Registered:November 2014
To make my first weapon I copied and pasted the code for the first weapon:

Weapons.xml

<uiIndex>1762</uiIndex>
<szWeaponName>XT-A</szWeaponName>
<ubWeaponClass>1</ubWeaponClass>
<ubWeaponType>1</ubWeaponType>
<ubCalibre>2</ubCalibre>
<ubShotsPer4Turns>18.72</ubShotsPer4Turns>
<ubBulletSpeed>21</ubBulletSpeed>
<ubImpact>25</ubImpact>
<ubDeadliness>16</ubDeadliness>
<ubMagSize>15</ubMagSize>
<usRange>115</usRange>
<usReloadDelay>200</usReloadDelay>
<BurstAniDelay>100</BurstAniDelay>
<ubAttackVolume>50</ubAttackVolume>
<ubHitVolume>3</ubHitVolume>
<sSound>299</sSound>
<sReloadSound>100</sReloadSound>
<sLocknLoadSound>106</sLocknLoadSound>
<SilencedSound>156</SilencedSound>
<bBurstAP>20</bBurstAP>
<APsToReload>12</APsToReload>
<SwapClips>1</SwapClips>
<MaxDistForMessyDeath>7</MaxDistForMessyDeath>
<ManualReloadSound>476</ManualReloadSound>
<nAccuracy>6</nAccuracy>
<ubAimLevels>3</ubAimLevels>
<Handling>9</Handling>
<usOverheatingJamThreshold>20000</usOverheatingJamThreshold>
<usOverheatingDamageThreshold>13500</usOverheatingDamageThreshold>
<usOverheatingSingleShotTemperature>45</usOverheatingSingleShotTemperature>

And then items.xml

<uiIndex>1762</uiIndex>
<szItemName>XT-A</szItemName>
<szLongItemName>XT-A</szLongItemName>
<szItemDesc>Favored by most military officers, this ACME semi-automatic pistol is considered the defacto standard side-arm worldwide.</szItemDesc>
<szBRName>XT-A</szBRName>
<szBRDesc>This semi-automatic pistol is one of the most succesfull items on our catalogue!.</szBRDesc>
<usItemClass>2</usItemClass>
<nasLayoutClass>1</nasLayoutClass>
<ubClassIndex>1</ubClassIndex>
<ubCursor>3</ubCursor>
<ubGraphicNum>1762</ubGraphicNum>
<ubWeight>6</ubWeight>
<ubPerPocket>1</ubPerPocket>
<ItemSize>1</ItemSize>
<usPrice>796</usPrice>
<ubCoolness>1</ubCoolness>
<bReliability>4</bReliability>
<bRepairEase>3</bRepairEase>
<Damageable>1</Damageable>
<Repairable>1</Repairable>
<WaterDamages>1</WaterDamages>
<Metal>1</Metal>
<Sinks>1</Sinks>
<ShowStatus>1</ShowStatus>
<BR_NewInventory>5</BR_NewInventory>
<BR_UsedInventory>1</BR_UsedInventory>
<BR_ROF>36</BR_ROF>
<usOverheatingCooldownFa


Long story short, I can't see anything wrong.. I'm positive I made a mistake somewhere, and first thing that came to my mind is missing images, but they are there..
By the way, I was missing the piece of info about mdp1Items.sti's, thanks.

Report message to a moderator

Sergeant
Re: MDGuns and SMGuns[message #365996 is a reply to message #365995] Tue, 26 March 2024 21:32 Go to previous messageGo to next message
Kitty

 
Messages:466
Registered:October 2017
Location: Germany
but is the index-nr used in md and sm matching the numner in tag?

for big-items (what you see at BR and EDB), in latest 1.13 the highest numeber used is GUN374.sti

and md and smguns.sti currently go up to 374 as well

so, if it's the first new weapon you add after that, try 375 instead of 1762 for graphic-number

for all three: big,md and sm

-

also, latest 1.13 already has item 1762 (a recently added civilian P90)

so, be vary if you ever update your 1.13-version (and the index will vary as well, that new P90 is at 374)

actually, it might be helpfull to take a look at how that new weapon was added, might give you some idea

FN PS90 gitHub changed files

that may can be usefull to see how to add attachments for weapon and how to add it to Tony, etc

--

the Lobot part is optional, only if you use a very unique shape of weapon that you would like to be seen with Lobot

(and have rendered required files for that with blender)

if not added there, it will show the default weapon of that class when using Lobot

[Updated on: Tue, 26 March 2024 21:52]




How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
Re: MDGuns and SMGuns[message #365997 is a reply to message #365996] Tue, 26 March 2024 22:04 Go to previous messageGo to next message
Marcus is currently offline Marcus

 
Messages:109
Registered:November 2014
Nope, that crashed the game when I accessed Bobby Ray page where my weapon is...
And yes, I was using the same index number.

Thanks for the new P90 link.

Update: I managed to make the "375 variant" work, but no inventory/ground images again..

UPDATE: I made another test and used my pics with an existing pistol and they all showed in game. I could revert to my original idea, IE substituting original weapons with my own. I'll have to delve into attachments anyway but it would work..

For now I'll close this issue, still, if anybody has another idea please let me know!

[Updated on: Tue, 26 March 2024 22:56]

Report message to a moderator

Sergeant
Re: MDGuns and SMGuns[message #365998 is a reply to message #365997] Tue, 26 March 2024 23:06 Go to previous messageGo to next message
Kitty

 
Messages:466
Registered:October 2017
Location: Germany
In the latest available 1.13, there

already is an item 1762

<uiIndex>1762</uiIndex>

using

<ubGraphicNum>374</ubGraphicNum>

--

but, in your post above, you've used 1762 for your new weapon

therefore I assume you're using an older version of 1.13 (one that doesn't include the new item 1762)

--

if that's the case, the index 374 also isn't used in that older version

so, if you use an older version without it, check what's the highest number at Guns.sti, that's a good indicator of what number to use

if that is 373, the next one will be 374

(while at latest 1.13 it's 374, so the next would be 375)


for md and sm, the latest used index is the same

Example:

StiEditor showing index-nr for item 1762 (civilian version of the P90, the PS90) in mdguns.sti
that index-nr has to be used as graphic-number in items.xml
-
https://i.imgur.com/lrECCta.png
-


so, if the highest index in your version is 373, use 374 for next entry

if you add the new graphic to mdguns.sti, you do so by adding another picture to that sti
and that automatically will result in next higher index-nr

[Updated on: Tue, 26 March 2024 23:14]




How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
Re: MDGuns and SMGuns[message #365999 is a reply to message #365998] Tue, 26 March 2024 23:13 Go to previous message
Marcus is currently offline Marcus

 
Messages:109
Registered:November 2014
Yes, I'm using a slightly older version, I downloaded it some 6 weeks ago and max item number was 373. At this point I'll go for the substitute way, I'll be able to upgrade my 1.13 version without issues.

Thanks for everything Kitty!

Report message to a moderator

Sergeant
Previous Topic: Modding Weapons In Game. (SOLVED, basically)
Next Topic: Fastest/most efficient way to test new items in game? (Solved!!)
Goto Forum:
  


Current Time: Sun Oct 13 15:44:38 GMT+3 2024

Total time taken to generate the page: 0.01732 seconds