[BMA] Source for recent server

Issues, news, and discussion specific to any other servers.
Post Reply
Berendol
Evil Iggy
Posts: 868
Joined: Mon 11.11.2002, 19:13
Location: Loot Pile
Contact:

[BMA] Source for recent server

Post by Berendol » Tue 21.12.2004, 13:30

Hey everyone. I have a copy of the DServ source code and a better archive of the client. The code I have is what you were playing on minus the most recent update. I am releasing it to you so that you can play with it.<br><br>I packaged up two zip archives. If you're on UNIX/Linux or Macintosh, you will need to get the "unzip" program. Windows XP knows what to do with them already, but I still recommend either the program listed above or WinRAR.<br><br>1) The client, as set up on my computer. If you have trouble with your client, unpack this into a new directory and try it. If you still have trouble, then let me know. This includes all of the lib/* files for your browsing convenience.<br><br>2) The complete package, including source code. If you want to try running your own server, or if you want to run the X11 edition of my client, it's got everything you need - just "make" and enjoy.<br><br>1) Download the Windows client (619 KB)<br><br>2) Download the source (1.52 MB)<br><br>That's it. Enjoy!
By appreciation, we make excellence in others our own property. (Voltaire)

xbytez
Drooling Harpy
Posts: 9
Joined: Tue 28.12.2004, 10:00

Re: Source for recent server

Post by xbytez » Tue 28.12.2004, 10:20

Hi Berendol,

I grabbed the source and compiled it on one of my boxes, firstly can you give me an explanation or point me to info on what the dynamo-script does as I am only familiar with the 0.7.2 src, I do not remember that element.

Secondly, I had a problem with cave.c on compile it errored I think some where around line 931  the lines starts

int value

and   is related to /* Multi-hued monster */ if memory servers correctly, I just removed that small amount of code you had added,  and replaced it with the original routine out of cave.c from 0.7.2. which then allowed a correct compile.

It's a pretty old box I compiled it on and I will be trying it a compile on a production server later today to see if that helps.

Thanks for pointing out the tilda issue, any idea why it is causing a crash?

Cheers

Xbyte

xbytez
Drooling Harpy
Posts: 9
Joined: Tue 28.12.2004, 10:00

Re: Source for recent server

Post by xbytez » Tue 28.12.2004, 13:26

I've just compiled a standard 0.7.2a and have it running with your BMangband 6.4.3 client and ~ and | work without causing a crash.

Berendol
Evil Iggy
Posts: 868
Joined: Mon 11.11.2002, 19:13
Location: Loot Pile
Contact:

Re: Source for recent server

Post by Berendol » Tue 28.12.2004, 15:06

First of all.. Dynamo is my auditing script. The "dynamo-script" is actually not a script. It's intended to be called by a cron job (or script, hence the name) every so often. It creates some new files in lib/text (which I plan to change to lib/dynamo) that contain all kinds of useful auditing information. It's very different from and inferior to Crimson's auditing system here, but at least you can get it ;) The most useful audits are MVP-Full and the other MVP. Those tell you who the ten most valuable players on the server are, and the full one tells you how much they are worth. The other one is suitable for public viewing and I intend for it to be copied to the server's website via the cron job that runs the audit. The houses.txt file tells you about all the houses. The levels.txt file tells you which levels are staticed and how many times the game figured out that they should be staticed (which can sometimes indicate that more than one player is saved there.) If you run the "src/dyn/dynamo" binary, and make sure you redirect it into a file, it will generate more information. And, if you run the savefile analysis program from src/dyn, making sure to redirect it as well, you will get most of the information about each player on your server. Be careful with that.

The code that's up for 6.4.3 is not guaranteed to work properly, since it is an earlier version of what I actually use. I can't access the actual source right now because my system is horribly crippled for some unknown reason. In about a week I will post the real source because I will have physical access to the machine (it's in my living room and I am on vacation.)

Which version of gcc are you using? It should work fine on any 3.3 or 3.4 series. I'm pretty sure DServ runs one of the 3.3 series. Also, check the Makefile, because there is a flag that tells the compiler to produce i586 code, which you may not want.

Replacing the code with different code might fix the error, but it doesn't fix the problem. You basically got rid of one of the coolest features of BMAngband, the single-hue monster flashing. If that did not compile correctly then it would indicate to me that perhaps the #defines aren't there. I looked at the code and I can't figure out why it caused an error - maybe if you post the message I can figure it out?

(edit) The crashing might be due to a permissions misconfiguration. Make sure all the files are owned by the user who will run the server, and chmod everything related to the server to 744.
By appreciation, we make excellence in others our own property. (Voltaire)

xbytez
Drooling Harpy
Posts: 9
Joined: Tue 28.12.2004, 10:00

Re: Source for recent server

Post by xbytez » Tue 28.12.2004, 16:25

Thanks for the info on Dynamo, I'll have a  play as an admin info tool it's sound impressive ;-)

I'll recompile and post the exact error I get, I just wanted to get a compile working so I hacked in the old code as a test. I would much rather the original worked correctly, and produce a correct build of your work.

gcc -v on morgoth.org.uk box is:

gcc version 2.95.3

I've got 3.3 on one of my desktops so will try that when I get a few mins.

I'd already flipped the compile flags to match my system in both the Dynamo and Server Makefile, so it's not that causing any problems.

I am just really glad that you posted the sources, as some of the features you created are great, and it gave me the motivation to bring a server back up and have a play again which is always fun. your variant makes a welcome game change, I also prefer the 'game balance' of your variant.

Just off to check the permissions but I am pretty sure the group, owner, chmod is correct for the whole directory sturcture......but you never know until you look.

Thanks for the prompt reply ;-)

xbytez
Drooling Harpy
Posts: 9
Joined: Tue 28.12.2004, 10:00

Re: Source for recent server

Post by xbytez » Wed 29.12.2004, 17:35

fixed the ~ | issues.......so that is working fine.

My stupid mistake the tmp folder had the incorrect permissions.

I am going to do a recompile from scratch later and I will post the exact error I get on cave.c once that is fixed I'll be good to go on setting up a working server ;-)

xbytez
Drooling Harpy
Posts: 9
Joined: Tue 28.12.2004, 10:00

Re: Source for recent server

Post by xbytez » Wed 29.12.2004, 18:11

Exact error:

server/cave.c: In function `map_info':
server/cave.c:929: parse error before `int'
server/cave.c:931: `value' undeclared (first use in this function)
server/cave.c:931: (Each undeclared identifier is reported only once
server/cave.c:931: for each function it appears in.)
make: *** [server/cave.o] Error 1

xbytez
Drooling Harpy
Posts: 9
Joined: Tue 28.12.2004, 10:00

Re: Source for recent server

Post by xbytez » Wed 29.12.2004, 18:28

I am not sure if this is correct, but I got it to compile, I added the following to map_info:

void map_info(int Ind, int y, int x, byte *ap, char *cp)
{

 int value;

 player_type *p_ptr = Players[Ind];
 int Depth = p_ptr->dun_depth;
 int kludge; /* for displaying chars with lowered hp's */

and then commented out your int value;  on line 932

Being a code hacker, rather than a programmer I am not sure if this is correct but it compiled without issue, however I'll leave it to an expert to comment on ;-)

Berendol
Evil Iggy
Posts: 868
Joined: Mon 11.11.2002, 19:13
Location: Loot Pile
Contact:

Re: Source for recent server

Post by Berendol » Wed 29.12.2004, 19:30

The following code should appear in full inside the [k]"else if (r_ptr->flags1 & RF1_ATTR_MULTI)"[/k] block, after line 927, to make the single-multi-hued flashing work properly (as long as the flags exist):

Code: Select all

              /* Normal char */
              (*cp) = c;

              /* Multi-hued attr */
                    /* VJI - Special attributes for shimmering monsters! */
                    int value; /* VJI 0 = Dark, 1 = Light, 2 = White */
                    
                    value=rand_int(2); /* Get a random integer value from the set {0,1} */
                    
//                    if(randint(20)==0) /* One time in 20... */
//                          value = 2; /* make it flash white */
                        
//                    if(value==2) (*ap)=TERM_WHITE; /* Eliminates redundant code below */
                    (*ap)=TERM_L_DARK; /* Default value = L.Dark */

                    if(r_ptr->flags2 & RF2_ATTR_MULTI_RED) { /* Red and Pink */
                          if(value == 0)      (*ap) = TERM_RED;
                          else if(value == 1) (*ap) = TERM_L_RED;
                    } else if(r_ptr->flags2 & RF2_ATTR_MULTI_YELLOW) { /* Orange and Yellow */
                          if(value == 0)      (*ap) = TERM_ORANGE;
                          else if(value == 1) (*ap) = TERM_YELLOW;
                    } else if(r_ptr->flags2 & RF2_ATTR_MULTI_GREEN) { /* Greens */
                          if(value == 0)      (*ap) = TERM_GREEN;
                          else if(value == 1) (*ap) = TERM_L_GREEN;
                    } else if(r_ptr->flags2 & RF2_ATTR_MULTI_BLUE) { /* Blues */
                          if(value == 0)      (*ap) = TERM_BLUE;
                          else if(value == 1) (*ap) = TERM_L_BLUE;
                    } else if(r_ptr->flags2 & RF2_ATTR_MULTI_UMBER) { /* Umbers (Browns) */
                          if(value == 0)      (*ap) = TERM_UMBER;
                          else if(value == 1) (*ap) = TERM_L_UMBER;
                    } else if(r_ptr->flags2 & RF2_ATTR_MULTI_PURPLE) { /* Medium Purple and Pink */
                          if(value == 0)      (*ap) = TERM_VIOLET;
                          else if(value == 1) (*ap) = TERM_L_RED;
                    } else if(r_ptr->flags2 & RF2_ATTR_MULTI_LIGHT) { /* Dark gray, gray, light gray, and white */
                          value=rand_int(4); /* random integer from the set {0,1,2,3} */
                          if(value == 0)      (*ap) = TERM_L_DARK;
                          else if(value == 1) (*ap) = TERM_SLATE;
                          else if(value == 2) (*ap) = TERM_L_WHITE;
                          else if(value == 3) (*ap) = TERM_WHITE;
                    } else { /* Normal ATTR_MULTI behavior */
                        (*ap) = randint(15);
                    }
If your download does not have this, then you should wipe your src/ directory and re-download it, then try again.

From your error, it would appear that something before the [k]"int value"[/k] statement was not terminated, which is not the case in my code. Did you alter something else in the file? Adding the variable at the top of the function may have fixed the problem, but the only way to be sure is to log in as the DM and insta-recall to the bottom. (Notice the DM powers in the U menu.)

I've had some trouble with the DServ code on my other machine, so I am going to figure out what's going on when I get back. If the worst scenario happened, and I have to start from the 6.4.3 source and fight fires in my code for a week, then so be it... there are weird problems that need to be fixed.
By appreciation, we make excellence in others our own property. (Voltaire)

Post Reply