Home » MODDING HQ 1.13 » v1.13 Bug Reports » [bug report] Bayonets and Random Items
[bug report] Bayonets and Random Items[message #358305] Sun, 20 October 2019 16:40 Go to next message
smeagol

 
Messages:2733
Registered:June 2008
Location: Bremen, Germany
Two separate bugs:

1. bayonets don't seem to work on semi-automatic weapons, as you can't change firing mode on them.

2. The newer map editor versions can't handle the "random item" class items.

https://media.discordapp.net/attachments/348538024381906945/635385285550800897/random_items.gif?width=407&height=407

Which means, that those placed items don't show up in game at all, even if correctly put into the according xml files.

Would be cool if those two issues could be looked into.


Re: [bug report] Bayonets and Random Items[message #358317 is a reply to message #358305] Tue, 22 October 2019 22:21 Go to previous messageGo to next message
silversurfer

 
Messages:2600
Registered:May 2009
I just tested an SKS with a KCB knife attached to it and I can switch between single fire and Bayonet mode. Do you have an example weapon where it doesn't work?

Unfortunately I have no idea how that random item stuff works (is it even used in standard 1.13?) so I can't be of help with that problem.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: [bug report] Bayonets and Random Items[message #358346 is a reply to message #358317] Thu, 24 October 2019 01:10 Go to previous messageGo to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
The bayonet issue has been fixed as of r8701. The bug was somewhat tedious, as it only happened if the merc's inventory was open. Yes, sometimes our fire mode routines ask the UI on whether they are allowed to work, why do you ask? Bang head

As to the second issue, uh, perhaps I'll have time tomorrow to check or so.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: [bug report] Bayonets and Random Items[message #358358 is a reply to message #358346] Thu, 24 October 2019 23:38 Go to previous messageGo to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
To my astonishment, the usItemClass of the stock random items was wrong (the correct one is 1073741824) since ages (fixed in GameDir r2481). No idea how the map editor worked in the mean time then.

After that it seems to work fine. It's probably a very dumb question, but you didn't try to save in vanilla format, did you? Cause that eats items > 351.

Perhaps your coolness is to low? I've set randomitemcoolnessmodificator to a stupid value like 20 and get SCARs in Omerta.

For comparison, this one works in stock:
<ITEM>
	<uiIndex>1623</uiIndex>
	<szItemName>random NATO AR number 1</szItemName>
	<szLongItemName>random NATO AR 1</szLongItemName>
	<szItemDesc>If you can read this, Flugente propably didn't catch a certain way to create items. Go blame him!</szItemDesc>
	<szBRName>random NATO AR 1</szBRName>
	<szBRDesc>NO DESCRIPTION NECESSARY.</szBRDesc>
	<usItemClass>1073741824</usItemClass>
	<nasLayoutClass>1</nasLayoutClass>
	<ubGraphicType>2</ubGraphicType>
	<ubGraphicNum>1</ubGraphicNum>
	<ubWeight>9</ubWeight>
	<ubPerPocket>8</ubPerPocket>
	<ItemSize>13</ItemSize>
	<usPrice>90</usPrice>
	<ubCoolness>1</ubCoolness>
	<usOverheatingCooldownFactor>100</usOverheatingCooldownFactor>
	<randomitem>15</randomitem>
	<randomitemcoolnessmodificator>20</randomitemcoolnessmodificator>
        <STAND_MODIFIERS />
	<CROUCH_MODIFIERS />
	<PRONE_MODIFIERS />
</ITEM>



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: [bug report] Bayonets and Random Items[message #358385 is a reply to message #358358] Sun, 27 October 2019 11:16 Go to previous messageGo to next message
smeagol

 
Messages:2733
Registered:June 2008
Location: Bremen, Germany
Well, I think I have the two properties "item class" and "coolness" set correctly.

Maybe I actually need properties like weight/size/etc. as well? shouldn't those be replaced once the game decides which random item to use?

Maybe it is something in the random item drop table xml file?

But then again, the map editor I use doesn't recognize the item class (that's what is in the screen shot).

As for not showing up in starting gear, I think it was explained earlier that this was not intended anyways...

<ITEM>
<uiIndex>3001</uiIndex>
<szItemName>*** Random Item 0001 ***</szItemName>
<szLongItemName>*** Random Item 0001 ***</szLongItemName>
<szItemDesc>This is a random item that should be repalced with an item according to its random item class. If this item shows up in game, someone screwed up.</szItemDesc>
<szBRName>*** Random Item 0001 ***</szBRName>
<szBRDesc>This is a random item that should be repalced with an item according to its random item class. If this item shows up in game, someone screwed up.</szBRDesc>
<usItemClass>1073741824</usItemClass>
<ubCoolness>1</ubCoolness>
<usOverheatingCooldownFactor>100</usOverheatingCooldownFactor>
<randomitem>1</randomitem>
<STAND_MODIFIERS />
<CROUCH_MODIFIERS />
<PRONE_MODIFIERS />
</ITEM>


As for saving in wrong map format, I highly doubt that, as I use big maps and other items with high item id show up in maps.


Re: [bug report] Bayonets and Random Items[message #358388 is a reply to message #358385] Sun, 27 October 2019 21:52 Go to previous messageGo to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
I've fixed a bit of the GUI in r8702 (now one can set status, trap and exist chance), but that doesn't affect the placement itself. Add the <randomitemcoolnessmodificator>-tag with a high enough value (10+) and see whether it appears then.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: [bug report] Bayonets and Random Items[message #358390 is a reply to message #358388] Mon, 28 October 2019 20:14 Go to previous message
smeagol

 
Messages:2733
Registered:June 2008
Location: Bremen, Germany
Setting random coolness modifier to a value =/= 0 seems to do the trick. I set it to 1, and the random item shows up in the map. weird...


Previous Topic: [bug report] Strategic Withdraw After Subway Exit in Urban Chaos Mod
Next Topic: [bug report] Proposition for fixes for multiple bugs.
Goto Forum:
  


Current Time: Mon Nov 18 14:15:08 EET 2019

Total time taken to generate the page: 0.01455 seconds