Jump to content
IndeedPete

Spin-Off Release: Simple Conversation System

Recommended Posts

Good morning to you, fellow armaholics!

I'm currently working on some stuff and figured that part of it might be useful to others though it's all still WIP. Today's spin-off is a simple conversation system which supports single sentences as well as full multiple choice conversations with multiple layers. First of all I want to give some credit and my thanks to dwringer, who released a smiliar system not too long ago. I found it inspiring, especially the "live-cam", and as I needed something like that for my purposes I decided to build my own, including some of his ideas. Our approaches and the "back-end" might be different though. Anyway, let's get to the interesting part.

Features

  • Single sentence radio / direct conversations with live-cam or avatar picture.
  • Full multiple choice conversations with multiple layers.
  • Custom code excecution.
  • Config based, easy to set up.
  • Exclude choices based on user-defined conditions.
  • Support for music, sounds and kbTell. (Latter is still a bit clunky.)
  • MP compatible.

Limitations

  • Live-cam is not suited for units in vehicles yet. The function wil automatically switch to the avatar picture.
  • Conversations with three or more participants are not possible yet.
  • For full conversations, both participants NEED a variable name. (It's necessary for a workaround to make the MC work.)
  • Too long conversations should be splitted because they can't fit into the RscStructuredText as it seems that this control doesn't support scrollbars. :/

Setup

  1. Download v1.07 example mission.
  2. Copy conv folder to your mission.
  3. Create description.ext and add:
    #include "conv\cfg\defines.hpp"
    #include "conv\cfg\dialogs.hpp"
    
    class CfgFunctions
    {
    #include "conv\cfg\functions.hpp"
    };


  4. (Optional) Create "missionConversations.hpp", fill it with conversations and add to your desciption.ext:
    #include "missionConversations.hpp"

    .

  5. (Optional, needed for kbTell) Create "sentences.bikb", fill it with sentences and add to your desciption.ext:
    #include "sentences.bikb"

    .

  6. (Optional) Set "IP_Avatar", "IP_LiveFeed", "IP_ConvSpecial", "IP_AmbientChatter" and "IP_AmbientSentences" variables on units.

The "missionConversations.hpp"

is the central config file you need in order to create full multiple choice conversations. In its current state it should look like this:

class Conversations // main config class - DO NOT change the name!
{
class MyFirstConversation // Name of the conversation.
{
               arguments[] = {"(name player)"}; // Arguments passed to each sentence. Can be used via %1, %2, etc.
	condition = ""; // Condition (Boolean) which causes the conversation to show up as action or response in MC. Empty string means conversation will always show up.
	expression = "hint 'Sucess, yay!';"; // Expression(s) that is/are called after dialog is created and filled. Passed arguments are: [first speaker, second speaker, conversation].
               music = ""; // Name of music track to play defined in CfgMusic.
	responses[] = {"MyFirstResponse", "exit"}; // Possible responses to this conversation. Must be classname(s) of another conversation(s) in this config.
	sentences[] = {"Hello, I'm %1!", "Cool, I'm Mike, nice to meet you!"}; // Sentences of this conversation. Every even sentence will be said by the first person, every odd by the second. The first sentence of the conversation marks the response / action name in other conversations.
               sound = ""; // Name of sound to play defined in CfgSounds.
};
       class MyFirstResponse // Name of the conversation.
{
	responses[] = {"exit"};
	sentences[] = {"How are you?", "Fine, fine."};
};
       class exit
{
	exit = 1; // Closes conversation.
               expression = "nul = [iP_Buddy, 'See ya!', 'DIRECT', 3] spawn IP_fnc_simpleSentence;";
	sentences[] = {"Good bye!"};
};
};

The Variables

There are currently five variables that can be set on units by:

unit setVariable ["VarName", value, isPublic];

  • "IP_LiveFeed" - True: shows live cam when saying simpleSentence and not in a vehicle. - False: Shows avatar always.
  • "IP_Avatar" - Path to avatar picture, should be roughly 4:3 format. Default avatar picture is used if variable is nil.
  • "IP_ConvSpecial" - Will show user defined text below the avatar in a conversation.
  • "IP_AmbientChatter" - True: Unit will be in the pool of ambient NPCs if Ip_fnc_ambientChatter is running. False: Unit won't be in the pool of units who can throw a random sentence when the player walks by.
  • "IP_IP_AmbientSentences" - Array, overrides the passed sentence(s) (classes) of IP_fnc_ambientChatter(KB) for a certain unit.

The Functions

This system is based on functions defined via CfgFunctions. Below are the headers of all current functions. Check them for parameter explanation.

/*
Name: addConversation
Author: IndeedPete
Purpose: Adds conversation from config to unit or object related to unit (e.g. a cellphone), i.e. adds action to start the conversation.
----------
Parameters:
_unit - OBJECT: Unit that the action should be attached to. - MyInterestingConversationPartner
_conversation - STRING: The config entry referring to the desired conversation. - "MyFirstConversation"
_object - OBJECT (Optional): Action will be attached to given object instead of unit. - MyCellphone - DEFAULT: objNull
*/

/*
Name: ambientChatter
Author: IndeedPete
Purpose: Player-centred radio chatter. If player is close, defined NPCs will throw a random sentence.
----------
Parameters:
_receiver - OBJECT: Unit that receives the _sentences. - player
_sentences - ARRAY OF STRINGS: Sentences the NPCs will randomly pick from. - ["Hello world!", "Fuck off!"]
_radius - NUMBER (OPTIONAL): Radius in metres around the _receiver in which random sentences should be triggered. - 10 - DEFAULT: 5
_cycle - NUMBER (OPTIONAL): Interval in seconds in which the script checks for near-by NPCs. - 3 - DEFAULT: 1
_sides - ARAAY OF SIDES: Sides of NPCs who are allowed to speak to the _receiver. - [west, east] - DEFAULT: [civilian, (side _receiver)]
----------
Requires:
IP_fnc_simpleSentence
*/

/*
Name: ambientChatterKB
Author: IndeedPete
Purpose: Player-centred radio chatter. If player is close, defined NPCs will throw a random sentence via kbTell.
----------
Parameters:
_receiver - OBJECT: Unit that receives the _sentences. - player
_topic - STRING: Topic needed for kbTell. - "MyTopic"
_sentences - ARRAY OF STRINGS: Sentence classes the NPCs will randomly pick from, defined in .bikb. - ["MySentence1", "MySentence2"]
_bikb - STRING (OPTIONAL): Path to the .bikb which contains the _sentence. - "mySentences.bikb" - DEFAULT: "sentences.bikb"
_subs - BOOLEAN (OPTIONAL): Show subtitles. - false - DEFAULT: true
_radius - NUMBER (OPTIONAL): Radius in metres around the _receiver in which random sentences should be triggered. - 10 - DEFAULT: 5
_cycle - NUMBER (OPTIONAL): Interval in seconds in which the script checks for near-by NPCs. - 3 - DEFAULT: 1
_sides - ARAAY OF SIDES: Sides of NPCs who are allowed to speak to the _receiver. - [west, east] - DEFAULT: [civilian, (side _receiver)]
----------
Requires:
IP_fnc_simpleSentenceKB
.bikb - File that contains class sentences. (See BI Wiki / documentation on the kbTell system.)
*/

/*
Name: closeConversation
Author: IndeedPete
Purpose: Closes current conversation, i.e. the dialog. Is in fact just a place holder right now. 
*/

/*
Name: openConversation
Author: IndeedPete
Purpose: Opens a conversation (dialog) from config.
----------
Parameters:
_first - OBJECT: The first conversation participant saying every EVEN sentence. - player
_second - OBJECT: The second conversation participant saying every ODD sentence.  - MyInterestingConversationPartner
_conversation - STRING: The config entry referring to the desired conversation. - "MyFirstConversation"
----------
Requires:
Dialog "IP_DLG_CONVERSATION"
.jpg - "conv\img\defaultAvatar.jpg"
*/

/*
Name: removeConversation
Author: IndeedPete
Purpose: Removes conversation from unit or object, i.e. removes action to start the conversation.
----------
Parameters:
_unit - OBJECT: Unit that the action should be removed from. - MyInterestingConversationPartner
_conversation - STRING: The config entry referring to the desired conversation. - "MyFirstConversation"
*/

/*
Name: selectResponse
Author: IndeedPete
Purpose: Upon response selection, conversation dialog is closed and reopened to show the new conversation based on the selected response.
----------
Parameters:
_this - STRING: Data string which contains the two conversation participants and the response name. Trick to bypass engine limitation in passing additional arguments via dialog EHs. - "['IP_Main', 'IP_Buddy', 'MyFirstConversation']"
*/

/*
Name: simpleConversation
Author: IndeedPete
Purpose: Wrapper function to create a simple conversation from several simple sentences (IP_fnc_simpleSentence).
----------
Parameters:
_speakers - ARRAY OF OBJECTS: Units that alternately say the _sentences. - [player, SomeGuy]
_sentences - ARAAY OF STRINGS: Sentences the _speakers should say. Every Xth sentence will be spoken by the Xth speaker. - ["Hello world!", "Fuck off!"]
_wichChat - STRING (OPTIONAL): Which way of communication should be used. Available chats: "SIDE", "GROUP", "VEHICLE", "CUT" or "DIRECT" - "DIRECT" - DEFAULT: "SIDE"
_isCutscene - BOOL (OPTIONAL): Cutscene mode: If set to true cinema borders will show up and the conversation can be skipped by the player pressing space. - true - DEFAULT: false
----------
Requires:
IP_fnc_simpleSentence
*/

/*
Name: simpleConversationKB
Author: IndeedPete
Purpose: Wrapper function to create a simple conversation from several KB simple sentences (IP_fnc_simpleSentenceKB).
----------
Parameters:
_speakers - ARRAY OF OBJECTS: Units that alternately say the _sentences. Receiver of the Xth _sentence is the X + 1th _speaker. - [player, SomeGuy]
_sentences - ARRAY OF ARRAY OF STRINGS: Topics and sentences the _speakers should say. Every Xth sentence will be spoken by the Xth speaker. - [["MyTopic","Hello world!"], ["MyTopic","Fuck off!"]]
_wichChat - STRING (OPTIONAL): Which way of communication should be used for showing the text. Available chats: "SIDE", "GROUP", "VEHICLE", "CUT" or "DIRECT" - "DIRECT" - DEFAULT: "SIDE"
_isCutscene - BOOL (OPTIONAL): Cutscene mode: If set to true cinema borders will show up and the conversation can be skipped by the player pressing space. - true - DEFAULT: false
_bikb - STRING (OPTIONAL): Path to the .bikb which contains the _sentence. - "mySentences.bikb" - DEFAULT: "sentences.bikb"
----------
Requires:
IP_fnc_simpleSentenceKB
.bikb - File that contains class sentences. (See BI Wiki / documentation on the kbTell system.)
*/

/*
Name: simpleSentence
Author: IndeedPete
Purpose: Simulate radio or direct conversations between units. Calculates delay based on input length. Defines global variable "IP_SimpleSentence_Talking" while someone is talking.
----------
Parameters:
_speaker - OBJECT: Unit that should say the _sentence. - player
_sentence - STRING: Text that the _speaker should say. - "Hello world!"
_wichChat - STRING (OPTIONAL): Which way of communication should be used. Available chats: "SIDE", "GROUP", "VEHICLE", "CUT" or "DIRECT" - "DIRECT" - DEFAULT: "SIDE"
_add - NUMBER (OPTIONAL): Addition in seconds to the calculated delay. Can be negative. - 5 - DEFAULT: 0
_len - NUMBER (OPTIONAL): Fixed delay. - 20 - DEFAULT: ((count (toArray _sentence)) * _x) <- calculation to determine delay
----------
Requires:
Dialog "IP_DLG_SIMPLESENTENCE"
.jpg - "conv\img\defaultAvatar.jpg"
*/

/*
Name: simpleSentenceKB
Author: IndeedPete
Purpose: Plays speech by kbTell; shows text in simple sentence box if defined properly.
----------
Parameters:
_speaker - OBJECT: Unit that should say the _sentence. - player
_receiver - OBJECT: Unit that should say the _sentence. - player
_topic - STRING: Topic the _sentence is part of. - "MyTopic"
_sentence - STRING: Class name defined in .bikb of the _sentence the _speaker should say. - "Hello world!"
_wichChat - STRING (OPTIONAL): Which way of communication should be used for showing the text. Available chats: "SIDE", "GROUP", "VEHICLE", "CUT" or "DIRECT" - "DIRECT" - DEFAULT: "SIDE"
_bikb - STRING (OPTIONAL): Path to the .bikb which contains the _sentence. - "mySentences.bikb" - DEFAULT: "sentences.bikb"
_subs - BOOLEAN (OPTIONAL): Show subtitles. - false - DEFAULT: true
_kbTellParams - ARRAY (OPTIONAL): Additional parameters for the kbTell command. (See BI Wiki on "kbTell" for details.) - [] - DEFAULT: []
_forceRadio - BOOLEAN (OPTIONAL): Forces the kbTell command to use the radio (contrary to automatically determined way of communication). - true - DEFAULT: false
----------
Requires:
Dialog "IP_DLG_SIMPLESENTENCE"
.jpg - "conv\img\defaultAvatar.jpg"
.bikb - File that contains class sentences. (See BI Wiki / documentation on the kbTell system.)
*/

Examples

Setting up a unit and add a conversation (action) to it:

IP_Buddy setVariable ["IP_LiveFeed", true];
IP_Buddy setVariable ["IP_Avatar", "img\buddyAvatar.jpg"];
[iP_Buddy, "opener"] call IP_fnc_addConversation;

Open conversation from script:

nul = [player, IP_Buddy, "MyFirstConversation"] spawn IP_fnc_openConversation;

Creating simple radio sentence from script:

nul = [iP_Buddy, "Hey, come over here if you want to ask me some questions!", "SIDE"] spawn IP_fnc_simpleSentence;

Creating a small in-game cutscene:

[
	[iP_Commander, player],
	[
		"Hey, I just met you!",
		"And this is crazy!",
		"So here's my number!",
		"Call me maybe!"
	],
	"DIRECT",
	true
] call IP_fnc_simpleConversation;	

Screenshots

2014-03-29_00003pik6y.jpg 2014-03-29_000044rkku.jpg

Changelog

v1.07 - Fixed a bug with the argument feature.

v1.06 - Added support for kbTell, music and sounds. Added ambient chatter function.

v1.05 - Talking to dead guys is not possible anymore.

v1.04 - Added IP_fnc_simpleConversation. Changed folder structure. Changed defines to not interfere with other script packages. Added / changed some minor stuff.

v1.03 - Hotfixed wrong defaultAvatar.jpg path error.

v1.02 - Conversations can now have arguments passed to the sentences. All attributes apart from "sentences[]" are optional now and don't need to be set, not even empty (""). Functions will now create a conversation log accessible in the map screen.

v1.01 - Conversations can now have conditions.

v1.00 - Inital Release

Download v1.07

Feel free to use, abuse or change this system and don't hesitate to ask if you have additional questions. Please note that this is still work in progress and may contain errors or lack certain features. Oh, and don't be too confused by the conversations in the example mission. Those are incomplete, part of another WIP project and are containing some story stuff - I was just too lazy to make up another full example for this small spin-off. :D

v1.06 notice: Before messing around with the new functions ambientChatterKB, simpleConversationKB and simpleSentenceKB please familiarise yourself with the kbTell system (keywords "kbTell", "kbAddTopic", "kbWasSaid").

Cheers!

Edited by IndeedPete
  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Whoa, that's gonna be perfect for RPG style mods! Thanks IndeedPete!

Share this post


Link to post
Share on other sites

Nice! Completely missed dwringer's system as well. I was working on a similar, more complicated system, but I doubt I'll ever get it done with my skills.

Share this post


Link to post
Share on other sites
Release frontpaged on the Armaholic homepage.

Thank you, much appreciated!

Nice! Completely missed dwringer's system as well. I was working on a similar, more complicated system, but I doubt I'll ever get it done with my skills.

Why not? What do you have in mind? Maybe I can help, feel free to ask or take some of my code if it's useful to you in any way.

Share this post


Link to post
Share on other sites
Why not? What do you have in mind? Maybe I can help, feel free to ask or take some of my code if it's useful to you in any way.

Thank you, I'll keep that in mind :) It's mostly due to overreaching (too many features), poor planning (giant mess), and an effort drain from making a separate program for dialogue editing, which I had no previous experience of. I'll just have to start simplifying it at some point.

Share this post


Link to post
Share on other sites

New version!

Changelog

v1.01 - Conversations can now have conditions.

v1.00 - Inital Release

Conditions may be set in missionConversations.hpp and will be checked in openConversation and addConversation functions:

class Conversations // main config class - DO NOT change the name!
{
class MyFirstConversation // Name of the conversation.
{
	[b][color="#FF0000"]condition = ""; // Condition (Boolean) which causes the conversation to show up as action or response in MC. Empty string means conversation will always show up.[/color][/b]
	expression = "hint 'Sucess, yay!';"; // Expression(s) that is/are called after dialog is created and filled. Passed arguments are: [first speaker, second speaker, conversation].
	responses[] = {"MyFirstResponse", "exit"}; // Possible responses to this conversation. Must be classname(s) of another conversation(s) in this config.
	sentences[] = {"Hello, I'm Peter!", "Cool, I'm Mike, nice to meet you!"}; // Sentences of this conversation. Every even sentence will be said by the first person, every odd by the second. The first sentence of the conversation marks the response / action name in other conversations.
};
};

Download v1.01

Share this post


Link to post
Share on other sites

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Hi I want to use this in my missions but we play with a max 32 people. How would I go about making it so any west unit can enter the conversation?

Share this post


Link to post
Share on other sites
Hi I want to use this in my missions but we play with a max 32 people. How would I go about making it so any west unit can enter the conversation?

Limitations

  • ...
  • Conversations with three or more participants are not possible yet.
  • ...

Hi R-o-x, there is no way of having more than two units having a full conversation (with MC) yet. It would require to rebuild some parts of the system. Also this system's main purpose for me was to function in SP so I can't say how it will behave in MP. Anyway, you should be able to use the IP_fnc_simpleSenence at least. In theory you would have to call that one just on the desired clients, e.g. all players who are west. Maybe some script ran from a trigger or somewhere else globally (not tested):

if (side player != west) exitWith{};
[soldier1, "Hey, this sentence is only seen by NATO units!", "SIDE"] call IP_fnc_simpleSentence; 
[soldier2, "Cool story, Bro!", "SIDE"] call IP_fnc_simpleSentence; 

I'm sorry that I can't help you further as I've got only very little experience in the field of making stuff run properly in multiplayer.

Share this post


Link to post
Share on other sites

Hey IndeedPete. Your dialogue system is great and I collaborate with R-o-x currently so we have some constructive pointers.

Parameters as a child:

We wish to be able to put parameters in the sentences and I've tried putting 'call compile format' in the sentences[] child but it interprets it as a string.

I know that you already have the name of the player as the first name and of the second guy in there so it's not impossible.

Make a new child named parameters where you can put (name player) and Variables you want to pass to the dialoge. Then they activates using %1 and %2 etc.

(I see that your condition child already uses a call compile command)

Make a child for who is the person starting the dialoge:

A simple child for PlayerStartsConversation with a boolean. Then the conversation starts either on the player or not the player.

Put some debug code for the class children:

I noticed that an empty Sentences child will create script errors.

Thanks for an awesome script.

Limitations

  • ...
  • Conversations with three or more participants are not possible yet.
  • ...
  • ...

False!

By including a second copy of the missionConversations.hpp with changed, unique class names for the conversations in the description and then changing the call function in the init.sqf, you can get multiple dialogs.

You can even put the call function in the init of a unit:

this setVariable ["IP_LiveFeed", true];
this setVariable ["IP_Avatar", "img\buddyAvatar.jpg"];
[this, "AnotherOpener"] call IP_fnc_addConversation;

Arma is more dynamic than that.

Edited by Mossarelli
Saw Something

Share this post


Link to post
Share on other sites

First, thanks for your positive feedback! Now to business:

  • Parameters as a child <- Should definitely be possible and was on my list already. Just haven't had the time and need to implement it yet. ;)
  • Make a child for who is the person starting the dialoge <- Should be possible though I don't quite see the benefit yet as the conversation is actually opened via [first, second, topic] call IP_fnc_openConversation. Maybe a change in the IP_fnc_addConversation would do it too?
  • Put some debug code for the class children <- Didn't run into this issue yet but I'll take a look, thanks for the heads-up!

By including a second copy of the missionConversations.hpp with changed, unique class names for the conversations in the description and then changing the call function in the init.sqf, you can get multiple dialogs.

You can even put the call function in the init of a unit:

this setVariable ["IP_LiveFeed", true];
this setVariable ["IP_Avatar", "img\buddyAvatar.jpg"];
[this, "AnotherOpener"] call IP_fnc_addConversation;

Arma is more dynamic than that.

I think we misunderstood each other there. With

  • Conversations with three or more participants are not possible yet.

I meant that the actual dialog and the first-second-system at the moment just supports two people. There are not three or four speakers possible within one dialog. Imagine a single player role play game where you talk to two persons at the same time, like in a cutscene. Both people respond to what you say and vice versa. That is not possible with this system yet. Of course you can run the dialog in multiple instances though I don't know how it will behave in "complex" situations.

Share this post


Link to post
Share on other sites

New version!

Changelog

v1.02 - Conversations can now have arguments passed to the sentences. All attributes apart from "sentences[]" are optional now and don't need to be set, not even empty ("").

v1.01 - Conversations can now have conditions.

v1.00 - Inital Release

Download v1.02

Arguments can easily be set and accessed within the missionConversations.hpp:

class Conversations
{
class opener
{
	[b][color="#FF0000"]arguments[] = {"(name player)"}; // Arguments passed to each sentence. Can be used via %1, %2, etc.[/color][/b]
	responses[] = {"survive", "buddy", "mercs", "maxwell", "stratis", "exit"};
	sentences[] = {
		"Hey, can I ask you something?",
		"Fell free, [b][color="#FF0000"]%1[/color][/b]. What would you like to know?"
	};
};
}:

---------- Post added at 02:13 PM ---------- Previous post was at 02:08 PM ----------

Addition to changelog:

Changelog

v1.02 - Conversations can now have arguments passed to the sentences. All attributes apart from "sentences[]" are optional now and don't need to be set, not even empty (""). Functions will now create a conversation log accessible in the map screen.

v1.01 - Conversations can now have conditions.

v1.00 - Inital Release

Share this post


Link to post
Share on other sites

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Lovely.

The only thing that is left to do now is to move it all into one folder like other script modules and you're done.

Good work IndeedPete.

Debug:

Error loading control D:\Backup\Users\Administrator\Documents\Arma 3 - Other Profiles\-Pvt-%20Mossarelli\missions\IP_ConvSystem.Stratis\description.ext/rscTitles/IP_DLG_SIMPLESENTENCE/Controls/IP_BOX_MAIN/
Error loading control D:\Backup\Users\Administrator\Documents\Arma 3 - Other Profiles\-Pvt-%20Mossarelli\missions\IP_ConvSystem.Stratis\description.ext/IP_DLG_CONVERSATION/Controls/IP_BOX_MAIN/
Warning Message: Picture campaigns\ip_cmp_mercs\img\defaultavatar.jpg not found

IndeedPete:

Can you change all the class names to unique names so that it doesn't conflict with other class names with the same name?

Append IP_ to all class names you use please.

Edited by Mossarelli

Share this post


Link to post
Share on other sites
Lovely.

The only thing that is left to do now is to move it all into one folder like other script modules and you're done.

Good work IndeedPete.

Debug:

Error loading control D:\Backup\Users\Administrator\Documents\Arma 3 - Other Profiles\-Pvt-%20Mossarelli\missions\IP_ConvSystem.Stratis\description.ext/rscTitles/IP_DLG_SIMPLESENTENCE/Controls/IP_BOX_MAIN/
Error loading control D:\Backup\Users\Administrator\Documents\Arma 3 - Other Profiles\-Pvt-%20Mossarelli\missions\IP_ConvSystem.Stratis\description.ext/IP_DLG_CONVERSATION/Controls/IP_BOX_MAIN/
Warning Message: Picture campaigns\ip_cmp_mercs\img\defaultavatar.jpg not found

IndeedPete:

Can you change all the class names to unique names so that it doesn't conflict with other class names with the same name?

Append IP_ to all class names you use please.

Oh dear, I'm very sorry. I was developing the system further in a campaign environment and just copied the changed files to the example mission dir. It works on my machine of course, but not on everybody else's. I'm sorry that my "internal quality assurance" failed here. Below is a hotfixed version. As for putting it all in one folder: I agree in general but it's still under continious development and as soon as I build all my ideas into it and tested it in praxis I see to it to release and easier applicable version.

Changelog

v1.03 - Hotfixed wrong defaultAvatar.jpg path error.

v1.02 - Conversations can now have arguments passed to the sentences. All attributes apart from "sentences[]" are optional now and don't need to be set, not even empty (""). Functions will now create a conversation log accessible in the map screen.

v1.01 - Conversations can now have conditions.

v1.00 - Inital Release

Download v1.03

Share this post


Link to post
Share on other sites

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Awesome, thank you Foxhound. Keep up the good work!

Share this post


Link to post
Share on other sites

I'm curious...

Is it possible for players to have conversations with AI spawned with ALiVE? Also, is it possible for multiple players to have their own conversations with different NPCs at a time? For example, if I want to ask an NPC for directions while another player has a conversation with a totally different NPC somewhere else on the map (at the same time)?

It'd also be cool if the responses by these NPCs could be randomly generated. I think something like this could make civilian interaction more interesting, if expanded upon. ;)

Share this post


Link to post
Share on other sites
Is it possible for players to have conversations with AI spawned with ALiVE?

That's more an ALiVE problem than one of the conv system. I don't know how ALiVE works bt if you can somehow access the spawned civies it's no problem to add the action via IP_fnc_addConversation. A quick & dirty implementation would be to set up a persitent loop that runs over every civ on the map (via allUnits) every X seconds and calls IP_fnc_addConversation on them. The function checks if the conversation has already been added to the unit in question before so multiple listing of actions shouldn't happen.

Also, is it possible for multiple players to have their own conversations with different NPCs at a time? For example, if I want to ask an NPC for directions while another player has a conversation with a totally different NPC somewhere else on the map (at the same time)?

I've stated before that I HAVEN'T TESTED IT IN MP, so I don't know how it will behave exactly. However, if you trigger the conversations via actions on the civilians it shouldn't be much of a problem. But my MP-Editing knowledge is very limited. On the bright side, this system does not use any global vars, it only saves stuff in other namespaces (the player's, the conversation partner's and the UINamespace). Selected responses etc. are passed directly between the functions.

As to my knowledge, you run all the conv system functions locally, i.e. code in actions is run locally on the guy's machine who triggered the action. Please correct me if I'm wrong. Thus making it possible to have each player having his own conversation with a different (or the same) AI at the exact same time - in theory. So, to sum it up: I don't know, but feel free to try it and give feedback. ;)

It'd also be cool if the responses by these NPCs could be randomly generated. I think something like this could make civilian interaction more interesting, if expanded upon. ;)

True, but not possible in the current state. I don't know if Arma's config structure supports multi-dimensional arrays. It would be very easy to implement if so. Other workarounds might use the custom code execution. E.g. by bypassing the system and calling up random conversation after the player responded.

Anyway, thanks for your feedback! I wil start looking into the random response thing as I am curious about this by myself. And please give more feedback if you decide to test this system in an MP environment.

---------- Post added at 12:29 PM ---------- Previous post was at 12:23 PM ----------

Thinking more about this, there's actually an easy way to bypass the fixed sentences thing. I've added the possibility to define arguments in conversations lately. So you could simply define a sentence as "%1" and then add an argument like "(['randomSentence1', 'randomSentence2', 'randomSentence3'] call BIS_fnc_selectRandom)". Not tested though. But I still look into it.

---------- Post added at 12:39 PM ---------- Previous post was at 12:29 PM ----------

The function checks if the conversation has already been added to the unit in question before so multiple listing of actions shouldn't happen.

On the contrary, this feature is not part of the released versions yet; it's just in my own version I'm working on. It's coming with the next update. Sorry I mentioned it already.

Share this post


Link to post
Share on other sites

Great addon/script. One thing though, if IP_Buddy gets killed you can still have a conversation with him.

Also could you perhaps have a default setting somewhere that mission makers could switch with a true or false to have conversation topics

disappear after they have been displayed? Another option could be having a secondary line that will replace the first the second time a question is asked. Perhaps a single parameter could be at the end of each conversation block eg..0 for do not list this topic again and a 1 if the topic is to be displayed again. Maybe a 3 to display secondary line or paragraph if already been displayed previously.

The last one would be handy if you want the player to ask a suspect a question a second time.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×