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

0XP RolMod A18

What would be an example of each case?
I would think that Zombie Transmogrifier and the new NPC classes would have to exist on both client and server, as it needs to spawn and distribute them to other players.

The nerd polling mod would just affect you as a player, and has no effect on anyone else, so it's a client-side only.

 
What would be an example of each case?
Whatever alloc feels like should be server side vs whatever he feels like should be client side.

Player movement in the world would be server side (so other players would see where other players are) but say, quest progression is probably client side (since my progress has no bearing on you).

His goal would be to limit the number of server side things to lower network congestion, so my /guess/ is as we get closer to gold, more things will be client side.

So walk types are likely client side, random get up time server?

You might get odd complaints down the line, so it's best to compile on the server as well.

 
Bug report:

The trader is twice in the game. This might also be the reason why he is invulnerable as the invulnerable version might intercept all the bullets meant for the vulnerable version. And yes, this happened in a new game of 17.4 with current mod.

You can see the double (only) immediately after you talk with the trader and exit the dialog. Then (at least with the trader I used) one version will do a "goodbye" animation while the other is standing still. Luckily it doesn't seem as if you can switch between talking to one or the other trader, so no real harm except for the visual glitch

Another thing I noticed which might be bug or feature or a wrong observation by me: If you die, you get the skillpoints immediately that you would otherwise get at the end of the day. After a death on day 3 I suddenly had two skill points where I expected zero, but I'm really not sure about this.

As an anecdote, I wasted a lot of time yesterday because I forgot that you changed the skillpoint progression and thought the bleeding buffs without icon were a result of my compilation gone wrong. :crushed:

 
Ok, here is the promised howto:

-------------------------------------------------------------------

These are the steps to create a (windows or linux) headless server with 0XP-mod using SDX. (SDX is on the way out and will probably be replaced by DMT. Also Mod Launcher could possibly be used to generate the files for the headless server. Wine might be used to do all of this without windows, but this has not been tried yet)

First time tasks:

1) Load SDX 0.7.3 from https://7daystodie.com/forums/showthread.php?97663-SDX-0-7-3-Alpha-17 and unzip it

2) Start SDX and klick "Settings" and point the "Game Directory" to a directory where you want to store your headless server image

3) If you get a runtime exception on startup of SDX, edit SDX7DTD.exe.config and insert the line "<loadFromRemoteSources enabled="true"/>" after the line "<runtime>"

4) Enable or install Microsoft .net framework 3.5 (google for "enable .net framework 3.5" or "install .net framework 3.5" for instructions).

Tasks whenever a new version of mod or 7D2D is available:

1) Load newest 0xpmod from https://github.com/Roland7dtd/0XP-Rolmod (green "Clone or Download" button)

copy the contents of the Mods Folder of 0XP-Rolmod into [sDX DIR]/Targets/7DaysToDie/Mods

2) Download newest 7D2D headless server image from steam, instructions here: https://developer.valvesoftware.com/wiki/7_Days_to_Die_Dedicated_Server

For login to steam you can use "login anonymous"

3) Start SDX

4) If everything is correct, SDX should show you a list consisting of (currently) "Anti Nerd Poling" and "Skillpoint Generator". Klick "Build" and wait for it to finish

4a) If you point "Game Directory" to your local copy of 7D2D you can build the libraries for the client too, they will be in [local client]\7DaysToDie_Data\Managed\

5) Look into [headless server image]\7DaysToDieServer_Data\Managed\. There should be 5 new files: Assembly-CSharp.dll, Mods.dll, Mods.pdb, SDX.Payload.dll, SDX.Core.dll

6) Copy those 5 files to the respective directory on the server, i.e. 7DaysToDieServer_Data/Managed

7) Extract 0XP-Rolmod into the server image on the server

-------------------------------------------

For linux users without access to Windows I have put the relevant files for 17.4 and current mod version into a zip you can find on https://we.tl/t-7YIB2Ox1bU . (sha256sum is 6943df20924716663483cc4a6044e31b419bf7636062510f19a8eb90ea127a94). Sadly the link is only working for a week.

 
Last edited by a moderator:
Bug report:
The trader is twice in the game.
This happend to me in another mod. I think it was darkness falls. I was moving the trader about to be able to build as I wanted around him. Once he was moved 1 or 2 blocks another one spawned in the original position.

 
Last edited by a moderator:
Hmmm.....weird. I never committed any attempted changes to trader vulnerability for the trader himself. It was all experimented on locally and nothing worked anyway. I did look at what Khaine did with his “Wandering Trader” version of the trader but it was sdx based so I left it alone.

The only changes I made were deleting three lines that reference trader POI protection and changing the property “Trader Area” to false.

Maybe I’ll try leaving one or more of those lines of code in place to see if it fixes the double trader.

 
Bug report:
The trader is twice in the game. This might also be the reason why he is invulnerable as the invulnerable version might intercept all the bullets meant for the vulnerable version. And yes, this happened in a new game of 17.4 with current mod.

You can see the double (only) immediately after you talk with the trader and exit the dialog. Then (at least with the trader I used) one version will do a "goodbye" animation while the other is standing still. Luckily it doesn't seem as if you can switch between talking to one or the other trader, so no real harm except for the visual glitch

Another thing I noticed which might be bug or feature or a wrong observation by me: If you die, you get the skillpoints immediately that you would otherwise get at the end of the day. After a death on day 3 I suddenly had two skill points where I expected zero, but I'm really not sure about this.

As an anecdote, I wasted a lot of time yesterday because I forgot that you changed the skillpoint progression and thought the bleeding buffs without icon were a result of my compilation gone wrong. :crushed:
I couldn't reproduce either bug in SP so maybe it is a networking issue. I'm working on adding new trader quests that will involve crafting and placing working workstations in the trader compound and also adding reinforcements to the trader's defenses all made possible due to the protection being gone. My biggest problem right now is enforcing the placement of the workstations in the trader compound. Even if I can't figure it out I will still include the quests because I'm willing to roleplay them correctly even if they could be exploited. Hopefully the inclusion of these additional quests will enhance the unprotected trader status and make it a bit more enticing for others to try.

Here are my ideas for the quests and I'm happy to get feedback and additional ideas:

Tier 1 Station Craft: Craft and place a campfire complete with cooking pot and grill within the trader compound

Tier 2 Station Craft: Craft and place a forge complete with anvil within the trader compound

Tier 3 Station Craft: Craft and place a workbench within the trader compound

Tier 4 Station Craft: Craft and place a Table Saw and Cement Mixer within the trader compound

Tier 5 Station Craft: Craft and place a Chemistry Lab within the trader compound

I'm also thinking about how to do quests to upgrade the trader compound by having quests that would have you place turrets, traps, and simply blocks in order to repair holes made by zombies or just add another layer of defense. I haven't fully thought this through but I would like to capitalize on the quest system and the fact that the protection is gone with some gameplay features. Again, I have no idea if any of this will end up being able to be enforceable or left to the "honor system" that the player will roleplay the spirit of the quest as it is intended. But I am up for ideas and, of course, coding help. :)

As progress report I have created the first quest and it mostly works. I've tried creating localization text but it isn't getting applied for some reason and I can make the entire quest work except for when I try to use the objective of remaining within the area. When I try to do that one it doesn't target the trader POI as the center of the radius so it is useless.

 
You can't per say do a quest where you "place/upgrade xyz block at zyx location", but you can use block placement/upgrade as a quest goal (wood frame quest).

So you can either create a quest that upgrades blocks only found in trader outposts (those goofy log spikes?), OR, if you REALLY want to be a boss (and learn new things):

Copy a few choice blocks that are used as trader walls, like woodblocks, whatever, to trader-woodblocks or something.

Edit the trader prefabs to use trader-woodblocks in lieu of woodblocks

Set the quest to upgrade trader-woodblocks.

...since trader-woodblocks wouldn't be craftable, you'd only be able to fulfill the quest by upgrading the blocks you specify as existing in the trader prefab.

You can get fancier too, but this is already a daunting task.

 
You can't per say do a quest where you "place/upgrade xyz block at zyx location", but you can use block placement/upgrade as a quest goal (wood frame quest).
I should be able to do that using the "Stay in Area" objective. The way I ordered my campfire quest you first craft a campfire and obtain a cooking pot and grill (which I found both in a nearby apartment building). Once those three objectives are done you are directed to return to the trader and as soon as you get close to him it triggers the objective to place the campfire and the "Remain in area" objective at the same time. Then, once that is done it triggers the "Turn In" objective to return to the trader and get your reward.

It all works great except that the "stay in area" isn't centered on the trader POI like I want it to be nor does it end. In the original code it mentions the chosen quest POI as its target but I don't know how to target the current trader POI. It would be nice if I could just target the NPC trader as the center of the area radius.

I think it could be possible. But it also could be that there is no supporting code for it even though it appears that there almost is.

So you can either create a quest that upgrades blocks only found in trader outposts (those goofy log spikes?), OR, if you REALLY want to be a boss (and learn new things):
Copy a few choice blocks that are used as trader walls, like woodblocks, whatever, to trader-woodblocks or something.

Edit the trader prefabs to use trader-woodblocks in lieu of woodblocks

Set the quest to upgrade trader-woodblocks.

...since trader-woodblocks wouldn't be craftable, you'd only be able to fulfill the quest by upgrading the blocks you specify as existing in the trader prefab.

You can get fancier too, but this is already a daunting task.
That is a really good idea. I will look into seeing if I can get the trader wall blocks to be able to be upgraded.

Like I said, these quests can be created and completed on the honor system and I will do that rather than do nothing but it would be cool if we can find a way to make it as tightly controlled as possible.

 
You do know that the consequence will be that everyone will use the trader as craft base? That is exactly what my group did in darkness falls, and that even without the quests.

It would be best if the trader reseted at the start like any other quest POI. But then there would be an easy method to repair any damage to the trader

So, back to the honor system.

 
I like the idea of starter bases. Changes the game, allows you to focus on the fun stuff week one rather than the boring toil of punching trees.

 
Hmmm.....weird. I never committed any attempted changes to trader vulnerability for the trader himself. It was all experimented on locally and nothing worked anyway. I did look at what Khaine did with his “Wandering Trader” version of the trader but it was sdx based so I left it alone.
The only changes I made were deleting three lines that reference trader POI protection and changing the property “Trader Area” to false.

Maybe I’ll try leaving one or more of those lines of code in place to see if it fixes the double trader.
Mine is a modified version of Sphereii's wandering trader code to remove the god buff from the trader.

Double traders happen because the spawn block respawns a trader if they move from it, to fix the disappearing trader issue from A16, and then trader protection deletes any duplicate entities... according to Prime. :)

 
You do know that the consequence will be that everyone will use the trader as craft base? That is exactly what my group did in darkness falls, and that even without the quests.
It would be best if the trader reseted at the start like any other quest POI. But then there would be an easy method to repair any damage to the trader

So, back to the honor system.
Is that so bad? Having the trader POI be the center of trade and industry makes sense. Did you see it as exploitive or detrimental having played it?

 
Mine is a modified version of Sphereii's wandering trader code to remove the god buff from the trader.
Double traders happen because the spawn block respawns a trader if they move from it, to fix the disappearing trader issue from A16, and then trader protection deletes any duplicate entities... according to Prime. :)
What happens if your trader dies? Is that it for that POI or does a new trader spawn in?

 
So yeh to fix disappearing traders, tfp made it so that the spawn block respawns the entity if it "disappears" from the spawn block.

The problem is, when you make them vulnerable, they can now "be moved" from the spawn spot, even if by scant inches, so the trader block says "it's gone, respawn a new one".

So what WE do is use a modified script that uses a /different/ spawn block, that allows a max number of spawns, which we set to 1.

You could use the script since you're already an sdx mod, but it'll mean having to edit the prefab or the spawnTrader block to use the new scripted block.

...had the same thing with my vehicle mod... Cars (working) would spawn, move JUST a bit, then a new one would respawn flipping the old one, over and over. Quite hysterical.

So, I now use the modified spawn block instead of the lazy vanilla one.

...as you continue modding, you'll realize more and more that tfp has a lot of "hack" fixes to legitimate problems. *Cough*invisible animals*cough*.

 
Last edited by a moderator:
...as you continue modding, you'll realize more and more that tfp has a lot of "hack" fixes to legitimate problems. *Cough*invisible animals*cough*.
Well they ARE former modders, no?

;)

Hmmm...maybe I need invisible traders....haha

 
Is that so bad? Having the trader POI be the center of trade and industry makes sense. Did you see it as exploitive or detrimental having played it?
Realistically a vulnerable trader has not that much impact on the game UNLESS you use it as your base. And it was a nice change from the usual. It was one of the best if not the best feature of DF.

The only problem (in A16) was that the trader was so OP, having him IN the base devalued scavenging even more.

So, no, for a mod it isn't bad.

 
Back
Top