Medal
QuestCompleted
name = "Quest Completed"
description = "You completed a quest."
icon_state = "quest-completed"
hub_name = "Quest Completed"
mob
completed_quest()
..()
award_medal(/Medal/QuestCompleted)
This uses BYOND's hub so the medals are client-specific, not character-specific. This also means you need to create a hub entry and add medals to it if you want to create your own medals. The demo uses a test hub entry I set up.
I also added the mob.pvp var and the ability to form parties. The library provides these things so its can_attack() proc can properly limit who you can attack, but it's really up to the game to manage how parties are formed or how/when pvp is enabled. For your game, you might want PvP to always be enabled. You might want it to be a server-wide setting that varies from server to server. You might be making a team PvP game where you enable PvP for everyone and automatically put the players into parties.
I started working on an interface to show your party members but that's really something the game would handle (the code's still there, it's just disabled by default).
Here is the full list of changes:
- Increased the layer of objects created by the atom.effect() proc to make them less likely to appear underneath overlays.
- Added a new graphical effect for being poisoned and taking poison damage.
- Changed the way shadows work in the sample game and added shadows to enemies.
- Added the /Medal object which contains all of the information you need to describe a medal. You're still responsible for checking the conditions to determine when a player has earned a medal.
- Added the mob.award_medal() proc which can take a /Medal object type path or an object instance. This proc automatically handles the on-screen display of medals when the player receives one.
- Added the Options.medal_display_time var which determines how long a medal is shown on the screen when it's received. The default value is 30 (3 seconds).
- Added two medals to the sample game.
- Added the mob.text_prompt() proc which creates an on-screen prompt that displays a message and prompts the user to type in a string. When the user hits enter, the proc returns. The return value is the string that was typed.
- Added a message that gets displayed at the bottom of a prompt window that contains text and no buttons. This message is defined in the Options object as Options.prompt_continue_message, so you can easily change it if you'd like. The default value is "Press the Space Bar to continue."
- Added a basic character creation process to the mob.new_character() proc in the sample game. When you make a new character, it now asks for your name and character class.
- Added the mob.class var to the sample game, moved the mob's description() proc to the sample game, and made it use your class and name.
- Updated shadow-47.dmi in the sample game to make the shadows a little bit lighter (important change, I know).
- Fixed a bug with quests dialogs. Previously mobs would offer you a quest even if they were only the ending point of the quest.
- Added the mob.pvp var. Two mobs on the TEAM_PLAYERS team can attack each other if their mob.pvp vars are both 1. Setting this var is completely up to you. Maybe you want players to be able to turn PVP mode on or off for themselves. Maybe you want the game to enable PVP for players when they enter a certain area.
- Added an example of enabling and disabling PVP in the sample game. When you press the P key it adds or removes a condition. See demo\conditions.dm for more details.
- Added the /Party object and the ability for players to be in groups with other players. You can invite players to your party by clicking the "Invite" link next to their name in the "Who's Online" list.
- Updated the can_attack proc to let you attack players if both of you have pvp enabled. Also updated the proc to prevent you from attacking people who are also in your party.
- Added the Options.title_screen var. You can override its default value to specify a custom file to be used as the title screen. If the image is smaller than an icon it'll be tiled, otherwise it'll be centered in the screen. There's an example of how to do this in demo\mobs.dm but it's commented out by default.
- Changed the way health and mana meters determine how many bubbles to show. The relationship between the value and the number of bubbles is logarithmic now, so that 50 is five bubbles, 100 is six, and 500 is eight bubbles.