Giter VIP home page Giter VIP logo

software-inc-multiplayer's Introduction



Software Inc Multiplayer Mod

A multiplayer mod for the game "Software Inc"

Contents

Installation

Manual Installation (Windows/Contributors/Developers only)
  1. Head to the "Utilities" folder and run as administrator the batch file called "setSoftwareIncFolder.bat";
  2. It will ask you to copy and paste the game's directory installation path (usually something like "A:\SteamLibrary\steamapps\common\Software Inc", to find it quickly, right click on the game on Steam->Manage->Browse Local Files);
  3. The batch file will then execute the following batch command to set an Environment variable called softwareincfolder:
    setx softwareincfolder "%pathyoutcopypasted" /m
  4. All the references in the various projects inside the solution use the environment variable to point at the game root folder in order to avoid having to overwrite those references path at every push from a different person.
  5. There are also post-build events that automatically move the required DLL to the proper game's folders so everything you need to do is just build and play the game to see the mod!

To remove the environment variable use the following batch command in an administrator prompt window:

REG delete HKCU\Environment /F /V softwareincfolder

And then a full computer restart for the changes to take effect.

How it works

The multiplayer mod is based on the Peer To Peer system currently, with dedicated servers coming soon.

First, the client connects to the server and sends their "GameWorld", which is their company, their stocks, etc. Secondly, the client will recieve a collection of GameWorlds from the other clients and merges them with theirs, showing other players companies and their stocks etc. Lastly, any changes will be sent to the server to be sent to the other clients and vice versa.

Bug Reports and Feature Requests

Anyone can submit a bug report via the issues tab on GitHub, please provide as much infomation as possible. Same for feature requests.

Contributing

See CONTRIBUTING.md

software-inc-multiplayer's People

Contributors

daredloco avatar dependabot[bot] avatar imb11 avatar matta-official avatar smaskrate avatar xemrox 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

software-inc-multiplayer's Issues

Multiple Multiplayer Windows

Describe the bug
If you click multiple times the multiplayer button, it creates multiple windows.

To Reproduce
Steps to reproduce the behavior:

  1. Install 0.2.0-unstable
  2. Enable mod
  3. Click on 'Multiplayer' multiple times
  4. See error (Move the windows to see that there's more than one window)

Expected behaviour
Only create 1 window.

Screenshots
alt text

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Alpha 11.6.11

Move the multiplayer button from the mainmenu to the ActorCustomization scene

As it would take an additional step from connect to gamestart it would be better to move the button (and the logic) to the ActorCustomization scene.
This would make it easier for us as we wouldn't need to have to wait for the player but could already load the gameworld as soon as its fully loaded after starting a new game.
The button should be somewhere close to the default Start button, so the user knows where he has to press to start a multiplayer game.

A good location would be somewhere here:
somewherehere.png

Persist User State

The UserManager needs information about the existing users of a world.
This should be persisted on the server / world.

Chat box doesn't automatically add messages to box

Describe the bug
When you receive a message, it isn't shown on the chat box instantly, you have to send a message for it to be shown.

To Reproduce
Steps to reproduce the behavior:

  1. Open chat box
  2. Receive a message
  3. Send a message

Expected behaviour
Messages should appear when received

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Win 10
  • Software Inc Version: 11.6
  • Mod Version: 0.3.0

Additional context
:)

System.Exception if mod is enabled.

Describe the bug
When enabling multiplayer, an error message appears in the errors section of mods. The error is as follows "System.Exception: [CS1644]: Feature 'declaration expression' cannot be used because it is not part of the C# 6.0 language specification in GameBehaviour.cs at [205 , 119]"

To Reproduce
Steps to reproduce the behaviour:

  1. Put the Software Inc Multiplayer Mod in a DLLMods folder
  2. Run Software Inc
  3. Enable the mod
  4. Head to errors section of mods

Expected behaviour
Either no error or a different error.

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version Alpha 11.7.62
  • Mod Version Clone of master folder at 26/07/2021

Additional context
The error seems to be coming from line 205 from file GameBehavior.cs.
if (Networking.Server.isRunning)

Settings

Create some basic settings, some ideas:

  • Debug Mode (checkbox) Not so sure about this.
  • Account Stuff (usernames, etc.)
  • Chat Settings (colors/themes etc.)

it's alive?

the development of the mod is discontinued?

Create a KickHandler

Admins should be able to kick specific users from the server.
This enforces a connection close on the client/server.

Create a BanHandler

The server should be able to permanently ban people.

  • Bans should be persisted
  • Bans should be time constrained
  • Bans should contain IP and/or UserId

Ingame button keeps showing up even if mod was deactivated

Describe the bug
Ingame button keeps showing up even if mod was deactivated

To Reproduce

  1. Start SINC
  2. Deactivate mod
  3. (Get error "can't activate mod")
  4. Start game (new, load or continue)
  5. Button appears on the top

Expected behaviour
Button not shown if mod is deactivated

Desktop (please complete the following information):

  • OS: Windows 8.1
  • Software Inc Version 11.6.11
  • Mod Version 0.2.6-unstable

Additional context
Try to add this before adding the button:

if(isActiveAndEnabled)

strange but this did happen only when the 'cant activate mod' error came up...

Flush packet buffer before disconnecting

Telepathy's disconnect just kills the underlying connection.
We want to send a gracefull disconnect or something else before doing so.
Atm its very hard to determine if a packet is already on the wire or not.

A new solution has to fix this problem

This is a test feature request, please ignore.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the feature you'd like

A clear and concise description of what you want to happen. #### Additional context Add any other context or screenshots about the feature request here.

MULTIPLAYER_SAVE could not load file Serialization

Describe the bug
When running the command MULTIPLAYER_SAVE, it gives the following error:
Could not load file or assembly 'System_Runtime_Serialization, Culture—neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

To Reproduce
Steps to reproduce the behaviour:

  1. Enable mod
  2. Start a server
  3. Run MULTIPLAYER_SAVE
  4. See error

Expected behaviour
No Error

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Alpha 11.6.11
  • Mod Version: v0.2.6-unstable

Have the mod version on the multiplayer options screen.

Describe the feature you'd like

The multiplayer options screen should show the mod version.

Benefits of this:

  1. People can make sure they are using the correct mod version to connect to a server (in case of incompatibilities)
  2. People can easily find their mod version to put in bug reports.
  3. It will make me happy.

Username not shown in Chat

Describe the bug
The Username won't show up in Chat messages, it will state "Server", means that Username is NULL

To Reproduce

  1. Send a chat message with MULTIPLAYER_CHAT

Expected behaviour
Your Username shown to other people on the server

Screenshots
I've seen the Screenshot to confirm it

Desktop (please complete the following information):

  • OS: All
  • Software Inc Version All
  • Mod Version 2.0.6-unstable

Waring in console when using chat command

Describe the bug
Two warnings appear when you use the chat command

To Reproduce
Steps to reproduce the behaviour:

  1. Press "New Game" and continue as if you'd start a normal game
  2. Open the Console and write "MULTIPLAYER_START" (press enter)
  3. Write "MULTIPLAYER_CHAT" inside the console (press enter)
  4. The warnings appear

Expected behaviour
No warnings

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Alpha 11.6.11
  • Mod Version: 0.2.2-unstable

Installer error when Alt-tabbing

Describe the bug
If you open the version dropdown and ALT-TAB, the installer throws an error.

To Reproduce
Steps to reproduce the behavior:

  1. Open installer.
  2. Open the version dropdown (but don't select anything)
  3. ALT-TAB to another application
  4. See error

Expected behaviour
The installer shouldn't give an error.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Alpha 11.6.11
  • Mod Version: Installer

Additional context
Crash: https://pastebin.com/BWsNCRSB

Multiplayer commands give an error

Describe the bug
When running MULTIPLAYER_START or MULTIPLAYER_CONNECT I get the following error: Object reference not set to an instance of an object

To Reproduce
Steps to reproduce the behavior:

  1. Enable mod
  2. Open console
  3. Enter MULTIPLAYER_START or MULTIPLAYER_CONNECT
  4. See error

Expected behaviour
There should be no error

Screenshots
alt text

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Alpha 11.6.11
  • Mod Version: v0.2.1-unstable

Send message when enter is pressed

Is your feature request related to a problem? Please describe.
no

Describe the feature you'd like

In the chat box, if you press enter, it should send the message

Additional context

:)

Add multiplayer button to the mod menu

Add a button to the mod settings.
If the user clicks on it, it will open a new window with tabs for "Host Server", "Connect to Server" and "Server List".

It's updated on the ui-rework branch.

Fix network serialization

Messagepack requires Unity 2018.3 as minimum version.

  • replace it with the standard BinaryFormatter
  • fix test cases for serialization

Error disabling mod

Describe the bug
When deactivating the mod, it gives an error to the output_log.txt (no error on console)

To Reproduce
Steps to reproduce the behavior:

  1. Go to main menu
  2. Enable mod
  3. Disable mod
  4. Get pop-up saying Failed activating mod. Check log for details
  5. Check log (In SINC install dir)

Expected behaviour
No error

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Alpha 11.6.11
  • Mod Version: v0.3.1-closed

Additional context
Error:

Error activating/deactivating dll mod Multiplayer.Core:
System.TypeInitializationException: The type initializer for 'Multiplayer.Networking.Server' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at MarketSimulation.get_Active () [0x00000] in <9ea9c027dc0040299fd0b91d02ca7bd1>:0 
  at Multiplayer.Networking.GameWorld.Server..ctor () [0x000fa] in <785cc9427bfa4f6f96d6a9e0ad90d482>:0 
  at Multiplayer.Networking.ServerData..ctor (System.String fname) [0x0009b] in <785cc9427bfa4f6f96d6a9e0ad90d482>:0 
  at Multiplayer.Networking.Server..cctor () [0x00035] in <785cc9427bfa4f6f96d6a9e0ad90d482>:0 
   --- End of inner exception stack trace ---
  at ModController+DLLMod.Activate (System.Boolean active) [0x00058] in <9ea9c027dc0040299fd0b91d02ca7bd1>:0 
  at OptionsWindow+<AddModOption>c__AnonStorey9.<>m__0 (System.Boolean x) [0x00000] in <9ea9c027dc0040299fd0b91d02ca7bd1>:0 

Only happens in main menu, but it also happens in gameworld if it already threw this error.

Multiplayer menu can become unopenable

Describe the bug
When the multiplayer menu is open and you go to a different screen and then return to the main one the multiplayer window will close and you can't open it back up.

To Reproduce
Steps to reproduce the behaviour:

  1. Open the "Multiplayer menu" (button on the main screen)
  2. Click on "New Game"
  3. Click on "Cancel"
  4. Try to open the "Multiplayer menu" (button on the main screen)
  5. See that it doesn't work and makes an error sound

Expected behaviour
The multiplayer menu should open back up when you click on the button.

Desktop (please complete the following information):

  • OS: Windows 10 ()
  • Software Inc Version: Alpha 11.6.11
  • Mod Version: 0.2.1

Disabling the mod doesn't remove all commands.

Describe the bug
When you disable or reload the mod, 2 commands (MULTIPLAYER_USERS and MULTIPLAYER_GAMEWORLD) are not removed.

To Reproduce
Steps to reproduce the behavior:

  1. Enable mod
  2. Disable mod
  3. Open console and type MULTIPLAYER_USERS or MULTIPLAYER_GAMEWORLD
  4. See error

Expected behaviour
The commands should be removed.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: 11.6.11
  • Mod Version: v0.2.4-unstable

Additional context
:)

multiple multiplayer buttons

Describe the bug
When i disable the mod and enable it again right after each other i get an error message (screenshot) and another multiplayer button. if i do it more times i keep getting more multiplayer buttons.

To Reproduce
Steps to reproduce the behavior:

  1. Go to options, mods and enable the multiplayer mod
  2. spam click the box to enable and disable the mod
  3. you get an error message and a second multiplayer button

Expected behaviour
shouldnt give any error and not give a second button

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version 11.16.11
  • Mod Version 0.2.2 unstable

Server Management Window

Show a window when the Multiplayer MainMenu button is clicked:

  • Manage local server.
  • Server Info
  • Manage user settings.
  • Serverlist (scheduled open beta)

Server password hardening

The password is saved and transmitted in clear text.
This is a potential security issue and needs to be changed.
Additional brute-force countermeassures are needed too.

Company of joined player won't be added to the Servers "GameWorld"

Describe the bug
Company of joined player won't be added to the Servers "GameWorld"

To Reproduce

  1. Connect to a Server

Expected behaviour
Should add the company to the list of companies in the Servers GameWorld

Desktop (please complete the following information):

  • OS: All
  • Software Inc Version All
  • Mod Version 0.2.7-unstable

Additional context
I'll try to fix the GameWorld so the Company will be added as it should

Server throws an exception if loading the GameWorld

Describe the bug
User derpydino had a problem where the Server will throw a reference not set exception if he loads the GameWorld at Server.Start(). This seems to be because the MarketSimulation.Active is null.

To Reproduce

  1. Start new game
  2. Open Console
  3. Enter MULTIPLAYER_START 55234

Expected behaviour
MarketSimulation being loaded before it gets called

Screenshots
sdffffff

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Alpha 11.6.11
  • Mod Version: 0.2.4-unstable

Additional context

Comment from daRedLoCo:
I couldn't reproduce this one.

Empty messages are sendable & a console error.

If you don't type anything and send a message, it sends!
To Reproduce*

  1. Open mainScene, and start a server
  2. Have someone join the server
  3. DON'T TYPE ANYTHING INTO CHAT BOX and click send
  4. The other person on server will see the empty message

Expected behaviour
The message shouldn't send and a warning pops up and says, " Type before you send!"

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Alpha 11.6.11
  • Mod Version: 0.3.1-closed

Additional context
another error pops up in console too. Dont know how it was triggered, but it was. Image:
image

Error disabling mod

Describe the bug
When deactivating the mod, it gives an error to the output_log.txt (no error on console)

To Reproduce
Steps to reproduce the behavior:

  1. Enable mod
  2. Disable mod
  3. Get pop-up saying Failed activating mod. Check log for details
  4. Check log (In SINC install dir)
  5. See error

Expected behaviour
No error

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Alpha 11.6.11
  • Mod Version: v0.2.6-unstable

Additional context
Error:

Error activating/deactivating dll mod Multiplayer.Core:
System.NullReferenceException: Object reference not set to an instance of an object
  at Multiplayer.Core.GameBehaviour.OnDeactivate () [0x00007] in <27ce75c8901545708e16e458fe47b595>:0 
  at ModController+DLLMod.Activate (System.Boolean active) [0x00058] in <9ea9c027dc0040299fd0b91d02ca7bd1>:0 
  at OptionsWindow+<AddModOption>c__AnonStorey9.<>m__0 (System.Boolean x) [0x00000] in <9ea9c027dc0040299fd0b91d02ca7bd1>:0 

Version dropdown broken

Describe the bug
If you select latest (the only option) and press install it won't work.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Version dropdown'
  2. Click on 'latest'
  3. Press install
  4. See error

Expected behaviour
The thing should install using the latest version of Software Inc.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Software Inc Version: Latest

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.