Coder Social home page Coder Social logo

acemulator / ace Goto Github PK

View Code? Open in Web Editor NEW
281.0 50.0 237.0 30.65 MB

Asheron's Call server emulator.

Home Page: https://emulator.ac

License: GNU Affero General Public License v3.0

C# 99.89% Batchfile 0.09% JavaScript 0.01% Dockerfile 0.01% PowerShell 0.01%
emulator server-emulator csharp asherons-call acemulator dotnet dotnet-core entity-framework-core mmo mmorpg

ace's Introduction

ACEmulator Core Server

Discord

Build status: GitHub last commit (master) Windows CI docker build

Download Latest Server Release GitHub Release Date Download Latest World Database Release GitHub Release Date

GitHub All Releases GitHub All Releases Docker Pulls

ACEmulator is a custom, completely from-scratch open source server implementation for Asheron's Call built on C#

  • MySQL and MariaDB are used as the database engine.
  • Latest client supported.
  • License

Disclaimer

This project is for educational and non-commercial purposes only, use of the game client is for interoperability with the emulated server.

  • Asheron's Call was a registered trademark of Turbine, Inc. and WB Games Inc which has since expired.
  • ACEmulator is not associated or affiliated in any way with Turbine, Inc. or WB Games Inc.

Getting Started

Extended documentation can be found on the project Wiki.

Contributions

  • Contributions in the form of issues and pull requests are welcomed and encouraged.
  • The preferred way to contribute is to fork the repo and submit a pull request on GitHub.
  • Code style information can be found on the Wiki.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Bug Reports

  • Please use the issue tracker provided by GitHub to send us bug reports.
  • You may also discuss issues and bug reports on our discord listed below.

Contact

ace's People

Contributors

aquafir avatar boop-ac avatar ddevec avatar dependabot[bot] avatar dgarson avatar dgatewood avatar dirtyelf avatar fantoms avatar fartwhif avatar forbiddenz avatar gmriggs avatar harliq avatar lidefeath avatar ltripley36706 avatar lurker-mcdoogle avatar lytelthorpethistledown avatar mag-nus avatar mcreedjr avatar miachoftd avatar mogwai-thefurry avatar ogmage78 avatar optimshi avatar rawaho avatar scottaday avatar slushnas avatar splatterghast avatar tigrisofgaul avatar yazgoo avatar zegeger avatar ziang4891 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ace's Issues

Server should have a way to apply DB migrations

The server should have a way to track which DB migrations it has applied, and automatically apply missing ones in the correct order.

@Mag-nus suggested a naming convention of YYYY_MM_DD_tablename.sql. This would work, but would make dealing with pull requests and merges annoying, if multiple came in one day.

I would suggest a naming scheme more along the lines of $patchNumber + '_' + $YYYY_MM_DD + '_' + $descriptiveFeatureName, for example 01_2017_02_03_add_monster_information.sql and not limiting them to any particular tables.

Picking the second naming system will make dealing with pull requests easier and help developers understand what updates are for. Additionally, the leading number provides a good way of tracking our schema revision.

CreateObject message needs work

Jyrus pointed out a problem with portals in town network.

To comfirm, I loaded into ACE and issued teleloc command /teleloc 00070145 70.10 -83.07 0.10 1.00 0.00 0.00 -0.01 to arrive in Town Network and found portals to be majorly flawed.

PCAPs filled will exceptions.

Attaching files of retail pcap, plus export scripts, plus pcap from ace
output.zip

Action queue for Player<->Landblock Interaction

Use Cases:

  • Picking up an item off the ground
  • Casting a spell
  • Getting health of a monster
  • Using a Door
  • Using a Lifestone
  • Opening chests

Other necessary changes:

  • Remove the exposure of WorldObjects from Landblock and LandblockManager

Design thoughts:

  • The session/player object would have a List of queued actions.
  • As Actions arrive.... If they don't require Landblock interaction, just handle them and be done with it. If they do require Landblock / Object interaction, add them to the session/player queue.
  • In the main Landblock server control loop, process the top X actions from each player's queue.

Logs should go to separate window, and filesystem

Logs should go in a separate window from the main ACE >> command prompt so admins aren't frustrated with information stomping commands as they're being typed.

Might as well add a Config.json option to log them to the filesystem and set verbosity at the same time.

Add message buffering and send as multifragment packet

Continue reworking network pipe to support message buffering and flushing from Session.Update to send as a multifragment packet.

  • NetworkBuffer class to queue messages during a timeslice
  • NetworkBuffer will have a current NetworkBundle which will contain all messages and optional flags.
  • On a session update, create new NetworkBundle and use the previous one to send packets.
  • Move certain packet flag responses (Echo, TimeSync, etc) to be sent with a NetworkBundle.
  • Create NetworkManager function to send a NetworkBundle, splitting large messages into two packets, or combining multiple messages into one packet.
    • This function should take a NetworkBundle and create packets and fragments as appropriate to send all messages.

Continue build out of inventory functions

  • Fix bug with drop after pickup
  • create a pack and enable equip
  • add the ability to move to and from main pack
  • add tables (if needed) and wire up inventory to persist with character save

Primary keys too restrictive on some weenie tables

Proposed fix:

ALTER TABLE weenie_palette_changes DROP PRIMARY KEY, ADD PRIMARY KEY(weenieClassId, subPaletteId, offset, length);
ALTER TABLE weenie_texture_map_changes DROP PRIMARY KEY, ADD PRIMARY KEY(weenieClassId, index, oldId);

I think the weenie_palette_changes table needs a different primary index. Currently it is weenieClassId + subPaletteId.

Here is the palette data for Narg.

subPaletteId,offset,length
67116992,192,64
67109565,256,64
67114248,576,160
67114248,1088,192
67114248,320,192
67114248,928,160
67114248,0,192
67114248,768,96
67114248,928,96
67110336,2000,48

subPaletteId 67114248 appears 7 times, twice it has the same offset of 928

The same problem exists for weenie_texture_map_changes. Currently it is weenieClassId + index.

Here is the texture data for the Aluvian Mid-Stakes Gamesmaster

index,oldId,newId
16,83886232,83890685
16,83886668,83890262
16,83886837,83890287
16,83886684,83890353
9,83887070,83886781
9,83887062,83886686
0,83889072,83889072
0,83889342,83889342
5,83887064,83886241
1,83887064,83886241
3,83889344,83887054
7,83889344,83887054
4,83887068,83887054
8,83887068,83887054

index 16 apears 4 times

Converting ACE to run as a Windows service

Envisioning how this server will eventually be run and/or deployed, I suspect that most would like the opportunity to have the server run as a Windows service. This will allow automated starting of ACE at Windows startup. This will require a separate monitoring application to monitor any "console" output. I offer this only from a sysadmin point of view who has an aversion to having to interactively start applications which others use. I'm not sure what architectural changes will be required, but thought it would be worth mentioning early in the development process.

Issues with second client

When more than one person is logged on to the server, the second person never comes out of portal space until they move. This may be an incorrect setting of contact. Also under the same use case - if 2 clients are logged in, from the perspective of each client - the other jumps and briefly does the falling animation with every movement. In looking at live world pcaps, it looks like almost all movements have the contact flag set to true. It looks to be that way in ours. I am putting this here so it is documented - if anyone has time to look for this great - if not, I will try to see if I can debug it.

Create Test Script and add to project

As each of us is working on different parts at different times, it would be useful to have a document like our read me or change log where we could put tests and expected results for our areas. That way prior to submitting a PR you could run through the test to make sure your change did not break the world.

Quick example: Test item pickup and drop

  1. Log in on 2 characters ( we need to test what other clients are seeing)
  2. On client 1 in the chat window type @ctw me
  3. Take the wand and drop it to the ground.
    a. Did both clients see and here the drop? Do you see the wand on the ground from both clients. Did client 1 do the animation to set the wand on the ground. Is the item out of the backpack for client 1?
  4. Pick up the wand. Is the wand gone for client 2 and in the backpack of client 1. Did you see the animation from both clients. Did you hear the pickup sound.

Friends list functionality

  • Persist/read friends from db table
  • Send full friends list on login
  • Respond to Add friend client message
  • Respond to Remove friend client message

Likely not able to add yet until multiplayer support added:

  • When player logs on or off, send friend status update to their friends.

Objects don't appear correctly until on top of them

Some portals/lifestones are not appearing until right on top of them or past them.

Repo:
@telepoi candeth keep
run straight to tree

note the very late appearance of some of the objects.. if you turn around and run back toward the entrance, one of the portals blinks and resets as well.

ACE Chat System

StackOverflow had something working in chat, perhaps submit a pull request.

Change way mysql databases are accessed

Should we be "internalizing" the connections to the mysql servers? Even with strong username/passwords is there as technical reason why we need to expose the sql server externally to the internet?

Missing character position crashes server

Deleting a character's position of PositionType=1 causes server to crash when character is loaded.

Background for this:
I used @spacejump command which put me in an endless portal (command should probably be removed or fixed). I figured I'd just delete that character's current position and it would default back to fallback position but it did not work. Probably needs some logic built in the load-in if no current position is in the db to reset to a safe location, either lifestone if set and failing that probably holtburg drop (or race specific starter town drop).

cc: @fantoms

Save & reload window positioning

Chat window(s), character info / inventory panel, etc.

Logging this as people are constantly asking for stuff that can be done.

Teleport no longer applies rotation to Position

Session.Player.Teleport always ends up with 1 0 0 0 for the Quaternion regardless of what the actual position sent in to it specified.

This is a recent change that was not present previously.

Background maintenance thread

We need some sort of low priority thread to run and periodically perform routine maintenance tasks such as removing characters marked for deletion.

Password storage should use PBKDF2

Right now it's using salted SHA256, which works for now but isn't suitable for real password storage, taking into considerations things like password reuse across services and the fact that inexperienced server admins will likely be operating poorly configured ACEmulator servers.

To minimize the damage of leaking any password hashes from the DB, the supported standard for password storage on .NET is PBKDF2.

I am already working on converting password storage to use PBKDF2 on my branch.

https://dusted.codes/sha-256-is-not-a-secure-password-hashing-algorithm

Give Characters a set of positions

Make an enum for the following positions types:

  • Physical Location
  • Lifestone Used
  • Lifestone Tied
  • Portal Recall
  • Primary Portal Recall
  • Secondary Portal Recall
  • Allegiance Hometown (This should only apply to monarchs)
  • Mansion Recall

Notes / Requirements

  • The character database model will need to change so that players have a set of positions rather than a single position
  • The character object will have 1 new property for each of the recall locations in the enumeration, where Allegiance Hometown will attempt to find the monarch's Allegiance Hometown. If you can't do this yet, just slap a // TODO and return null.
  • Each of these positions should save to the database whenever changed.
  • Hook up the /lifestone and /ls commands to go to the Lifestone position.

Implement lifestone usage

  • Using a Lifestone
  • Implement /die or whatever the command was
  • Portal back to your position of the lifestone usage on death
  • [Bonus points] Vitae

Character rotation

I have not had a chance to look into it, but either on the save or the load, we are not saving or loading the character rotation (facing direction) correctly. You log out facing one way, you log back in in the same spot rotated 90 degrees.

Subscription data model concept + GLS replacement

Login == account
retail "AC account" == subscription (under the hood, as Turbine did it)
subscription == a set of characters on worlds

Old/retail paradigm: 1 login for every subscription
New paradigm: 1 master login, select a subscription

This will entail building a set of REST services and a new launcher with Thwargle.

Rework packet pipe

Rewrite packet and fragment handling to delay and allow for combining outgoing fragments.

Client Launcher needed

We need a client launcher. Perhaps we use a modified thwarglauncher.
https://thwarglauncher.codeplex.com/

For decal to work:
"for emu, you should make a launcher that injects OR a shim client that loads the client and injects"
"just stuff inject.dll in the process space early enough and it will do its thing"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.