Jump to content

Electrical settings...


Recommended Posts

I'm currently working on a mod I started on in A17, left for A18, and am working on again in A19. The goal is to eliminate a majority of visible wires where we would normally have wiring in the walls. I have created a fusebox which can be turned on and off and shows no wire running from it to the target item, but am having two problems. The fusebox accepts a wire from the power source (generator, battery box, solar, etc) but it is WAY out in front, floating in the air. I need to adjust this and cannot figure out how. I believe this is what had me stop working on it ages ago.

 

The second issue is duplicating a motion sensor, but making the wire leading to the traps invisible. A single motion sensor may activate half a dozen traps, and those wires seriously block my line of sight. I cannot remember how I made the wires leaving the fusebox invisible. Can somebody point me in the right direction?

 

The item code:


<block name="DHTA_Fusebox">
    <property name="Extends" value="corrugatedMetalNoUpgradeMaster"/>
    <property name="CustomIcon" value="fusebox"/>
    <property name="DescriptionKey" value="DHTA_Fusebox_Desc"/>
    <property name="RuntimeSwitch" value="true"/>
    <property name="Class" value="Switch"/>
    <property name="UnlockedBy" value="perkAdvancedEngineering"/>
    <property name="Shape" value="Ext3dModel"/>
    <property name="Texture" value="293"/>
    <property name="Mesh" value="models"/>
    <property name="Model" value="Industrial/fusebox" param1="main_mesh"/>
    <property name="HandleFace" value="South"/>
    <property name="Material" value="Mmetal_hard"/>
    <property name="StabilitySupport" value="true"/>
    <property name="DamageReceived" value="0.5"/>
    <property name="LightOpacity" value="0"/>
    <property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
    <property class="RepairItems">
        <property name="resourceElectricParts" value="1"/>
        <property name="resourceForgedIron" value="1"/>
    </property>
    <property name="RequiredPower" value="0"/>
    <property name="DisplayType" value="blockElectrical"/>
    <property name="TriggerType" value="Switch"/>
    <property name="Group" value="Science"/>
    <drop event="Harvest" name="resourceElectricParts" count="1,2" tag="salvageHarvest"/>
    <drop event="Harvest" name="resourceScrapIron" count="0" tag="allHarvest"/>
    <drop event="Destroy" name="resourceScrapIron" count="1,20" prob="1"/>
    <drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
    <property name="EconomicValue" value="150"/>
    <property name="FilterTags" value="fdecor,fother,felectrical"/>
    <property name="SortOrder1" value="70e0"/>
</block>

<block name="DHTA_MotionSensor">
    <property name="CreativeMode" value="Player"/>
    <property name="Class" value="MotionSensor"/>
    <property name="UnlockedBy" value="perkAdvancedEngineering,motionsensorSchematic"/>
    <property name="Material" value="Mmetal_weak"/>
    <property name="StabilitySupport" value="false"/>
    <property name="Shape" value="ModelEntity"/>
    <property name="Mesh" value="models"/>
    <property name="Model" value="Entities/Electrical/motion_sensorPrefab"/>
    <property name="OnlySimpleRotations" value="true"/>
    <property name="ImposterDontBlock" value="true"/>
    <property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
    <property name="RequiredPower" value="5"/>
    <property name="DisplayType" value="blockElectrical"/>
    <property name="YawRange" value="90"/>
    <property name="PitchRange" value="90"/>
    <property name="Group" value="Science"/>
    <property class="RepairItems">
        <property name="resourceForgedIron" value="2"/>
        <property name="resourceElectricParts" value="1"/>
    </property>
    <drop event="Harvest" name="terrStone" count="0" tool_category="Disassemble"/>
    <drop event="Harvest" name="resourceElectricParts" count="0,2" tag="salvageHarvest"/>
    <drop event="Harvest" name="resourceScrapIron" count="5,10" tag="allHarvest"/>
    <drop event="Destroy" count="0"/>
    <drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
    <property name="EconomicValue" value="135"/>
    <property name="PickupJournalEntry" value="cameraTip,triggerDelayDurationTip,passthroughTriggeringTip"/>
    <property name="FilterTags" value="fdecor,felectrical,ftraps"/>
    <property name="SortOrder1" value="70a0"/>
</block>

Link to comment
Share on other sites

I found an older thread of mine where somebody tried helping me get this wire location issue sorted. The user suggested I use the following in my block code.


<property name="WireOffset" value="0,0.5,0"/>

Back then and even now, only the Y value works. I can raise where the wire coming from the generator attaches to my fusebox and I can lower it, but X and Z do absolutely nothing. I have tried all kinds of values in the X and Z locations and the wire doesn't budge. This made me think of something. Is this "WireOffset" tage for the wire leaving the box and going to devices or for the wire coming into the box? I want to adjust the location of the wire coming INTO the box. There is no wire rendered leaving the box. The entire code is below.


<block name="DHTA_Fusebox">
    <property name="Extends" value="corrugatedMetalNoUpgradeMaster"/>
    <property name="CustomIcon" value="fusebox"/>
    <property name="DescriptionKey" value="DHTA_Fusebox_Desc"/>
    <property name="RuntimeSwitch" value="true"/>
    <property name="Class" value="Switch"/>
    <property name="UnlockedBy" value="perkAdvancedEngineering"/>
    <property name="Shape" value="Ext3dModel"/>
    <property name="Texture" value="293"/>
    <property name="Mesh" value="models"/>
    <property name="Model" value="Industrial/fusebox" param1="main_mesh"/>
    <property name="HandleFace" value="South"/>
    <property name="Material" value="Mmetal_hard"/>
    <property name="StabilitySupport" value="true"/>
    <property name="DamageReceived" value="0.5"/>
    <property name="LightOpacity" value="0"/>
    <property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
    <property class="RepairItems">
        <property name="resourceElectricParts" value="1"/>
        <property name="resourceForgedIron" value="1"/>
    </property>
    <property name="WireOffset" value="0,-.9,.8"/>
    <property name="RequiredPower" value="0"/>
    <property name="DisplayType" value="blockElectrical"/>
    <property name="TriggerType" value="Switch"/>
    <property name="Group" value="Science"/>
    <drop event="Harvest" name="resourceElectricParts" count="1,2" tag="salvageHarvest"/>
    <drop event="Harvest" name="resourceScrapIron" count="0" tag="allHarvest"/>
    <drop event="Destroy" name="resourceScrapIron" count="1,20" prob="1"/>
    <drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
    <property name="EconomicValue" value="150"/>
    <property name="FilterTags" value="fdecor,fother,felectrical"/>
    <property name="SortOrder1" value="70e0"/>
</block>

This places the incoming wire about a foot out in front of the fusebox model, but it IS at the correct height. Adjusting the Z value to anything between positive 1 and negative 1 does nothing to move the connection point.

Link to comment
Share on other sites

Ah, you are the guy who tried helping me last time. Good to see you again! As for why, I do not know. My suggestion to you, who seems to be able to make it work, is to copy my code above and see if you can make it work on your end. If not, then we have found some kind of bug, or some code is missing. If it DOES work, then why won't it work here?

Link to comment
Share on other sites

I have tried it both ways. I have also tried positive numbers. Nothing seems to work.

 

With that said I did notice one thing. If I use the model used for the motion-sensor in a custom block of any type, the wire ALWAYS connects to the bottom of the camera. This leads me to believe that for the wire OFFSET to work it needs some default connection spot. I did some digging and found people talking about editing the 3D models and having some kind of tag on something which tells the game engine where to connect wires by default. Is this the case? I am not going to go re-learn 3D modelling (I last used 3DS Max 3 ages ago) and view this as a bit of a bug. Not everybody has 3D modelling software.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...