Log in

View Full Version : suggestion on item handeling



shorun
08-03-2011, 06:50 PM
i dont know if you allready have this in mind, but this is what testing tells me and damian.
We see each other's outfits, if we go in/out a place it re-syncs outfits pritty well.
Switching weapons doesnt sync very well, going in-out a place fixes this (read above why)
dropping an item on the ground doesnt do anything for the other side, neither is manipulating items. we both pick up the same stuff. it's dupe. we have our own items.

so here's my suggestion:
make npc's and items server based, meaning that the player recieves the items of the world from the server, wich could or could not be re-spawnable, and set the client to ignore it's own items. this way, dropping something on the ground tells the server there's an item there, wich then gets send to the other players. and you have the basics of trade.

Apply this to npc's, and you have pritty much synced npc's. all npc's would have to be re-made tough, so someone will have to do that (applying for the job if you teach me how.) and would need a specific function (trader/villager/soldier) with each their own tasks. you could create new city's this way, made for multiplayer.

foxtacles
08-03-2011, 08:11 PM
Thanks for the feedback and thoughts :D Dropping items is in fact not synced yet, but it's going to be added of course. Currently dropping an item is noticed by the server as "item is gone". The effect should be synced, for example if you drop your armor your mate will see you without that equipment shortly afterwards. The server just can't distinguish between using (like drinking a Nuka Cola, so the item gets removed) and dropping an item yet ;)

The dedicated server will gain control over the gameplay and contents soon. The idea is that the server forces the player to run a specific savegame (prepared by the server owner). This makes sure everybody has the same in-game setup from the beginning. Changes made to the environment (like picking up an item) will be sent to the server (and synced to everyone else). Vaultmp will keep track of all the changes made to the game and create kind of a .diff file which will be stored on the server alongside the savegame. When a new player joins, he will automatically download the diff file and all changes will automatically get applied to his local game.

Items as well as NPCs have static references in the prepared gameworld. This means it'll be easy to sync this stuff, as everybody will have the same references (provided the case the server forces the players to run the same base savegame, which will be an optional feature, but highly recommended).

Handling of dynamic elements will be more difficult. Some features of the game will get disabled (at first, may be re-implemented later); I'm referring to quests and random encounters (which are better scripted via the server then anyway). Dropped items count as dynamic too, but those will have full support by the mod.

Default behaviour of game events will remain, but you can configure those by your needs via the server. Imagine functions like SetActorEnabled, SetActorDisabled, ToggleActorDialog and lots more. You can create your own NPCs, optionally remove the default ones, save this as the base savegame for the server if you made lots of changes, and so on. In addition, you can distribute Fallout mods in any form to the player.

Might take some more time until we get to the point when everythings working like that. But it is possible and it will be done ;)

If you have any more suggestions / questions, just post. It will help make the mod a better product in the end, for sure :D