Jump to content
Christopher Janzen

spawnabletypes <hoarder /> ???

Recommended Posts

can someone explain how to use this parameter?

i want to let some barrels spawning with random loot inside.

but the<cargo preset= parameter dosnt work on barrels :(

 

Share this post


Link to post
Share on other sites
3 hours ago, Christopher Janzen said:

can someone explain how to use this parameter?

i want to let some barrels spawning with random loot inside.

but the<cargo preset= parameter dosnt work on barrels 😞

 

<type name="Barrel_Blue">
       <cargo preset="foodVillage" />
        <cargo preset="toolsMedic" />
        <cargo chance="0.20">
            <item name="TacticalBaconCan" chance="0.14" />
            <item name="Tomato" chance="0.14" />
        </cargo>
    </type>

this for example will spawn items from foodvillage and toolsmedic category defined in cfgrandompresets, where these categories have their own spawnchances defined, + there is a 20% check and if that will pass there is another 14% check for bacon can and tomato, dont forget that this works only for fresh spawned items, and since barrels have their default lifetime set to 45 days or something like that(types.xml) this will not work until a barrel respawns(or you delete a database) after you change/set this

<type name="FirstAidKit">
		<tag name="shelves" />
		<cargo chance="1">
			<item name="BandageDressing" />
		</cargo>
		<cargo chance="1">
			<item name="BloodTestKit" />
		</cargo>
		<cargo chance="1">
			<item name="BloodBagEmpty" />
		</cargo>
		<cargo chance="1">
			<item name="StartKitIV" />
		</cargo>
	</type>

this is how the first aid kits are done so they always have these 4 things when you find them

Edited by TheSzepy

Share this post


Link to post
Share on other sites

okay, i will explain a bit better.

i made a safe for Money and create n complete new Event:

Events.xml

Spoiler

    <event name="StaticSafe">
        <waves>0</waves>
        <nominal>5</nominal>
        <min>0</min>
        <max>0</max>
        <lifetime>28800</lifetime>
        <restock>28800</restock>
        <saferadius>1000</saferadius>
        <distanceradius>1000</distanceradius>
        <cleanupradius>1000</cleanupradius>
        <flags deletable="1" init_random="0" remove_damaged="0" sec_spawner="0"/>
        <position>fixed</position>
        <limit>child</limit>
        <active>1</active>
        <children>
            <child lootmax="20" lootmin="10" max="1" min="1" type="Safe_Static"/>
        </children>
    </event>

 

cfgspawnabletypes.xml

Spoiler

<type name="Safe_Static">
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl3" />
	<cargo preset="SafeLvl3" />
	<cargo preset="SafeLvl3" />
	<cargo preset="SafeLvl4" />
</type>

 

 

 

cfgrandompresets.xml

Spoiler


		<cargo chance="0.80" name="SafeLvl1">
				<item name="Money_Ruble1" chance="0.25" />
				<item name="Money_Ruble2" chance="0.20" />
				<item name="Money_Ruble5" chance="0.15" />
				<item name="Money_Ruble20" chance="0.10" />
				<item name="Money_Ruble50" chance="0.10" />
				<item name="Money_Dollar1" chance="0.15" />
				<item name="Money_Dollar2" chance="0.10" />
				<item name="Money_Euro1" chance="0.005" />
				<item name="Money_Euro2" chance="0.005" />
				<item name="Money_Euro5" chance="0.005" />
		</cargo>
		<cargo chance="0.80" name="SafeLvl2">
				<item name="Money_Ruble1" chance="0.25" />
				<item name="Money_Ruble2" chance="0.20" />
				<item name="Money_Ruble5" chance="0.15" />
				<item name="Money_Ruble20" chance="0.10" />
				<item name="Money_Ruble50" chance="0.10" />
				<item name="Money_Ruble100" chance="0.05" />
				<item name="Money_Dollar1" chance="0.15" />
				<item name="Money_Dollar2" chance="0.10" />
				<item name="Money_Dollar5" chance="0.06" />
				<item name="Money_Euro1" chance="0.005" />
				<item name="Money_Euro2" chance="0.005" />
				<item name="Money_Euro5" chance="0.005" />
				<item name="Money_Euro10" chance="0.005" />
				<item name="Money_Euro20" chance="0.005" />
		</cargo>
		<cargo chance="0.80" name="SafeLvl3">
				<item name="Money_Ruble50" chance="0.10" />
				<item name="Money_Ruble100" chance="0.05" />
				<item name="Money_Ruble200" chance="0.03" />
				<item name="Money_Ruble500" chance="0.01" />
				<item name="Money_Dollar5" chance="0.06" />
				<item name="Money_Dollar10" chance="0.03" />
				<item name="Money_Euro10" chance="0.005" />
				<item name="Money_Euro20" chance="0.005" />
				<item name="Money_Euro50" chance="0.005" />
				<item name="Money_Euro100" chance="0.005" />
		</cargo>
		<cargo chance="0.50" name="SafeLvl4">
				<item name="Coin" chance="0.10" />
				<item name="Bitcoin" chance="0.05" />
				<item name="GoldNuggetsmall" chance="0.03" />
				<item name="GoldNugget" chance="0.01" />
		</cargo>

 



The Safes are spawning, but everytime there are empty 😞
I was irritated about the <hoarder />

Share this post


Link to post
Share on other sites
1 hour ago, Christopher Janzen said:

okay, i will explain a bit better.

i made a safe for Money and create n complete new Event:

Events.xml

  Reveal hidden contents


    <event name="StaticSafe">
        <waves>0</waves>
        <nominal>5</nominal>
        <min>0</min>
        <max>0</max>
        <lifetime>28800</lifetime>
        <restock>28800</restock>
        <saferadius>1000</saferadius>
        <distanceradius>1000</distanceradius>
        <cleanupradius>1000</cleanupradius>
        <flags deletable="1" init_random="0" remove_damaged="0" sec_spawner="0"/>
        <position>fixed</position>
        <limit>child</limit>
        <active>1</active>
        <children>
            <child lootmax="20" lootmin="10" max="1" min="1" type="Safe_Static"/>
        </children>
    </event>

 

cfgspawnabletypes.xml

  Reveal hidden contents


<type name="Safe_Static">
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl1" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl2" />
	<cargo preset="SafeLvl3" />
	<cargo preset="SafeLvl3" />
	<cargo preset="SafeLvl3" />
	<cargo preset="SafeLvl4" />
</type>

 

 

 

cfgrandompresets.xml

  Reveal hidden contents



		<cargo chance="0.80" name="SafeLvl1">
				<item name="Money_Ruble1" chance="0.25" />
				<item name="Money_Ruble2" chance="0.20" />
				<item name="Money_Ruble5" chance="0.15" />
				<item name="Money_Ruble20" chance="0.10" />
				<item name="Money_Ruble50" chance="0.10" />
				<item name="Money_Dollar1" chance="0.15" />
				<item name="Money_Dollar2" chance="0.10" />
				<item name="Money_Euro1" chance="0.005" />
				<item name="Money_Euro2" chance="0.005" />
				<item name="Money_Euro5" chance="0.005" />
		</cargo>
		<cargo chance="0.80" name="SafeLvl2">
				<item name="Money_Ruble1" chance="0.25" />
				<item name="Money_Ruble2" chance="0.20" />
				<item name="Money_Ruble5" chance="0.15" />
				<item name="Money_Ruble20" chance="0.10" />
				<item name="Money_Ruble50" chance="0.10" />
				<item name="Money_Ruble100" chance="0.05" />
				<item name="Money_Dollar1" chance="0.15" />
				<item name="Money_Dollar2" chance="0.10" />
				<item name="Money_Dollar5" chance="0.06" />
				<item name="Money_Euro1" chance="0.005" />
				<item name="Money_Euro2" chance="0.005" />
				<item name="Money_Euro5" chance="0.005" />
				<item name="Money_Euro10" chance="0.005" />
				<item name="Money_Euro20" chance="0.005" />
		</cargo>
		<cargo chance="0.80" name="SafeLvl3">
				<item name="Money_Ruble50" chance="0.10" />
				<item name="Money_Ruble100" chance="0.05" />
				<item name="Money_Ruble200" chance="0.03" />
				<item name="Money_Ruble500" chance="0.01" />
				<item name="Money_Dollar5" chance="0.06" />
				<item name="Money_Dollar10" chance="0.03" />
				<item name="Money_Euro10" chance="0.005" />
				<item name="Money_Euro20" chance="0.005" />
				<item name="Money_Euro50" chance="0.005" />
				<item name="Money_Euro100" chance="0.005" />
		</cargo>
		<cargo chance="0.50" name="SafeLvl4">
				<item name="Coin" chance="0.10" />
				<item name="Bitcoin" chance="0.05" />
				<item name="GoldNuggetsmall" chance="0.03" />
				<item name="GoldNugget" chance="0.01" />
		</cargo>

 



The Safes are spawning, but everytime there are empty 😞
I was irritated about the <hoarder />

is the safe made as a normal "storage thing"(tent,barrel etc.) with cargo space or is it made as a "vehicle" with attachments for different things?(doors etc.) i’m not using these trader/money/whatever mods so i dont know, but if it is made as a "vehicle" with attachments then leave the events as it is, but change the randompresets from cargo to attachments:
 

<attachments chance="0.80" name="SafeLvl1">
				<item name="Money_Ruble1" chance="0.25" />
				<item name="Money_Ruble2" chance="0.20" />
				<item name="Money_Ruble5" chance="0.15" />
				<item name="Money_Ruble20" chance="0.10" />
				<item name="Money_Ruble50" chance="0.10" />
				<item name="Money_Dollar1" chance="0.15" />
				<item name="Money_Dollar2" chance="0.10" />
				<item name="Money_Euro1" chance="0.005" />
				<item name="Money_Euro2" chance="0.005" />
				<item name="Money_Euro5" chance="0.005" />
		</attachments>

and spawnabletypes too 

<type name="Safe_Static">
	<attachments  preset="SafeLvl1" />
	<attachments  preset="SafeLvl1" />
	<attachments  preset="SafeLvl1" />
	<attachments  preset="SafeLvl1" />
	<attachments  preset="SafeLvl1" />
</type>

 

Edited by TheSzepy

Share this post


Link to post
Share on other sites

No, the Safe has no Attachments and no Proxies.
it is a simple Container, like the WoodenChest or WoodenCrate...
the Save have only 8x8 itemcargosize 😢

Share this post


Link to post
Share on other sites
8 minutes ago, Christopher Janzen said:

No, the Safe has no Attachments and no Proxies.
it is a simple Container, like the WoodenChest or WoodenCrate...
the Save have only 8x8 itemcargosize 😢

then the last thing which comes to my mind right now is to put the safe into types.xml, something like this 

<type name="Safe_Static">
        <nominal>0</nominal>
        <lifetime>28800</lifetime>
        <restock>0</restock>
        <min>0</min>
        <quantmin>-1</quantmin>
        <quantmax>-1</quantmax>
        <cost>100</cost>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
    </type>

 

Share this post


Link to post
Share on other sites

did you tried if the money is there if you just let the safe spawn as a normal loot from the types.xml? 

Share this post


Link to post
Share on other sites
12 minutes ago, Christopher Janzen said:

nope.
But i have Wallets spawning everywhere and they have some money inside.

to be honest i dont know what may cause this anymore, maybe try getting rid of presets in randompresets and just set everything in spawnabletypes?

something like this:
 

<type name="Safe_Static">
        <cargo chance="0.20">
            <item name="Money_Ruble50" chance="0.10" />
            <item name="Money_Ruble20" chance="0.20" />
        </cargo>
  <cargo chance="0.10">
            <item name="Money_Euro5" chance="0.10" />
            <item name="Money_Euro1" chance="0.20" />
        </cargo>
    </type>

 

Edited by TheSzepy

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×