Overview
This prompt aims to guide developers in enhancing game features related to item acquisition and UI design. Programmers and game designers will benefit from the clear instructions for implementing these modifications.
Prompt Overview
Purpose: This feature enhances player engagement by celebrating rare item achievements through chat notifications.
Audience: Game developers and programmers looking to improve user experience in their gaming applications.
Distinctive Feature: The modification includes both a chat notification and visual adjustments to the crate display for better visibility.
Outcome: Players will feel rewarded and acknowledged for their achievements, fostering a more interactive gaming environment.
Quick Specs
- Media: Text
- Use case: Generation
- Industry: Content & Media Creation
- Techniques: Decomposition, Role/Persona Prompting, Structured Output
- Models: Claude 3.5 Sonnet, Gemini 2.0 Flash, GPT-4o, Llama 3.1 70B
- Estimated time: 5-10 minutes
- Skill level: Beginner
Variables to Fill
No inputs required — just copy and use the prompt.
Example Variables Block
No example values needed for this prompt.
The Prompt
You are tasked with modifying a game feature involving crates and chat messages.
**Objective:**
– Whenever a player obtains the rarest item from a crate, a message should pop up in the chat indicating that the player received this rare item.
**Additional Adjustments:**
– Modify the in-game crate display by:
– Making the text above the crate larger.
– Removing the gray background from this text area.
– Repositioning the text slightly lower to enhance visibility.
# Steps
1. Detect when a player obtains the rarest crate item.
2. Trigger a chat message announcing the player’s achievement.
3. Increase the font size of the text displayed above the crate.
4. Remove the gray background behind this text.
5. Adjust the vertical positioning of the text, moving it slightly downward.
# Output Format
– Provide clear, concise code snippets or instructions detailing how to implement these changes, including:
– Relevant game logic.
– UI adjustments.
Screenshot Examples
How to Use This Prompt
- Copy the prompt.
- Paste it into your coding environment.
- Follow the steps outlined for implementation.
- Test the changes in the game.
- Adjust as necessary based on testing feedback.
Tips for Best Results
- Detect Rare Item: Implement an event listener to check when a player opens a crate and receives the rarest item.
- Trigger Chat Message: Use a function to send a chat message to all players announcing the rare item acquisition.
- Adjust Font Size: Update the CSS for the crate’s title to increase the font size, e.g., `font-size: 24px;`.
- Modify Text Area: Remove the gray background by setting `background: none;` and adjust the position with `margin-top: 10px;` for better visibility.
FAQ
- How to detect when a player gets a rare item?
Implement an event listener that triggers when a player opens a crate and checks the item rarity. - How to display a chat message for rare item acquisition?
Use a chat system function to send a message indicating the player's achievement when a rare item is obtained. - What changes are needed for crate text size?
Modify the font size property in the UI settings for the text element above the crate. - How to adjust the crate text position?
Change the vertical alignment property to move the text slightly lower for better visibility.
Compliance and Best Practices
- Best Practice: Review AI output for accuracy and relevance before use.
- Privacy: Avoid sharing personal, financial, or confidential data in prompts.
- Platform Policy: Your use of AI tools must comply with their terms and your local laws.
Revision History
- Version 1.0 (February 2026): Initial release.


