Jump to content

A15 - Working Electric Lights


Valmar

Recommended Posts

i see your nailed down spotlight made it in to the vanillia game ( and our workbenches) great work, I forone thing this whole lighting mod should make it to vanilla the fps gains of these vs tourches is amazing.

 

vote valmar for pimp 2016 :)

 

Actually the nailed spotlight was Gazz's handywork. I did, for a shortwhile, have it set so all the lights could be nailed down. However as I'm sure you're aware A14 drastically reduced the number of free block IDs so I had to cut back on the bulk.

 

Thank you, though. However I think it'd be more reasonable to call Deccypher the pimp of 2016. Your dev tracker is pretty much the only way I get my 7DTD news. Its such handy way of keeping up-to-date on the latest news that I'm surprised the Pimps don't offer such a page of their own.

Link to comment
Share on other sites

Due to it using the extends property for pretty much everything the only thing that should ever need to be changed in the future is the block ID numbers, if anything. Provided the vanilla game doesn't use those block IDs in the future I suspect this code will be valid for many builds to come.

Link to comment
Share on other sites

Hay Val got another light question for you. Do you know away to turn off Spotlights? There is no light code in the block code it almost looks like the light is attached to the mesh. I'm trying to make it turn off and on.

Link to comment
Share on other sites

That I'm not sure can be done. As you noticed the light is attached to the mesh of the model. Its not a property that can be turned off. At least, I can think of no way to do it due to he way the light is part of the model.

Link to comment
Share on other sites

Very Nice Mod Valmar, It works great. Now if someone could come up with a working hugger style light/ceilingfan combo that centers in a 3x3 block and cools you down some would be really cool ( pun intended). LOL!!

Link to comment
Share on other sites

  • 2 weeks later...

NullReferenceException

 

Ok. So. Getting NullReferenceException errors after crafting an item and trying to click on it.

The changes were made to my personal server.

I did not use the lightbulbs, instead just subbing broken glass as a temp idea.

I removed the <property name="DescriptionKey" value="WorkingLightDesc"/> as a futile attempt to fix the NullRef.

BOTH blocks.xml and recipes.xml are previously edited and confirmed working. The block changes were to up the damage of spikes. The recipes are to add a few for vanilla items (IE: Machete).

I tried copying the entire config folder to my client with no luck. I have been restarting the server with each xml edit and my client as well.

I've tried looking around for more information about NullReferenceException errors in 7D2D but have not been able to find anything current or applicable.

 

Am I missing something simple? I'm not totally new to xml or modding but this is driving me crazy to get this working...

 

In my servers BLOCKS.xml

	<!-- Working Lights Mod -->
<block id="3906" name="lightStreetLamp">
	<property name="Extends" value="streetLight01" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="streetLight01" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3907" name="lightPorchRural">
	<property name="Extends" value="porchLight01" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="porchLight01" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3908" name="lightPorchBrass">
	<property name="Extends" value="porchLight04Brass" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="porchLight04Brass" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3909" name="lightPorch">
	<property name="Extends" value="porchLight04" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="porchLight04" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3910" name="lightCeiling3">
	<property name="Extends" value="ceilingLight01" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="ceilingLight01" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3911" name="lightCeilingDome">
	<property name="Extends" value="ceilingLight02" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="ceilingLight02" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3912" name="lightCeilingDomeBrass">
	<property name="Extends" value="ceilingLight02Brass" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="ceilingLight02Brass" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3913" name="lightCeiling">
	<property name="Extends" value="ceilingLight04" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="ceilingLight04" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3914" name="lightCeiling2">
	<property name="Extends" value="ceilingLight05" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="ceilingLight05" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3915" name="lightCeilingBrass">
	<property name="Extends" value="ceilingLight05Brass" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="ceilingLight05Brass" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3916" name="lightWall">
	<property name="Extends" value="wallLight01" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="wallLight01" />
	<property name="Place" value="TowardsPlacerInverted" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3917" name="lightCeilingBar">
	<property name="Extends" value="ceilingLight07" />
	<property name="Class" value="Deadgrass" />
	<property name="CustomIcon" value="ceilingLight07" />
	<property name="Place" value="TowardsPlacer90" />
	<drop event="Destroy" count="0" />
	<property name="CanPickup" value="true" />
</block>
<block id="3918" name="lightIndustrial">
	<property name="Extends" value="industrialLight01" />
	<property name="CustomIcon" value="industrialLight01" />
	<property name="Class" value="Deadgrass" />
	<property name="CanPickup" value="true" />
	<drop event="Destroy" count="0" />
</block>
<!-- Working Lights Mod -->

 

In my servers RECIPES.xml

	<!-- Working Lights -->
<recipe name="flashlight02" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="4" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightStreetLamp" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="headlight" count="1" />
</recipe>
<recipe name="lightPorchRural" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightPorchBrass" count="1" scrapable="False" >
	<ingredient name="scrapBrass" count="7" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightPorch" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightCeilingBar" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightCeiling" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightCeilingBrass" count="1" scrapable="False" >
	<ingredient name="scrapBrass" count="5" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightCeiling2" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightCeiling3" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightCeilingDome" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightCeilingDomeBrass" count="1" scrapable="False" >
	<ingredient name="scrapBrass" count="5" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightWall" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="brokenGlass" count="1" />
</recipe>
<recipe name="lightIndustrial" count="1" scrapable="False" >
	<ingredient name="scrapIron" count="8" />
	<ingredient name="brokenGlass" count="1" />
</recipe>

 

Client output_log.txt snip of NullReferenceException

NullReferenceException: Object reference not set to an instance of an object
 at XUiM_ItemStack.GetItemStats (.ItemStack itemStack) [0x00000] in <filename unknown>:0 
 at XUiC_ItemInfoWindow.NIG (.ItemStack , .XUiController , ItemActionListTypes ) [0x00000] in <filename unknown>:0 
 at XUiC_ItemInfoWindow.SetItemStack (.XUiC_ItemStack stack) [0x00000] in <filename unknown>:0 
 at XUiC_ItemInfoWindow.SetItemInfo (.XUiC_ItemStack stack) [0x00000] in <filename unknown>:0 
 at XUiC_ItemStack.KSH () [0x00000] in <filename unknown>:0 
 at XUiC_ItemStack.Update (Single _dt) [0x00000] in <filename unknown>:0 
 at XUiController.Update (Single _dt) [0x00000] in <filename unknown>:0 
 at XUiController.Update (Single _dt) [0x00000] in <filename unknown>:0 
 at XUiController.Update (Single _dt) [0x00000] in <filename unknown>:0 
 at XUiController.Update (Single _dt) [0x00000] in <filename unknown>:0 
 at XUi.Update () [0x00000] in <filename unknown>:0 

(Filename:  Line: -1)

Link to comment
Share on other sites

block id only goes upto 2047. anything after this causes errors and/or doesnt show in game.

 

ohhhhhhhhhhmygod.. wait. They do show up though.. I mean I'll check and lower the values but they do appear in the crafting menu and inventory, I just cant click them

 

EDIT: Mother Zed you were right!! I tried looking for the block id limit but couldn't find it.. is there a place where the other id limits are posted??

Link to comment
Share on other sites

  • 1 month later...
Hey Valmar.

 

In previous versions you had End Table Lamp in as working. Any chance that it will come back. Many on my server is asking for it.. :)

 

Best regards

 

Hjorten

 

Here you go:

 

<block id="540" name="tableLamp">

<property name="Extends" value="endTableLamp" />

<property name="CustomIcon" value="endTableLamp" />

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

<property name="ParticleName" value="candleWall_flame" />

<property name="ParticleOffset" value="0.5,1.6,0.48" />

<property name="Light" value="15" />

</block>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...