Files
DarkflameServer/resources/ugcconfig.ini
Aaron Kimbrell abf1cc1d80 feat: UGC server that makes and serves player models' meshes and icons
A new server (dUgcServer, started by master with enable_ugc_server=1) that
takes unprocessed ugc and ugc_modular_build rows from the database and makes
what the client downloads with UGCUSE3DSERVICES: an optimized NIF (hidden
faces removed, ambient occlusion baked into vertex colors) and a 128px DDS
icon for player models, rendered by a software rasterizer from the client's
LDD brick primitives, and icons for cars and rockets assembled from their
modules per ModularBuildComponent/ModuleComponent. It serves them, with the
models' LXFML, over HTTP in the client's UGCC<dc>/3DOPTIMIZED and
IMAGE128DDS layout with .gz and .checksum files, and keeps its folder under
a size cap.

Processing state lives in ugc.is_optimized plus new processed_at,
process_attempts and process_error columns (and the same on
ugc_modular_build). ServiceType::UGC is appended. NifFile moves to dCommon
and records named node transforms for the modules' attach points.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:30:57 -05:00

49 lines
1.9 KiB
INI

# UGC server: makes the meshes and icons of what players build and serves them to the game client.
# The master starts it when enable_ugc_server=1 (masterconfig.ini). See docs/UgcServer.md.
# HTTP port the game client downloads from (the client's UGCSERVERPORT)
port=2008
# The IP address to bind to. The game client has to reach it, so the default is every interface.
listen_ip=0.0.0.0
# UDP port for the connection to the master server (the next port is used too). It must not clash with another
# server's ports: auth uses 1500-1501, chat 2005-2006, the dashboard 2010-2011, worlds 3000 and up.
net_port=2012
# The client's UGCSERVERDIR: the path the downloads are under (the client adds /UGCC<DATACENTERID>/...)
client_path=/ugc
# Where the made files are kept (relative to the server binaries), and at most how much space they may take in MB.
# When there's more, the files used longest ago are deleted; they're made again when asked for. 0: no limit.
ugc_output_dir=ugc
ugc_max_storage_mb=2048
# Worker threads making files (0: half the CPU cores)
worker_threads=0
# How often to look for models to make (milliseconds), how many to take at once, and how often a model may fail
# before it's given up on (the dashboard can try again)
poll_interval_ms=2000
poll_batch=32
max_attempts=3
# Brick detail used for meshes and icons: 0 (most detailed) to 2
brick_lod=0
# Remove faces that can't be seen from anywhere, and darken hidden corners (ambient occlusion baked into the vertex
# colors): 0 or 1. ao_strength: 0 (none) to 1. optimize_resolution: detail of the renders that decide both.
remove_hidden_faces=1
bake_ao=1
ao_strength=0.6
optimize_resolution=1024
# Icons: size in pixels, the camera's angle around (yaw, from the model's front) and above (pitch) the model in degrees,
# and the empty border (1 fills the icon). Modular builds (cars, rockets) have their own angles.
icon_size=128
icon_yaw=35
icon_pitch=25
icon_margin=1.03
modular_icon_yaw=35
modular_icon_pitch=20