Skip to content
This repository was archived by the owner on Jul 5, 2025. It is now read-only.

Commit f9d72d8

Browse files
Merge pull request #44 from jonathan-robertson/dev
Fix Travel Through Rotated Multidim Blocks
2 parents a8bd8af + 4de384d commit f9d72d8

7 files changed

Lines changed: 219 additions & 78 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.4] - 2023-05-13
9+
10+
- add dll version log message on awake
11+
- fix travel through rotated multidim blocks
12+
- update console enable/disable debug command
13+
- update readme with setup steps
14+
815
## [1.1.3] - 2023-04-16
916

1017
- fix crash caused by complex multi-dim blocks

ModInfo.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<Name value="Quantum Elevators" />
44
<Description value="Add infinite distance, vertical-warp elevator panels." />
55
<Author value="Jonathan Robertson (Kanaverum)" />
6-
<Version value="1.1.3" />
6+
<!-- REMINDER: this mod's DLL version will be logged on GameAwake and should reflect the same version listed here! -->
7+
<!-- If troubleshooting an issue, search "Quantum Elevators DLL" in logs to confirm these two values match. -->
8+
<Version value="1.1.4" />
79
<Website value="https://github.com/jonathan-robertson/quantum-elevators" />
810
</ModInfo>
911
</xml>

QuantumElevators.dll

1 KB
Binary file not shown.

README.md

Lines changed: 86 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@
1010
- [Features](#features)
1111
- [Portable Quantum Elevator panels](#portable-quantum-elevator-panels)
1212
- [Secure Quantum Elevator panels](#secure-quantum-elevator-panels)
13-
- [Compatibility](#compatibility)
14-
- [Admin Commands](#admin-commands)
15-
- [Acknowledgements](#acknowledgements)
13+
- [Admin Commands](#admin-commands)
14+
- [Setup](#setup)
15+
- [Compatibility Quick Reference](#compatibility-quick-reference)
16+
- [Windows PC (Single Player or Hosting P2P)](#windows-pc-single-player-or-hosting-p2p)
17+
- [Critical Reminders](#critical-reminders)
18+
- [Windows/Linux Installation (Server via FTP from Windows PC)](#windowslinux-installation-server-via-ftp-from-windows-pc)
19+
- [Linux Server Installation (Server via SSH)](#linux-server-installation-server-via-ssh)
20+
- [Troubleshooting / Common Issues](#troubleshooting--common-issues)
21+
- [Special Thanks](#special-thanks)
1622

1723
## Summary
1824

@@ -52,15 +58,7 @@ When attempting to travel, panels you are not already authenticated with or do n
5258

5359
> [Hint] You can use this mechanic to include **hidden rooms/floors** within your base's structure without it being overly clear that such a room exists. Simply set the panel in the 'hidden' room/floor to a different password from the rest.
5460
55-
## Compatibility
56-
57-
Environment | Compatible | Details
58-
--- | --- | ---
59-
Dedicated Server | Yes | only the server needs this mod (EAC can be **Enabled** on client and server)
60-
Peer-to-Peer Hosting | Yes | only the host needs this mod (EAC must be **Disabled** on host)
61-
Local Single Player | Yes | EAC must be **Disabled**
62-
63-
## Admin Commands
61+
### Admin Commands
6462

6563
> ℹ️ You can always search for this command or any command by running:
6664
>
@@ -69,11 +67,84 @@ Local Single Player | Yes | EAC must be **Disabled**
6967
7068
primary | alternate | params | description
7169
:---: | :---: | :---: | ---
72-
quantumelevators | qe | N/A | enable/disable debug logging for this mod (disabled by default)
70+
quantumelevators | qe | `debug` | enable/disable debug logging for this mod (disabled by default)
71+
quantumelevators | qe | `push <x> <y> <z>` | recursively push entities 1 block at a time to make room; use float values from 'lp' command to let system calculate correct block coordinates for you
7372

7473
*Note that leaving debug mode on can have a negative impact on performance. It is therefore recommended to only turn it on while troubleshooting and then disable it afterwards.*
7574

76-
## Acknowledgements
75+
## Setup
76+
77+
Without proper installation, this mod will not work as expected. Using this guide should help to complete the installation properly.
78+
79+
If you have trouble getting things working, you can reach out to me for support via [Support](#support).
80+
81+
### Compatibility Quick Reference
82+
83+
Does this mod require a fresh map?
84+
85+
> No, a fresh map is not necessary. You can add or remove the Quantum Elevators mod without having to start a new map.
86+
87+
Environment | Compatible | Does EAC Need to be Disabled? | Who needs to install?
88+
--- | --- | --- | ---
89+
Dedicated Server | Yes | no | only server
90+
Peer-to-Peer Hosting | Yes | only on the host | only the host
91+
Single Player Game | Yes | Yes | self (of course)
92+
93+
> 🤔 If you aren't sure what some of this means, details steps are provided below to walk you through the setup process.
94+
95+
### Windows PC (Single Player or Hosting P2P)
96+
97+
> ℹ️ If you plan to host a multiplayer game, only the host PC will need to install this mod. Other players connecting to your session do not need to install anything for this mod to work 😉
98+
99+
1. 📦 Download the latest release by navigating to [this link](https://github.com/jonathan-robertson/quantum-elevators/releases/latest/) and clicking the link for `quantum-elevators.zip`
100+
2. 📂 Unzip this file to a folder named `quantum-elevators` by right-clicking it and choosing the `Extract All...` option (you will find Windows suggests extracting to a new folder named `quantum-elevators` - this is the option you want to use)
101+
3. 🕵️ Locate and create your mods folder (if missing): in another window, paste this address into to the address bar: `%APPDATA%\7DaysToDie`, then enter your `Mods` folder by double-clicking it. If no `Mods` folder is present, you will first need to create it, then enter your `Mods` folder after that
102+
4. 🚚 Move this new `quantum-elevators` folder into your `Mods` folder by dragging & dropping or cutting/copying & pasting, whichever you prefer
103+
5. ♻️ Stop the game if it's currently running, then start the game again without EAC by navigating to your install folder and running `7DaysToDie.exe`
104+
- running from Steam or other launchers usually starts 7 Days up with the `7DaysToDie_EAC.exe` program instead, but running 7 Days directly will skip EAC startup
105+
106+
#### Critical Reminders
107+
108+
- ⚠️ it is **NECESSARY** for the host to run with EAC disabled or the DLL file in this mod will not be able to run
109+
- 😉 other players **DO NOT** need to disable EAC in order to connect to your game session, so you don't need to walk them through these steps
110+
- 🔑 it is also **HIGHLY RECOMMENDED** to add a password to your game session
111+
- while disabling EAC is 100% necessary to run this mod properly, it also allows other players to run any mods they want on their end (which could be used to gain access to admin commands and/or grief you or your other players)
112+
113+
### Windows/Linux Installation (Server via FTP from Windows PC)
114+
115+
1. 📦 Download the latest release by navigating to [this link](https://github.com/jonathan-robertson/quantum-elevators/releases/latest/) and clicking the link for `quantum-elevators.zip`
116+
2. 📂 Unzip this file to a folder named `quantum-elevators` by right-clicking it and choosing the `Extract All...` option (you will find Windows suggests extracting to a new folder named `quantum-elevators` - this is the option you want to use)
117+
3. 🕵️ Locate and create your mods folder (if missing):
118+
- Windows PC or Server: in another window, paste this address into to the address bar: `%APPDATA%\7DaysToDie`, then enter your `Mods` folder by double-clicking it. If no `Mods` folder is present, you will first need to create it, then enter your `Mods` folder after that
119+
- FTP: in another window, connect to your server via FTP and navigate to the game folder that should contain your `Mods` folder (if no `Mods` folder is present, you will need to create it in the appropriate location), then enter your `Mods` folder. If you are confused about where your mods folder should go, reach out to your host.
120+
4. 🚚 Move this new `quantum-elevators` folder into your `Mods` folder by dragging & dropping or cutting/copying & pasting, whichever you prefer
121+
5. ♻️ Restart your server to allow this mod to take effect and monitor your logs to ensure it starts successfully:
122+
- you can search the logs for the word `QuantumElevators`; the name of this mod will appear with that phrase and all log lines it produces will be presented with this prefix for quick reference
123+
124+
### Linux Server Installation (Server via SSH)
125+
126+
1. 🔍 [SSH](https://www.digitalocean.com/community/tutorials/how-to-use-ssh-to-connect-to-a-remote-server) into your server and navigate to the `Mods` folder on your server
127+
- if you installed 7 Days to Die with [LinuxGSM](https://linuxgsm.com/servers/sdtdserver/) (which I'd highly recommend), the default mods folder will be under `~/serverfiles/Mods` (which you may have to create)
128+
2. 📦 Download the latest `quantum-elevators.zip` release from [this link](https://github.com/jonathan-robertson/quantum-elevators/releases/latest/) in whatever method you prefer
129+
- example: `wget https://github.com/jonathan-robertson/quantum-elevators/releases/latest/download/quantum-elevators.zip`
130+
3. 📂 Unzip this file to a folder by the same name: `unzip quantum-elevators.zip -d quantum-elevators`
131+
- you may need to install `unzip` if it isn't already installed: `sudo apt-get update && sudo apt-get install unzip`
132+
- once unzipped, you can remove the quantum-elevators download with `rm quantum-elevators.zip`
133+
4. ♻️ Restart your server to allow this mod to take effect and monitor your logs to ensure it starts successfully:
134+
- you can search the logs for the word `QuantumElevators`; the name of this mod will appear with that phrase and all log lines it produces will be presented with this prefix for quick reference
135+
- rather than monitoring telnet, I'd recommend viewing the console logs directly because mod and DLL registration happens very early in the startup process and you may miss it if you connect via telnet after this happens
136+
- you can reference your server config file to identify your logs folder
137+
- if you installed 7 Days to Die with [LinuxGSM](https://linuxgsm.com/servers/sdtdserver/), your console log will be under `log/console/sdtdserver-console.log`
138+
- I'd highly recommend using `less` to open this file for a variety of reasons: it's safe to view active files with, easy to search, and can be automatically tailed/followed by pressing a keyboard shortcut so you can monitor logs in realtime
139+
- follow: `SHIFT+F` (use `CTRL+C` to exit follow mode)
140+
- exit: `q` to exit less when not in follow mode
141+
- search: `/QuantumElevators` [enter] to enter search mode for the lines that will be produced by this mod; while in search mode, use `n` to navigate to the next match or `SHIFT+n` to navigate to the previous match
142+
143+
### Troubleshooting / Common Issues
144+
145+
⚠️ Because QuantumElevators contains a DLL file, you may have trouble uploading to a 7 Days to Die dedicated host. Some hosts will silently *remove* DLL files from mods or prevent them from being overwritten (i.e. updated) when they are uploaded via FTP or various other methods. Please be sure to double-check that the `QuantumElevators.DLL` file is found within the `quantum-elevators` folder within your server if you don't see a reference to this DLL file in the logs on startup. In those cases, you can reach out to your host and explain the problem; most hosts will allow you to upload DLL mods and may have a special set of steps for you to follow or they may need to simply enable this functionality on your account.
146+
147+
## Special Thanks
77148

78149
Several people in the community have offered feedback, identified bugs, and have worked to provide me with debug logs to help move this project forward. Quantum Elevators is a cool idea and has been a lot of fun to work on, but would not be what it is today without the added effort from these incredible admins, modders, and players. *(Discord Usernames)*
79150

@@ -82,3 +153,4 @@ Several people in the community have offered feedback, identified bugs, and have
82153
- `Blight#7410` of Pimp my House, Tea Lounge, Juggernaut, and Ragnarok submitted bug reports that helped identify and resolve a critical bug.
83154
- `O C#2804` reviewed and offered suggestions and advice that led to the resolution of a critical bug.
84155
- `vivo#0815` identified how to recreate a bug that occurred only on initial launch of a new map.
156+
- `Oggy#9577` identified an issue related to height detection of multi-dimensional block rotation.

src/ConsoleCmdQuantumElevators.cs

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal class ConsoleCmdQuantumElevators : ConsoleCmdAbstract
1414
public ConsoleCmdQuantumElevators()
1515
{
1616
var dict = new Dictionary<string, string>() {
17-
{ "", "enable/disable debug logging for this mod" },
17+
{ "debug", "enable/disable debug logging for this mod" },
1818
{ "push <x> <y> <z>", "recursively push entities 1 block at a time to make room; use float values from 'lp' command to let system calculate correct block coordinates for you" },
1919
};
2020

@@ -39,37 +39,38 @@ public override string GetHelp()
3939

4040
public override void Execute(List<string> _params, CommandSenderInfo _senderInfo)
4141
{
42-
if (_params.Count == 0)
42+
if (_params.Count > 0)
4343
{
44-
ModApi.DebugMode = !ModApi.DebugMode;
45-
SdtdConsole.Instance.Output($"Debug logging is now {(ModApi.DebugMode ? "enabled" : "disabled")}.");
46-
return;
47-
}
48-
switch (_params[0])
49-
{
50-
case "push":
51-
if (_params.Count != 4)
52-
{
53-
SdtdConsole.Instance.Output("Wrong number of arguments, expected 4, found " + _params.Count.ToString() + ".");
44+
switch (_params[0])
45+
{
46+
case "debug":
47+
ModApi.DebugMode = !ModApi.DebugMode;
48+
SdtdConsole.Instance.Output($"Debug logging is now {(ModApi.DebugMode ? "enabled" : "disabled")}.");
5449
return;
55-
}
56-
if (!float.TryParse(_params[1], out var x)
57-
|| !float.TryParse(_params[2], out var y)
58-
|| !float.TryParse(_params[3], out var z))
59-
{
60-
SdtdConsole.Instance.Output($"Wrong type of argument, provided string could not be converted to float: {_params[1]}, {_params[2]}, {_params[3]}.");
50+
case "push":
51+
if (_params.Count != 4)
52+
{
53+
SdtdConsole.Instance.Output("Wrong number of arguments, expected 4, found " + _params.Count.ToString() + ".");
54+
return;
55+
}
56+
if (!float.TryParse(_params[1], out var x)
57+
|| !float.TryParse(_params[2], out var y)
58+
|| !float.TryParse(_params[3], out var z))
59+
{
60+
SdtdConsole.Instance.Output($"Wrong type of argument, provided string could not be converted to float: {_params[1]}, {_params[2]}, {_params[3]}.");
61+
return;
62+
}
63+
SdtdConsole.Instance.Output($"Pushing...");
64+
// note: one can use integer conversion to get the bottom-left of a positive coordinate,
65+
// but not for the bottom-left of a negative coordinate... these have to be rounded "down" to the *next* nearest number.
66+
// ... yes, this is how block coords are identified lol
67+
_ = CoreLogic.Push(new Vector3i(
68+
x % 1 < 0 ? x - 1 : x,
69+
y % 1 < 0 ? y - 1 : y,
70+
z % 1 < 0 ? z - 1 : z));
71+
SdtdConsole.Instance.Output($"Pushing completed.");
6172
return;
62-
}
63-
SdtdConsole.Instance.Output($"Pushing...");
64-
// note: one can use integer conversion to get the bottom-left of a positive coordinate,
65-
// but not for the bottom-left of a negative coordinate... these have to be rounded "down" to the *next* nearest number.
66-
// ... yes, this is how block coords are identified lol
67-
_ = CoreLogic.Push(new Vector3i(
68-
x % 1 < 0 ? x - 1 : x,
69-
y % 1 < 0 ? y - 1 : y,
70-
z % 1 < 0 ? z - 1 : z));
71-
SdtdConsole.Instance.Output($"Pushing completed.");
72-
return;
73+
}
7374
}
7475

7576
SdtdConsole.Instance.Output($"Invalid number of parameters; use 'help {_commands[0]}' to verify valid options.");

0 commit comments

Comments
 (0)