Item remembering

General discussion of the port and Doom-related chat.
Post Reply
FLYBAT
 
Posts: 21
Joined: Sat Jul 21, 2012 1:20 pm

Item remembering

#1

Post by FLYBAT » Sat Jul 21, 2012 1:27 pm

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.

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: Item remembering

#2

Post by Llewellyn » Sat Jul 21, 2012 3:16 pm

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...)
Last edited by Llewellyn on Sat Jul 21, 2012 3:17 pm, edited 1 time in total.

Neewbie
Forum Regular
Posts: 140
Joined: Sat Jun 23, 2012 11:10 am

RE: Item remembering

#3

Post by Neewbie » Sat Jul 21, 2012 4:04 pm

Request this at the tracker..

User avatar
Zeberpal
Forum Regular
Posts: 476
Joined: Mon Jun 04, 2012 6:55 am

RE: Item remembering

#4

Post by Zeberpal » Sat Jul 21, 2012 5:15 pm

You might want to use this method instead. And yeah you may try to request it here, though i doubt it will be usefull.
Image ImageImage

FLYBAT
 
Posts: 21
Joined: Sat Jul 21, 2012 1:20 pm

RE: Item remembering

#5

Post by FLYBAT » Sat Jul 21, 2012 8:20 pm

Neewbie wrote: Request this at the tracker..
How do I do that?

Guest

RE: Item remembering

#6

Post by Guest » Sun Jul 22, 2012 12:23 am

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

User avatar
Ænima
Addicted to Zandronum
Posts: 3578
Joined: Tue Jun 05, 2012 6:12 pm

RE: Item remembering

#7

Post by Ænima » Sun Jul 22, 2012 1:11 am

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.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Guest

RE: Item remembering

#8

Post by Guest » Sun Jul 22, 2012 2:58 am

Something to connect or create a database system would be needed. Also, an account system, possibly internal in the server.

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: Item remembering

#9

Post by Llewellyn » Sun Jul 22, 2012 3:43 am

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?
Last edited by Llewellyn on Sun Jul 22, 2012 3:47 am, edited 1 time in total.

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Item remembering

#10

Post by Ijon Tichy » Sun Jul 22, 2012 3:47 am

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
Last edited by Ijon Tichy on Sun Jul 22, 2012 3:48 am, edited 1 time in total.

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: Item remembering

#11

Post by Llewellyn » Sun Jul 22, 2012 3:49 am

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.)
Last edited by Llewellyn on Sun Jul 22, 2012 3:50 am, edited 1 time in total.

Guest

RE: Item remembering

#12

Post by Guest » Sun Jul 22, 2012 6:17 am

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...

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: Item remembering

#13

Post by Llewellyn » Sun Jul 22, 2012 7:02 am

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.
Last edited by Llewellyn on Sun Jul 22, 2012 7:06 am, edited 1 time in total.

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Item remembering

#14

Post by Ijon Tichy » Sun Jul 22, 2012 8:13 am

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
Last edited by Ijon Tichy on Sun Jul 22, 2012 8:34 am, edited 1 time in total.

FLYBAT
 
Posts: 21
Joined: Sat Jul 21, 2012 1:20 pm

RE: Item remembering

#15

Post by FLYBAT » Sun Jul 22, 2012 6:15 pm

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.

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: Item remembering

#16

Post by Llewellyn » Mon Jul 23, 2012 7:51 am

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!
Last edited by Llewellyn on Mon Jul 23, 2012 7:52 am, edited 1 time in total.

Synert
Forum Regular
Posts: 228
Joined: Mon Jun 04, 2012 12:54 pm
Contact:

RE: Item remembering

#17

Post by Synert » Mon Jul 23, 2012 2:32 pm

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.

FLYBAT
 
Posts: 21
Joined: Sat Jul 21, 2012 1:20 pm

RE: Item remembering

#18

Post by FLYBAT » Mon Jul 23, 2012 2:49 pm

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 >_<
Last edited by FLYBAT on Mon Jul 23, 2012 2:49 pm, edited 1 time in total.

Post Reply