7 Days to Die

7 Days to Die

View Stats:
amefurashi Jul 10, 2024 @ 5:07pm
Is there a way to add the Trader Protection effect to the DarknessFalls5.1.0 prefab?
As the title says, I'm looking for a way to give trader protection to any prefab.
Anyone with knowledge please advise.
Last edited by amefurashi; Jul 11, 2024 @ 10:46am
< >
Showing 1-15 of 24 comments
CatPerson Jul 10, 2024 @ 8:01pm 
Not sure why you'd want to, and I have zero clue what kind of possible gameplay repercussions there might be for doing it (besides not being able to hit/alter/destroy any blocks within/around the POI, I mean, and a constant noise if zombies were hitting it), but you could open the .xml for the POI in question and in the top section with other parameters add:
<property name="TraderAreaProtect" value="0,0,0" />

You may also have to alter the line "TraderArea" value="False" to True, I forget/not sure. This would (probably) work in an existing save, last I knew, without needing to start a new game.

.xml's for the individual POI's are here:
\steamapps\common\7 Days To Die\Data\Prefabs\POIs

Edit: if you're making your own custom prefab, I have no idea if there's a folder/.xml files created for it etc. If there are, I'd assume you'd just do similar with those files.
Last edited by CatPerson; Jul 10, 2024 @ 8:04pm
amefurashi Jul 11, 2024 @ 12:21am 
Thank you.

Oh, I forgot to mention something important. I'm in the middle of customizing a large mod by KainUK called Darkness Falls MOD, but I've tried to restore the trader protection that is lost by this mod by simply changing TraderArea=True and TraderAreaProtect 0,0,0, but it had no effect (probably doesn't work), so I'd like some advice.:momocat:

(Some old posts I found on the Internet said that it was set in the mesh file, so you have to edit it, but I couldn't give trader protection with the in-game POI editor.)
Last edited by amefurashi; Jul 11, 2024 @ 12:21am
CatPerson Jul 11, 2024 @ 12:57am 
Ah ... a big overhaul mod may have used Unity editor or some other 3rd party type thingie to change stuff so the vanilla .xml edits don't work. I don't know anything about that, haven't played with any of those mods/nor do those kind of extensive mods - eg don't have that type of experience - sorry.

In vanilla the trader protection lines do work, I gave it to a gas station to test.

Does the mod trader (like trader_bob) xml parameters look the same as in vanilla?

eg vanilla trader_bob's at the top in full look like this:
<property name="CopyAirBlocks" value="True" /> <property name="AllowTopSoilDecorations" value="False" /> <property name="Zoning" value="any" /> <property name="RotationToFaceNorth" value="2" /> <property name="YOffset" value="-1" /> <property name="AllowedTownships" value="city,town,rural,wilderness" /> <property name="TraderArea" value="True" /> <property name="TraderAreaProtect" value="0,0,0" /> <property name="TraderAreaTeleportSize" value="40, 27, 42" /> <property name="TraderAreaTeleportCenter" value="10, 0, 4" /> <property name="ExcludeDistantPOIMesh" value="False" /> <property name="DistantPOIYOffset" value="0" /> <property name="EditorGroups" value="settlements" /> <property name="QuestTags" value="trader, traderBob" /> <property name="DifficultyTier" value="0" /> <property name="ExcludePOICulling" value="True" /> <property name="ShowQuestClearCount" value="1" /> <property name="Tags" value="gateway, nocheckpoint" /> <property name="ThemeTags" value="trader" /> <property name="ThemeRepeatDistance" value="1000" /> <property name="PrefabSize" value="60, 28, 60" />

Anyway, yeah, no clue. Might need one of those unity tools or something.
Last edited by CatPerson; Jul 11, 2024 @ 1:05am
amefurashi Jul 11, 2024 @ 4:44am 
In my search for clues, I also compared the vanilla xml with the DF xml, looking for any items in the xml that gave special instructions, but I was unable to find anything.

If possible, I would like to create and release a clever patch that would restore only the trader protection, but the production process is still a black box, so I'm stuck.

Anyway, thanks for the cooperation:spiffo:
amefurashi Jul 11, 2024 @ 4:49am 
Wait, I may have forgotten the quickest way.

Maybe I should just overwrite DF's trader_xx.mesh with vanilla mesh data!

The DF traderPOI has almost the same structure as the vanilla one, so I think this should work......... (However, I expect that the trader NPCs unique to DF will be lost)
Similar Jul 11, 2024 @ 6:22am 
Originally posted by amefurashi:
Wait, I may have forgotten the quickest way.

Maybe I should just overwrite DF's trader_xx.mesh with vanilla mesh data!

The DF traderPOI has almost the same structure as the vanilla one, so I think this should work......... (However, I expect that the trader NPCs unique to DF will be lost)
The scout probably will and that would break progression, but if it works, it'll at least show that it does have something to do with the .mesh files.
Caitlin uses the old Jen compound, so perhaps the A20 .mesh file might work for that.
... Unless that would just cause Jen to replace Caitlin.

I'm pretty certain DF V4 shrunk the protected area to a single block (it probably caused issues to delete it completely), but I have no idea if V5 does the same.

Also, DF does use the SCore mod, which can disable trader protection, but that option seems to be disabled in DF, so it probably isn't that easy (I also think I read that SCore blocks the use of LCBs in trader areas, but DF allows them).
amefurashi Jul 11, 2024 @ 7:49am 
"Also, DF does use the SCore mod, which can disable trader protection,"
Is that true? That's good to hear. It may not be the solution, but it may be a clue.

I just replaced all traderPOI files, including mesh files, with vanilla ones, and the result was that all traders except Caitlin left the wasteland XD
This probably means that worldgen is using some internal description as a marker, not just the file name and extension:VGRUMPY:

I'm currently looking for a way to run worldgen while mistaking vanilla traders to DF traders. If that doesn't work, I'll look for a way to tweak the worldgen rules:espresso:

By the way, exchanging only the mesh file didn't make any difference:shit:


Addendum : These are all explorations within DarknessFalls v5.1.0 (compatible with A21.2)
Last edited by amefurashi; Jul 11, 2024 @ 8:00am
amefurashi Jul 11, 2024 @ 8:12am 
https://gyazo.com/e768bd623f8bcc72dd093860ed259e3c
By the way, what on earth is this?
It seems to be placed in front of the trader's main gate.
Also, it seems that you cannot hit blocks in the area covered by this in prefab editing mode.
Last edited by amefurashi; Jul 11, 2024 @ 8:14am
amefurashi Jul 11, 2024 @ 10:45am 
I have determined that the "trader_xx.block.nim" file is most likely the problem.
However, if replace this with the vanilla one, no traders other than Caitlyn will be generated during worldgen, and even if I don't, trader protection doesn't work in prefab editing mode (even in vanilla), so we are not yet able to determine whether trader protection will be restored just by changing the .nim file.:VGRUMPY:
Similar Jul 11, 2024 @ 12:23pm 
Originally posted by amefurashi:
I have determined that the "trader_xx.block.nim" file is most likely the problem.
However, if replace this with the vanilla one, no traders other than Caitlyn will be generated during worldgen, and even if I don't, trader protection doesn't work in prefab editing mode (even in vanilla), so we are not yet able to determine whether trader protection will be restored just by changing the .nim file.:VGRUMPY:
hmm. If you look at a .nim file in a text editor (it's not a text file, but you can still see stuff), it looks like it contains all the blocks of the trader POI, which could mean it also has the trader spawn block in it. I can't find it so far, but it might be interesting because I think DF uses different names for the traders than vanilla (which might also explain why your RWG left them out).

... The .nim file I'm looking at has "DFSpawnGuardCaptain" in it, which would be the scout spawn block, I think. ... hm, but it also just has "spawnTrader", so that seems to suggest it gets the type of trader to spawn from somewhere else than this file. I think.

This is getting complicated.

Edit:
The .nim file for Caitlin has "DFSpawnCaitlin" rather than just "spawnTrader", so that might explain, partly, why she's the only one who showed up in your RWG.
Last edited by Similar; Jul 11, 2024 @ 12:30pm
amefurashi Jul 11, 2024 @ 12:51pm 
Oh, I can only read and write a little bit of xml! This trial and error is getting out of hand. My head is going to explode!:aurip:

So you mean that the Rekt that stands in DF Trader is not our beloved Rekt, but a cloned one?
Also, does that mean that it is some file outside of trader_xx.block.nim that decides who stands there as the shopkeeper (original or clone)?
Oh my goodness, this journey is going to be long and last.
I'll have to cancel my Christmas plans...
Last edited by amefurashi; Jul 11, 2024 @ 12:55pm
amefurashi Jul 11, 2024 @ 1:10pm 
It's entirely possible that the starting point for trader protection is the trader NPC themselves. (can't stand next to them in DF either.)

By the way, in order to test the map where the vanilla trader is generated, I put the Navezgane folder from vanilla into the World in DF, and the UI of the new game start screen started to show a waterfall of errors.

The errorfall did not stop even if I deleted the Navezgane folder, but it did stop when I reset the 0-SCore folder, so it seems that if you try to use an incompatible map, the SCore system (which probably defines the rules at worldgen time) is irreversibly destroyed.
Similar Jul 11, 2024 @ 2:41pm 
Originally posted by amefurashi:
Oh, I can only read and write a little bit of xml!
The .nim file isn't even XML. It's a binary file, so the odd characters could theoretically mean something important, but there are so few that I dont think they can contain enough information. They look more like linebreaks or such to me.

Originally posted by amefurashi:
So you mean that the Rekt that stands in DF Trader is not our beloved Rekt, but a cloned one?
Now I'm unsure. I remembered searching the POI Teleporter list in the debug menu and not seeing my traders, but it could have been back in V4.
When I search it now, in V5, I do get trader_hugh, trader_joel, etc.

Originally posted by amefurashi:
Also, does that mean that it is some file outside of trader_xx.block.nim that decides who stands there as the shopkeeper (original or clone)?
That's how it seems to me, since the "spawnTrader" doesn't appear to indicate a specific one. It could just take it from the file name, but then you'd think your RWG should have worked.
... hmm. But I know some mods have POIs will all traders in them at the same time, so the file name wouldn't work for that, but I guess they could have made a workaround.

Originally posted by amefurashi:
Oh my goodness, this journey is going to be long and last.
I'll have to cancel my Christmas plans...
hehe. It really does seem way more complicated than you'd think it had to be.


Originally posted by amefurashi:
It's entirely possible that the starting point for trader protection is the trader NPC themselves. (can't stand next to them in DF either.)
I think the area that invisibly blocks you from entering is a whole new A21 type of protection that isn't related to the old one that protects blocks and boots you out at night.
But yeah, the NPC could still be the starting point. I don't think it was in A20, though.

Originally posted by amefurashi:
By the way, in order to test the map where the vanilla trader is generated, I put the Navezgane folder from vanilla into the World in DF, and the UI of the new game start screen started to show a waterfall of errors.

The errorfall did not stop even if I deleted the Navezgane folder, but it did stop when I reset the 0-SCore folder, so it seems that if you try to use an incompatible map, the SCore system (which probably defines the rules at worldgen time) is irreversibly destroyed.
I get that after I installed 1.0 experimental. If I generate a new map in DF, go back out to the menu and click 'New Game' I get a ton of errors that just keep going. For some reason, if I go into 'Continue Game' first, back out and go into 'New Game' I don't get the waterfall. My impression is that the 1.0 maps confuse the hell out of A21, even if they're just in the worlds inventory.
I just have to shut the game in task manager, though. It doesn't affect SCore (I think).
amefurashi Jul 11, 2024 @ 4:16pm 
"I get that after I installed 1.0 experimental. If I generate a new map in DF, go back out to the menu and click 'New Game' I get a ton of errors that just keep going. For some reason, if I go into 'Continue Game' first, back out and go into 'New Game' I don't get the waterfall. My impression is that the 1.0 maps confuse the hell out of A21, even if they're just in the worlds inventory."
Indeed, I forgot to pay attention to the version difference when I extracted the Navezgane map. This is a big mistake.

And now I have confirmed that the errorfall was caused by a version incompatibility of 7D2D, not an incompatibility between Vanilla Navezgane and DF.

In addition, I found that if I replaced trader_xx.block.nim (and .ins and .mesh) with the vanilla one, the traders disappeared even when I visited Vanilla Navezgane.:steamfacepalm::steamfacepalm:
This means that even if the trader protection could be restored by changing the .nim, it cannot be proven, and it seems to mean something else important.
Last edited by amefurashi; Jul 11, 2024 @ 4:19pm
amefurashi Jul 11, 2024 @ 4:39pm 
On a whim, I gave abandoned_house_01 trader protection with a volume of 40x30x40 in xml, but nothing happened.
This means that DF isn't removing the starting point of trader protection from traders, but rather erasing the concept of trader protection itself from the game.

Therefore, I realized that what I should do is not to investigate the effects of .nim, but to investigate and destroy the eraser outside the prefab folder.:carrionmouth:
Last edited by amefurashi; Jul 11, 2024 @ 4:40pm
< >
Showing 1-15 of 24 comments
Per page: 1530 50

Date Posted: Jul 10, 2024 @ 5:07pm
Posts: 24