Alpha15より公式でクラフト可能になりました。
灯りが付く電灯を作りたい
本家:
https://7daystodie.com/forums/showthread.php?34748-Working-Electric-Lights
Alpha13.6にて確認 通常、ポーチライトなどのブロックを配置しても光ることはありませんが、公式フォーラムでValmar氏が
公開している[MOD]Expanded Working Lightsを導入すれば、光る電灯を設置できるようになります。
Alpha13.6 版 Valmar氏 ありがとう。活用させていただいてます。
1. block.xml に追加する (id="xxxx"の連番は変更可能です)
<!-- Working Lights Mod --> <block id="1690" name="Street_Light"> <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" /> <property name="Material" value="metal" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/street_light01Prefab" /> <drop event="Fall" name="scrapMetalPile" count="1" prob="1.0" stick_chance=".75" /> </block> <block id="1691" name="Rural_Porch_Light"> <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" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/porchLight01Prefab" /> </block> <block id="1692" name="Porch_Light_Brass"> <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" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/porchLight04BrassPrefab" /> </block> <block id="1693" name="Porch_Light"> <property name="Class" value="Deadgrass" /> <property name="CustomIcon" value="porchLight04" /> <property name="Place" value="TowardsPlacer90" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/porchLight04Prefab" /> <drop event="Destroy" count="0" /> <property name="CanPickup" value="true" /> </block> <block id="1694" name="Ceiling_Light_3"> <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" /> <property name="Material" value="glass" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/ceilingLight01Prefab" /> </block> <block id="1695" name="Ceiling_Light_Dome"> <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" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/ceilingLight02Prefab" /> </block> <block id="1696" name="Ceiling_Light_Dome_Brass"> <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" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/ceilingLight02BrassPrefab" /> </block> <block id="1697" name="Ceiling_Light"> <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" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/ceilingLight04Prefab" /> </block> <block id="1698" name="Ceiling_Light_2"> <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" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/ceilingLight05Prefab" /> </block> <block id="1699" name="Ceiling_Light_Brass"> <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" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/ceilingLight05BrassPrefab" /> </block> <block id="1700" name="Wall_Light"> <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" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/wall_light01Prefab" /> </block> <block id="1701" name="Ceiling_Light_Bar"> <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" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/ceilingLight07Prefab" /> </block> <block id="1702" name="Table_Lamp"> <property name="CustomIcon" value="endTableLamp" /> <property name="Class" value="Particle" /> <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="ParticleName" value="candleWall_flame" /> <property name="ParticleOffset" value="0.5,1.6,0.48" /> <property name="Light" value="15" /> <property name="Group" value="Decor" /> <drop event="Destroy" name="Table Lamp" count="1" prob="1" /> </block> <block id="1703" name="Light_Barrel"> <!-- <property name="CustomIcon" value="oilBarrel" /> --> <property name="CanPickup" value="true" /> <property name="Class" value="Particle" /> <property name="Material" value="metal" /> <property name="Shape" value="Ext3dModel" /> <property name="Mesh" value="models" /> <property name="Model" value="Industrial/barrel01" param1="main_mesh" /> <property name="ParticleName" value="campfire" /> <property name="ParticleOffset" value="0.53,1.04,0.45" /> <drop event="Destroy" name="scrapIron" count="8" prob="1" /> </block> <block id="1704" name="White_Pole"> <property name="CustomIcon" value="adobeWhitePole" /> <property name="Material" value="wood+wood" /> <property name="Shape" value="Pole" /> <property name="Texture" value="245" /> <drop event="Destroy" count="0" /> <property name="Group" value="Building" /> <drop event="Fall" count="0"/> </block> <block id="1705" name="White_Pole_Light"> <property name="Class" value="Particle" /> <property name="Light" value="2.5" /> <!--<property name="CustomIcon" value="adobeWhitePole" /> --> <property name="Material" value="wood+wood" /> <property name="Shape" value="Pole" /> <property name="Texture" value="245" /> <property name="ParticleName" value="torch_wall" /> <property name="ParticleOffset" value="0.125,0.97,0.125" /> <drop event="Destroy" count="0" /> <property name="Group" value="Building" /> <drop event="Fall" count="0"/> </block> <block id="1706" name="Pole_Light"> <!--<property name="CustomIcon" value="poleBlockOldWood" /> --> <property name="Class" value="Particle" /> <property name="Light" value="2.5" /> <property name="Material" value="wood+wood" /> <property name="Shape" value="Pole" /> <property name="Texture" value="241" /> <property name="ParticleName" value="torch_wall" /> <property name="ParticleOffset" value="0.125,0.97,0.125" /> <drop event="Destroy" count="0" /> <property name="Group" value="Building" /> <drop event="Fall" count="0"/> </block> <block id="1707" name="Industrial_Light"> <property name="CustomIcon" value="industrialLight01" /> <property name="Class" value="Deadgrass" /> <property name="Material" value="metal_thin" /> <property name="Shape" value="ModelEntity" /> <property name="Texture" value="241" /> <property name="Light" value="0.5" /> <property name="Collide" value="bullet,melee" /> <property name="Model" value="Entities/Lighting/industrialLight01Prefab" /> <property name="Place" value="TowardsPlacerInverted" /> <drop event="Destroy" name="ironFragment" count="1" prob="1" /> <property name="CanPickup" value="true" /> </block>
<!-- Working Lights End-->
Valmar氏の原文のまま
2.recipes.xml に追加する
<!-- Working Lights --> <recipe name="tubeHalfMetal1" count="1" scrapable="False" > <ingredient name="scrapIron" count="4" /> </recipe> <recipe name="Street_Light" count="1" scrapable="False" > <ingredient name="forgedIron" count="5" /> <ingredient name="forgedIron" count="1" /> <ingredient name="headlight" count="1" /> </recipe> <recipe name="Porch_Light" count="1" scrapable="False" > <ingredient name="forgedIron" count="7" /> <ingredient name="Lightbulb" count="1" /> </recipe> <recipe name="Porch_Light_Brass" count="1" scrapable="False" > <ingredient name="scrapBrass" count="7" /> <ingredient name="Lightbulb" count="1" /> </recipe> <recipe name="Rural_Porch_Light" count="1" scrapable="False" > <ingredient name="forgedIron" count="7" /> <ingredient name="Lightbulb" count="1" /> <ingredient name="scrapIron" count="2" /> </recipe> <recipe name="Ceiling_Light_Bar" count="1" scrapable="False" > <ingredient name="forgedIron" count="6" /> <ingredient name="Lightbulb" count="2" /> </recipe> <recipe name="Ceiling_Light" count="1" scrapable="False" > <ingredient name="forgedIron" count="5" /> <ingredient name="Lightbulb" count="1" /> </recipe> <recipe name="Ceiling_Light_Brass" count="1" scrapable="False" > <ingredient name="scrapBrass" count="5" /> <ingredient name="Lightbulb" count="1" /> </recipe> <recipe name="Ceiling_Light_2" count="1" scrapable="False" > <ingredient name="forgedIron" count="5" /> <ingredient name="Lightbulb" count="1" /> </recipe> <recipe name="Ceiling_Light_3" count="1" scrapable="False" > <ingredient name="forgedIron" count="5" /> <ingredient name="Lightbulb" count="1" /> </recipe> <recipe name="Ceiling_Light_Dome" count="1" scrapable="False" > <ingredient name="forgedIron" count="5" /> <ingredient name="Lightbulb" count="1" /> <ingredient name="glass" count="1" /> </recipe> <recipe name="Ceiling_Light_Dome_Brass" count="1" scrapable="False" > <ingredient name="scrapBrass" count="5" /> <ingredient name="Lightbulb" count="1" /> <ingredient name="glass" count="1" /> </recipe> <recipe name="Wall_Light" count="1" scrapable="False" > <ingredient name="forgedIron" count="6" /> <ingredient name="Lightbulb" count="1" /> </recipe> <recipe name="Table_Lamp" count="1" scrapable="False" > <ingredient name="wood" count="10"/> <ingredient name="nail" count="10"/> <ingredient name="Lightbulb" count="1" grid="0, -2" /> </recipe> <recipe name="candleTable" count="1" scrapable="False" > <ingredient name="wood" count="1" /> <ingredient name="candle" count="1" /> </recipe> <recipe name="White_Pole_Light" count="1" scrapable="False" > <ingredient name="tallow" count="1" /> <ingredient name="cloth" count="1" /> <ingredient name="wood" count="1"/> </recipe> <recipe name="White_Pole" count="4" scrapable="False" > <ingredient name="wood" count="3"/> </recipe> <recipe name="Pole_Light" count="1" scrapable="False" > <ingredient name="tallow" count="1" /> <ingredient name="cloth" count="1" /> <ingredient name="wood" count="1"/> </recipe> <recipe name="Light_Barrel" count="1" scrapable="False" > <ingredient name="scrapIron" count="10" /> <ingredient name="coal" count="3" /> <ingredient name="wood" count="3" /> <ingredient name="paper" count="15" /> </recipe> <recipe name="Industrial_Light" count="1" scrapable="False" > <ingredient name="forgedIron" count="6" /> <ingredient name="Lightbulb" count="1" /> </recipe> <!-- Working Lights End-->
Valmar氏の原文のまま
補足:コピーすると書式や位置が必ずずれます。書式設定まで複製しておりません
3.LightbulbのアイテムをItems.xmlに新規追加する
Items.xml
<item id="1170" name="Lightbulb"> <property name="Meshfile" value="Items/Misc/sackPrefab" /> <property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab" /> <property name="Material" value="organic" /> <property name="HoldType" value="3" /> <property name="Stacknumber" value="64" /> <property class="Preview"> <property name="Zoom" value="28" /> <property name="Pos" value="0,-0.05" /> <property name="Rot" value="90,45,0" /> </property> </item>
4.loot.xmlのid="8"の行に1行追加する
<item name="Lightbulb" count="1,2" />
loot.xml内
<!-- lootcontainer 8 kitchen cupboards (lower), cleaning chemicals, plates, silverware, pots and pans --> <lootcontainer id="8" count="0,2" size="4,3" sound_open="UseActions/open_cupboard" sound_close="UseActions/close_cupboard" loot_quality_template="baseTemplate"> <item name="cookingPot" count="1"/> <item name="emptyJar" count="1,2" /> <item name="canEmpty" count="1,2"/> <item name="coffeeBeans" count="1,4"/> <item name="shortMetalPipe" count="1,2" prob="1.5" /> <item name="wrench" count="1"/> <item name="scrapLead" count="1"/> <item name="Lightbulb" count="1,2" /> <!--ココ追加--> </lootcontainer>
※ ブロックを更新するために「7DaystoDieプレイ」or 「ゲームをプレイ」を押して、ゲームを再び起動させてください
※ 専用のアイコンを導入していないため、「LIGHTBULB」の絵がありません。64個の表示だけです。詳しくは7DaystoDieフォーラムの本家:のリンク先へどうぞ
番外編. クラフトして量産したい
大元を大量に作り必要におうじて明るい家にしたい
<recipe name="Lightbulb" count="1" scrapable="False" > <ingredient name="glass" count="1" /> <ingredient name="torch" count="1" /> </recipe>