Git Product home page Git Product logo

tes3mp / tes3mp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openmw/openmw

749.0 749.0 90.0 81.75 MB

Multiplayer for OpenMW, a reimplementation of The Elder Scrolls 3: Morrowind's engine.

Home Page: https://tes3mp.com

License: GNU General Public License v3.0

Shell 0.34% CMake 1.38% C++ 96.75% C 0.69% Makefile 0.01% GLSL 0.45% TeX 0.38% PowerShell 0.01%
engine games multiplayer online-games openmw tes3mp

tes3mp's Introduction

TES3MP

Copyright (c) 2008-2015, OpenMW Team
Copyright (c) 2016-2022, David Cernat & Stanislav Zhukov

TES3MP is a project adding multiplayer functionality to OpenMW, an open-source game engine that supports playing "The Elder Scrolls III: Morrowind" by Bethesda Softworks.

  • TES3MP version: 0.8.1
  • OpenMW version: 0.47.0
  • License: GPLv3 with additional allowed terms (see LICENSE for more information)

Font Licenses:

Project status

Version changelog

As of version 0.8.1, TES3MP is fully playable, providing very extensive player, NPC, world and quest synchronization, as well as state saving and loading, all of which are highly customizable via serverside Lua scripts.

Remaining gameplay problems mostly relate to AI and the fact that clientside script variables need to be placed on a synchronization whitelist to avoid packet spam.

TES3MP now also has a VR branch that combines its code with that of Mads Buvik Sandvei's OpenMW VR.

Donations

You can benefit the project by donating on Patreon to our two developers, David Cernat and Koncord, as well as by supporting OpenMW.

Contributing

Helping us with documentation, bug hunting and video showcases is always greatly appreciated.

For code contributions, it's best to start out with modestly sized fixes and features and work your way up. There are so many different possible implementations of more major features – many of which would cause undesirable code or vision conflicts with OpenMW – that those should be talked over in advance with the existing developers before effort is spent on them.

Feel free to contact the team members for any questions you might have.

Getting started

tes3mp's People

Contributors

aesylwinn avatar akortunov avatar allofich avatar am0s avatar ananace avatar anyoldname3 avatar assumeru avatar capostrophic avatar davidcernat avatar drummyfish avatar elsid avatar fr3dz10 avatar greye avatar gugus avatar jhooks1 avatar joelgraff avatar kcat avatar koncord avatar korslund avatar lgromanowski avatar miroslavr avatar mrcheko avatar nikolaykasyanov avatar potatoesmaster avatar psi29a avatar sirherrbatka avatar smbas avatar swick avatar unelsson avatar zinnschlag 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tes3mp's Issues

Add message box warning about invalid server IP

Clients crashing because of invalid IPs is a great source of confusion for new players. We should instead have a message box letting them know that the connection failed, and their client should only close down after that.

Characters randomly become invisible to random observers when switching cells

Whenever a character logs in or teleports into a cell, the other players have a somewhat random chance of not seeing him.

We first noticed this whenever a third player joined the server, the other two players would sometimes not be able to see him.

Tests were conducted using up to 5 characters moving between cells in random or predetermined order and no pattern was found. Random characters would be seen by random observers.

Additionally, sometimes instead of just becoming invisible, the missing player would be seen by random observers in the spawn point of ToddTest in a perpetual falling animation.

Together with David and Norc we were able to capture the phenomenon in our first test session video:

1h22m00s - "Invisible" player spotted falling in ToddTest
1h25m00s - Started testing with 5 characters in ToddTest
1h28m00s - Switching 5 characters between cells

Dedicated players' objects crash clients

Originally posted by @davidcernat

CellStore needs to think a dedicated player's object has a RefNum or it will not move them correctly across exterior cells.

However, the fact that the object doesn't actually have a RefNum can lead to a crash.

This requires additional investigation.

My initial understanding of the situation as shared with Koncord in chat:

12:08 PM - David C.: I don't know  if the crash depends on exteriors or interiors.
12:08 PM - David C.: I just know that I commented out this code:
12:08 PM - David C.: if (!object.getCellRef().getRefNum().hasContentFile())
        {
            MWWorld::Ptr copied = object.getClass().copyToCell(object, *cellToMoveTo, object.getRefData().getCount());
            object.getRefData().setCount(0);
            object.getRefData().setBaseNode(NULL);
            return copied;
        }
12:08 PM - David C.: This code says
12:09 PM - David C.: If this dedicated player's object doesn't have a RefNum, don't spend too much effort on moving it.
12:09 PM - David C.: So I commented it out...
12:09 PM - David C.: And now players can move from one end of the world to another.
12:09 PM - David C.: No problems.
12:09 PM - David C.: But sometimes, because they don't have RefNums, a cell gets confused...
12:09 PM - David C.: And the client crashes.
12:09 PM - David C.: That's the best I can explain it with minimal testing.
12:09 PM - David C.: But the problem is clearly in one of those two functions.
12:10 PM - David C.: void CellStore::moveFrom(const Ptr &object, CellStore *from)
12:10 PM - David C.: and
12:10 PM - David C.: MWWorld::Ptr CellStore::moveTo(const Ptr &object, CellStore *cellToMoveTo)
12:10 PM - David C.: So, there is not a lot of code to debug.

Wild "endif" running amok

Noticed this yesterday on the client output, @davidcernat says it has been there for a while.
Doesn't seem high priority, but its a good idea to document it while its location is still unknown.

endif

Crash on player connect, when the Lua scripts are loaded

Grim Kriegor: Koncord, tried to get the server running after updating from the latest git changes, got this error whenever a player connected and lua scripts were loaded
Grim Kriegor: terminate called after throwing an instance of 'boost::exception_detail::clone_implboost::exception_detail::error_info_injector<boost::bad_any_cast >'
what(): boost::bad_any_cast: failed conversion using boost::any_cast
zsh: abort (core dumped) ./openmw-mp
Grim Kriegor: it works well without the server scripts
Grim Kriegor: could it have to do with this change
Grim Kriegor: 5a6c175#diff-8f31b30fca1f728b7be960523bbe1024L111
Grim Kriegor: it went from being a signed int to an unsigned nothing

This started sometime between the 5a6c175 and the 23a37fc commits.
Server crashes when a player connects, after displaying the "You have 10 seconds to log in..." string, and probably after initializing the counter.

No focus in GUI API InputDialog

05:11 - Grim Kriegor: But whenever I call a text input GUI dialog window, if I change to another program window and come back to openmw, I lose the focus on the text input, I cannot open the inventory or the console, but I can walk, and write in chat
05:12 - Grim Kriegor: the message box and custom button message box dont have this problem
05:12 - Grim Kriegor: as they force the user to click one of the buttons to regain focus of the game
05:14 - Grim Kriegor: the only way to close the text input gui window after this is to call it again

Sometimes unable to see other players

In rare cases, after joining the server, player can see other players' chat but can not see their characters anywhere in the world.
Probably an issue with transfer of other players' data packets.

Sanitize character names

On yesterday and today's test sessions it became apparent character names with leading or trailing white-spaces as well as non-alphanumeric characters would cause unexpected behavior.

I have tried patching that in the server scripts, example:

local pname = tes3mp.GetName(pid)
pname = pname:gsub('%W','') -- Remove all non-alphanumeric characters
pname = pname:gsub("^%s*(.-)%s*$", "%1") -- Remove leading and trailing white-spaces
Players[pid].name = pname

But it would be a much more elegant and reliable solution to take care of this problem at the source so we get a clean and safe string whenever the user logs in or we call tes3mp.GetName(). What do you gentlemen think?

TES3MP logos and designs discussion

Hello there gentlemen. It is way too early to think about such superficial things such as this, but it is also a good idea to set up a place where people can discuss and share ideas regarding this in the future.

Sooner or later we will be needing a logo to distinguish us from the OpenMW project.
Feel free to share your ideas and suggestions here.

Implement better handling of dynamic stats

Currently, the dynamic stats (health, magicka and fatigue) only have one confusingly named packet (ID_GAME_UPDATE_BASESTATS) associated with them, when it really makes more sense to have one packet for their base values (that only change on a level up) and another packet for their current values (that change constantly).

The reason is that it's useful to have a script event that fires whenever the base values change (so you can save them to a player's file), but there is very little point in having a similar script event for whenever the current values change (because that would just fire all the time).

The current packet ID_GAME_UPDATE_BASESTATS, from the class PacketMainStats, should also be renamed. Current tes3mp code refers to health, magicka and fatigue as both base stats and main stats, whereas OpenMW refers to them as dynamic stats and distinguishes between their base values and their current values. ID_GAME_DYNAMICSTATS is a better name for it.

That packet should then be split into one handling base values (ID_GAME_DYNAMICSTATS_BASE) and one handling current values (ID_GAME_DYNAMICSTATS_CURRENT).

Functions for inventory. Part 2

Originally posted by @Koncord

Function Status Description
AddItem ✔️
RemoveItem ✔️
GetItemCount
GetItemSlot int GetItemSlot(int slot, char *item); // GetItemSlot return count and itemid.

Upon logging in some characters are displayed as the default dunmer

Whenever a character logs in there's a somewhat random chance it will be displayed as the default dunmer, regardless of race.

This effect can be negated by making the observer switch cells,

Additional, by removing the clothing of the affected character, the underneath body parts will be those of the correct race.

At 33s this video displays a recently logged in character being displayed as the default dunmer, followed by the negation of that effect by the observer's cell switching.

Players fall to ground after putting in their names

Starting with commit 2461758, players find themselves on the ground with zero fatigue as soon as they've put in their names after joining a server.

Logging or registering fixes the issue, but still leaves players immobile for a few seconds until they get back up.

Load dynamic stats

It is currently impossible to correctly load dynamic stats for players from a script.

Keep old logs for client and server

We should have a "logs" folder for automatically generated text logs.

Every time you start openmw.exe you should get a new client log, and every time you start openmw-mp.exe you should get a new server log, without overwriting previously existing logs.

This will be really useful for determining which series of packets have caused a desync or another problem, by cross-referencing logs from the server and various players.

Can't write in chat

Hello! I followed the instructions: install openmw, build client (on linux), connect to server play.suran.pl (it works!) but I can't type nothing in chat, keys don't react. I trying to press any keys, change layout, nothing helps. So I can't register on this server (but can enter name).

Players use fall damage animation when landing even if they shouldn't

When setting their Acrobatics skill to high values, players have enough of it to not take any damage when jumping around, but they still play their fall damage animation on other clients whenever landing anywhere.

A lot of future videos and tests will probably look better if we fix that.

Display a message when the server goes down

Right now, clients crash whenever the server goes down. Instead of crashing, they should receive a message telling them what has happened, similarly to how they receive a message when they are unable to connect to a server.

Edit players stats from server

Originally posted by @Koncord

Function Status Description
[Get/Set]Name ✔️
[Get/Set]BirthSign ✔️
[Get/Set]CharClass ✔️
[Get/Set][Health/Magic/Fatigue] ✔️
[Get/Set]Current[Health/Magic/Fatigue] ✔️
[Get/Set]Attributes ✔️
[Get/Set]CurrentAttributes ✔️
[Get/Set]Skills ✔️
[Get/Set]CurrenSkills ✔️
[Get/Set]IncreaseSkills ✔️
[Get/Set]MajorSkills ✔️
[Get/Set]Race ✔️
[Get/Set]Head ✔️
[Get/Set]Hairstyle ✔️
[Get/Set]Class ✔️
[Get/Set]IsMale ✔️

Time API

Function Status Description
SetHour ✔️ SetHour(pid, hours)
SetMonth ✔️ SetMonth(pid, month)
SetDay ✔️ SetDay(pid, day)

Load player class from server

Right now classes are not being loaded correctly from the server at all.

Although there was some sense in closing #41 because saving them to the server technically works, it means we get to deal with the loading part as a separate issue.

Framelistener error when being attacked

Whenever another player attacks you in hand-to-hand, the following error is displayed in your client console:

Error in framelistener: Cannot get class of an empty object

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.