Jump to content

A15 - Working Electric Lights


Valmar

Recommended Posts

Ah, thats right, the damnable class. Shame we can't assign multiple classes. Well, we can, but only specific ones work together. Oh well. Sorry for the false hope.

 

I may at some point tidy the code up (such as your extends example) and add a upgrade path for them. Though its really low on my list atm. My attention is on the Medieval project. Lol.

 

 

I will keep it in mind, however. Its a good idea. :)

Link to comment
Share on other sites

  • 3 weeks later...

I tried to get the endTableLamp to work with the methods you've applied in this mod. I've placed and replaced it ~20 times and it won't light.

 

Is this not working because it needs to be a <property name="Shape" value="ModelEntity" /> type or because it doesn't naturally light up in the first place? I thought adding <property name="Light" value="0.5" /> would allow that. Maybe not?

 

  <block id="1607" name="endTableLampLight">
   <property name="CustomIcon" value="endTableLamp" />
   <property name="Class" value="Deadgrass" />
   <property name="Material" value="furniture" />
   <property name="Shape" value="Ext3dModel" />
   <property name="Mesh" value="models" />
   <property name="Model" value="Furniture/end_table_lamp" param1="main_mesh" />
   <property name="Light" value="0.5" />
   <property name="FuelValue" value="32" />
   <property name="CanPickup" value="true" />
   <property class="RepairItems">
<property name="wood" value="5" />
   </property>
   <property name="Group" value="Decor/Miscellaneous" />
 </block>

Link to comment
Share on other sites

I believe its because the end table does not ever light up in general. Have you ever found one on in-game? All of the light models I use have the ability to be triggered "on". But when you place them in-game they will not have this on property. Using the deadgrass class, for whatever reason, tricks them into triggering the on command and lighting up. The end table does not have any on command to trick on. If that makes sense.

 

The light property, far as I know, does absolutely nothing. If anything MAYBE it determines how much "light" the zombies see from it but I don't know. I've never seen any visual difference in it.

 

 

 

The only way to get the end table to "light" up is to add a candle particle, far as I know. Which is what I do in the code for it currently.

Link to comment
Share on other sites

I just used the candle particle on it. Downside is that candles can affect FPS some. It hasn't been terribly bad so far though.

 

  <block id="548" name="endTableLamp">    <property name="Class" value="Torch" /> 
   <property name="ParticleName" value="candleWall_flame" />
   <property name="ParticleOffset" value="0.5,0.75,0.5" />
   <property name="Material" value="furniture" />
   <property name="Shape" value="Ext3dModel" />
   <property name="Mesh" value="models" />
   <property name="Model" value="Furniture/end_table_lamp" param1="main_mesh" />
   <property name="FuelValue" value="32" />
   <property name="CanPickup" value="true" />
   <property class="RepairItems">
       <property name="wood" value="5" />
   </property>
   <property name="Group" value="Decor/Miscellaneous" />
 </block>

 

Edit: still tinkering with the placement. It's a bit off center.

Link to comment
Share on other sites

@SylenThunder

 

 

That's what I did also. It's also included in the mod code provided here incase it's been overlooked. Lol.

 

 

<block id="1702" name="Table_Lamp">

<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" />

<drop event="Destroy" name="Table Lamp" count="1" prob="1" />

</block>

Link to comment
Share on other sites

  • 1 month later...

This mod should still work in A14 if you adjust the block IDs to be something not already used. Other than the block IDs the code itself should be the same and still work. After I finish updating the Valmod Pack I'll go through these individual mods and ensure everything is running correctly.

Link to comment
Share on other sites

This mod doesn't work on A14 in its current state.

 

You need to change the material of each item using metal_thin or metal_medium to Mmetal_thin or Mmetal_medium as per the new convention.

 

Actually in its most current state at the time of writing this much of the code is using extends. That is to say, only a few blocks have a material assigned to them. wood+wood and metal are the only two materials I believe is in the code currently. You're likely working off an earlier version of the code before I tidied it up.

 

All the same this will be one of the first mods I give the ol A14 compatibility sweep too. Hopefully soon.

 

 

Edit: Should be updated now.

Link to comment
Share on other sites

I'd need to see your config folder or at least the output log to know where you went wrong. The code works fine. If it was added correctly you should have no issues. Just tested it out myself on a fresh vanilla A14.3 build.

Link to comment
Share on other sites

Yep. Been having them since I believe before A12.

 

Believe it or not the key to making them work is making them class as deadgrass. Weird, right? Sure, sometimes they dont turn on when you place them and require multiple tries... but once they do they stay on. Either way we have working electrical lights. A must for me.

Link to comment
Share on other sites

I have a question for you Val. In 13 I used the extend = Air function on all electric POI lighting Blocks and it removed all artificial lighting from POIs. I get errors when I try the same thing this build. I tried removing all the lighting properties the class and the particle code but they all still have light coming from them. Do you know of any way to turn all the lights off in the block file?

Link to comment
Share on other sites

Yep. Been having them since I believe before A12.

 

Believe it or not the key to making them work is making them class as deadgrass. Weird, right? Sure, sometimes they dont turn on when you place them and require multiple tries... but once they do they stay on. Either way we have working electrical lights. A must for me.

 

Ugh! I was close.

 

I thought about grass. I just never hit the mark. Hahahaha looks like you have more conviction than me.

 

Anything special I need to know about installing this? I'm going to insert it right now.

Adjusting all my XML's from 13.6 over to 14.3 right now. [taking hours so far :sorrow:]

Link to comment
Share on other sites

Only thing worth mentioning is that the lights don't always light up when placed. Though I pointed that out already. They're set to be able to pick up so you can easily pick up and replace if they turn on the first time.

 

Also avoid making them line up on a wall completely. They need to be placed at least a block apart from each other or else they bug out. Not sure why, probably the grass trying to merge or something. Few people notice that problem though since I dont think many try to cover an entire wall with lights. Lol.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...