[1.0] Zetrith's Multiplayer

Started by Zetrith, December 16, 2018, 11:11:50 AM

Previous topic - Next topic

florisjan

#15
It gives a MpInvalidUsernameAlreadyPlaying when I try to connect on the same machine.  It would be cool if it could be used to connect to a second rimworld instance, so you can keep eyes on two locations at the same time. Trying to connect directly gives a connection failed.

micshadow

Hi Zetrith, awesome mod, really enjoying it so far.

I am a little bit familiar with RimWorlds modding structure and very familiar with C# and networking code, would love to contribute if any issues or roadblocks come up.

Let us know if there is issues or coding tasks that will advance the mod on the github

Zetrith

Quote from: micshadow on December 18, 2018, 08:04:26 AM
Hi Zetrith, awesome mod, really enjoying it so far.

I am a little bit familiar with RimWorlds modding structure and very familiar with C# and networking code, would love to contribute if any issues or roadblocks come up.

Let us know if there is issues or coding tasks that will advance the mod on the github
Could you reach me on Discord?

Quote from: florisjan on December 18, 2018, 06:54:58 AM
It gives a MpInvalidUsernameAlreadyPlaying when I try to connect on the same machine.  It would be cool if it could be used to connect to a second rimworld instance, so you can keep eyes on two locations at the same time. Trying to connect directly gives a connection failed.
You can connect on the same machine just fine, you just need a different username. It can be changed in mod options and by using -username=x argument.

Arek_PL

works well, sadly mods do not work for now, i hope they will do later ;)

Kamerow

Holy sh!t, this will be so awesome if it works well!!

Rust Cohle

Yeah, holy shit is the word ;)

Does someone know how it's working tough ?

Thanks for any help !

DerpentineSoFine

This mod runs so nice. Other mods seem to make it get screwey sometimes, playing vanilla though, it was hours of pure fun playing with another guy, merciless randy is more fun when someone else is there to suffer with me.
Now I just need more friends to play with! My new buddy just went to sleep :(

Nightinggale

#22
What are the plans for mod support? All it says is "not yet", which is reasonable considering there isn't full vanilla support yet, but it doesn't hurt to plan ahead.

I want to propose making mods use network code exclusively. This means adding some API, which allows mods to call a certain function with certain arguments in sync. This should give the modding freedom needed to allow mods to run completely custom code in network games.

The next problem is what to do if the network mod isn't loaded. Add a DLL, which adds the API and in singleplayer, just call the requested function without calling any network code. Release such a DLL as a standalone like Harmony or ModCheck and any mod using it can add it.

EDIT: I think the best way to implement such a singleplayer DLL is to make it really simple. Just make it assume singleplayer and unconditionally make calls back to the game. No checks for multiplayer and no network code at all. The multiplayer DLL can then use harmony to make a prefix for the singleplayer call, overwriting the calls and make them transmit on the network.

The problem with adding a DLL like that is what if you update it and mods contains an outdated version? It's a potential problem and the best I could come up with is a function in ModCheck, which throws an error on outdated AssemblyFileVersion. Basically it assumes the DLL in question to have the same version in AssemblyFileVersion and AssemblyVersion. It loops through all loaded mods, locates all the DLL files of the name in question and reads the version number. It will then inform you something is wrong unless they are all up to date. It will just be a warning if the newest is read first because then calls will be made to the first. If an outdated is first, then it's an error. Feel free to copy the file in question to add this check. Just be sure to remember to credit me for this function  ;)

Speaking of ModCheck, it should work just fine in network games. While it does have a DLL file, it does all the work prior to reaching the main menu. Also it does the same each time if the mod list is the same, meaning even if it is required to run in sync, it will apply to the design of keeping network sync by making the same calculations on all computers in parallel without network communication. If you can find any way to make ModCheck to cause desyncs while loading identical xml files on all computers, then I would like to know about it.
ModCheck - boost your patch loading times and include patchmods in your main mod.

ambivalence


riverrin2002

Hey found a new bug we cant clean its gray and not clickable ty

riverrin2002

We cant operate animals ty

Zetrith

Quote from: riverrin2002 on December 19, 2018, 12:35:37 PM
Hey found a new bug we cant clean its gray and not clickable ty
Quote from: riverrin2002 on December 19, 2018, 01:18:53 PM
We cant operate animals ty
Both issues are now fixed in the latest version.

awildlurker

i cannot change animals/pawns areas to unrestricted after changing them to home/area #

jackfrancis

HOW DO I JOIN A GAME

cause when i do direct it just says "conection failed"

ambivalence

Who played already, please, tell:

1. How many players can play simultaneously?
2. Do you bulid the same colony together controlling different pawns?
3. Is multiplayer planned officially, anybody knows?