Badges – Special Game Awards

Time:10 分钟

Badges let you create special awards for players who do something exceptional within your game. A badge might be awarded when a player:

  • Collects 100 gold stars.

  • Jumps across a challenging series of platforms over a poison swamp.

  • Finds all 7 keys to unlock the kingdoms of Earth, Air, Lava, Ocean, Light, Shadow, and Dreams.

Creating a Badge

It costs

100 to create a badge. To begin:

  1. Go to the Create page on the Roblox website. Once there, make sure that Games is selected in the left column.

  2. Determine the game you want to create a badge for.

  3. In the settings drop-down menu on the right-hand side, select Create Badge.

Create an Icon

Badge icons should be designed as follows:

  1. In an image editing application, design a circular badge (a template of 512×512 pixels is recommended). The final icon will be trimmed/cropped into a circular image, so you shouldn’t include important details outside the circular boundaries.

  1. Save the badge image in .jpg, .gif, .png, .tga, or .bmp format.

Upload the Badge

The next step in the creation process is uploading the badge.

  1. Back on the Roblox website, click the small button next to Find your image.

  2. Find the badge image on your computer and confirm that you’d like to upload it.

  3. Type in a name and description for the badge. It’s a good idea to describe how the badge can be earned so players have a specific goal to reach for.

  4. Click Preview, review the details for the badge, and purchase when you’re ready. Once the purchase is complete, the badge will appear in the Game Badges section of the game’s main page.

Editing Badges Once you purchase a badge, it will be added to the Badges tree of the Game Explorer window. Note that you may need to click the

refresh button in the top-right corner of the window to see a newly purchased badge.

To edit a badge, right-click it and select Configure. On the configuration page, you can edit the icon, badge name, and description. You can also toggle whether the badge is active with the Item is Active switch at the bottom of the page.

Scripting for Badges

To take full advantage of badges, you’ll need to use scripting. Here are some common examples:

Awarding a Badge

In the following server-side Script, the awardBadge() function can be called whenever it fits your game design. Using properties of the badge fetched via BadgeService/GetBadgeInfoAsync|BadgeService:GetBadgeInfoAsync(), it confirms that the badge can be awarded and does so using BadgeService/AwardBadge|BadgeService:AwardBadge().

Roblox官方链接:Badges – Special Game Awards