gg_convert = gg4: winners [TODO]

Ask questions and share info about GunGame 5

gg_convert = gg4: winners [TODO]

Postby Lob » Sat Nov 08, 2008 3:14 pm

Hi Guys,

Just a quick question regarding gg_convert.

I notice that gg3 winners can be converted but gg4 winners is not completed as of yet.

How long do you anticipate it will be until this part of the convert is completed.

I only ask as i have been looking forward to Gungame 5 but it would cause mayhem if my devoted players all lost their ranks.

I suspect this would be the case with a lot of other Servers too.

Thanks

- Lob
Lob

Private
Private
User avatar
 
Posts: 9
Joined: Thu Sep 25, 2008 2:10 pm
Steam Friends Name: Lob

Postby XE_ManUp » Sat Nov 08, 2008 10:05 pm

I would imagine since GunGame4 uses SQLite to store the winners that this shouldn't be too hard to do. Saul is the one that has coded gg_convert, so I will have to see what he says.
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Postby Saul » Sat Nov 08, 2008 11:26 pm

I have no experience(AT ALL) in SQL. If someone could do the code to do a loop through the SQL data in the file, I will happily code the rest.
Saul

GunGame5 Developer
GunGame5 Developer
 
Posts: 147
Joined: Sun Sep 07, 2008 3:29 pm
Xfire Name: saul0

Re:

Postby XE_ManUp » Sun Nov 09, 2008 12:05 am

Saul wrote:I have no experience(AT ALL) in SQL. If someone could do the code to do a loop through the SQL data in the file, I will happily code the rest.

I need a GG4 winners database. Could someone provide me one so I could test it out? ;)

*cough* *hint* *cough*
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Postby Don » Sun Nov 09, 2008 12:20 am

Here you go:
Attachments
es_gg_database.zip
(977 Bytes) Downloaded 435 times
Don

Site Admin
Site Admin
User avatar
 
Posts: 529
Joined: Fri Sep 05, 2008 3:05 am
Location: The Valley
Steam Friends Name: Don
Xfire Name: donlafferty

Re: gg_convert = gg4: winners [TODO]

Postby Lob » Sun Nov 09, 2008 12:41 am

Thanks very much Guys.

Your efforts are greatly appreciated. ;)

- Lob
Lob

Private
Private
User avatar
 
Posts: 9
Joined: Thu Sep 25, 2008 2:10 pm
Steam Friends Name: Lob

Postby Fragenstein » Thu Nov 13, 2008 8:27 am

I was just gonna submit a post regarding updating the GG4 winner database to GG5. Any update on this?
Fragenstein

Private
Private
User avatar
 
Posts: 21
Joined: Thu Nov 13, 2008 8:13 am
Location: Blackwood NJ

Re:

Postby XE_ManUp » Thu Nov 13, 2008 9:19 am

Fragenstein wrote:I was just gonna submit a post regarding updating the GG4 winner database to GG5. Any update on this?

I have been gone for the past 6 days due to work. I haven't had a chance to mess with it yet. As soon as I get a chance, I will get this done.
XE_ManUp

Site Admin
Site Admin
 
Posts: 662
Joined: Sat Sep 06, 2008 3:36 am

Postby PitBull » Wed Nov 19, 2008 7:39 pm

I'm currently writing on a GG4 converter. I think it's finished, I will try it tomorrow. If it's working, I will upload the code. Sc0pE already offered me to include the code into the gg_converter for GG3. Would be great ;)
PitBull

GunGame5 Developer
GunGame5 Developer
User avatar
 
Posts: 66
Joined: Mon Nov 10, 2008 7:05 pm
Steam Friends Name: wergup_pitbull

Postby Saul » Wed Nov 19, 2008 9:47 pm

Awesome! You mind posting the code here first so we can have a look?
Saul

GunGame5 Developer
GunGame5 Developer
 
Posts: 147
Joined: Sun Sep 07, 2008 3:29 pm
Xfire Name: saul0

Re:

Postby Fragenstein » Thu Nov 20, 2008 12:22 am

PitBull wrote:I'm currently writing on a GG4 converter. I think it's finished, I will try it tomorrow. If it's working, I will upload the code. Sc0pE already offered me to include the code into the gg_converter for GG3. Would be great ;)


Sweet! :P
Fragenstein

Private
Private
User avatar
 
Posts: 21
Joined: Thu Nov 13, 2008 8:13 am
Location: Blackwood NJ

Re:

Postby PitBull » Thu Nov 20, 2008 4:47 pm

Saul wrote:Awesome! You mind posting the code here first so we can have a look?

The important part of code is this one:
def convert():
    es.sql('open', 'gg_database', '|gungame4/db')
    es.sql('query', 'gg_database', 'gg4c_db', 'SELECT * FROM gg_players')
    es.sql('close', 'gg_database')
   
    for steamid in gg4c_db['steamid']:
        dict_winners[steamid]['name'] = gg4c_db['name']
        dict_winners[steamid]['wins'] = gg4c_db['wins']

I don't know if I have a error in reasoning, but I think it should work. I'm currently setting up a test server. Could take about 1-2 hours.

Best Regards, PitBull

//EDIT: I tried it as above, but it doesn't work. I'm currently trying some other methods. I will answer again when I made it ;)
//EDIT2: I opened a new topic for that. Go here!
Saul: If I see a server where I have to download music, I quit instantly, set cl_download_filer all then find another server.
crazypip666: Wait, so you don't actually play GunGame?
Don: Owned!
PitBull

GunGame5 Developer
GunGame5 Developer
User avatar
 
Posts: 66
Joined: Mon Nov 10, 2008 7:05 pm
Steam Friends Name: wergup_pitbull

Postby Warren » Fri Nov 21, 2008 6:21 pm

We have added a GunGame4 converter based off of that code you started PitBull. Thanks for the help!

http://code.google.com/p/gungame-python ... tail?r=553
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

Postby PitBull » Fri Nov 21, 2008 6:28 pm

I'm glad that it is now working. I'm also very impressed how you realised it. Nice ;)

~PitBull
PitBull

GunGame5 Developer
GunGame5 Developer
User avatar
 
Posts: 66
Joined: Mon Nov 10, 2008 7:05 pm
Steam Friends Name: wergup_pitbull

Postby Saul » Sat Nov 22, 2008 11:26 am

Nice one Sc0pE. The only thing I disagree with is the: try: except: clause. I'm sure we can come up with a better alternative that just catching all errors.
Saul

GunGame5 Developer
GunGame5 Developer
 
Posts: 147
Joined: Sun Sep 07, 2008 3:29 pm
Xfire Name: saul0

Postby Lob » Sat Nov 22, 2008 5:30 pm

Good Work Guys

Thanks

- Lob
Lob

Private
Private
User avatar
 
Posts: 9
Joined: Thu Sep 25, 2008 2:10 pm
Steam Friends Name: Lob

Re:

Postby Warren » Sat Nov 22, 2008 5:54 pm

Saul wrote:Nice one Sc0pE. The only thing I disagree with is the: try: except: clause. I'm sure we can come up with a better alternative that just catching all errors.

I agree. Some players in the GG4 Database aren't real players, for example they didn't even have a steamid set up, so it just spammed errors for those other parts of the DB that weren't players.
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

Postby Warren » Sat Nov 22, 2008 6:10 pm

It turns out that the:
if not wins:
    continue

section gets rid of these not-real-people and doesn't spam any errors.

I am committing r555.
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000



Return to General Discussion

Who is online

Users browsing this forum: No registered users and 17 guests