Page 1 of 1
Item remembering
Posted: Sat Jul 21, 2012 1:27 pm
by FLYBAT
I don't know if I chose the right place to request this...
Doom does not remember your stats and inventory, yes?
But you could make it so the port will have a flag that remembers player's IP, name and the whole inventory just like Minecraft or any MMO does.
Like, when the player quits the game, the "Quit Game" button does not close the game first. Instead, it sends the whole player information to the server. Server remembers it by creating a file which contains item and stat data, maybe like this:
Code: Select all
192.168.0.1
{
Player256
{
Health, 95
Pistol, 1
Clip, 34
BlueArmor, 197
}
MegaDude
{
Health, 100
Pistol, 1
Clip, 50
Chainsaw, 1
}
Doomer
{
Health, 57
Pistol, 1
Clip, 0
Chainsaw, 1
PlasmaRifle, 1
Cell, 20
}
}
And then player quits the game.
When a player joins the server, if the "Remember player stats" flag is set, then the server checks for this player's IP and name in the list, and if finds them, gives all the listed stuff to a player.
Then the player quits another time and the server writes new data instead of the old.
This function is, um... I think it is not hard to make, yes?
But we just dream about it. If it will be implemented in future versions...
It will be... I don't even know how to describe the size of mega-epic-happiness the developers will give to us, doomers.
I think this can be added to the port by using an external file.
This method will even make an admin a local king. Because he'll edit the file and give himself admin items which are present in game but not accessible from any level.
This feature is really wanted because it will be the point of creating RPG wads.
Anyway, it will be very nice.
RE: Item remembering
Posted: Sat Jul 21, 2012 3:16 pm
by Llewellyn
Technically you can do this right now, albeit in a very hacky manner using GetCvar and ConsoleCommand.
(Not the Name and IP part, but both of those are already dynamic...)
RE: Item remembering
Posted: Sat Jul 21, 2012 4:04 pm
by Neewbie
Request this at the tracker..
RE: Item remembering
Posted: Sat Jul 21, 2012 5:15 pm
by Zeberpal
You might want to use
this method instead. And yeah you may try to request it
here, though i doubt it will be usefull.
RE: Item remembering
Posted: Sat Jul 21, 2012 8:20 pm
by FLYBAT
Neewbie wrote:
Request this at the tracker..
How do I do that?
RE: Item remembering
Posted: Sun Jul 22, 2012 12:23 am
by Guest
Tracker is the "developer's forum".
That's where you report bugs and suggests features for the port, you need to register.
http://zandronum.com/tracker/my_view_page.php
RE: Item remembering
Posted: Sun Jul 22, 2012 1:11 am
by Ænima
Storing stats by IP wouldn't work. People like me have dynamic IP's.
Also, I doubt the developers would implement this anyways. Modders can implement it in theirs mods themselves. This is what I am currently working on for my Mercenaries mod.
RE: Item remembering
Posted: Sun Jul 22, 2012 2:58 am
by Guest
Something to connect or create a database system would be needed. Also, an account system, possibly internal in the server.
RE: Item remembering
Posted: Sun Jul 22, 2012 3:43 am
by Llewellyn
Alien wrote:
Something to connect or create a database system would be needed. Also, an account system, possibly internal in the server.
The problem is being able to reliably detect who is who.
You
can't use:
IP addreses: Dynamic IPs.
Names: Nicknames, Clantags, Parsing Strings, etc.
(Strings... HAHAHA, if you can call those strings...)
You MIGHT be able to get away with storing some sort of unique identifier in the INI, but if someone wipes their INI (or purposely changes this hash/username/password) then this method is no better than using ACS.
So until you come up with a solution that is reliable, this feature is going to be a no-no.
Other things to think about
How will a modder access this file?
How will Zandronum interpret a file that is incorrectly formatted when it needs to save NEW data?
What type of Syntax will be used?
What can be done to promote future compatibility with new features?
What features will it have?
RE: Item remembering
Posted: Sun Jul 22, 2012 3:47 am
by Ijon Tichy
the best system I can think on is the server and client agreeing on a hash - 32 characters long at the very least, and can be completely random
the client would store the hash in its INI, and the server would record the client's inventory in a database of crap (or its INI, who knows), and when the client reconnects, it sends the hash to the server, giving it the inventory it had on last disconnect
if you wipe your ini, you really shouldn't expect to keep your stuff :V
RE: Item remembering
Posted: Sun Jul 22, 2012 3:49 am
by Llewellyn
Ijon Tichy wrote:
the best system I can think on is the server and client agreeing on a hash - 32 characters long at the very least, and can be completely random
the client would store the hash in its INI, and the server would record the client's inventory in a database of crap (or its INI, who knows), and when the client reconnects, it sends the hash to the server, giving it the inventory it had on last disconnect
I already did one of these systems in ACS, works great.
(Granted it wasn't a hash, just a REALLY LONG number.)
PS Ijon, sorry for ninjaediting, I do that every time I post (I literally do.)
RE: Item remembering
Posted: Sun Jul 22, 2012 6:17 am
by Guest
Llewellyn wrote:
The problem is being able to reliably detect who is who.
Internal account system.
You would register in-game, in server. So each server would have it's own "world", it's own account, completely independent.
The shared way would turn the master server really messy...
RE: Item remembering
Posted: Sun Jul 22, 2012 7:02 am
by Llewellyn
Alien wrote:
You would register in-game, in server. So each server would have it's own "world", it's own account, completely independent.
This sounds really nasty for a boatload of reasons.
Servers storing passwords, dumb users putting their passwords they use for other stuff into the servers, having to have different passwords for each server to prevent the owners of one server from logging in as you in another server... lots of stuff.
Also I would HATE to have to log-in to every server that wanted to use this system. That would just be REALLY annoying.
Also, again, this can be done in ACS, so what you're proposing isn't really something that would be worth the effort to add into Zandronum with such little gain.
Alien wrote:
The shared way would turn the master server really messy...
It wouldn't involve the master server at all...?
The Server (as in the game server, not the master) stores a hash. The client stores another hash. They are compared on connecting. Each server shares stats individually, so they aren't really shared, just the hash.
Also that method doesn't require it to even be shared, the client could generate another hash for each server if you wanted it to.
RE: Item remembering
Posted: Sun Jul 22, 2012 8:13 am
by Ijon Tichy
Alien wrote:
Llewellyn wrote:
The problem is being able to reliably detect who is who.
Internal account system.
You would register in-game, in server. So each server would have it's own "world", it's own account, completely independent.
The shared way would turn the master server really messy...
a login system has been talked about for over a year now
edit: actually that's the wrong one - it's come up a lot
edit2: well I can't find it, whoopie - either way, this has come up multiple times within the past year, and nothing has come of it
don't expect anything to come of it now
RE: Item remembering
Posted: Sun Jul 22, 2012 6:15 pm
by FLYBAT
If it is actually hard to make this system or it won't happen in next few years...
Then I think someone should make a tutorial on how to do so your stuff will be accessible even after you leaved and then joined the server again.
RE: Item remembering
Posted: Mon Jul 23, 2012 7:51 am
by Llewellyn
FLYBAT wrote:
If it is actually hard to make this system or it won't happen in next few years...
Then I think someone should make a tutorial on how to do so your stuff will be accessible even after you leaved and then joined the server again.
I was going to write a tutorial but the whole involved code is a bit long...
The basics are that you:
Have the Server and Client store a matching CVAR using ConsoleCommand.
Have the server save this CVAR on UNLOADING, and DISCONNECT (and whenever else you want.)
You can, at any time, get the CVAR by using SetActivator(tid) to set the activator of the script to the client whose CVAR you want to access, by using GetCVar. (Remember to set the Activator to the server again if you're going to save it on the server's side.)
Don't wipe your INI on the server otherwise the data will be wiped for the server!
RE: Item remembering
Posted: Mon Jul 23, 2012 2:32 pm
by Synert
Llewellyn wrote:
You can't use:
Names: Nicknames, Clantags, Parsing Strings, etc. (Strings... HAHAHA, if you can call those strings...)
You can check player names with strcheck, but then you have the problem of players changing names or using someone else's name.
RE: Item remembering
Posted: Mon Jul 23, 2012 2:49 pm
by FLYBAT
Llewellyn wrote:
The basics are that you:
...
I understood nothing, I'm bad at ACS.
If I knew how to use vars, booleans etc. I wouldn't probably want this flag to be implemented >_<