• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Enable Jail Door again

danielspoa

Refugee
Hi guys. This is something I tried to do myself and I faced a problem, so I'm looking for help. I reenabled the jail door mixing old code with the model that is still in the game files, but had trouble working with collisions. Basically I want to allow gunfire and arrows through it. I want to block movement, melee, rockets.

However after some testing I noticed every time I add the movement collide it also blocks arrows and rockets independently of those settings (I WANT to block rockets indeed, just that I noticed that too). Gunfire still goes through.

I assume I'm doing something wrong with the new properties but.. any help to set the collision correctly is greatly appreciated. I can do the rest again if needed.

thanks!

----

this is what I have right now. Consider I don't know what all the properties do so I was playing around some of them.

Code:
<config>
<append xpath="/blocks">
	<block name="jailDoor">
		<property name="Class" value="DoorSecure"/>
		<property name="Material" value="Msteel"/>
		<property name="MaxDamage" value="2500"/>
		<property name="CustomIcon" value="jailDoorStatic"/>
		<property name="Shape" value="ModelEntity"/>
		<property name="LightOpacity" value="0"/>
		<property name="UseGlobalUV" value="Local"/>
		<property name="Tag" value="Door"/>
		<property name="Place" value="Door"/> <!-- build restriction -->
		<property name="PlaceEverywhere" value="true"/>
		<property name="DisplayType" value="blockMulti" />
		<property name="Model" value="Entities/Doors/jail_doorPrefab"/>
		<property name="ModelOffset" value="0,.5,0"/>
		<property name="MultiBlockDim" value="1,2,1"/>
		<property name="ImposterExcludeAndStop" value="true"/>
		<property name="DescriptionKey" value="Made of steel the jail door is not as strong as a solid vault door, but allows you to shoot small projectiles through it."/>
		<property name="OpenSound" value="open_door_jail"/>
		<property name="CloseSound" value="close_door_jail"/>
		<property name="Collide" value="movement,melee"/> <!-- -rocket -->
		<property class="RepairItems"> <property name="forgedSteel" value="18"/> </property>
		<drop event="Harvest" name="" count="0" tool_category="Disassemble"/>
		<drop event="Destroy" count="0"/>
		<drop event="Destroy" name="spring" count="0,2" prob="1" tool_category="Disassemble"/>
		<drop event="Destroy" name="mechanicalParts" count="0,2" prob="1" tool_category="Disassemble"/>
		<drop event="Harvest" name="scrapIron" count="20,60"/>
		<property name="EconomicValue" value="30"/>
		<drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
		<property name="Group" value="Building"/>
		<property name="FilterTags" value="fdecor,fother,fwindows,fdoors"/>
		<property name="SortOrder1" value="7060"/>
		<property name="SortOrder2" value="0061"/> <!-- SortDoors -->
	</block>
</append>

<remove xpath="/blocks/block[@name='glassBusinessPlate']/property[@class='UpgradeBlock']"/>
</config>
edit: ignore the remove line in the end, it's an unrelated change I made. I'm aware I need the rocket collide as well on the jaildoor, it's just the moment I copied the code. Thanks guys!!

 
Last edited by a moderator:
here - <property name="Collide" value="movement,melee"/> looks right you can add rocket to it to as rockets wouldnt really fit thru the gaps lol. But yeh the collide is the part your looking for so yeh i noticed with the iron bars it has all like this -

<property name="Collide" value="movement,melee,rocket"/> <!-- -rocket -->

and you cant walk thru them but can shoot thru them.

I guess that is why they are not in yet as they havent been finished

 
thanks for the answer stallion. Unfortunately when I add the "movement" collider it blocks arrows and rockets automatically, even without having those other two there. Gunfire is the only thing that still goes through.

I don't know if it's hardcoded or I have some other setting messed up, do you have any clue? I thought it could be related to being a door, because otherwise it's similar to the iron bars

 
i dare say thats why they are not working is they are unfinished and tfp still have to work on it to fix the issues unfort. Unless someone whom is more knowledgeable can think of the answer.

 
removing melee works as intended, just allows melee to go through. It's only the movement collider that blocks pretty much everything with it (aside from gunfire). But again, it works well in other items, I thought this could be related to the shape, the model or whatever. Or the door interaction, I don't know.

 
It may be because arrows and rockets are "projectiles", they are physical objects, whereas gunfire is just hitscan/raycast. Is odd though because arrows go through iron bars? Or at least they used to. Maybe try a few tags from woodframemaster?

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

<property name="Frame"/>

<property name="ImposterExclude" value="true"/> (I see you have a combination tag but try them separately)

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

 
It may be because arrows and rockets are "projectiles", they are physical objects, whereas gunfire is just hitscan/raycast. Is odd though because arrows go through iron bars? Or at least they used to. Maybe try a few tags from woodframemaster?
<property name="Mesh" value="cutout"/>

<property name="Frame"/>

<property name="ImposterExclude" value="true"/> (I see you have a combination tag but try them separately)

<property name="ImposterDontBlock" value="true"/>
Hey pastry,

I just tried this, no success. I don't know whats the imposter property, it's just one of those things I was playing with.


However I just noticed an odd behavior - keep in mind the jail door slides to the side -:

- door closed: melee collides where the door is.

- door open: melee collides where the door is now, to the side. It doesn't collide where the door was.

Effectivelly the melee collider moves with the door.

Now for arrows:

- door closed: arrow collides with the door.

- door open: arrow doesn't collide where the door was, nor where the door is right now. Collision disappears while the door is open, so it's not relying on the same collision volume I guess

 
Back
Top