Jump to content

A16 Valmod Pack


Valmar

Recommended Posts

Problem with Assault_Rifle - null ref, no degradation bar

 

So, I'm still working on SD2DX'ing all sorts of parts of your mod (completed many, but want to get more done before posting and make sure they're pretty well-tested)...I've run into a snag.

 

I copied your code *exactly* from the expanded weapons mod for the "Assault_Rifle" as follows:

 

<item id="1602" name="Assault_Rifle">
<property name="CustomIcon" value="sniperRifle" />
<property name="Meshfile" value="Items/Weapons/Ranged/SniperRifle/sniperRiflePrefab" />
<property name="Material" value="metal" />
<property name="HoldType" value="11" />
<property name="Stacknumber" value="1" />
<property name="RepairTools" value="repairKit" />
<property name="Degradation" value="150" param1="false" />
<property name="DegradationBreaksAfter" value="false" /> 
<property name="Attachments" value="flashlight02" />       
<property class="Parts">
	<property name="Stock" value="Assault_Rifle_Stock" />
	<property name="Receiver" value="Assault_Rifle_Housing" />
	<property name="Barrel" value="Assault_Rifle_Barrel" />
	<property name="Pump" value="Assault_Rifle_Parts" />
</property>
<property class="Action0">
	<!-- AttackAction -->
	<property name="Class" value="Ranged" />
	<property name="Delay" value="0.130" />
	<property name="Range" value="160" />
	<property name="Auto_fire" value="true" />
	<property name="Rays_per_shot" value="1" />
	<property name="Rays_spread" value="0" />
	<property name="Crosshair_min_distance" value="30" />
	<property name="Crosshair_max_distance" value="100" />
	<property name="DamageEntity" value="75" />
	<property name="DamageBlock" value="5" />
	<property name="Magazine_size" value="15" />
	<property name="Magazine_items" value="762mmBullet, 762mm_Hollow_Point, 762mm_Incendiary" />          
	<property name="Reload_time" value="2.5" />
	<property name="Bullet_icon" value="uzi" />
	<property name="Sound_start" value="Weapons/Ranged/MP5/mp5_fire_start" />
	<property name="Sound_repeat" value="Weapons/Ranged/MP5/mp5_fire_lp" />
	<property name="Sound_end" value="Weapons/Ranged/MP5/mp5_fire_end" />
	<property name="Sound_empty" value="Weapons/weapon_empty" />
	<property name="Sound_reload" value="Weapons/Ranged/SniperRifle/sniperrifle_reload" />
	<property name="Particles_muzzle_fire" value="nozzleflashuzi" />
	<property name="Particles_muzzle_smoke" value="nozzlesmokeuzi" />
	<property name="DamageBonus.head" value="6" />
	<property name="DamageBonus.glass" value="25" />
	<property name="Horde_meter_rate" value="2.5" />
	<property name="Horde_meter_distance" value="20" />
</property>
<property class="Action1">
	<!-- UseAction -->
	<property name="Class" value="Zoom" />
	<property name="Zoom_overlay" value="Items/Weapons/HUD/sniper_zoom_overlay" />
	<property name="Zoom_max_out" value="45" />
	<property name="Zoom_max_in" value="45" />
</property>
<!-- Start: Needed for the attachment flashlight -->
<property name="LightSource" value="lightSource" />
<property name="ActivateObject" value="Attachments/flashlight/lightSource" />
<property name="AttachmentFlashlight" value="flashlight02" />
<!-- End: Needed for the attachment flashlight -->   
<property name="Group" value="Ammo/Weapons" />
<property class="Preview">
	<property name="Zoom" value="1" />
	<property name="Pos" value="-0.15,-0.25" />
	<property name="Rot" value="0,-45,0" />
</property>
<property class="Attributes">
	<property name="BlockDamage" value="1,1" />
</property>
</item>

 

I copied that into my SD2DX expanded weapons file, compiled (no issues with sd2dx coding), and opened the game -- everything in the game (including all items both before and after the assault rifle in my compiled items.xml) work EXCEPT for this Assault_Rifle .

 

It shows up in the creative window (in a creative window group I created for the weapons), as do all the other items, but when I even just move my mouse over it or hover over it, the game throws a null ref.

The Assault_Rifle also doesn't have a "health"/degradation bar like the other weapons--which I know is part of / related to the problem, I'm sure--but I can't seem to figure out why it's missing the bar:

 

2015-10-11_00001.thumb.jpg.172087357f0fe7e54cd319d917090a49.jpg

 

I have winmerged the crap out of this gun against all the other (working) guns, and I can't figure out where I've gone wrong to cause this. The code looks good, far as I can tell.

 

[And I definitely have all of it's specific gun parts and such that is required present/loaded in the game, and they don't throw the null ref when I hover over them. I also did make sure that SD2DX was correctly renumbering items and that the id didn't have a duplicate - it does not, it is a unique id]

 

This is what my output_log tells me, exactly:

 

...
NullReferenceException: Object reference not set to an instance of an object
 at AttributeBase.GetVal[AttributeEntityDamage] (.ItemValue _itemValue, Single _default) [0x00000] in <filename unknown>:0 

 at ItemActionAttack.GetDamageEntity (.ItemValue _itemValue) [0x00000] in <filename unknown>:0 

 at NGuiDragAndDropItem.CalculateStats () [0x00000] in <filename unknown>:0 

 at NGuiDragAndDropItem.GetItemInfo () [0x00000] in <filename unknown>:0 

 at NGuiDragAndDropItem.OnHover (Boolean isOver) [0x00000] in <filename unknown>:0 
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UICamera:Notify(GameObject, String, Object)
UICamera:ProcessMouse()
UICamera:ProcessTouches()
UICamera:Update()

(Filename:  Line: -1)
...

 

and this is the full output log, in case that is required or it would be of any help to see the rest of it: [ATTACH]11198[/ATTACH].

 

Sorry to bother you with this -- I'm usually pretty astute at tracking down such problems and figuring them out pretty quickly, but I've been looking at this for 2 hours and can't see the issue. If you don't see it either, that's fine, just let me know -- I just figured I'd post in case you happen to look at it and see the issue right away.

 

Thanks so much.

output_log.txt

Link to comment
Share on other sites

I do notice now that the parts do not have any degradation bars / quality values either, but it turns out I can still craft them together to make the rifle and for some reason, the crafted rifle doesn't throw the null ref (though it doesn't have a quality/degradation either). Not sure what any of that means, though. Not sure why they are lacking the degradation bars. the code for the parts looks the same as the sniper rifle parts code (other than what values were changed), but for some reason they aren't getting degradation bars. I'm so confused.

Link to comment
Share on other sites

Hello Carmela.

 

I could be wrong but I believe the problem is with the group. Custom groups break quality items in the way you describe. Its a bug with the groups, it seems. Any time you hover up a gun in a custom group it gives errors in the console. The durability will always be busted too, in my experience. Quite annoying indeed. If you need to obtain the gun with the creation menu you will have to lower its ID number to lower than 903 and get it without a special group. I'm not sure if this is required for its individual parts aswell.

 

When A13 comes out I plan to do some restructuring of the file to ensure the weapons stay above 903 to avoid issues like this. Sorry for the inconvenience.

Link to comment
Share on other sites

Can you post the xml for the parts, might be something on those causing the issue. Normally I've had a similar problem when there is no degradation stats on the parts themselves.

 

Edit: actually I think Val is spot on, I remember that being a problem with the groups and quality items now :)

Link to comment
Share on other sites

Hey I'm playing your mod on your server and loving it (tho I like to kill myself on fire traps) I read the assault rifle book and took apart an assault rifle to upgrade a part and it won't let me put it back together. I know I read the assault rifle book

Link to comment
Share on other sites

Hey I'm playing your mod on your server and loving it (tho I like to kill myself on fire traps) I read the assault rifle book and took apart an assault rifle to upgrade a part and it won't let me put it back together. I know I read the assault rifle book

 

Is the recipe in your list? Sometimes the crafting bugs out and you have to manually place the parts, or if there is a mix of quality and non quality items it wont autoload the parts (e.g minibike handlebars)

Link to comment
Share on other sites

@Zlaun

 

Hello. Sorry for the issue. I glanced at the file and everything looks to be in order so I suspect it is a vanilla bug like Stompy suggest. Are you certain, by chance, at you are not using a Quality Assault Rifle? Only Veteran classes can use those, the book will not teach it. If you traded with a veteran to get his assault rifle you will need to have him upgrade it for you. If you yourself are a veteran or the assault rifle was in fact "normal" then, provided Stomp's solution did not work, let I or Eman on the server know and we'll hand you another assault rifle book to see if that resolves the issue.

Link to comment
Share on other sites

Hello Carmela.

 

I could be wrong but I believe the problem is with the group. Custom groups break quality items in the way you describe. Its a bug with the groups, it seems. Any time you hover up a gun in a custom group it gives errors in the console. The durability will always be busted too, in my experience. Quite annoying indeed. If you need to obtain the gun with the creation menu you will have to lower its ID number to lower than 903 and get it without a special group. I'm not sure if this is required for its individual parts aswell.

 

When A13 comes out I plan to do some restructuring of the file to ensure the weapons stay above 903 to avoid issues like this. Sorry for the inconvenience.

 

Oh, no worries, Valmar -- no need to apologize. I just thought that maybe I was doing something wrong or had messed something up. It is really strange that only that one gun and its parts are having the issue. Oh, well, not a huge deal -- just figured that if I *was* doing something wrong, it would be another chance to learn some more about this stuff.

 

I will try placing it below 903 with and without the special group and I'll see if it does indeed solve the issue. Either way, no worries. I appreciate all the help. :)

Link to comment
Share on other sites

Small update:

 

Medic can convert normal first aid kits into Quality first aid kits.

Medic's quality blood-draw bag now gives normal bloodbags to make kits.

Added in more bridge types.

Added in two hidden doors.

Small nerf to the explosive bloater and infected cop's explosion range.

Link to comment
Share on other sites

@The Game Master

 

Yeah, its possible. The reason you cannot find most of them in the creative menu is because there is a limit to how many the game's creative menu can "see". That limit is 903. My mod goes as high as 1652 at the time of writing this.

 

To get creative-menu access to items above 903 you need to add a custom group with the items you want to show up manually added. It's a bit of a pain in the ass, to be honest. It also doesn't work for items with attributes/quality ranges, apparently. Still it can be useful for, say, my ammo.

 

More info: https://7daystodie.com/forums/showthread.php?15441-Adding-Groups-to-the-Cheat-Menu

 

Example group: http://www.mediafire.com/download/rgzi49i2t9230mh/groups.zip

 

When A13 hits I plan to tidy the file up so all weapons show up in vanilla creative menu and then include custom group files that have all the added goodies.

 

 

@Jax

 

Certainly.

 

<block id="276" name="snowyGrassDiagonal">

<property name="Class" value="Deadgrass" />

<property name="Material" value="tallgrass" />

<property name="CanPickup" param1="yuccaFibers" value="true" />

<property name="Shape" value="Grass" />

<property name="Mesh" value="grass" />

<property name="Texture" value="350,368,369,370,350,368" />

<property name="Collide" value="melee" />

<property name="CanDecorateOnSlopes" value="true" />

<property name="IsTerrainDecoration" value="true" />

<drop event="Destroy" name="yuccaFibers" count="1" />

<property name="DropScale" value="2" />

</block>

 

 

Also just did a quick (well, it wasn't so quick, but whatever) fix to the choke shotgun. Odd as heck bug, that one. Im not sure why it didn't work. The gun itself worked fine but if you craft it then it will always come out busted and give errors. Switching parts around seems to have fixed it - whatever was wrong with it in the first place. Will have to keep an eye out for any similar problems in the future.

Link to comment
Share on other sites

Just released a small update that "fixed" the fact that apparently you cant add new cooking recipes behind books on servers. So anyone who tried to craft the mead or oil were having issues with the timer not working. This was only a bug in multiplayer. So I've adjusted it so the oil recipe is now strictly done in the crafting menu. Sorry to any server owners who were getting this issue. Should all be settled now. Keep me updated.

 

Also, tiny changelog:

 

Infected Cops can drop sham sandwiches.

Reduced the loot chance of medical books on nurses.

Camo tent has the same map color as grass so it can be used to camouflage your base from being viewed by the world map.

Link to comment
Share on other sites

@The Game Master

 

Yeah, its possible. The reason you cannot find most of them in the creative menu is because there is a limit to how many the game's creative menu can "see". That limit is 903. My mod goes as high as 1652 at the time of writing this.

 

To get creative-menu access to items above 903 you need to add a custom group with the items you want to show up manually added. It's a bit of a pain in the ass, to be honest. It also doesn't work for items with attributes/quality ranges, apparently. Still it can be useful for, say, my ammo.

 

More info: https://7daystodie.com/forums/showthread.php?15441-Adding-Groups-to-the-Cheat-Menu

 

Example group: http://www.mediafire.com/download/rgzi49i2t9230mh/groups.zip

 

When A13 hits I plan to tidy the file up so all weapons show up in vanilla creative menu and then include custom group files that have all the added goodies.

 

Thanks for the help :)

Link to comment
Share on other sites

Hi Valmar, me and 2 of my friends started playing on your server yesterday, and I have to say, we are simply overwhelmed! We are running a heavily modded server by ourselves, and tested and tried a lot of mods and snippets beside our own creations, but we never came across a mod so well-thought-out and detailed like yours.

 

We've also never seen before such a detailed and comprehensive guide to lead beginners through all the modded things. We will continue to enjoy the mod on your server, and we hope you will adapt it to A13! And we would count ourself lucky, if you allow us to use your mod on our server while giving you credit, once A13 comes out.

Link to comment
Share on other sites

@Puschpa

 

Thank you, I'm happy you enjoy your stay on the server. When A13 releases it will probably take me some time but I do hope to eventually make it compatible. Might take me a week, though. Besides just making it compatible I also wish to "tidy" up the file a bit so that all my modded weapon can show up in creative menu. This means a lot of reordering. Probably wouldn't take me that long but I dont know how long it'd take to make things work with A13. I /will/ update it though.

 

You're are more than welcome to use my mod anywhere you wish, no credit needed. Its there to be enjoyed :)

Link to comment
Share on other sites

Hello, My gf would love this mod as it add a lot more decoration in her basement but I was wondering if this mod only suppose to have 3 lights? I only see Pole_light,white_pole_light and Light Barrel in new game. I wasn't sure if I will get more option more later on since she would love the lantern light.

Link to comment
Share on other sites

Hello, My gf would love this mod as it add a lot more decoration in her basement but I was wondering if this mod only suppose to have 3 lights? I only see Pole_light,white_pole_light and Light Barrel in new game. I wasn't sure if I will get more option more later on since she would love the lantern light.

 

To be able to craft all the other lamps you need to find and learn the book "Tesla Electronics" :)

Link to comment
Share on other sites

Welp, it seem there was this error pop up "Cannot expand this MemoryStream Stack Trace" . When I exit and get back in the game, it seem that a portain of my house, not all, reset it terrain :subdued: but my gf side is perfectly fine. The terrain is now perfectly flat so I assume for some reason the terrain reset? I was also using an already existing save for the mod so I don't know if it cause that.

Link to comment
Share on other sites

@Killertu

 

I'm sorry to hear of your problem. There is nothing, to the best of my knowledge, in my mod that could cause such a bug. Sound like a "normal" vanilla game bug - one that I've suffered more than once - without my mod being involved. That being said I will not rule out my mod being culprit since that would be arrogant. Could you try a new game real quick to see if you can replicate the problem? Since its memory it could be, well, a memory issue. I'd need to see the output log. Could you please share your output_log file with me? Also, if possible, do so BEFORE you start a new game!

 

Everytime you start the game, the output log resets. So I need to see the output log immediately after you get the above mentioned error message.

 

Here are the steps on how to find the output log:

 

"Start the game. Do NOT ALT+TAB.

Reproduce the problem.

Exit the game.

In the steam client.

Right Click 7 Days To Die and select properties

Click the Local Files Tab

Click the Browse local files button.

double-click the \7DaysToDie_Data\ folder

open output_log.txt

Copy all the contents {CTRL+A then CTRL+C}

paste the contents to http://pastebin.com

Include the link to that paste."

 

 

Honestly, just hearing that little bit of the problem, it sounds like a memory issue. I will, hopefully, know more after seeing the file.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...