JasonX Posted September 8 Share Posted September 8 (edited) Hi all, I remember back in A17 or so, this XML feature stopped working and became hard-coded or something. Just tinkering now with some mod features (re-locatable barb wire and barricades) and notice that TakeDelay just doesn't work except on specific blocks (generator, forge etc.). Tried mixing it with and without CanPickup (this works but it's instant pickup). Looking at the rest of the block XML, I've tried different tags to no avail. There's no reference to these blocks in any other XML files that might indicate the ability to implement this. The outcome I'm looking for is to be able to hover over custom blocks like road barricades, and be prompted to hold "E" for XXX seconds to pick up. Edited September 8 by JasonX (see edit history) Link to comment Share on other sites More sharing options...
Cranberry Monster Posted September 11 Share Posted September 11 Yeah, I've wrestled with this in the past. At the moment, a couple of quick and dirty solution occur to me for this. You could try setting these to class "PoweredLight" and then just never hook them up to a power grid. But I'm imagining that would probably negate the barb wires damage and I'm not sure if powered lights block things like you'd want the barricade to. A possible work around would be to have a movable version of each using the "PoweredLight" setting, and that version is the upgraded form of your standard movable blocks. In other words, you place your barbed wire or barricade and they function as you like, but when you want to move them, you have to do an upgrade action on them first, switching them to the "PoweredLight" version. Then, in the xml, have it so the item you are actually picking up is the original, functional version of the barbed wire or barricade block. You can either add the upgrade ability to existing tools, or put a new tool in that does just that job. The "PoweredLight" setting would probably mean this pick up functionality would only work where your LCB was active. Alternatively, you could require an upgrade action on the unmovable version that makes it a transitional block (like the old wet cement ones) that turns into the instant pickup version after a given time has elapsed. I haven't tinkered with A21's xml yet, but hopefully the class "UpgradeRated" remains in the code even if it's not currently used by anything in vanilla. Here's what that looked like back in A19 <block name="pouredConcreteMaster"> <property name="Group" value="Building,advBuilding"/> <property name="DisplayType" value="blockHardened"/> <property name="Material" value="Mconcrete"/> <property name="MaxDamage" value="1250"/> <property name="Texture" value="176"/> <property name="DescriptionKey" value="concreteGroupDesc"/> <!-- <property name="ImposterExchange" value="imposterBlock" param1="2"/> --> <property name="CreativeMode" value="None"/> <property class="RepairItems"> <property name="resourceConcreteMix" value="8"/> </property> <property name="Class" value="UpgradeRated"/> <property name="UpgradeRated.ToBlock" value="concreteMaster"/> <property name="UpgradeRated.Rate" value="4"/> <drop event="Destroy" count="0"/> <property name="EconomicValue" value="50"/> <property name="EconomicBundleSize" value="20"/> <property name="FilterTags" value="fbuilding,fconcrete"/> <property name="SortOrder1" value="40m0"/> <property name="SortOrder2" value="0002"/> </block> If the ability to use this class remains in vanilla A21, you could set your "RepairItems" to the new tool for unlocking the unmovable versions and the value to "0" so said tool doesn't go poof when you use it. Then you could set the UpgradeRated.ToBlock to your instant pick up version of your blocks, and fiddle around with the UpgradeRated.Rate to get an acceptable delay (I'd try maybe 1 or less there, assuming decimal values are okay there). At work at the moment so I can't try any of this out myself, but I hope you get this to work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now