Page 1 of 1

Would this be possible?

Posted: August 27th, 2011, 12:51 am
by whatwhathow
I'm not really interested in creating a RPG game or a quest game or anything like that. I'd like to create a language immersion game where the character could walk around and mainly observe other characters, but also interact if he wants.

Would it be possible to:
Have other characters randomly created and walking around a small area that would include streets, shops, markets, etc.

Have them talk to each other and have 1) their dialogue appear on screen in text so the main player could read it and 2) trigger the playing of an mp3 file of each line of dialogue?

When the main player initiates a conversation with a random character, that character chooses the conversation to start, randomly from a list of choices?
E.g. You could walk up to a character, click him, and the conversation might go:

Player: "Hello"
Character: "Hi"
Player: "Nice day"
Character: "Yes, I know"
Player: "Goodbye"
Character: "Bye"

Or:
Player: "Hello"
Character: "Hello"
Player: "Nice day isn't it"
Character: "No it isn't"
* Conversation ends

Or:
Player: "Hello"
Character: "Yo"
Player: "What is your name"
Character: "my name is " <random_name_chosen_from_list
Player: "Goodbye"

Re: Would this be possible?

Posted: August 27th, 2011, 6:40 am
by Hirato
You can attempt it, but we still lack a lot of the functionality you'd need to pull this off well.
the RPG may be sufficient, but it will be difficult to pull off your project well and the 2.7.0 RPG will be able to play sounds with a directional component (see RoseStorm)

Would it be possible to:
Have other characters randomly created and walking around a small area that would include streets, shops, markets, etc.
You can spawn random friendly creatures in the RPG, although the amount of randomization you get from the definition side is limited.
You can try defining a character and having his spawn script randomise him significantly, from names to models (or heck, even another script for some personalized dialogue)
Have them talk to each other and have 1) their dialogue appear on screen in text so the main player could read it and 2) trigger the playing of an mp3 file of each line of dialogue?
First, the NPCs do not talk to each other, you can fake it by having them walk to the same area and playing a few dialogue files before moving on.
Secondly, there's no means to judge when a sound file has stopped playing, this means you have to manually define the time elapsed between sounds (also, you should really use either wav or ogg).
Finally, no subtitles outside of cutscenes, though you can redefine the HUD to display a set string in the centre; you can always use that to fake subtitles.

so yeah, there are 3 ways you can go about this with the RPG module
Firstly the hardest method, you can have 2 NPCs walk to an area, and talk by playing a few set sounds before moving on, while using the aforementioned HUD hack to display subtitles. It falls upon you to provide context when the player interrupts

Secondly, a much easier method is to use scripted cutscenes, you'll have much finer control over things and you would've have to redefine the HUD to boot. The secret here is to interrupt the cutscene on occasion and ask the player if he wants to interrupt the conversation. (this would probably fit your needs best)

The final and easiest method can actually be accomplished in the FPS too. Essentially you just walk up to the characters and you join a conversation with them, they talk, swap between characters and the player has the option to chime in or simply observe

This isn't a priority either.
When the main player initiates a conversation with a random character, that character chooses the conversation to start, randomly from a list of choices?
This facet is very easy and can be done without any difficulty in both the RPG and FPS.
Just make sure to define all the needed dialogue trees