Noob questions- Portrait placement options, dialog programming, module avail.

Started by Sooz, Wed 16/09/2015 18:48:34

Previous topic - Next topic

Sooz

Hullo, all.  I'm a stupid newbie with some aspirations, but so far haven't been able to find the following info.  If any of y'all can help me out, it'd be super great.

1) Sierra Portrait Options
I haven't been able to easily track down the answer on this; Is it possible to set up Sierra-style dialog so the game ends up looking like this?:


That is, PC portrait top-left, PC dialog top, NPC portrait bottom right, NPC dialog right, and the game screen visible behind. 

2) Dialog- is it room-based or universal? 
If I want to, say, have a character that shows up in several different rooms, and have the option for a one-off dialog sequence with that character that could happen in any of those rooms, can I do that? 

3) Modules
-Are there any modules available that can be used to simulate a simple webpage with a scrollbar and links? 

-Are there any that can allow a player to search an in-game database using a key word?  (Similar to the game Her Story, if anyone's played that.)

As is probably abundantly clear, I am super new to game programming, and thus do not relish the prospect of trying to do either of these things on my own. 

Thanks for your attention!

Snarky

1. You mean displayed at the same time? Not with the built-in features, no. It's possible to script it yourself, but it'll be a good deal of work.
2. Yes. Dialogs are not room-based.
3. There's no module that will do all of that out of the box (AFAIK), but SSH's HyperText module might get you part of the way â€" haven't used it myself, but it sounds like what you want. Unfortunately the page where all his modules were hosted is down, but I'm sure someone can dig up a copy somewhere.

Database search is pretty easy if you only have a few queries that will give a hit. You can just have a function that checks the input against each of the valid search terms (using a string comparison) in turn, and brings up the corresponding file. 

Sooz

1) All right, cool.  Secondarily, would it be possible to have the dialog for both displayed in the same box, but have the portraits show up in different places?  (Say, PC's on the left, NPC's on the right?)

2) Excellent, thanks!

3) Well, poop!  Worse comes to worst, I suppose I can always try to track down someone more competent with coding than I to commission. 

Slasher

1) You could indeed have all the text displayed in one place (one at a time) using SayAt command.
   Regarding the portraits i would say create a custom function to show portraits when character is talking.
   Not forgetting repeatedly_execute_always()function.

Quick example for one player:
Code: ags


function player_talking() // your custom function for when player talking or not talking
{
 if (cplayer.View==9) // player talking view
 gplayer_portrait.Visible=true; // gui portrait to show (static). Remember to position it's  x y in its properties.
 else
 gplayer_portrait.Visible=false;  player stops talking
}

function repeatedly_execute_always() // can't use blocking commands like Wait();
{
 player_talking(); // the function player_talking()
}



Code: ags

 cplayer.SayAt(6, 60, 640,"\"If I could only read it.\"") ; //Where you want the text displayed. Shown with speech quotes. You could place all speech text on top of a custom gui.   You could also make a custom function for this.


This may not be the ultimate way but it works.


Snarky

On the first point, I would encourage you to just reconsider, unless you have a very good reason. One of the tools adventure games have for making the game world seem real is to make the dialog unfold in "real time", line by line. This is also how subtitles are usually provided for movies/TV shows. What benefit is there to showing both sides on screen at the same time? It's just going to take twice as long to read, and make the game seem that much more static, and cover up more of the screen with text boxes.

Not that it would be terrible or anything, but would it really be any better? And worth the hassle of implementing in AGS?

An in-game web browser could be anywhere from relatively simple to basically impossible to implement in AGS. It all depends on how sophisticated you want it to be: a simple way might just be to make a tall scrollable room where the background is an image of the web page, and use hotspots for the links. You could use a GUI to do the browser buttons and the "computer screen" effect around the edges. If you don't have too many pages in your "web", you could use one room per page. On the other hand, if you want a full-fledged Chrome browser, good luck with that! Also keep in mind that unless your game is quite high-resolution (by AGS standards), any in-game computer screen is going to be quite clunky: even in 800x600 you won't be able to do all that much in terms of UI and styling. For these reasons, most AGS games use old-style terminal (text-only) UIs for most in-game computer systems.

Sooz

Re: dialog
Yeah, mostly I was just seeing what options are available; I'm not really married to the two boxes setup, though I'd like if I can have the portraits on either side, just to keep it clear who's talking.  (It's more a "this would be nice" than a "must have," TBH.)

Re: browser
Yeah, this is intended to just be suuuuper basic- I'm probably just overestimating the amount of effort I'd need to put forth.  I have a bad habit of doing that!

Thanks for all the help, y'all.

Snarky

You can certainly have the portraits show up on different sides, just not at the same time. There's a game option called "Speech portrait side" that allows you to have it alternate, or use the character's on-screen position to determine on which side the portrait shows up.

For the "room as web page" idea I proposed (which I think is the least-coding way to get a scrollable web page in the game, and makes particular sense if your page is going to have both text and pictures, which would be a pain to lay out dynamically in AGS), the obvious drawback is that it's not very flexible: if you want to change it, you'll have to reimport the image and change the hotspots. And the more pages you have, the more work it is. Also, a limitation is that it would take some additional work to make the links change color when you hover over them, click them, or have visited them.

Sooz

Thanks a bunch! 

My page thing is super web 1.0 (basically just a set of interconnected photos, text, and links) so it sounds like jury-rigging a set of rooms is the most efficient way to go about it.

SMF spam blocked by CleanTalk