Thread Tools Display Modes
04-04-11, 10:44 PM   #1
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
Editing Achievement Strings

So I'm trying to edit my achievement strings alongside a host of others, but nothing seems to work. The achievement announcement always looks like the default. I've searched for instances of other add-ons that may be preventing the edit somehow, but there's none.

Here's what I'm using:

Code:
(212  ) ACHIEVEMENT_BROADCAST = "%s earned %s."
(213  ) ACHIEVEMENT_BROADCAST_SELF = "|cffffffff+|r  %s."
Can achievement strings even be edited? Every other string is working but these. I assume I've gotten my wires crossed somewhere and it needs to be a bit more involved.
__________________
"Someday we'll look back on this, laugh nervously and quickly change the subject."

"The truth is like sunlight: people used to think it was good for you."

Last edited by Moxie : 04-04-11 at 10:47 PM.
  Reply With Quote
04-04-11, 11:31 PM   #2
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 213
I use this string

Code:
 text = text:gsub("(|Hplayer.+|h) has earned the achievement (.+)!", "%1 ! %2")
What it does is putting a ! in front of achievment instead of saying "has earned the achievment".
  Reply With Quote
04-05-11, 10:52 AM   #3
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 154
There are a couple more localization constants that you might need to replace:
Code:
NEW_ACHIEVEMENT_EARNED = "You have earned the achievement '%s'.";

GUILD_ACHIEVEMENT_BROADCAST = "\"%s\" has earned the achievement $a!";
PLAYER_SERVER_FIRST_ACHIEVEMENT = "|Hplayer:%s|h[%s]|h has earned the achievement $a!";
SERVER_FIRST_ACHIEVEMENT = "%s has earned the achievement $a!";
____
Edit: It makes no sense, but PLAYER_SERVER_FIRST_ACHIEVEMENT is the only one that matches what I see actually printed to chat. It might be recycled for all achievement broadcasts.

Last edited by Saiket : 04-05-11 at 10:59 AM.
  Reply With Quote
04-05-11, 12:26 PM   #4
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
I realized that Damn Achievement Spam was conflicting with it but wasn't showing up in my search. It works perfectly now. Thanks for the help, guys. I'll bookmark this for next time I play around.
__________________
"Someday we'll look back on this, laugh nervously and quickly change the subject."

"The truth is like sunlight: people used to think it was good for you."
  Reply With Quote
04-05-11, 03:41 PM   #5
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
So I noticed something odd, in that both messages will print out randomly as someone earns an achievement. The same person got two achievements earlier, and one announcement was the edited version while the other was the default.

This is weird.
__________________
"Someday we'll look back on this, laugh nervously and quickly change the subject."

"The truth is like sunlight: people used to think it was good for you."
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Editing Achievement Strings


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off