Jump to content

Car Respawning


Anabella

Recommended Posts

Car Respawning

 

Below info kept in case anyone still wants to use the mod in a16. Use the above link to the get updated mod.

 

This can be done to where you have all the different colors of cars respawning but due to the limit of block ids I just went with one color. The air block will take up a place where nothing can be put down. To get rid of it you would just simply need to remove the block below it. With limited maps and some of us having days going into the thousands this can be useful.

 

ONLY USE THIS VERSION FOR A16

 

  Hide contents

 


From Blocks

<block id="1455" name="cntCar03Damage2">
<property name="Class" value="CarExplode" /> 
<property name="Material" value="metal" />
<property name="Shape" value="ModelEntity" />
<property name="Texture" value="26" />
<property name="IsTerrainDecoration" value="true" />
<property name="Place" value="TowardsPlacer" />
<property name="Model" value="Entities/Vehicles/car03_dmg3_Prefab" />
<property name="MultiBlockDim" value="2,2,6" />
<property name="ShowModelOnFall" value="false" />
<drop event="Harvest" name="shortMetalPipe" count="5" prob="0.5" tool_category="Disassemble" />
<drop event="Harvest" name="gasCan" count="20" prob="0.3" />
<drop event="Harvest" name="headlight" count="1" prob="0.45" tool_category="Disassemble" />
<drop event="Harvest" name="scrapIron" count="4" prob="1" tool_category="Disassemble"/>
<drop event="Destroy" name="scrapIron" count="1,2" prob="1" />
<drop event="Fall" name="scrapMetalPile" count="1" prob="1" stick_chance="1" />
<property name="BigDecorationRadius" value="5" />
<property name="CanDecorateOnSlopes" value="false" />
<property class="Explosion"> 
	<property name="ParticleIndex" value="4" /> <!-- which prefab/particle is used -->
	<property name="RadiusBlocks" value="5" /> <!-- damage radius for blocks -->
	<property name="BlockDamage" value="5000" /><!-- damage for blocks in the center of the explosion -->
	<property name="RadiusEntities" value="5" /> <!-- damage radius for entities -->
	<property name="EntityDamage" value="100" /> <!-- damage for entities in the center of the explosion -->
</property> 
<property name="DowngradeBlock" value="CarRespawner-AirBlockStage" />
</block>


<block id="2030" name="CarRespawner-AirBlockStage">
	<property name="CustomIcon" value="sidingBluePlasterMiddleBlock" />
	<property name="IsDeveloper" value="true" />
	<property name="Class" value="PlantGrowing" />	
	<property name="Material" value="airEnhanced" />
	<property name="Shape" value="Invisible" />
	<property name="Texture" value="250" />
	<property name="CanMobsSpawnOn" value="false" />
	<drop event="Destroy" count="0" />	
	<property name="IsTerrainDecoration" value="true" />
	<property name="PlantGrowing.Next" value="cntCar03Red" />
	<property name="PlantGrowing.GrowthRate" value="180" /><!-- amount of days for respawn 60 equals 1 day-->
	<property name="PlantGrowing.FertileLevel" value="0" />
	<property name="PlantGrowing.IsRandom" value="false" />
</block>

From Materials

<material id="airEnhanced">
	<property name="collidable" value="false" />
	<property name="lightopacity" value="0" />
	<property name="Hardness" type="float" value="50000" />
	<property name="Mass" type="int" value="30" />	  
</material> 
Link to comment
Share on other sites

Has been checked and works for 19.2, 19.3 and 19.4. 

 

In 19.1 Stable the Fun Pimps added 3 new vehicles.  This adds them to the respawning of the modlet.  If you are using a19 the one below that works for a18.3 will work for it.

 

https://github.com/Anabella00geek/7D2D-Vehicle-Respawner-19.1

 

 

______________________________________________

This version also works with a19 Stable release. 

 

A18.3 stable b4 version of car respawner. Also respawns buses and army truck. I have changed it to not use an air block and to be one of the wheels with rim laying on ground so that you can tell it is not a normal tire to chop. I also used metal material so that it takes a few more hits to destroy it. Destroying will stop the vehicle respawning for anyone wanting to build where the vehicles are.

 

Download by clicking on the "clone or download" button from the link below.

 

https://github.com/Anabella00geek/7D2D-Vehicle-Respawner

 

 

 

Link to comment
Share on other sites

  • 11 months later...
This can be done to where you have all the different colors of cars respawning but due to the limit of block ids I just went with one color. The air block will take up a place where nothing can be put down. To get rid of it you would just simply need to remove the block below it. With limited maps and some of us having days going into the thousands this can be useful.

 

From Blocks

<block id="1455" name="cntCar03Damage2">
<property name="Class" value="CarExplode" /> 
<property name="Material" value="metal" />
<property name="Shape" value="ModelEntity" />
<property name="Texture" value="26" />
<property name="IsTerrainDecoration" value="true" />
<property name="Place" value="TowardsPlacer" />
<property name="Model" value="Entities/Vehicles/car03_dmg3_Prefab" />
<property name="MultiBlockDim" value="2,2,6" />
<property name="ShowModelOnFall" value="false" />
<drop event="Harvest" name="shortMetalPipe" count="5" prob="0.5" tool_category="Disassemble" />
<drop event="Harvest" name="gasCan" count="20" prob="0.3" />
<drop event="Harvest" name="headlight" count="1" prob="0.45" tool_category="Disassemble" />
<drop event="Harvest" name="scrapIron" count="4" prob="1" tool_category="Disassemble"/>
<drop event="Destroy" name="scrapIron" count="1,2" prob="1" />
<drop event="Fall" name="scrapMetalPile" count="1" prob="1" stick_chance="1" />
<property name="BigDecorationRadius" value="5" />
<property name="CanDecorateOnSlopes" value="false" />
<property class="Explosion"> 
	<property name="ParticleIndex" value="4" /> <!-- which prefab/particle is used -->
	<property name="RadiusBlocks" value="5" /> <!-- damage radius for blocks -->
	<property name="BlockDamage" value="5000" /><!-- damage for blocks in the center of the explosion -->
	<property name="RadiusEntities" value="5" /> <!-- damage radius for entities -->
	<property name="EntityDamage" value="100" /> <!-- damage for entities in the center of the explosion -->
</property> 
<property name="DowngradeBlock" value="CarRespawner-AirBlockStage" />
</block>


<block id="2030" name="CarRespawner-AirBlockStage">
	<property name="CustomIcon" value="sidingBluePlasterMiddleBlock" />
	<property name="IsDeveloper" value="true" />
	<property name="Class" value="PlantGrowing" />	
	<property name="Material" value="airEnhanced" />
	<property name="Shape" value="Invisible" />
	<property name="Texture" value="250" />
	<property name="CanMobsSpawnOn" value="false" />
	<drop event="Destroy" count="0" />	
	<property name="IsTerrainDecoration" value="true" />
	<property name="PlantGrowing.Next" value="cntCar03Red" />
	<property name="PlantGrowing.GrowthRate" value="180" /><!-- amount of days for respawn 60 equals 1 day-->
	<property name="PlantGrowing.FertileLevel" value="0" />
	<property name="PlantGrowing.IsRandom" value="false" />
</block>

From Materials

<material id="airEnhanced">
	<property name="collidable" value="false" />
	<property name="lightopacity" value="0" />
	<property name="Hardness" type="float" value="50000" />
	<property name="Mass" type="int" value="30" />	  
</material> 

 

Still working in A16 ?

Link to comment
Share on other sites

Use to have the code on my old build and did the following changes to see if it would work on the new build. Figured i would share.

 

Changes from the original code is where the downgradeblock is placed, and what car it respawns. I could be wrong but i should know in about 7 days <-changed it so the cars respawn after 7 days.

 

Remember to put the material code in, but below is the code i have in the blocks.

 

 

 

 

<block id="1455" name="cntCar03SedanDamage2"> <!-- car wreck, no color -->

<property name="Class" value="CarExplode"/>

<property name="Material" value="metal"/>

<property name="Shape" value="ModelEntity"/>

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

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

<property name="Place" value="TowardsPlacer"/>

<property name="Model" value="Entities/Vehicles/car03_dmg2_Prefab"/>

<property name="MultiBlockDim" value="2,2,6"/>

<property name="ShowModelOnFall" value="false"/>

<drop event="Harvest" name="shortMetalPipe" count="5" prob="0.5" tool_category="Disassemble"/>

<drop event="Harvest" name="gasCan" count="50,150" prob="0.5"/>

<drop event="Harvest" name="gasCan" count="50,150" prob="0.5" tool_category="Disassemble"/> <!-- together 100 avg -->

<drop event="Harvest" name="headlight" count="1" prob="0.45" tool_category="Disassemble"/>

<drop event="Harvest" name="scrapIron" count="20" tool_category="Disassemble"/>

<drop event="Destroy" count="0"/>

<drop event="Harvest" name="mechanicalParts" count="1,5" tool_category="Disassemble"/>

<drop event="Harvest" name="electricParts" count="0,2" prob="0.1" tool_category="Disassemble"/>

<drop event="Harvest" name="scrapIron" count="12"/>

<drop event="Fall" name="scrapMetalPile" count="1" prob="1" stick_chance="1"/>

<property name="DowngradeBlock" value="CarRespawner-AirBlockStage" />

<property name="BigDecorationRadius" value="5"/>

<property name="CanDecorateOnSlopes" value="false"/>

 

<block id="2034" name="CarRespawner-AirBlockStage">

<property name="CustomIcon" value="sidingBluePlasterMiddleBlock" />

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

<property name="Class" value="PlantGrowing" />

<property name="Material" value="airEnhanced" />

<property name="Shape" value="Invisible" />

<property name="Texture" value="250" />

<property name="CanMobsSpawnOn" value="false" />

<drop event="Destroy" count="0" />

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

<property name="PlantGrowing.Next" value="cntCar03SedanDamage0" />

<property name="PlantGrowing.GrowthRate" value="420" /><!-- amount of days for respawn 60 equals 1 day-->

<property name="PlantGrowing.FertileLevel" value="0" />

<property name="PlantGrowing.IsRandom" value="false" />

</block>

 

 

Link to comment
Share on other sites

Changed it as follows

 

Made the Placeholer a Bunch of grass you can Punch easy away

Made the Upgrade a Random Car State with a random color and the chance that the Circle breaks by spawning a oil Barrel

Here the code (Only a few minutes testet until now)

 

 

 

In loot XML

	<placeholder name="lootMyCarsHelper">
	<block name="oilBarrel"/>
	<block name="cntCar03SedanDamage0"/>
	<block name="cntCar03SedanDamage1"/>
	<block name="cntCar03SedanDamage2"/>
</placeholder>

 

In Blocks XML

 

New

<block id="2018" name="Nothing">
	<property name="CustomIcon" value="steelMaster" />
	<property name="CustomIconTint" value="ffa0ff"/>		
	<property name="IsDeveloper" value="true" />
	<property name="Class" value="PlantGrowing" />	
	<property name="Material" value="Mtallgrass"/>
<property name="StabilitySupport" value="false"/>
<property name="Shape" value="Grass"/>
<property name="Mesh" value="grass"/>
<property name="Texture" value="350,368,369,370,350,368"/>		
	<property name="Collide" value="melee"/>
	<property name="CanMobsSpawnOn" value="false" />
	<drop event="Destroy" count="0" />	
	<property name="IsTerrainDecoration" value="true" />
	<property name="PlantGrowing.Next" value="lootMyCarsHelper" />
	<property name="PlantGrowing.GrowthRate" value="4" /><!-- amount of days for respawn 60 equals 1 day-->
	<property name="PlantGrowing.FertileLevel" value="0" />
	<property name="PlantGrowing.IsRandom" value="false" />
</block>

<block id="2019" name="lootMyCarsHelper">
<property name="Extends" value="lootWastelandHelper" param1="CustomIcon,DescriptionKey"/>
<property name="Texture" value="278"/>
<property name="CreativeMode" value="Dev"/>
</block>

 

and edited/added in the Car

<block id="1455" name="cntCar03SedanDamage2">

	<property name="DowngradeBlock" value="Nothing"/>

 

 

So all cars will end as a Bush/Grass Bundle you can destroy or there will respawn a Random Car

 

The time is very low to test, no idea which Grow Rate will be a god choice, but i think this depends on the server too. And maybe it will make sense to give the Oil Barrel a lower or Higher chance

 

And good work, i had some problems by my own solution, was very helpfull to use yours as Base.

 

 

 

Planted

A12152B356C5F885920320CE168EF570A2FE2AF8

Grown

5E9D27D1A52F383973065C35F9EB9F56C4785DC3

Link to comment
Share on other sites

  • 5 weeks later...

 

Changed it as follows

 

Made the Placeholer a Bunch of grass you can Punch easy away

Made the Upgrade a Random Car State with a random color and the chance that the Circle breaks by spawning a oil Barrel

Here the code (Only a few minutes testet until now)

 

 

 

In loot XML

	<placeholder name="lootMyCarsHelper">
	<block name="oilBarrel"/>
	<block name="cntCar03SedanDamage0"/>
	<block name="cntCar03SedanDamage1"/>
	<block name="cntCar03SedanDamage2"/>
</placeholder>

 

In Blocks XML

 

New

<block id="2018" name="Nothing">
	<property name="CustomIcon" value="steelMaster" />
	<property name="CustomIconTint" value="ffa0ff"/>		
	<property name="IsDeveloper" value="true" />
	<property name="Class" value="PlantGrowing" />	
	<property name="Material" value="Mtallgrass"/>
<property name="StabilitySupport" value="false"/>
<property name="Shape" value="Grass"/>
<property name="Mesh" value="grass"/>
<property name="Texture" value="350,368,369,370,350,368"/>		
	<property name="Collide" value="melee"/>
	<property name="CanMobsSpawnOn" value="false" />
	<drop event="Destroy" count="0" />	
	<property name="IsTerrainDecoration" value="true" />
	<property name="PlantGrowing.Next" value="lootMyCarsHelper" />
	<property name="PlantGrowing.GrowthRate" value="4" /><!-- amount of days for respawn 60 equals 1 day-->
	<property name="PlantGrowing.FertileLevel" value="0" />
	<property name="PlantGrowing.IsRandom" value="false" />
</block>

<block id="2019" name="lootMyCarsHelper">
<property name="Extends" value="lootWastelandHelper" param1="CustomIcon,DescriptionKey"/>
<property name="Texture" value="278"/>
<property name="CreativeMode" value="Dev"/>
</block>

 

and edited/added in the Car

<block id="1455" name="cntCar03SedanDamage2">

	<property name="DowngradeBlock" value="Nothing"/>

 

 

So all cars will end as a Bush/Grass Bundle you can destroy or there will respawn a Random Car

 

The time is very low to test, no idea which Grow Rate will be a god choice, but i think this depends on the server too. And maybe it will make sense to give the Oil Barrel a lower or Higher chance

 

And good work, i had some problems by my own solution, was very helpfull to use yours as Base.

 

 

 

Planted

A12152B356C5F885920320CE168EF570A2FE2AF8

Grown

5E9D27D1A52F383973065C35F9EB9F56C4785DC3

 

 

works with 16.2?

Link to comment
Share on other sites

For a really simple version of this, I just changed the entry for the "stripped to the frame" car block like so:

<block id="1455" name="cntCar03SedanDamage2"> <!-- car wreck, no color -->
<property name="Class" value="PlantGrowing"/>
<property name="Material" value="metal"/>
<property name="Shape" value="ModelEntity"/>
<property name="ImposterDontBlock" value="true"/>
<property name="IsTerrainDecoration" value="true"/>
<property name="Place" value="TowardsPlacer"/>
<property name="Model" value="Entities/Vehicles/car03_dmg2_Prefab"/>
<property name="MultiBlockDim" value="2,2,6"/>
<property name="ShowModelOnFall" value="false"/>
<property name="PlantGrowing.Next" value="randomCarsHelper"/>
<property name="PlantGrowing.GrowthRate" value="60" /><!-- amount of days for respawn 60 equals 1 day-->
<property name="PlantGrowing.FertileLevel" value="0" />
<property name="PlantGrowing.IsRandom" value="false" />
<drop event="Harvest" name="shortMetalPipe" count="5" prob="0.5" tool_category="Disassemble"/>
<drop event="Harvest" name="gasCan" count="50,150" prob="0.5"/>
<drop event="Harvest" name="gasCan" count="50,150" prob="0.5" tool_category="Disassemble"/> <!-- together 100 avg -->
<drop event="Harvest" name="headlight" count="1" prob="0.45" tool_category="Disassemble"/>
<drop event="Harvest" name="scrapIron" count="20" tool_category="Disassemble"/>
<drop event="Destroy" count="0"/>
<drop event="Harvest" name="mechanicalParts" count="1,5" tool_category="Disassemble"/>
<drop event="Harvest" name="electricParts" count="0,2" prob="0.1" tool_category="Disassemble"/>
<drop event="Harvest" name="scrapIron" count="12"/>
<drop event="Fall" name="scrapMetalPile" count="1" prob="1" stick_chance="1"/>
<property name="BigDecorationRadius" value="5"/>
<property name="CanDecorateOnSlopes" value="false"/>
<!--
<property name="RandomTintColor1" value="0,50,110" param1="car03_white"/>
<property name="RandomTintColor2" value="148,119,10" param1="car03_white"/>
<property name="RandomTintColor3" value="200,161,17" param1="car03_white"/>
<property name="RandomTintColor4" value="212,50,7" param1="car03_white"/>
<property name="RandomTintColor5" value="246,0,15" param1="car03_white"/>
<property name="RandomTintColor6" value="255,204,16" param1="car03_white"/>
<property name="RandomTintColor7" value="255,255,255" param1="car03_white"/>
<property name="RandomTintColor8" value="5,95,190" param1="car03_white"/>
<property name="RandomTintColor9" value="70,158,255" param1="car03_white"/>
<property name="RandomTintColor10" value="184,6,40" param1="car03_frame"/>
-->
<property class="Explosion">
	<property name="ParticleIndex" value="4"/> <!-- which prefab/particle is used -->
	<property name="RadiusBlocks" value="5"/> <!-- damage radius for blocks -->
	<property name="BlockDamage" value="5000"/> <!-- damage for blocks in the center of the explosion -->
	<property name="RadiusEntities" value="5"/> <!-- damage radius for entities -->
	<property name="EntityDamage" value="70"/> <!-- damage for entities in the center of the explosion -->
</property>
<property name="ActivationDistance" value="6"/>
</block>

 

This way, as long as you don't fully destroy the cars, they have a chance to upgrade each day. The randomCarsHelper block is already defined, and gives probabilities for the undamaged, damaged, and stripped versions. Each time the frame grows, it's replaced with the randomCarsHelper block, which will just be the same stripped frame most of the time, so nothing will appear to happen. But you have a chance at the damaged and undamaged states as well.

 

Eventually this would cause all the stripped cars in the game to regenerate to damaged or undamaged cars, but it would take a very long time.

 

If you want a more reliable version you could create another car helper loot placeholder without the cntCar03SedanDamage2 block in it, but this would mean your world would have no stripped car frames in it in short order. I'd recommend setting the growth rate to at least 420 (7 days) if you went that route.

Link to comment
Share on other sites

<property name="PlantGrowing.GrowthRate" value="4" /> <!-- amount of days for respawn 60 equals 1 day-->

 

The value is not set a day timer but mostly a minute/hour timer...

 

 

If not, I have a better mod who are a little better realistic but without respawn!

 

biomes.xml

 

Search "car" & replace all:

 

blockname="...car..." prob="..."

 

By:

 

blockname="cntCar03SedanDamage0" prob="0.01"

 

 

The prob spawn value 0.01 seem like good for 2 reasons, cause if you set a high value:

 

- The world generator will be really slow & so in game you will lag very much (in my side it's like that)

 

- Example with prob="1.00" you will have a car on each block & if one car explode so all car would explode in chain (I didn't test yet my mod with a16.2 but one of my friend said me that when he do it, with a16.1 seem like don't happen so maybe a new mechanic car's explode with a16.2)

 

But there is a little problem (but not for me cause is a little more realistic), to loot car, you need fist to wench it for car go to stage 2.

Link to comment
Share on other sites

  • 2 months later...

Is this still viable in A16.4

 

For a really simple version of this, I just changed the entry for the "stripped to the frame" car block like so:

<block id="1455" name="cntCar03SedanDamage2"> <!-- car wreck, no color -->
<property name="Class" value="PlantGrowing"/>
<property name="Material" value="metal"/>
<property name="Shape" value="ModelEntity"/>
<property name="ImposterDontBlock" value="true"/>
<property name="IsTerrainDecoration" value="true"/>
<property name="Place" value="TowardsPlacer"/>
<property name="Model" value="Entities/Vehicles/car03_dmg2_Prefab"/>
<property name="MultiBlockDim" value="2,2,6"/>
<property name="ShowModelOnFall" value="false"/>
<property name="PlantGrowing.Next" value="randomCarsHelper"/>
<property name="PlantGrowing.GrowthRate" value="60" /><!-- amount of days for respawn 60 equals 1 day-->
<property name="PlantGrowing.FertileLevel" value="0" />
<property name="PlantGrowing.IsRandom" value="false" />
<drop event="Harvest" name="shortMetalPipe" count="5" prob="0.5" tool_category="Disassemble"/>
<drop event="Harvest" name="gasCan" count="50,150" prob="0.5"/>
<drop event="Harvest" name="gasCan" count="50,150" prob="0.5" tool_category="Disassemble"/> <!-- together 100 avg -->
<drop event="Harvest" name="headlight" count="1" prob="0.45" tool_category="Disassemble"/>
<drop event="Harvest" name="scrapIron" count="20" tool_category="Disassemble"/>
<drop event="Destroy" count="0"/>
<drop event="Harvest" name="mechanicalParts" count="1,5" tool_category="Disassemble"/>
<drop event="Harvest" name="electricParts" count="0,2" prob="0.1" tool_category="Disassemble"/>
<drop event="Harvest" name="scrapIron" count="12"/>
<drop event="Fall" name="scrapMetalPile" count="1" prob="1" stick_chance="1"/>
<property name="BigDecorationRadius" value="5"/>
<property name="CanDecorateOnSlopes" value="false"/>
<!--
<property name="RandomTintColor1" value="0,50,110" param1="car03_white"/>
<property name="RandomTintColor2" value="148,119,10" param1="car03_white"/>
<property name="RandomTintColor3" value="200,161,17" param1="car03_white"/>
<property name="RandomTintColor4" value="212,50,7" param1="car03_white"/>
<property name="RandomTintColor5" value="246,0,15" param1="car03_white"/>
<property name="RandomTintColor6" value="255,204,16" param1="car03_white"/>
<property name="RandomTintColor7" value="255,255,255" param1="car03_white"/>
<property name="RandomTintColor8" value="5,95,190" param1="car03_white"/>
<property name="RandomTintColor9" value="70,158,255" param1="car03_white"/>
<property name="RandomTintColor10" value="184,6,40" param1="car03_frame"/>
-->
<property class="Explosion">
	<property name="ParticleIndex" value="4"/> <!-- which prefab/particle is used -->
	<property name="RadiusBlocks" value="5"/> <!-- damage radius for blocks -->
	<property name="BlockDamage" value="5000"/> <!-- damage for blocks in the center of the explosion -->
	<property name="RadiusEntities" value="5"/> <!-- damage radius for entities -->
	<property name="EntityDamage" value="70"/> <!-- damage for entities in the center of the explosion -->
</property>
<property name="ActivationDistance" value="6"/>
</block>

 

This way, as long as you don't fully destroy the cars, they have a chance to upgrade each day. The randomCarsHelper block is already defined, and gives probabilities for the undamaged, damaged, and stripped versions. Each time the frame grows, it's replaced with the randomCarsHelper block, which will just be the same stripped frame most of the time, so nothing will appear to happen. But you have a chance at the damaged and undamaged states as well.

 

Eventually this would cause all the stripped cars in the game to regenerate to damaged or undamaged cars, but it would take a very long time.

 

If you want a more reliable version you could create another car helper loot placeholder without the cntCar03SedanDamage2 block in it, but this would mean your world would have no stripped car frames in it in short order. I'd recommend setting the growth rate to at least 420 (7 days) if you went that route.

 

 

 

 

Is this still a viable workaround in verion A16.4? We have a lot of players who are wrenching cars out of existence and new players cannot find any - we try to manually spawn in sedans to help, but believe this is slowing or lagging the server - I am by no means a programmer - so if this could work with having them leave the car at a few points, it would be awesome - please advise - does it work and which .xml file would need to be edited - I use Wing FTP Server to do this - THAT much at least I can play with - please advise.

Link to comment
Share on other sites

  • 5 months later...

In 16.4 the base code from the front page OP had some minor errors that caused a failure to load.

Mostly a block id incompatibility, and referencing invalid sedan model names for the respawn damage state.

 

This is cleaned up for anyone looking for a current 16.4 basic mod.

 

It also regens cars in all colours, but I didn't adjust anything so that may have been changed by an official patch?

 

 

PS. I don't know if its something affected by this code or not. (Ie. it may be in vanilla too but I wasnt paying attention to it till I was modifying it) The third damage state of sedan sound effect changes from metal to stone when wrenched. Any ideas?

 

Blocks

<block id="1455" name="cntCar03SedanDamage2">
<property name="Material" value="metal" />
<property name="Class" value="CarExplode" /> 
<property name="Shape" value="ModelEntity" />
<property name="Texture" value="26" />
<property name="IsTerrainDecoration" value="true" />
<property name="Place" value="TowardsPlacer" />
<property name="Model" value="Entities/Vehicles/car03_dmg2_Prefab" />
<property name="MultiBlockDim" value="2,2,6" />
<property name="ShowModelOnFall" value="false" />
<drop event="Harvest" name="shortMetalPipe" count="5" prob="0.5" tool_category="Disassemble" />
<drop event="Harvest" name="gasCan" count="20" prob="0.3" />
<drop event="Harvest" name="headlight" count="1" prob="0.45" tool_category="Disassemble" />
<drop event="Harvest" name="scrapIron" count="4" prob="1" tool_category="Disassemble"/>
<drop event="Destroy" name="scrapIron" count="1,2" prob="1" />
<drop event="Fall" name="scrapMetalPile" count="1" prob="1" stick_chance="1" />
<property name="DowngradeBlock" value="CarRespawner-AirBlockStage" />
<property name="BigDecorationRadius" value="5" />
<property name="CanDecorateOnSlopes" value="false" />
<property class="Explosion"> 
	<property name="ParticleIndex" value="4" /> <!-- which prefab/particle is used -->
	<property name="RadiusBlocks" value="5" /> <!-- damage radius for blocks -->
	<property name="BlockDamage" value="5000" /><!-- damage for blocks in the center of the explosion -->
	<property name="RadiusEntities" value="5" /> <!-- damage radius for entities -->
	<property name="EntityDamage" value="70" /> <!-- damage for entities in the center of the explosion -->
</property> 

</block>


<block id="2031" name="CarRespawner-AirBlockStage">
<property name="CustomIcon" value="sidingBluePlasterMiddleBlock" />
<property name="IsDeveloper" value="true" />
<property name="Class" value="PlantGrowing" />	
<property name="Material" value="airEnhanced" />
<property name="Shape" value="Invisible" />
<property name="Texture" value="250" />
<property name="CanMobsSpawnOn" value="false" />
<drop event="Destroy" count="0" />	
<property name="IsTerrainDecoration" value="true" />
<property name="PlantGrowing.Next" value="cntCar03SedanDamage0" />
<property name="PlantGrowing.GrowthRate" value="420" /><!-- amount of days for respawn 60 equals 1 day-->
<property name="PlantGrowing.FertileLevel" value="0" />
<property name="PlantGrowing.IsRandom" value="false" />
</block>

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

I wish I had seen this before I did my workaround lol. I just modded the loot list so that searching a car can give you the useful things you get from dismantling it (small engine, battery, springs, gas, etc.) I mostly used the same probabilitys they had for dismantleing but I made some of the things less common then that (mostly for balance). After that I made the cars give nothing when you dismantle them with wrench (to discorage trolling). The reason I do this is that I run a mp server that my friends and I play on often and with the number of people playing all the time cars become rare quickly (we all have no life and play to much lol).

Link to comment
Share on other sites

I see good sir =) can help out a noob and toss some codes? (may some 1 only get ctrl+c, ctrl+v skill )

 

 

Respawning boulders (rocks)

 

 

Blocks.xml

 

EDIT in blocks.xml id 645 and 647 to:

 

<block id="645" name="rockResourceBroke2"> <!-- used for the rock with id 630 (rockResource) -->

<property name="Extends" value="rockResource"/>

<property name="CreativeMode" value="Dev"/>

<property name="Model" value="Entities/Resources/rock_resource_broke2Prefab"/>

<property name="DowngradeBlock" value="lootMyRockHelper"/>

</block>

 

<block id="647" name="rockResource02Broke2"> <!-- used for the rock with id 640 (rockResource02) -->

<property name="Extends" value="rockResource"/>

<property name="CreativeMode" value="Dev"/>

<property name="Model" value="Entities/Resources/rock_resource02_broke2Prefab"/>

<property name="MultiBlockDim" value="1,2,1"/>

<property name="DowngradeBlock" value="lootMyRockHelper"/>

</block>

 

 

ADD to blocks.xml the following (carefully with the ids, change 866 and 867 to something else if already used):

 

<block id="866" name="lootMyRockHelper">

<property name="CreativeMode" value="Dev"/>

<property name="MaxDamage" value="50000"/>

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

<property name="Material" value="Mboulder"/>

<property name="StabilitySupport" value="false"/>

<property name="Shape" value="Grass"/>

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

<property name="Texture" value="441"/>

<property name="Collide" value="melee"/>

<property name="CanMobsSpawnOn" value="false" />

<drop event="Destroy" count="0" />

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

<property name="Class" value="UpgradeRated"/>

<property name="UpgradeRated.ToBlock" value="lootMyRock"/>

<property name="UpgradeRated.Rate" value="20"/>

</block>

 

<block id="867" name="lootMyRock">

<property name="CreativeMode" value="Dev"/>

<property name="Extends" value="lootWastelandHelper" param1="CustomIcon,DescriptionKey"/>

<property name="Texture" value="278"/>

<property name="CreativeMode" value="Dev"/>

</block>

 

 

 

Loot.xml

 

 

ADD to loot.xml:

 

<placeholder name="lootMyRock">

<block name="rockResource"/>

<block name="rockResource02"/>

</placeholder>

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...