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

Sam's Car and Truck Respawner - A20, Server-Side

saminal

New member
I decided with the extra options for vehicles in the game I'd like a respawner mod that would be more randomised. This mod will allow cars, army trucks, service trucks, ambulances and buses to respawn to a similar vehicle after a few hours.

  • Cars will respawn to a random car (with a random stage of damage)
  • Army trucks (open or closed) will respawn to a randomly open or closed army truck
  • Service trucks and ambulances are grouped together to respawn each other
  • Big buses will respawn big buses, the short school bus will respawn itself - to avoid respawning through parts of buildings.


Download here - file will be updated automatically as the mod is updated.

before.jpg

after.jpg

 
Last edited by a moderator:
.

Great mod; say is this server side only mod or does the client need to install this too?

 
Last edited by a moderator:
Hallo Saminal,

I am still quite the tyro regarding xml, and coding in general, so I apologize that what follows is obvious to a professional or hobbyist software engineer. I am far more comfortable throwing lead and launching 227mm rockets, and even that was 30 years ago.

Which attribute do we alter to extend the amount of time before respawn occurs?  I found prob=".3" in blockplaceholders.xml and that seems to be what I would want to change, but I wish to make sure prior to committing to any edits.

example on Line 13

    <block name="cntBusSchool" prob=".3"/>


If prob ("probability" from what I can glean) is the attribute I should change, does the ".3" represent the probability of the block spawning at any time during an in-game day?

Best regards,

mprojekt

 
Which attribute do we alter to extend the amount of time before respawn occurs?


In the blocks.xml you will see a number of blocks called "RandomRespawner". On each of these there is a property "PlantGrowing.GrowthRate", for example line 97. This value is in minutes, so if you'd like to extend it to a week, assuming you have 1 hour days, you would set it to 420.

Do this on each of the RandonRespawner blocks :)

 
In the blocks.xml you will see a number of blocks called "RandomRespawner". On each of these there is a property "PlantGrowing.GrowthRate", for example line 97. This value is in minutes, so if you'd like to extend it to a week, assuming you have 1 hour days, you would set it to 420.

Do this on each of the RandonRespawner blocks :)


Oho? I was looking at the wrong variable or attribute, indeed the wrong file, all along! Thank you for the correction and the advice! 😊

 
Hi sorry to just drop in, but I have a quick question.  Can this mod be added to a server already active, or does it need to be applied to a fresh world?

I have a lot of players that don't wanna lose their progress!

TIA

 
Hi sorry to just drop in, but I have a quick question.  Can this mod be added to a server already active, or does it need to be applied to a fresh world?

I have a lot of players that don't wanna lose their progress!

TIA


It can be added to an existing world without causing errors, but any car wrecks or trucks that already exist in the world will fail to respawn as they were generated before the extra code went in.

Only wrecks and trucks that come from POI resets or manually placing them will respawn going forward.

 
It can be added to an existing world without causing errors, but any car wrecks or trucks that already exist in the world will fail to respawn as they were generated before the extra code went in.

Only wrecks and trucks that come from POI resets or manually placing them will respawn going forward.
Thank you for getting back to me, much appreciated. :)

 
Quick question.  If take a vehicle right down and want to build there, will it still respawn?
Yes, when you dismantle it you'll see a snowy shrub left behind. If you remove the block underneath the shrub, it'll fall and then you can build over it without worrying about the vehicle coming back.

 
I am wondering if anyone can get this working in Undead Legacy.  I am trying to add a car respawner to my server due to massive request of the players.

 
Back
Top