Jump to content
Coolie

Objective Popup

Recommended Posts

I'm looking to request a script that does the following (I'd give it the ol' college try myself, but I'm incredibly busy with other stuff in development right now):

 

- Allows the player to set a button to bring up a popup on the map, detailing their current objective. It should stay visible until the same button is pressed again to dispose it.

- Allow a script call to update the objective, and save it until it is updated again.

Example: update_objective("\\c[13]Head into town and speak with \\n[5].\\c[0]")

- Allow a script call to dispose of the popup (for event scenes starting when the popup is still visible).

- Allow escape codes for line break, bold, italic, colors, icons, item names and actor names.

- Allow a SE to play when bringing up the popup window (default cancel sound should play when disposing).

- Allow for windowed mode or non-windowed (the same way the battle log default lines appear; text over a faded black BG) mode.

- Allow the width and number of lines to be shown to be defined in the user module of the script.

- Allow an icon to be shown at the beginning of the line of text (always the same icon).

 

In my project, players can save anywhere. This can sometimes be a detriment, if the player doesn't pick up the game again for a while. They'll forget what they had to do or where they had to go. This script can solve those issues by letting them know what their current objective is.

 

Thanks in advance for anyone who takes this on! Appreciate it!

  • Like 1

Share this post


Link to post
Share on other sites

this is a great request and would be very fun to do.

Thank you. Thank you x2 if you decide to give it a shot.

Share this post


Link to post
Share on other sites

i am kind of surprised you haven't whipped this up yourself; if i remember correctly, you're a decent scripter, aren't you?

Share this post


Link to post
Share on other sites

I can figure out what most code means and how to manipulate things to do what I want, but writing totally new stuff takes me a long time and a lot of looking things up, and I'm currently in the midst of a ton of different development work (art, events, mapping, etc.) so I was hoping someone faster than me could get this one.

Share this post


Link to post
Share on other sites

i'm probably gonna do this, regardless if someone else does it first. it is nice to have options. :D

 

also, food for thought: when you draw text into a window, the way you denote the string value is what interprets whether or not the program will use the escape characters before the final drawing is performed. any string value utilizing two quotes "..." will not convert escape characters. any string value using single quotations '...' will. no additional code is necessary to include the conversion of escape characters with your strings.

 

^^ i'm confident this is true for all windows and the strings to be drawn. 

Share this post


Link to post
Share on other sites

Glad you're gonna try it! Thank you!

 

Also, nice tidbit there, didn't know that. :D

 

EDIT: Tested that out in the CSCA Achievement 2.2 script... changed one of the descriptions to single quotes, added escape codes... it didn't process the escape characters.

Edited by William C

Share this post


Link to post
Share on other sites

odd. works fine for me when i use it within custom windows.

i learned that from the help file. i'll see if i can figure out the details when i sit down to write this script.

 

looking at your post above, i see that you used two backslashes in your example string. you only need one backslash, why did you use two backslashes? it should be \c. \n.

Share this post


Link to post
Share on other sites

Tried with both. Might be a difference between the capabilities of draw_text and sprintf?

 

EDIT: So it doesn't work in CSCA Achievements, but worked in Ninjamida's Auction House script. I guess it depends on how it's coded to display.

Edited by William C

Share this post


Link to post
Share on other sites

if you want more information on this, you can refer to the string literals section of the rgss help file.

 

i added custom escape character codes for my dating simulator script to show names of the player's love interests freely; this is when i found out about the differences with the quotes.

Share this post


Link to post
Share on other sites

i'm balls deep in this request and have the foundation complete, but we should discuss how you plan to integrate the popup window into your cut scenes. i see you asked to be able to hide the window with a script call, but if your intentions were to just manually hide it using the script call whenever activate a cut scene and then reshow it afterwards, that wouldn't account for if the player didn't have the window active when he started the event right?

 

we need to work out the kinks of how the popup's display will be affected by your events, so i know which direction to go in. you need to tell me exactly what kind of control you want.

Share this post


Link to post
Share on other sites

OK, let's say I'm walking around town, and I press the assigned button to bring up the objective popup. It stays open until I press that button again, even if I'm talking to people. If I go into an event scene, I'd use a script call to dispose it.

 

I guess whenever SceneManager calls a new scene, it should also be disposed.

 

I see what you're saying, though. Let's go over some scenarios.

 

- Player enters an event scene where disposing script call is present, but the Popup wasn't active. In this case, nothing should happen as the popup is already deactivated.

- Player has the popup open, and enters a door to a new map. Popup disposes when Scene_Map is reloaded.

- Player has the popup open and speaks to NPCs. Popup stays active until player presses assigned button to dispose it.

- Player enters an event scene where disposing script call is present, and popup is active. Popup disposes.

 

I hope this helps! Thanks a billion x2 for taking this on.

Share this post


Link to post
Share on other sites

If it's easier to auto-dispose whenever ANY event is processing, and have it open back up if active, then go that route, I'd say. Same effect with less responsibility on the user.

Share this post


Link to post
Share on other sites

for clarity, if the display is active and you dispose of it because an important event is beginning, is the popup supposed to reopen by itself after the cut scene has ended?

Share this post


Link to post
Share on other sites

Personally, *I* wouldn't want it to, but others using it might. I'm not even sure how you'd go about that without a manual script call at the end of the event. But yeah, more options is always nice.

Share this post


Link to post
Share on other sites

i'm fulfilling a request; i'm not making a custom script for the community, so i'm only including what is necessary.

all right, give me a little more time. i'll have this wrapped up in a little bit.

Share this post


Link to post
Share on other sites

i'm fulfilling a request; i'm not making a custom script for the community, so i'm only including what is necessary.

all right, give me a little more time. i'll have this wrapped up in a little bit.

Awesome, thanks again! :D

Share this post


Link to post
Share on other sites

here is a progress report on the list of features.

if you think of something else, now would be a good time to include it. :D

 

WilliamC Objective Popup Script Request

- user-defined input trigger (toggles window display)
- update window's contents (string value) via script call
- toggle display via script call (important for integration with event cutscenes)
- maintain integrity of escape codes within string value
- user-defined custom SE on display / default cancel SE of disposal
- integrate battle log's "dim background" theme as display mode
- user-defined width and line number
- user-defined icon display at the beginning of text line.

Share this post


Link to post
Share on other sites

I just want to point out something:

 

- Player has the popup open and speaks to NPCs. Popup stays active until player presses assigned button to dispose it.

- Player enters an event scene where disposing script call is present, and popup is active. Popup disposes.

 

Doesn't this kinda suggest that during an event cutscene, after the popup has been disposed by script call, the player could still turn it back on again mid-scene by pressing the button? I'd say you need to functionality to disable the popup button entirely for events where the popup is never supposed to be visible.

 

 

EDIT: So it doesn't work in CSCA Achievements, but worked in Ninjamida's Auction House script. I guess it depends on how it's coded to display.

 

That would be because CSCA Achievements uses "draw_text" instead of "draw_text_ex" to display its text. I'm sure dbchest has a pretty good handle on this, but the reason you'd want to make the popup window an actual Window class instead of a custom sprite is because Windows are automatically disposed every time the scene changes anyway and because you get access to "draw_text_ex", which is the method used to process escape characters. While the default system doesn't have escape characters for italicizing or emboldening, I'm pretty sure most message scripts that add escape characters need to alias or overwrite "draw_text_ex" to do so, which means combining a message script in tandem should yield the results as long as this script uses "draw_text_ex" to display.

  • Like 2

Share this post


Link to post
Share on other sites

i too considered that Traverse, and i took care of it. :D

 

i haven't experimented with CSCA, but that would definitely be the reason.

i made sure to use the draw_text_ex within my objective popup window.

 

edit:

Will, how do you want to user defined width and line number to work?

  • Like 1

Share this post


Link to post
Share on other sites

width and line number could just be module constants, no? They don't have to be able to be changed on the fly or anything.

Share this post


Link to post
Share on other sites

correct. i was just making sure they were gonna be constants and remain the same throughout the course of the entire game. last question; do you want the battle log themed background to be a constant also, or is this an option that can change on the fly? (freely switching between windowed mode and battle log mode)

Share this post


Link to post
Share on other sites

i'm wrapping this up now. i'm on the final feature (the alternate theme). expect this sometime today.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted