Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
But i can see another problem here, haven't tested it out yet.
Player 1 sorts Ingot into his Cargo 1 while Player 2 sorts Ingot aswell into his Cargo 2.
Wouldnt the Ingots be moved back and forth all the time then due to the fact that everyone sorts his own Containers? Or does he not take from other owners even tho it's shared (share with faction/everyone)?
The only person sorting for any block is their owner. The reason for this is because you can't share states or information between clients easily. Nor does the server run scripts in dedicated. So the only way for this to work across all platforms (single, multi and dedicated) the clients need to run it, and only the owner can sort their own blocks.
Any yes, cargo is not pulled from containers not owned by that player. This is definitely not a faction friendly mod. Unfortunately that will be this way until they fix a few issues with the API.
As the API gets fixed and added to, this limitation will disappear.
Your blocks will only sort when you are inside ANY GAME with containers OWNED BY YOU and demanding containers ALSO OWNED BY YOU.
I don't know if the SEServerExtender has enough access to be able to do this or not, as I haven't really looked into modding SE yet.
https://github.com/DraygoKorvan/SE-utils/blob/master/SE-Utils/Core.cs - Noting here that he is able to bring in mod API components:
SEModAPIInternal.API.Common (among others)
Then having a look at the mod API, the SEModAPIInternal includes:
SEModAPIInternal.API.Entity.InventoryEntity type, which has (among others):
InventoryEntity.RefreshInventory(),
DeleteEntry(InventoryItemEntity source)
NewEntry(InventoryItemEntity source)
UpdateAmount(InventoryItemEntity item, Decimal / float newAmount)
And the SEModAPIInternal . API . Eneity . InventoryItemEntity contains some stuff as well.
I'm still looking through it, I'm not sure if you can also utilize the base game's mod API, they reference stuff from Sandbox as well, but I don't know if you by extension can. I have to do some stuff now though, so can't continue looking for a while.
That being said I could probably convert this mod for dedicated, but my goal is to keep this mod purely for in game API, as it was sort of a test mod to bring my other mods to single player.
That being said, I can see this mod doing really well for a dedicated server script. As it stands now, even with the bugs fixed, the script won't run while my game isn't - which is the main reason why I have the server running as a dedicated in the first place, instead of just single player / self-hosted multiplayer.
So essentially what will happen is I log off, and the assemblers and refineries will eat through what they have and stop, and not be running for the rest of the time.
I can appreciate you wanting to make your other mods singleplayer, and keep the in game API, but I can really see this benefiting as a dedicated server script as well, if I might humbly ask you to reconsider (It would be nice to have both, really, but I can't blame you for not wanting to take on the upkeep on that, if that's a factor)
Then how does it performs sorting of faction shared inventories without ending up with collisions/desyncs/race conditions?
Was the API improved enough to support some sort of a interclient synchronization?
I'm a little concerned about this.
Script is running very good on our dedicated server in current version.