1. Welcome to Smogon Forums! Please take a minute to read the rules.
  2. New to the forums? Check out our Mentorship Program!
    Our mentors will answer your questions and help you become a part of the community!

Guide to building the Shoddy Battle 1 server from source

Discussion in 'Shoddy Battle and Pokémon Lab' started by bearzly, Jun 14, 2009.

  1. bearzly

    bearzly Shoddy Battle dev
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus

    Joined:
    Apr 25, 2009
    Messages:
    230
    A guide to building the Shoddy Battle server from source is now available here:

    Guide to building a Shoddy Battle server

    If you are looking to run a server with maximum flexibility and the latest updates, building from source is your best option. The guide also touches on port forwarding for people who are having trouble having others join their server.

    If anything is still unclear or you have further questions about building from the sources, you can ask in this thread.
  2. Sir Aaron Mist

    Sir Aaron Mist

    Joined:
    Jun 12, 2009
    Messages:
    15
    I have jdk1.6.0_14

    Is that just this file?:

    [​IMG]

    Or is it another file?
  3. Cathy

    Cathy

    Joined:
    Jul 11, 2007
    Messages:
    1,062
    The 'x' means it could be any number; it's called a variable. So yes you are staring at the right file.
  4. Sir Aaron Mist

    Sir Aaron Mist

    Joined:
    Jun 12, 2009
    Messages:
    15
    Alright, but here's what happens when I use that file:

    [​IMG]
    (In order to keep my user and pass a secret, I used Smogon as user and Error as password. I will not that this is what happened exactly when I used the acc/pass I actually wanted to use.)
  5. Cathy

    Cathy

    Joined:
    Jul 11, 2007
    Messages:
    1,062
    You need to change into the directory where you have your Shoddy Battle checkout, as the guide says. Please read the guide before asking questions.
  6. Sir Aaron Mist

    Sir Aaron Mist

    Joined:
    Jun 12, 2009
    Messages:
    15
    (Why does it say "Fat" ColinJF? I can't delete it)


    WTF? I swear I changed it to that. And no joke, I've read the guide like 20 times! But I'll check to see if that was the problem.

    I see you guys have no patience for stupidity.

    EDIT: This is what I got after re-routing it:
  7. bearzly

    bearzly Shoddy Battle dev
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus

    Joined:
    Apr 25, 2009
    Messages:
    230
    The path to the java program replaces the word java in the command.

    What you want is
    Code:
    [SIZE=2]"C:\Program Files\Java\jdk1.6.0_14\bin\java.exe" -cp dist/ShoddyBattle.jar shoddybattle.AccountEditor Admin smogon 2[/SIZE]
  8. Erodent

    Erodent

    Joined:
    Aug 22, 2008
    Messages:
    1,886
    Okay, I have a problem. I've managed to forward both TCP and UDP traffic on my port (22222). People can get on my server, but they can only get on when my computer is functional. Why?
  9. bearzly

    bearzly Shoddy Battle dev
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus

    Joined:
    Apr 25, 2009
    Messages:
    230
    You need to have your computer on and awake for people to connect. It's pretty hard for people to connect to your server on your computer if your computer is turned off. The server is running on your computer, not by some magical means
  10. Erodent

    Erodent

    Joined:
    Aug 22, 2008
    Messages:
    1,886
    I see. Is there a way that can allow the server to run by others' computer as well?
  11. bearzly

    bearzly Shoddy Battle dev
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus

    Joined:
    Apr 25, 2009
    Messages:
    230
    You can give them your ShoddyBattle.jar file and they will be able to run your server, but then your metaserver information will change
  12. Sir Aaron Mist

    Sir Aaron Mist

    Joined:
    Jun 12, 2009
    Messages:
    15
    This time, I used that exact code you gave me, and it said "Failed to make new account", or something on those lines.

    Needless to say, I'm going to back to a different way.

    Thanks for trying to help though.
  13. bearzly

    bearzly Shoddy Battle dev
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus

    Joined:
    Apr 25, 2009
    Messages:
    230
    If it failed to create an account then it sounds like there is something wrong with your mysql settings in the server.properties file. What happens when you try and run the server?
  14. Erodent

    Erodent

    Joined:
    Aug 22, 2008
    Messages:
    1,886
    Hi again, how do I set up a UU (and possibly other customizable) ladderS?

    Edit: I sent someone my shoddybattle.jar file but it still didnt work.
  15. Lunar Solstice

    Lunar Solstice

    Joined:
    Jan 4, 2009
    Messages:
    220
    Do you need a computer by itself to run the server? Or can you have the computer for the server and still use it?
  16. bearzly

    bearzly Shoddy Battle dev
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus

    Joined:
    Apr 25, 2009
    Messages:
    230
    Try sending them your whole Shoddy Battle Server folder instead. They will also need a mysql database set up. Adding other ladders requires a bit more knowledge that I might detail another time

    The server is just a program running on your computer, you can continue to use it for whatever you want
  17. SetSetSet

    SetSetSet

    Joined:
    Jun 19, 2009
    Messages:
    2
  18. StatigarJames

    StatigarJames

    Joined:
    Aug 20, 2008
    Messages:
    42
    If you're running the server from your home computer, you need php and mysql installed on it first. I also recommend you downloading and installing phpmyadmin for easy access to your mysql database.

    Once you've logged in to your database, simply quiery the code you see on that installation guide, and the tables will be made for you.
  19. Cathy

    Cathy

    Joined:
    Jul 11, 2007
    Messages:
    1,062
    php is not required to run a Shoddy Battle server or to use mysql.
  20. Cyrrona

    Cyrrona starlet
    is a Tiering Contributor

    Joined:
    Sep 15, 2008
    Messages:
    185
    I seem to be having the same problem as Sir Aaron--I get a nearly identical error message when I try to set up the first account on the server. I've done my best to follow the guide, and up until this point, everything (with one exception) has gone off without a hitch. That exception was during the MySQL installation, and it looked like this:

    [​IMG]

    I'm not sure why it couldn't start the service, since I haven't deviated from the guide at all (to my knowledge, at least). It still let me open the program with the Command Line Client and input the code from the MySQL section, so I don't know if the above screenshot is a problem or not. If it is, I'd love to know how to fix it.

    But anyways, during the first account set-up, I get this message:

    [​IMG]

    Reading through some of the posts in this topic, I tried pasting in bearzly's suggestion, but I got a similar error:

    [​IMG]

    If someone could tell me where this is all derailing (and how I could get it back on track), I would really, really appreciate it. (And I sincerely apologize if I'm asking obvious questions and/or making stupid mistakes with any of this--I'm pretty terrible with computers...)
  21. Cathy

    Cathy

    Joined:
    Jul 11, 2007
    Messages:
    1,062
    I'm guessing you didn't run the MySQL installer as root. Try right click -> run as admin.
  22. bearzly

    bearzly Shoddy Battle dev
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus

    Joined:
    Apr 25, 2009
    Messages:
    230
    El Becko, I think your problem is that you don't have a ShoddyBattle.jar created. Go into Netbeans and F11 to build the project (or hit the blue hammer icon). Also, the account editor is pretty shoddy so it won't work with names with a space in it. You can make a dummy account and then create another account the normal way and make it an admin the normal way

    I also got the service could not be started thing, but it actually worked fine so I didnt mention it.
  23. Gary Oak

    Gary Oak

    Joined:
    Jun 28, 2009
    Messages:
    55
    I have a quick question. For the server welcome page, it looks like it only interprets strings? Is there an easy way to display images/text/html/flash on the welcome besides re-writing alot of the other code?
  24. bearzly

    bearzly Shoddy Battle dev
    is a Battle Server Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus

    Joined:
    Apr 25, 2009
    Messages:
    230
    If you preface the message with <html> then it will be interpreted as HTML
  25. Lunar Solstice

    Lunar Solstice

    Joined:
    Jan 4, 2009
    Messages:
    220
    My friend has a question about the server he is creating. He wants to know how to phpmyadmin to create tables for mysql?
    If there is a link to follow to download anything post it please and thanks.

Users Viewing Thread (Users: 0, Guests: 0)