1
0
Fork
You've already forked alone
0
A Luanti mod to disperse players around the world.
  • Lua 100%
2025年12月15日 16:01:21 +10:00
locale Flag incompatibility with new Mineclonia mapgen 2025年12月15日 16:01:21 +10:00
lua Flag incompatibility with new Mineclonia mapgen 2025年12月15日 16:01:21 +10:00
.cdb.json Fix media_license 2025年07月23日 08:06:48 +10:00
.gitignore first commit 2025年07月05日 10:48:06 +10:00
.luacheckrc Flag incompatibility with new Mineclonia mapgen 2025年12月15日 16:01:21 +10:00
.luaformatrc first commit 2025年07月05日 10:48:06 +10:00
.luarc.json first commit 2025年07月05日 10:48:06 +10:00
Changes.md Add changes file 2025年07月22日 13:14:22 +10:00
init.lua Add setting and support for predictable spawn positions 2025年07月20日 13:02:32 +10:00
LICENSE.md first commit 2025年07月05日 10:48:06 +10:00
mod.conf Flag incompatibility with new Mineclonia mapgen 2025年12月15日 16:01:21 +10:00
README.md Fix typo 2025年07月20日 13:07:40 +10:00
settingtypes.txt Add setting and support for predictable spawn positions 2025年07月20日 13:02:32 +10:00

Alone

ContentDB

A Luanti mod to disperse players around the world.

This mod is a WIP!

Normally all players share the same default spawn point that is close to {0, 0, 0} or a server defined point.

This mod changes it so that each player gets their own, random, spawn point.

When a player registers they get random X and Y coordinates between 1,000 and 30,000, each of these has a 50% chance to be negative.

This spawn point is stored in the players meta data and they will spawn here unless they have registered another spawn point.

If you enable this feature on an existing world the existing registered player's will not be affected. New players will be affected.

If you disable this feature on an existing world then spawning will revert to the games normal spawn behavior.

Luanti Forum

Supported Games

This mod has a chance of working with any game, however a lot of games have extra spawn logic and may require some customization to work properly.

Game Testing Comment
Mineclonia A lot Works well. Random House.
Minetest Game Some Works OK. No House.
VoxelLibre Some Works OK. Small house.
MeseCraft Minimal Appears to work out of the box. No house.
Age Of Mending Minimal Appears to work out of the box. No house.
Lord of the Test Minimal Appears to work out of the box. No house.
NodeCore Minimal Appears to work out of the box. No house.

Failed testing

Game Testing Comment
Repixture Minimal No effect. Spawning not exposed for mods to override.

Supplying House Schematics

A server admin can override the schematics used for housing in two ways, globally and per world.

If a world has it's own house schematics then global house schematics will be ignored.

If either world or global schematics exist then any game supplied schematics will be ignored.

The schematics are not cached so that admins can add more schematics without having to restart the server.

Global

An admin can create a houses directory in this mod's data directory and copy *.mts files to it. These files will then be used as house schematics for new players.

The mods data directory is usually ~/.minetest/mod_data/alone/ but may be somewhere else on your system.

e.g. If a server admin had a directory of castle schematics and wanted players to start with one, they could do something like this.

mkdir -p ~/.minetest/mod_data/alone/houses
cp ~/castles/*.mts ~/.minetest/mod_data/alone/houses/.

Per World

An admin can create an alone_houses directory in a world's directory and copy *.mts files to it. These files will then be used as house schematics for new players.

The world directory is usually ~/.minetest/worlds/$your_worlds_name/ but may be somewhere else on your system.

e.g. If a server admin had a directory of hovel schematics and wanted players in the pov world to start with one, they could do something like this.

mkdir -p ~/.minetest/worlds/pov/alone_houses
cp ~/hovels/*.mts ~/.minetest/worlds/pov/alone_houses/.

Settings

Home Alone

If the alone_home_alone setting is enabled, and the game is supported, then a house will spawn with the player. This defaults to false.

Games with supported homes

  • Mineclonia: A random house, a building with a bed registered with mcl_villages.register_building, will be selected.
  • VoxelLibre: The small, single bed, house.

Players home has a teleport

If the alone_home_teleport setting is enabled, and a supported teleport mod is active, then the player's home will have a teleport pad that the player owns. This defaults to false.

Supported teleport mods: tpad.

Players home has a waypoint

If the alone_home_waypoint setting is enabled, and a supported waypoint mod is active, then the player's home will also have a named waypoint. This defaults to false.

Supported waypoint mods: named_waypoints.

Minimum distance from center

alone_min_dist controls the minium X and Y distance a player will spawn away from {0, 0, 0}. This defaults to 1000.

Maximum distance from center

alone_max_dist controls the maximum X and Y distance a player will spawn away from {0, 0, 0}. This defaults to 30000.

Distance from other players

alone_player_dist controls the minimum distance a player will spawn away from other player spawns. This defaults to 500.

Number of spawn attempts

alone_spawn_attempts setting controls the number of times to try an randomly place a new. If this limit is reached then new players will spawn at the default spawn point. This defaults to 5000.

Predictable spawn positions

The alone_predictable_spawns setting controls the way random numbers are generated when selection player spawn positions. This defaults to false.

If this is enabled then the random number generator will be seeded with the player's name and world seed. This will make starting positions predictable.

Note that setting this on does not guarantee a specific spawn position for a player. The minimum player distance is still used and if a player spawns close to another player's spawn position before that player spawns, then the player will be bounced to their next spawn position, and so on, until they get a clear space.

The more players that have spawned in the world before a new player joins the more likely it is they will collide and another position will be tried.

To Do

Definite

  • (削除) Fix endless loop in looking for random placement (削除ここまで) Done.
  • (削除) Ensure that the default spawn point is used if random placement fails (削除ここまで) Done.
    • It does.
  • (削除) Add setting to control use of teleport and waypoints (削除ここまで) Done.
    • Admin may want them active but not automatically used in homes
  • (削除) Allow admins to provide schemas to use for houses (削除ここまで) Done.

Being Considered

  • Support an area mod and grant the player ownership of their home and/or start area?
  • Split up player spawns in someway so distance checking is more efficient?
    • A problem with this is player home locations become predictable ...
  • Support float lands?
  • Support subterranean spawns?
  • A way to group players in an area?
    • e.g. your "team" might all be in the top left of the world
  • Support more teleport mods?
    • travelnet? - Needs manual placement. Check if it works in schemas.
    • teleport potion? - Pad is a sender. How to use it?

No Longer Being Considered

  • Allow specifying kits to equip players with?
    • This should probably be a standalone mod.
  • Support more games?
    • Not going to spend more time guessing on this. Players who want a specific game supported can request it.

Dependencies

There are no mandatory mods.

Optional

These mods can expand the experience this mod offers.

Known Issues

  • Sometimes mapgen (carving, structure placement, etc) can happen after the house is placed
  • You can be placed close to, or even in, structures
    • With a house this can break stuff
    • Without a house sometimes you just need to run :D

Source Code License

The source code in this mod is licensed under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.md.