Commit graph

23 commits

Author SHA1 Message Date
Ty Conner
66d3b98339
Add options for database logging (#4352) 2025-08-23 13:32:35 -04:00
Galli
b5f9418388
Removed the duplicate "the" words from the comments (#4322)
* Update OfflineConfiguration.cs

Removed the duplicate "the" from the comment on line 63

* Update Config.js.docker

Removed the duplicate "the" from line 216

* Update Config.js.example

Removed the duplicate "the" from line 217

* Update Player_Networking.cs

Removed the duplicate "the" from line 27
2025-06-22 15:33:13 -04:00
Ty Conner
ab54cf9002
Add support for client DAT patching from server (#3979)
* Update DatFile.cs

* Update DatFileType.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Create DDDManager.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Create GameMessageDDDBeginDDD.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Create GameMessageDDDDataMessage.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update DDDHandler.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update WorldManager.cs

* Update Program.cs

* committing changes provided

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* more wip changes

* Update DDDManager.cs

* Update DDDManager.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update CMostlyConsecutiveIntSet.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update WorldManager.cs

* Update DDDHandler.cs

* Update Session.cs

* Update DDDManager.cs

* Update Session.cs

* Update DDDManager.cs

* Update DDDManager.cs

* Update GameMessageDDDDataMessage.cs

* Update DDDHandler.cs

* Update Session.cs

* Update CAllIterationList.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update CMostlyConsecutiveIntSet.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Create PTaggedIterationList.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update Session.cs

* Update ConnectionListener.cs

* Create DDDConfiguration.cs

* Update MasterConfiguration.cs

* Update Config.js.example

* Update DDDManager.cs

* Update DDDHandler.cs

* Update Program.cs

* Update PropertyManager.cs

* Update WorldManager.cs

* Update SessionTerminationReason.cs

* Update DDDHandler.cs

* Update DDDManager.cs

* Update ConnectionListener.cs

* Update SessionTerminationReason.cs

* Update GameMessageDDDDataMessage.cs

* Update AuthenticationHandler.cs

* Update CharacterHandler.cs

* Update PacketInboundLoginRequest.cs

* Update Session.cs

* Update DatFileType.cs

---------

Co-authored-by: OptimShi <OptimShi@users.noreply.github.com>
2023-06-09 13:15:10 -04:00
aquafir
23a7a41a04
Add mod support (#3948)
* Add mod support

* Change .NET Core 3.1 to .NET 6 for DatLoader.Tests to remove dependency.

* Add default mod path

* Attempt to create missing mod folder

* Update Source/ACE.Server/Mods/ModManager.cs

Co-authored-by: gmriggs <gmriggs@gmail.com>

* Use pre-release Harmony

---------

Co-authored-by: gmriggs <gmriggs@gmail.com>
2023-05-25 22:15:41 -04:00
OptimShi
51e04e42cb
Added optional check for newer server binary. (#3838)
* Added optional check for newer server binary. Changed DB Update to check only 'latest'

* Update OfflineConfiguration.cs

* Update Program.cs

* Update Config.js.example

Co-authored-by: Ty Conner <tyconner@itcproductions.com>
2022-05-07 14:30:42 -04:00
Ty Conner
56575e72fb
Add some basic pruning for shard database (#3621)
* Add some basic pruning for shard database

* Update ShardDatabaseOfflineTools.cs

* add character squelch prune

* Update OfflineConfiguration.cs

* Update Program.cs

* Update Config.js.example

* Update Config.js.docker

* Update OfflineConfiguration.cs

* Update Config.js.docker

* Update Config.js.example
2021-08-15 18:41:28 -04:00
Ty Conner
e4e7397945
Add Shard Biota cache configuration options (#3368)
* Add Shard Biota cache configuration options

* Update Config.js.docker

* Update Config.js.docker
2020-11-20 12:30:18 -05:00
Mag-nus
055f37920e
DatabaseThreadCountMultiplier added to Config.js (#3336)
This allows independent configuration of thread counts for world and database, specifically to allow over saturation of vCPU.
2020-11-16 08:29:48 -06:00
ahricvirindi
0998462279
Adding ability to exclude specific IPs from max session count. (#2986)
* Adding ability to exclude specific IPs from max session count.

* Added config examples, and fixed misspelling of config property.
2020-05-11 23:52:07 -04:00
ahricvirindi
a034edfdbe
Adding extra options for AutoApplyWorldCustomizations (#2985)
* Adding extra options for AutoApplyWorldCustomizations

* Added examples for world customization content paths config option.

* Added double-backslash for path examples in world customization paths config.
2020-05-11 23:51:51 -04:00
Ty Conner
eb5703f862
Wire up automatic database updates (#2965)
* Wire up automatic database updates

- Support automatic database patching
- Support automatic updating of world database to latest release
- Support automatic re-application of world database customization

* Update Program_DbUpdates.cs

* Update Program_DbUpdates.cs

* Update Program_Setup.cs

* Update Program_DbUpdates.cs

* Update Program_DbUpdates.cs

* Update Program_DbUpdates.cs
2020-05-08 01:44:21 -04:00
Mag-nus
209561c4a9
Update default dats path on windows (#2594)
This lines up with the ACE install on windows wiki. I've seen others using the same directory structure as well before this documentation update:

https://github.com/ACEmulator/ACE/wiki/ACE-Hosting-Windows
2020-01-22 14:43:16 -06:00
Mag-nus
bff22f9140
PurgeOrphanedBiotas (#2326) 2019-11-24 16:50:50 -06:00
Mag-nus
df0b662926
Improve Multi-threaded landblock group ticking (non-physics) (#2383)
* Improve Multi-threaded landblock group ticking (non-physics)

This splits up the previous Landblock Tick() work into two functions:
TickMultiThreadedWork()
TickSingleThreadedWork()

Mainly, this allows multi-threading of the following work:
Landblock.actionQueue.RunActions();
Landblock creatures Monster_Tick()
Landblock Heartbeat
Landblock Database Save

The first two of which are the biggest CPU consumers from the previous Tick(), and, fortunately enough are pretty safe to multi-thread.

* Make player teleports from portal collisions via physics a thread safe action

* Fix an exception raised in debug mode when creating new characters

* Thread safety for player teleports from death

* ThreadSafeTeleport framework

* More ThreadSafeTeleport cleanup

* AdjustDungeonCells fix

* update  AdjustPos comments
2019-11-17 06:54:58 -06:00
Ty Conner
3ec425cce4
Support connection limits per IP Address (#2372)
* Support connection limits per IP Address

* Update NetworkManager.cs

* Update AuthenticationHandler.cs

* Update NetworkManager.cs
2019-10-30 10:55:14 -05:00
Mag-nus
b504cb418f
Multi-thread landblock ticking (Landblock Groups w/Thread Safety) (#2303)
* WIP: Multi-thread landblock ticking

This is the start of "landblock group" ticking.

The idea behind the landblock groups are that each group may contain multiple landblocks that must be ticked on the same thread, but, each group itself can be ticked on independant threads.

The current groups are as follows:
Every outdoor landblock is in a group
Every dungeon landblock is in it's own group (one per dungeon)

This is not ready for public servers yet.

* More changes

* First pass at actual groups

* ObjMaint.KnownPlayers needs to be concurrent

* Removing original PoC code from LandblockManager

* Landblock Tick Cleanup

* VisibleObjects also needs to be concurrent

* DestructionQueue also needs to be concurrent

* KnownObjects needs to be concurrent

* Use a bool to toggle multi-threading

* Add thread safety to SequenceManager

* Move landblock phsyics ticking to LandblockManager

Also

* Cleanup log.Info level messages

Log.info is the default console output and is intended for:
server startup
connection/disconnections
admin initiated command output
server shutdown

Log.Debug is the appropriate level for debug-type messages that are to be logged and audited at a later date, but not output to the console.

* Missed a couple

* Move HandleSalvaging from Warn to Debug

* Add thread safety to Landblock

* More landblock group calc stuff

* couple comments

* Add some thread capping

* Limit database from taking all the threads

This adds limits to the database thread consumption.

It also should allow the world to now consume threads easier.

The way it is done is as follows.

- We determine the number of available threads using Environment.ProcessCount
- We allocate (int)Math.Max(Environment.ProcessorCount * .34, 1) to the World, and the remainder tothe database.

It breaks down as follows
1 vCPU = 1 thread world, 1 thread database
2 vCPU = 1 thread world, 1 thread database
3 vCPU = 1 thread world, 2 thread database
4 vCPU = 1 thread world, 3 thread database
5 vCPU = 1 thread world, 4 thread database
6 vCPU = 2 thread world, 4 thread database
7 vCPU = 2 thread world, 5 thread database
8 vCPU = 2 thread world, 6 thread database
9 vCPU = 3 thread world, 6 thread database
10 vCPU = 3 thread world, 7 thread database

I'd like to get some feedback from this PR on various sized servers.

What you may notice is that loading a player may take slightly longer (very slightly).

What you will probably notice is no discenerable difference in-game.

What I want to make sure happens is that the world doesn't end up feeling more choppy due to the parallel processing of outbound network traffic. Hopefully the more fair thread distriubiton will help prevent thread starvation.

* quit if not enough vCPU

* separate landblock group recal between add/remove

* revert landblockMutex in Landblock.cs

* World Manager AboveNormal thread priority.

* Add some tags

* Couple more

* Create LandBlockGroup entity

* remove space between tags

* Update the log4net examples

* Efficiency improvements

* fix message

* more WIP

* Improve log4net

Add color to console output

Make the default logger use Log4Net.Async

* WIP

* More WIP

* more WIP

* More WIP

* more WIP

* More WIP

* more WIP

* wip

* more WIP

* remove old processor count check

* Create ServerObjectManager

This removes the ServerObjects collection out of ObjectMaint into it's own class.

This paves the way for thread safety that will need to be added to ObjectMaint for the multi-threaded landblock groups.

* Only split if multi-threading is enabled

* remove comment

* ObjMaint refactor

* all obj maint collections are now private

* few more optimizations

* alternate objectmaint thread safety model

* fix

* Remove a couple of comments

* improved ObjectMaint locking

* lock (ThreadConfiguration.WorldLockObject) OnDeath

* progress

* set MultiThreadedLandblockGroupPhysicsTicking to false

* Move a bool

* add lock

* physics ticking thread safety improvement

* use Config.js for thread configuration

* Add config comments

* measure physics ticking performance

* /serverstatus info added

* comments
2019-10-08 20:25:49 -05:00
Ty Conner
7dc5ff67cf
Support Purging of deleted Characters from database (#2223)
* Support Erase and Purge of deleted Characters

* Update ShardDatabase.cs

* Update ShardDatabase.cs

* Support AutoPurge

* Update CharacterCommands.cs

* Update CharacterCommands.cs

* .

* Add support for admin forced delete of character

* Update ShardDatabase.cs

* Update CharacterHandler.cs

* Update CharacterCommands.cs

* Update CharacterCommands.cs

* Add PurgeOrphans command

* Update ShardDatabase.cs

* Update ShardDatabase.cs

* Rename erase to purge

* Update ShardDatabase.cs

* Update Program.cs

* Rename Erase to Purge for consistency

* Remove purging from SerializedShardDatabase

* Update SerializedShardDatabase.cs

* Update ShardDatabase.cs

* Changes

* use all threads

* OfflineConfiguration
2019-09-27 23:01:25 -05:00
Mag-nus
9f80628201
Add some config.js.example comments (#2242)
* Add some config.js.example comments

* Typo fix and comment add

* Add :N0 formatting to GuidManager

* typos and DatFilesDirectory comment
2019-08-19 07:46:47 -05:00
Ty Conner
cd4850d0a2
Add support for preloading landblock groups (#1829)
* Add support for preloading landblock groups

* Update LandblockManager.cs
2019-04-29 13:53:06 -05:00
Mag-nus
759b01ac0c
/serverperformance command (Server Performance Monitor) (#1642)
* /serverperformancemonitor command

Optional parameters are:
start
stop
reset

If no parameters are present, the current performance metrics are spit out.

When disabled, overhead is the cost of some simple function calls and a bool check. When enabled, the additional cost is stopwatch events. In comparisson to the work that ACE does for normal processing, the work done when serverperformance is enabled is nearly 0.

Default is disabled.

Enable it to start up automatically in the config.js. This is recommend for most servers. Enable it at runtime using /serverperformance start

* Fix Reset
2019-04-04 13:38:01 -05:00
Ty Conner
d311df7e0c
Change BCrypt WorkFactor to configurable Option in Config.js (#1506)
* Change WorkFactor to 8

* Add configuration option for password workfactor, and migration option to support [up/down]grade at runtime

* Fix a default

* Do not pass in values less 4 and greater than 31 to prevent server crash

* Update defaults
2019-03-09 19:52:04 -06:00
gmriggs
6b4e9cfb12
Adding monster spawning aggro (#1477) 2019-03-02 03:16:03 -05:00
fartwhif
e142a863bc Configuration file change from JSON to JavaScript (#1404)
* Changing configuration file format to JavaScript instead of JSON for the ability to embed comments, Backwards compatible, ACE.Server project pre-build renames Config.json to Config.js when needed, but if that never happens it's still OK and falls back to the old filename.
Changed startup batch files to determine what the current directory should be and change to it before starting ACE

* fixed

* move config old to new filename upon program start
2019-02-16 16:27:46 -05:00
Renamed from Source/ACE.Server/Config.json.example (Browse further)