Aller au contenu

Photo

How to display a codex or achievement popup? (Solved)


  • Veuillez vous connecter pour répondre
15 réponses à ce sujet

#1
Herw81

Herw81
  • Members
  • 20 messages
Hello,

When you get a quest or a codex entry, you get a great popup in the middle of the screen with an icon and the name of what you get. What I should use to display that?
And how to display the popup for an achievement?

Thanks in advance

Modifié par Herw81, 15 août 2010 - 11:44 .


#2
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
The codex pop-up is automatic. You don't have to do anything special to get it.



Just set the codex entry as a plot. Be sure to set the plot type as codex. When the plot flag with that codex entry is activated the pop-up you are talking about should appear.

#3
TimelordDC

TimelordDC
  • Members
  • 923 messages
The text within the <summary> tags appears as the pop-up text.

#4
Herw81

Herw81
  • Members
  • 20 messages
How to set a plot as a Codex entry? or anything else. In the toolset when I compare the plots, I see no information to distinguish a Codex plot to a Quest plot.
I added a text in the Journal Text field of a plot. When the plot was set, I get a quest popup. So I suppose that if there a journal text by default it's a quest plot. But how/where to say it's a plot for something else. In my case I want to display a popup when my hero gets a talent, like the Wynne's spell "Vessel of the Spirit", and display the icon of my new talent.

#5
TimelordDC

TimelordDC
  • Members
  • 923 messages
Under Entry Type in the Properties section of the Plot, if you select a Codex type entry, it will be a codex entry under that appropriate Label.

For giving a talent, create it with Entry Type Plot and in the plot script, add code to give the talent to the player and display a message.

Modifié par TimelordDC, 14 avril 2010 - 10:59 .


#6
Herw81

Herw81
  • Members
  • 20 messages
I understood! I looked at in Properties (right click on the plot) and not with the Object Inspector. I'm going to try that. Thanks

#7
Herw81

Herw81
  • Members
  • 20 messages
I tried but without success. What kind of message I should use?

When I add my new talent I use that: AddAbility(oHero, MyAbility, TRUE). I thought that the third parameter bSendNotification should do what I want but no ...

#8
Guest_dewkl_*

Guest_dewkl_*
  • Guests
You can create your own achievements? Do they upload to the social.bioware-site as well?



If true, that's awesome.

#9
TimelordDC

TimelordDC
  • Members
  • 923 messages

Herw81 wrote...

I tried but without success. What kind of message I should use?
When I add my new talent I use that: AddAbility(oHero, MyAbility, TRUE). I thought that the third parameter bSendNotification should do what I want but no ...


It should. I checked Wynne's plot script and that's what it does. I don't remember well enough the events in the game but I do think she gets the pop-up.
Instead, you could just add a DisplayFloatyMessage to do what you want.

@dewkl, I don't think custom achievements are uploaded to the Bioware site. Not sure though.

#10
Magic

Magic
  • Members
  • 187 messages
AddAbility(oHero, MyAbility, TRUE);

does display the big pop-up assuming MyAbility is a valid int value for an ability.



If you created a codex entry, you actually would need something like a WR_SetPlotFlag() call. Not sure if there's maybe some confusion.

#11
Guest_dewkl_*

Guest_dewkl_*
  • Guests

TimelordDC wrote...
@dewkl, I don't think custom achievements are uploaded to the Bioware site. Not sure though.

Is it difficult creating your own achievements? I'd like to try. I looked at achievement_core where it seems every achievement is defined as a constant, maybe tied to the achievement plot? Does this plot hold all of them?

Doesn't seem like the wiki got anything on this.

#12
TimelordDC

TimelordDC
  • Members
  • 923 messages
There are bits of code everywhere to track the required stuff for achievements (I think it is in stats_h or something similar). Creating your own achievements isn't that big a deal -> the issue would be whether it shows up in the achievement screen in the game. Since the GUI isn't so transparent, I am not sure.

However, you could modify the GUI part which shows the number of kills, etc., I believe. One of the modules (I think it was Warden's Arena) has a new stat there showing how many arena fights were won or some such thing. So, you could potentially have your Achievement displayed there in some sort.

Or have a separate codex group maybe listing all the achievements and giving information on each.



NOTE: haven't tested any of the above :)

#13
Guest_dewkl_*

Guest_dewkl_*
  • Guests
I did a test with this and, as you said, I was able to create my own achievement. What I haven't done yet is specifying the description, name and icon. I can't figure out what kind of string type the achievement uses (I've tried, gui, spells etc.), I'm not able to make it show up ingame. AFAIK the type has nothing to do with whether it works? Its purpose seems to be for organizing only. I've looked through the string table in the singleplayer but I couldn't find anything achievement-related there. I could just use a normal text popup for the achievement notification, but it's nowhere as fancy.

Could craig/david weigh in on this? Whether this is possible at all, making custom achievements such as they appear in the official game?

Modifié par dewkl, 28 mai 2010 - 11:27 .


#14
TimelordDC

TimelordDC
  • Members
  • 923 messages
I don't think the String Type affects anything.



When you say it won't show up in-game, you mean the Achievement screen, right? The GUI has been rather poorly implemented, IMO. Rather than use 2DAs as most of the game does, many of the things in the GUI are hard limitations and this is probably one of them.

#15
Guest_dewkl_*

Guest_dewkl_*
  • Guests
It shows up on the achievement screen, but the strings showing the description and name won't. That's probably a mistake on my part. 

The popup however, does not, but that was expected.

Modifié par dewkl, 28 mai 2010 - 04:22 .


#16
Herw81

Herw81
  • Members
  • 20 messages
I gave up modding a long time ago because I was not able to find a solution to my problems (and so I didn't follow the thread). Finally I restart working on DAO modding and I found why that did not work (but not really understood why). I well used the AddAbility function, but some explanations are necessary to understand why that did not work:
I wanted to create a new talent tree which is dedicated to Grey Wardens. So our hero get it after the joining and I wanted to warn user as when we get a new specialization (so I wanted to display a popup like for specializations). In the ABI_base file I created my talent tree like a specialization. In the ABI_base file for these trees we have the value "12" in the guitype column, but I don't know why, with my talent tree this value prevent the popup display!!! If I set it to 0 that works!!! (that works it's fine for me, but I don't understand why that does not work for my talent tree but works for specializations...)
Thank you for your help, even if my answer is late.

Modifié par Herw81, 16 août 2010 - 05:33 .