Giter VIP home page Giter VIP logo

awakemud's Introduction

AwakeMUD Community Edition

A fork of Che's now-retired Awakened Worlds MUD codebase. Issues and pull requests welcome!

AwakeMUD CE is up and running at awakemud.com port 4000! Connect with your favorite telnet client. The current build/test instance for AwakeMUD Community Edition can be reached at awakemud.com port 4001; many thanks to Finster for running the previous test port for so long.

Join our Discord channel! https://discord.gg/q5VCMkv

Features

  • A full suite of additions including new areas, new features, and massive quality-of-life improvements
  • Screenreader accessibility via TOGGLE SCREENREADER
  • Enhanced security that fixes many serious exploits
  • Significantly increased performance
  • A slew of bugfixes to everything from combat code to sound propagation

OS Support

Actively tested on:

  • Mac OS 13
  • Ubuntu 18 LTS

Previously tested on (it worked there in the past, but is not guaranteed to now):

  • Amazon Linux
  • Cygwin (beta)
  • Mac OS 10.12-10.14, 12
  • Raspbian Jessie
  • Ubuntu 14, 16

Installation (Ubuntu commands in parentheses)

  • Install MySQL 5.7, including its development headers (ensure mysql/mysql.h exists in your path).
  • Install automake, make, gcc, g++, clang, libtool, autoconf, zlib1g-dev, libcurl4-openssl-dev, and libmysqlclient-dev if they're not already present (sudo apt-get install automake make gcc g++ clang libtool autoconf zlib1g-dev libcurl4-openssl-dev libmysqlclient-dev)
  • Install libsodium per their installation instructions. Version 1.0.16 is known to work, but higher versions should work as well.
  • Set your server's timezone to the West Coast to enable RP time to work correctly (sudo timedatectl set-timezone America/Los_Angeles)
  • Clone this repository to your machine. (git clone https://github.com/luciensadi/AwakeMUD.git)
  • Change to the repository's SQL directory (cd AwakeMUD/SQL)
  • Run ./gensql.sh (or do the steps manually if it doesn't support your OS). If you plan on running this with MariaDB, use the --skip-checks command-line flag.
  • Install the houses file (mv ../lib/etc/houses.template ../lib/etc/houses).
  • Change to the repository's SRC directory (cd ../src).
  • Edit Makefile and uncomment the OS that looks closest to yours by removing the # marks in front of it. Comment out the others by ensuring they have a # in front of their lines. The default is Mac OS X; you'll probably want to switch it to Linux. You probably also want to remove the -DGITHUB_INTEGRATION flag from the Makefile at this time.
  • From that same src directory, run make clean && make.
  • Change to the root directory (cd ..) and run the game (raw invocation bin/awake, or use a debugger like gdb bin/awake, or lldb bin/awake on OS X to help troubleshoot issues).
  • Connect to the game with telnet at 127.0.0.1:4000 and enjoy!

Additional Cygwin Installation Notes

  • AwakeCE can run in Windows under Cygwin.
  • To build it, you need Cygwin (64bit) and Cygwin apps/libraries: clang, make, automake, mysql-server, mysql-client, libmariadb-devel, dos2unix, g++, libcrypt, libsodium, gcc, gdb. You'll want the debugs too. If it fails to install one of these, retry, or try another mirror; manual install is possible but not recommended.
  • In src/Makefile, comment out the OSX config, and uncomment the Cygwin config.
  • Make sure to initialize the DB with mysql_install_db if you haven't done so already. Start it with mysqld_safe &, then mysql_secure_installation and accept all the options.
  • You may need to dos2unix gensql.sh to get it to read properly before executing with bash ./gensql.sh -s.
  • Build by doing cd src;make from the root directory.
  • Run by doing ./bin/awake.
  • Note: You may have to manually import the SQL changes as gensql.sh may or may not work, use 127.0.0.1 as dbhost if running local db.
  • With Cygwin, you can also use Eclipse CPP IDE, just create a Cygwin-C++ project and point the directory to where your AwakeMUD is located, play around with build settings to ensure it is using your Makefile in src. Debugging/Running works.

Additional OSX Installation Notes

  • To install the Boost library:
    • brew install boost
  • To install [email protected] and [email protected]:
  • Symlink mysql headers and libmysqlclient to your /usr/local directory (replace <version> with the version installed)
    • ln -s /usr/local/Cellar/[email protected]/<version>/include/mysql/ /usr/local/include/mysql
    • ln -s /usr/local/Cellar/[email protected]/<version>/lib/libmysqlclient.dylib /usr/local/lib/libmysqlclient.dylib

Make / Compile Troubleshooting

If you get an error like newdb.cpp:11:10: fatal error: mysql/mysql.h: No such file or directory while running make, you either haven't installed the MySQL development headers, or you haven't made them visible to your operating system. Since each OS is different, Google is your best bet for resolving this, but your goal / end state is to have the header inclusion path mysql/mysql.h resolve successfully.

/home/ubuntu/AwakeMUD/src/act.informative.cpp:2769: undefined reference to `mysql_num_rows'
/home/ubuntu/AwakeMUD/src/act.informative.cpp:2774: undefined reference to `mysql_fetch_row'
/home/ubuntu/AwakeMUD/src/act.informative.cpp:2779: undefined reference to `mysql_free_result'

If you see a wall of errors like the one above, you need to edit src/Makefile and uncomment the lines belonging to the OS you're running.

If you get an error like AwakeMUD/src/act.wizard.cpp:3841: undefined reference to 'crypt', it means that you've probably not selected the right OS in your src/Makefile. Make sure you comment out the OS X lines near the top by adding a # at their beginnings, and uncomment the Linux lines by removing their #.

If you get errors like /home/ubuntu/AwakeMUD/src/act.other.cpp:954: undefined reference to 'github_issues_url', you need to remove -DGITHUB_INTEGRATION from your selected OS in your Makefile, then make clean && make to scrub the references to the GitHub integration code.

If you get an error like structs.h:8:10: fatal error: sodium.h: No such file or directory, it means you need to install libsodium (./configure; make; (sudo) make install).

Runtime Troubleshooting

If you get an error like MYSQLERROR: Data too long for column 'Password' at row X when running the game, you need to update your database's pfile table to use the longer password-column capacity. Go into your database and execute the command in SQL/migration-libsodium.sql.

If you get an error like error while loading shared libraries: libsodium.so.23: cannot open shared object file: No such file or directory, your path does not include the directory libsodium is in. You can find libsodium.so's directory with sudo find / -name libsodium.so, then optionally symlink it with ln -s /the/directory/it/was/in/libsodium.so.XXX /usr/lib/libsodium.so.XXX, where XXX is the numbers indicated in the original error. This is probably not an ideal fix, so if anyone has a better suggestion, please file an issue!

If you get an error like MYSQLERROR: Table 'awakemud.pfiles_mail' doesn't exist, you need to run the command found in SQL/mail_fixes.sql in your database. This will upgrade your database to be compatible with the new mail system. This command is automatically run for new databases.

If it takes an exceedingly long time between you entering your password and the MUD responding, but the MUD is responsive for all other input, the machine that's hosting the MUD is not powerful enough for the password storage algorithm used by default. You may opt to either endure the delay (more secure, less convenient) or either lessen the work factor or add -DNOCRYPT to your Makefile (not at all secure, convenient, will break all current passwords and require you to either fix them by hand or purge and re-create your database and all characters in it).

If you log on for the first time and you're not a staff member, quit out and change your rank in the database. Rank 10 is the maximum. Your MySQL command will look something like: update pfiles set rank=10 where idnum=1;

awakemud's People

Contributors

adalanneko avatar awakemud avatar bigfanguy avatar carejo avatar danhealy avatar dependabot[bot] avatar inb4jex avatar jalles76 avatar jdevnull avatar luciensadi avatar mend-bolt-for-github[bot] avatar mxosingularity avatar nodens- avatar picoampere avatar rhicora avatar sticks2681 avatar thevilest avatar tuxkamen avatar undeadnappist avatar vitalyo7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awakemud's Issues

Typos

Lucien (Jun 13) [60522] successfull
Lucien (Jun 13) [60526] thes -> this

gensql.sh not compatible with mysql < 5.7.8

ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS 'AwakeMUD'@'localhost'' at line 1

mysql> select @@Version;
5.5.55-0ubuntu0.14.04.1

https://dev.mysql.com/doc/refman/5.7/en/drop-user.html
As of MySQL 5.7.8, the IF EXISTS clause can be used, which causes the statement to produce a warning for each named account that does not exist, rather than an error.

Room descriptions in chargen

Room descriptions should probably cleared of specific references to awakenedworlds. A generic placeholder maybe?

Add documentation to wiki

The documentation in docs/staffdocs needs to be added to the wiki for easy browsing. (Thanks for writing it up for us!)

Playergroup Creation / Disbanding

As the first step of coded playergroups, the ability to create and disband a group should be instated. This will also include the backend data structures to enable playergroups to exist.

Playergroups - Member Management

Member management includes the following commands:

PROMOTE / DEMOTE
GRANT / REVOKE
OUTCAST

GRANT / REVOKE is required for testing the majority of playergroup commands.

Add an 'authorize' command, or revisit messaging for 'set x auth off'.

It's hard to tell what the effect of 'set x auth on/off' is; it controls the authorize flag, but unless you know what the authorize flag does, you may think that setting it to on authorizes the character fully. We should either add an authorize command or better messaging to the set command to clarify this use case.

Implement write command

For RP purposes players should be able to record messages using pen and paper.

Precondition: have an object with a PEN flag and an object with WRITEBAL in inventory.

Restrictions: length

Could use a dumbed down implementation of iedit. Abuse possible?

'set' command irregularities

This issue is a catch-all for any issues with 'set'

set <initdice|initroll> does nothing. (act.wizard.cpp:3655-3664).

set <hunger|thirst> removes from 'score' output but doesn't gag hunger/thirst messages. Output in 'score' does not seem to return.

Setting a player's level to 0 removes them from wholist. Intended behavior?

nowizlist doesn't seem to be implemented (act.wizard.cpp:3770, commented out). I wonder why.

idnum doesn't seem to to anything and would probably screw up the DB if it did. Remove it?

passwd doesn't seem to to anything. Bugged?

newbie seems bugged. PLR: output from stat doesn't get updated properly.

pg does not seem implemented (missing case in act.wizard.cpp). Remove it?

help command still prone to SQL shenanigans

help 'hunger%' OR '%status

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6acc319 in _IO_vfprintf_internal (s=, format=, ap=) at vfprintf.c:2047
2047 vfprintf.c: No such file or directory.
(gdb) bt
#0 0x00007ffff6acc319 in _IO_vfprintf_internal (s=, format=, ap=) at vfprintf.c:2047
#1 0x00007ffff6acee71 in buffered_vfprintf (s=s@entry=0x7ffff6e421c0 <IO_2_1_stderr>, format=format@entry=0x7fffffff5a90 "Executing query: SELECT * FROM help_topic WHERE name LIKE '%\'hunger%\' OR \'%status%' ORDER BY name ASC", args=args@entry=0x7fffffff5998) at vfprintf.c:2356
#2 0x00007ffff6ac9dfe in _IO_vfprintf_internal (s=0x7ffff6e421c0 <IO_2_1_stderr>, format=0x7fffffff5a90 "Executing query: SELECT * FROM help_topic WHERE name LIKE '%\'hunger%\' OR \'%status%' ORDER BY name ASC", ap=0x7fffffff5998) at vfprintf.c:1313
#3 0x00000000005bacd9 in log (format=0x7fffffff5a90 "Executing query: SELECT * FROM help_topic WHERE name LIKE '%\'hunger%\' OR \'%status%' ORDER BY name ASC") at utils.cpp:633
#4 0x000000000053891e in mysql_wrapper (mysql=0x89c580, query=0x7fffffff7ae0 "SELECT * FROM help_topic WHERE name LIKE '%\'hunger%\' OR \'%status%' ORDER BY name ASC") at newdb.cpp:54
#5 0x0000000000433381 in display_help (help=0x7fffffff9b30 "\200\241\377\377\377\177", arg=0x7fffffffddb5 "'hunger%' OR '%status") at act.informative.cpp:2239
#6 0x00000000004336bb in do_help (ch=0xb41630, argument=0x7fffffffddb5 "'hunger%' OR '%status", cmd=200, subcmd=0) at act.informative.cpp:2278
#7 0x0000000000518a1d in command_interpreter (ch=0xb41630, argument=0x7fffffffddb0 "help 'hunger%' OR '%status", tcname=0xb41ea0 "Finster") at interpreter.cpp:1333
#8 0x00000000004aca2a in game_loop (mother_desc=3) at comm.cpp:660
#9 0x00000000004abbfe in init_game (port=4000) at comm.cpp:351
#10 0x00000000004ab669 in main (argc=1, argv=0x7fffffffe708) at comm.cpp:235
(gdb)

poofin/poofout message gets set to (null) when called with no argument

Circle's wizhelp guide states on page 5-6:

Sets the message seen by players when you use GOTO to move to a different
room. POOFIN with no argument resets your poofin to the default "appears with
an ear-splitting bang"; POOFOUT with no argument defaults to "disappears in
a puff of smoke."

However, Awake does not set a default message for both commands if called without arguments.

As (null) is not a nice thing for a player to see this should be changed.

Load all new chars with a radio set to 8

Having a radio set to 8 is critical to being able to communicate with the game. New characters should be auto-loaded with a radio set to 8, perhaps with a room along the way that tells them that the yellow text they've been seeing is coming from their radio. The goal is to prevent any player from leaving chargen without a radio.

branch playergroups does not compile

Not sure whether I should open an issue for an unmerged branch but I think I'm missing something here.
gcc 4.8.4 on Ubuntu 14.04

g++ -DDEBUG -DSELFADVANCE -Dlinux -Wall -I /usr/local/include/ -ggdb -c -o playergroup_classes.o playergroup_classes.cpp
playergroup_classes.cpp: In member function ‘void Playergroup::audit_log_vfprintf(const char*, ...)’:
playergroup_classes.cpp:215:24: error: ‘va_start’ was not declared in this scope
va_start(args, format);
^
playergroup_classes.cpp:217:14: error: ‘va_end’ was not declared in this scope
va_end(args);
^
make: *** [playergroup_classes.o] Error 1

Missing gear in chargen

  • pocketsec (discussable, of course)
  • survival gear vendor only offer trauma patches
  • Missing completely: armor/clothing vendor
  • melee vendor has a very sparse supply
  • firearms vendor has a very sparse supply / room description does not fit stock
  • ammo shop needs update (substitute magazines with generic ones)
  • talismonger doesn't have enough variety and is lacking enchanting mats and libraries

Forced-look after copyover has issues

After a copyover, your character is forced to LOOK the moment your descriptor is brought online. This creates a potential knowledge gap where another player in the room could load after you look and thus appear without you knowing they're there. Solutions for this include either doing a second loop and forcing a look after everyone has loaded, or alternatively printing a message when someone restores from copyover (potentially spammy).

Also, screenreader players probably do not appreciate being forced to look at the full description. Investigate ways to opt out of this behavior.

Vehicle Changes

I'd like to make the following changes to vehicles:

  • If you're strong enough, you can pick up a vehicle, transferring it from the world into your inventory and encumbering you appropriately.
  • If you're strong enough, you can drag a vehicle, provided it meets the towing requirements (destroyed or unlocked, not moving, etc).
  • Destroyed vehicles are not immediately purged on crash/copyover, but are instead transferred to a junkyard so that players have the chance to recover their vehicle before it's purged out. Destroyed vehicles in the junkyard are purged on next crash/copyover.
  • Trucks should be towable provided your vehicle is powerful enough.

Screenreader Toggle

Implement a toggle that lets the player indicate they're using a screenreader.

'create ammo' item used is a beret

It appears that item 121 (A UCAS Army Rangers Beret) is an ammo box in the base game; it's referenced by number in ammo creation, and you end up with a beret full of ammo at the end of it. While this is an entertaining mental image, either the item should be rewritten into an ammo container, or the vnum should be reassigned to something that is an ammo container, preferably between the 100-200 vnums.

Weight for mob displayed as 0kg

Not sure if it's really an issue. I created a mob (5001) with a weight of 2.00 kg. Looking at it displays the weight as 0kg.

relevant source: act.informative.cpp:500

Add timeouts for punitive commands

Commands such as 'mute', 'freeze', etc do not have any timeouts and are set-and-forget commands. Contesting or appealing these commands is difficult, especially if the staffer who set them is not present or has left the game. Forcing the staffer to set a maximum timeout on these commands ensures that problem players have a chance to mend their ways.

Rough design:
freeze <character> <minutes>
if minutes > 1 d * 24 h/d * 60 m/h (one day), display caution message (ex: "Freezing players for too long can provoke further antisocial behavior. Are you sure you want to continue?")
if minutes > arbitrary maximum, display error message and return.

The above will need discussion and calibration before it's designed into the code, and the timeout thresholds will need to be configurable on a per-codebase level.

Unable to iload credsticks, but you can load them.

I don't know why the iload restriction was put into place (my suspicion is that it's so an imm can't iload a credstick, put an arbitrary amount of nuyen on it, and hand it off to a mort without anyone tracking how much was given), but the restriction is not universal. It can be bypassed with LOAD OBJ , or the imm could just buy a credstick from one of the vendors.

If the goal is to make it so imms Cannot Give Out Credsticks Ever, restrict them from doing so in give/drop.

Otherwise, just add logging so that the value of a credstick is displayed in the cheatlog and remove this restriction.

Brand-new installation on Ubuntu, copyover after login, admin was immediately wrecked

After installation on a brand-new VirtualBox Ubuntu 16.04.2 LTS image, a new character was created and logged in, then a copyover performed shortly after. When the copyover finished, the character was in 0, paralyzed with 0 qui, and did not appear to be a staff member anymore (no room num, flags, etc). Console showed an idle_delete() took place and dropped 1 character. There was also an invalid val passed char-to-room.

Avenues of exploration:

  • Does Ubuntu have special snowflake timestamps?
  • How about MySQL on Ubuntu?
  • What happens if a character's pfile is lost in the DB during copyover, but the descriptor stays live?
  • How can we set it up to allow recovery of first-come admins without requiring direct DB manipulation?
  • Why does 0 qui stop you from using wiz commands?

Some modes for 'show' are unimplemented

The following modes for the 'show' command are unimplemented (act.wizard.cpp):

library
lodge
rent

This is informational only. It should be discussed whether these modes should be implemented or removed.

Missing skills?

constants.cpp lists 133 skills, yet the DB has 135 skill rows.

the pfiles_skills table is regularly updated for immortal characters:

May 26 09:29:13 :: Executing query: DELETE FROM pfiles_skills WHERE idnum=1
May 26 09:29:13 :: Executing query: INSERT INTO pfiles_skills (idnum, skillnum, rank) VALUES (1, 1, 100), [...], (1, 134, 100), (1, 135, 100);

Hence we get two "empty" skills:

< 10P 10M > skills
You know the following skills:
[...]
Blowgun (godly)
Pharmacuticals (godly)
(godly)
(godly)

Change find_workshop to invoke a flag instead of scanning room contents

On each healing tick, for each character, all the items in their room/vehicle are scanned for a workshop. This is probably the source of a lot of lag when you have hoarder players with thousands of items in their apartment while they program. This system should be updated such that a room has an attached list of deployed workshops that is updated when the workshop state changes (deploy, pack up, destruction, purge, world load, etc). This list will be much faster to scan than the list of all objects.

Flagged as both a bug an enhancement because it's 'working as intended' but the original design was flawed.

'set' command broken for offline players

The set command has a switch to modify stats of an offline player (act.wizard.cpp:3460).

set file Puppet Qui 6
A Male Human's qui set to 6.
Saved in file.

However, the value does not get committed to the DB.

Unable to bond with affected item until affect removed

I converted 10003 into a power focus and attempted to bond with it, but got the 'You can't bond with that' error (paraphrased). This was resolved when I removed the ImpInvis (Spell) flag from it, after which it bonded normally.

Playergroups Phase III - Logging

This phase focuses on audit logs (they need to be added to all commands, and viewing them should be doable for both privileged players and high-leveled immortals).

Key features of logs:

  • Unless the group is secret, pretty much every action is logged (see command spreadsheet for complete details).
  • Logs should persist after a group is disbanded / deleted.
  • Log viewing should allow for sectioning by date.
  • Log viewing should allow for searching by keyword.

Improvements to Spellset

Spellset needs the following:

  • Have its TODO entries completed
  • Figure out how to remove spells
  • Revisit syntax for improved attribute spells

'tail' command currently broken

ACMD(do_tail) uses two system calls (ls, tail) to list available logs and tail them. As log/ doesn't exist the command does nothing at the moment. I'm not sure I like passing commands to a shell from the game. However, it'd be nice for a staffer without shell access to view and/or search logs.

Vehicles cannot be individually purged

The only way I've found to purge vehicles is to purge the whole room, which is unappealing for a variety of reasons. The purge command should be expanded to allow targeting of vehicles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.