• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Solved Making Citizen Dialogs

for ch.Sound type, what ones can I use to fit a woman?
 
for ch.Sound type, what ones can I use to fit a woman?


Try - ch.sound_type = "female_citizen";

as in ---

Code:
// Jane Attwell
ch.old.name = "Jane";
ch.old.lastname = "Attwell";
ch.name = TranslateString("","Jane");
ch.lastname = TranslateString("","Attwell");
ch.id		= "Jane Attwell";
ch.model	= "towngirl7";
ch.sound_type = "female_citizen";
ch.fanatic = "1";
ch.church = "Redmond_church";
ch.church.loc = "goto3";
ch.back.location = "Redmond_town_01";
ch.back.locator = "citizen06";
ch.sex = "woman";
ch.nation = ENGLAND;
ch.location	= "Redmond_town_01";
ch.location.group = "goto";
ch.location.locator = "citizen06";
ch.Dialog.Filename = "Redmond Citizen_dialog.c";
ch.greeting = "Gr_Woman_English Citizen";
ch.rank 	= 1;
ch.reputation = "None";
ch.experience = "0";
ch.skill.Leadership = "1";
ch.skill.Fencing = "1";
ch.skill.Sailing = "1";
ch.skill.Accuracy = "1";
ch.skill.Cannons = "1";
ch.skill.Grappling = "1";
ch.skill.Repair = "1";
ch.skill.Defence = "1";
ch.skill.Commerce = "1";
ch.skill.Sneak = "1";
ch.money = "10";
LAi_SetCitizenType(ch);
LAi_group_MoveCharacter(ch, "ENGLAND_CITIZENS");
AddGameCharacter(n, ch);



lol, hey, when I use GM viewer, all I see is a grey "body" of the character with no color or definition, is there any way to change that?

Have you selected the location of the textures ( see image ) - for some reason this also does not work for me using Windows Vista ( it works ok in Windows XP )
Ships textures however work in both XP & Vista :shrug



:cheers
 

Attachments

  • PotC-GM_Viewer.JPG
    PotC-GM_Viewer.JPG
    143 KB · Views: 81
I have windows 7, and I'll try checking out the textures too and thanks talisman, I should have cayman done soon, then I'll try to do the english town on nevis
 
Also, what's the proper name of the locator for grand cayman and for the governor's harbor and Alice town for the dialog files and what not?

Also, what do I change in order to get my copied (from dowessun) C file to use an H file with a different name?

It's one thing after another with these dialog files, I'll need all these questions answered before I can do anything... :ko kinda frustrating honestly...
 
Also, what's the proper name of the locator for grand cayman and for the governor's harbor and Alice town for the dialog files and what not?

Also, what do I change in order to get my copied (from dowessun) C file to use an H file with a different name?

It's one thing after another with these dialog files, I'll need all these questions answered before I can do anything... :ko kinda frustrating honestly...


Don't worry - in most cases the only way to learn these things is trial & error .

I think the C file will automatically look for an H file of the same name in the English sub- folder --- so you have to give your H file the same name as your C file.


For the locators \ location in the character init file --- I assume you mean these

//Soldier íà âûõîäå èç ïîðòà
ch.old.name = "Soldier";
ch.old.lastname = "";
ch.name = TranslateString("","Soldier");
ch.lastname = "";
ch.id = "Dou_soldier_1";
ch.model = 6; // PB
ch.sound_type = "soldier";
LAi_CharacterReincarnation(ch, true, false);
ch.sex = "man";
GiveItem2Character(ch, BLADE_SABER);
ch.equip.blade = BLADE_SABER;
ch.location = "Douwesen_port";
ch.location.group = "goto";
ch.location.locator = "goto16";

ch.Dialog.Filename = "Douwesen soldier_dialog.c";
ch.nation = HOLLAND;
ch.rank = 1;
ch.reputation = "None";
ch.experience = "0";
ch.skill.Leadership = "1";
ch.skill.Fencing = "1";
ch.skill.Sailing = "1";
ch.skill.Accuracy = "1";
ch.skill.Cannons = "1";
ch.skill.Grappling = "1";
ch.skill.Repair = "1";
ch.skill.Defence = "1";
ch.skill.Commerce = "1";
ch.skill.Sneak = "1";
ch.money = "10";
LAi_SetGuardianType(ch);
LAi_SetLoginTime(ch, 0.0, 24.0);
LAi_SetHP(ch, 80.0, 80.0);
LAi_group_MoveCharacter(ch, "DOUWESEN_SOLDIERS");
ch.greeting = "Gr_Douwesen Soldier";
AddGameCharacter(n, ch);


then you have to use the console and the visable locators -- see this post --->>> http://forum.piratesahoy.net/index.php/topic/18426-making-american-soldier-and-citizen-dialogs/page__view__findpost__p__418798


to find where you want to put the person.


For instance in the Cayman port image in the post to put someone by the grass on the right -- I assume the entries would be


ch.location = "Cayman_Port";
ch.location.group = "officers";
ch.location.locator = "sea_3";



:drunk
 
Tailsman, I'm asking about the dialog.c files, what's the proper name of cayman that I have to use in the locator of the .c dialog for it to recognize that it's a cayman dialog.(so, it can use accurate town pop. numbers and whatnot)
 
You can use any filename; it's YOU who decides what name to use. Just set whatever you want for "ch.Dialog.Filename".

I know nobody else is working on this, so I wouldn't worry about that. If somebody else does want to work on it, it'd be easy enough to split things up.
 
okay, let me explain, there is an option in the dialog that uses city locators and makes the citizen say the size of the town, I need to know what the locator for grand cayman the town as a whole is so that the citizens will properly say however many troops the fort has, however many citizens there are, etc. It's set to dowessen, since that's what I copied it from, and until I change it, it will use dowessen's fort troops and dowessen's citizen count... Sorry if I'm being difficult, I'm just not sure if anyone knows what I'm talking about, if I just keep missing the point then I'll just forget about it and just set up the directions
 
eh, if pieter doesn't know what it is, then I'll just forget about it and just do directions, besides, it is a little odd when you think about it for a citizen to know the fort and town size....
 
eh, forget about the fort and citizen count, citizens aren't supposed to be that smart anyways :p I've finished adding characters to the american towns along with cayman, just have to make cayman dialog, then, I can move onto the English port on nevis.
 
I noticed that Randomly when I ask about the locals, I get these errors along with a game crash:

RUNTIME ERROR - file: dialogs\Alice citizen_dialog.c; line: 166
invalid index -1 [size:2250]
RUNTIME ERROR - file: dialogs\Alice citizen_dialog.c; line: 166
function 'ProcessDialogEvent' stack error

It will happen randomly with only alice town it seems and I don't know what's going on...

RUNTIME ERROR - file: dialogs\cayman_citizen_dialog.c; line: 166
invalid index -1 [size:2250]
RUNTIME ERROR - file: dialogs\cayman_citizen_dialog.c; line: 166
function 'ProcessDialogEvent' stack error

and cayman...

The alice town file should be on here somewhere around post #20 or so, it will be grouped with other dialogs, just download the Alice citizen_dialog ones if you want to look at them yourself...
 
okay, let me explain, there is an option in the dialog that uses city locators and makes the citizen say the size of the town, I need to know what the locator for grand cayman the town as a whole is so that the citizens will properly say however many troops the fort has, however many citizens there are, etc. It's set to dowessen, since that's what I copied it from, and until I change it, it will use dowessen's fort troops and dowessen's citizen count... Sorry if I'm being difficult, I'm just not sure if anyone knows what I'm talking about, if I just keep missing the point then I'll just forget about it and just set up the directions


Ok - Firstly I am not sure if this is correct - so it may not work - but here is my reasoning --

In the Douwsen Citizen_dialog.c file

This appears to be the code that puts the size of the population into the dialog

Code:
case "Douwesen":
d.Text = DLG_TEXT[143] + " " + DLG_TEXT[171] + " " + GetTownSize("Douwesen") + " " + DLG_TEXT[172]; // NK
Link.l1 = DLG_TEXT[144];
Link.l1.go = "Douwesen_1";
Link.l2 = DLG_TEXT[145];
Link.l2.go = "new question";
break;


The population + GetTownSize("Douwesen") is picked up from this bit of code in the file Towntable.c which you don't need to touch

Code:
int GetTownSize(string sTownName)
{
// NK 05-04-23 switch to towns[]
ref ctown = GetTownFromID(sTownName);
if(CheckAttribute(ctown,"size")) return sti(ctown.size);
return DEFAULT_TOWN_POP;
}



What you need to know is what to change the word ("Douwesen") in + GetTownSize("Douwesen") in the case "Douwesen": in the dialog.c file to in order to make the code pick up the population of other towns.

In the falaise de fleur citizen_dialog.c file

the code is

Code:
case "Fleur":
d.Text = DLG_TEXT[134] + DLG_TEXT[168] + GetTownSize("Falaise de Fleur") + DLG_TEXT[169]; // NK
Link.l1 = pcharrepphrase(DLG_TEXT[135], DLG_TEXT[136]);
Link.l1.go = "new question";
link.l2 = pcharrepphrase(DLG_TEXT[137], DLG_TEXT[138]);
link.l2.go = "exit";
break;


I think in the Douwsen file you are using you need to replace ("Douwesen") with the case names from this code in Towntable.c

Code:
string ret;
if (REAL_CARIBBEAN == 1) {
switch (townid) {
case "Conceicao":
switch(GetCurrentPeriod())
{
case PERIOD_REVOLUTIONS:			ret = "Saint George"; break;
case PERIOD_THE_CORSICAN:			ret = "Saint George"; break;
ret = "Sao Jorge";
}
break;
case "Douwesen":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "Palo Brasil"; break
//	case PERIOD_THE_SPANISH_MAIN:		ret = "Palo Brasil"; break;
ret = "Kralendijk";
}
break;
case "Falaise de Fleur":
ret = "St Pierre";
break;
case "Isla Muelle":
ret = "San Juan";
break;
case "Oxbay":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "São Luis"; break;
ret = "Speightstown";
}
break;
case "Greenford":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "Santa Inês"; break;
ret = "Bridgetown";
}
break;
case "Redmond":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "Villa de la Vega"; break;
case PERIOD_REVOLUTIONS:			ret = "Kingston"; break;
case PERIOD_THE_CORSICAN:			ret = "Kingston"; break;
ret = "Port Royale";
}
break;
case "Charlestown":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "Pueblo Carlos"; break;
ret = "Charlestown";
}
break;
case "Quebradas Costillas":
ret = "Pirate Settlement";
break;
case "Port au Prince":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "Santa Maria del Puerto"; break;
case PERIOD_THE_SPANISH_MAIN:		ret = "Hôpital"; break;
ret = "Port au Prince";
}
break;
case "Santo Domingo":
switch(GetCurrentPeriod())
{
case PERIOD_COLONIAL_POWERS:		ret = "Saint Domingue"; break;
case PERIOD_REVOLUTIONS:			ret = "Saint Domingue"; break;
ret = "Santo Domingo";
}
break;
/*			case "Grand Turk":
ret = "Grand Turk";
break;
*/			case "Grand Cayman":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "Cumana"; break;
ret = "Grand Cayman";
}
break;
case "Havana":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "San Cristobal de la Habana"; break;
ret = "Havana";
}
break;
case "Santiago":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "Santiago de Cuba"; break;
ret = "Santiago";
}
break;
case "Pointe a Pitre":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "Guadalupe"; break;
ret = "Pointe a Pitre";
}
break;
case "Tortuga":
switch(GetCurrentPeriod())
{
case PERIOD_COLONIAL_POWERS:		ret = "Tortuga"; break;
ret = "La Tortue";
}
break;
/*			case "Marigot":
ret = "Marigot";
break;
case "Philipsburg":
ret = "Philipsburg";
break;
case "St John's":
ret = "St John's";
break;
case "Willemstad":
ret = "Willemstad";
break;
*/			case "Eleuthera":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "Puerto la Cruz"; break;
case PERIOD_THE_SPANISH_MAIN:		ret = "Puerto la Cruz"; break;
ret = "Governor's Harbor";
}
break;
case "Alice":
switch(GetCurrentPeriod())
{
case PERIOD_EARLY_EXPLORERS:		ret = "San Elena"; break;
ret = "Alice Town";
}
break;
/*			case "Oranjestad":
ret = "Oranjestad";
break;
*/			case "Khael Roa":
ret = "Cozumel";
break;
// default:
ret = townid;
}
} else {
ret = townid;
}
return ret;
}




i.e. "Grand Cayman" "Charlestown" "Alice" "Pointe a Pitre"


As I said that is what I think - but I am not sure if it will work. :shrug


:cheers
 
Well, right now I have a much bigger problem, quoting my last post:

I noticed that Randomly when I ask about the locals, I get these errors along with a game crash:

RUNTIME ERROR - file: dialogs\Alice citizen_dialog.c; line: 166
invalid index -1 [size:2250]
RUNTIME ERROR - file: dialogs\Alice citizen_dialog.c; line: 166
function 'ProcessDialogEvent' stack error

It will happen randomly with only alice town it seems and I don't know what's going on...

RUNTIME ERROR - file: dialogs\cayman_citizen_dialog.c; line: 166
invalid index -1 [size:2250]
RUNTIME ERROR - file: dialogs\cayman_citizen_dialog.c; line: 166
function 'ProcessDialogEvent' stack error

and cayman...

The alice town file should be on here somewhere around post #20 or so, it will be grouped with other dialogs, just download the Alice citizen_dialog ones if you want to look at them yourself...
 
Well, right now I have a much bigger problem, quoting my last post:

I noticed that Randomly when I ask about the locals, I get these errors along with a game crash:

RUNTIME ERROR - file: dialogs\Alice citizen_dialog.c; line: 166
invalid index -1 [size:2250]
RUNTIME ERROR - file: dialogs\Alice citizen_dialog.c; line: 166
function 'ProcessDialogEvent' stack error

It will happen randomly with only alice town it seems and I don't know what's going on...

RUNTIME ERROR - file: dialogs\cayman_citizen_dialog.c; line: 166
invalid index -1 [size:2250]
RUNTIME ERROR - file: dialogs\cayman_citizen_dialog.c; line: 166
function 'ProcessDialogEvent' stack error

and cayman...

The alice town file should be on here somewhere around post #20 or so, it will be grouped with other dialogs, just download the Alice citizen_dialog ones if you want to look at them yourself...



:shrug

I can't see anything wrong with the files compared to the original Douwesen one.

Have you checked to see if the Douwesen one ( Bonaire ) works ? - since it seems to be different to some of the other original town ones.


Douwsen-->>
Code:
case "info":
dialog.snd1 = "";
dialog.snd2 = "";
dialog.snd3 = "";
d.Text = RandPhrase(DLG_TEXT[79] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[80], DLG_TEXT[81], DLG_TEXT[82] + GetMyName(Pchar) + DLG_TEXT[83], &Dialog, Dialog.snd1, Dialog.snd2, Dialog.snd3);
if(Rand(1)==0)
{	
Link.l1 = DLG_TEXT[84] + GetMyFullName(&Characters[GetCharacterIndex(DLG_TEXT[85])]) + DLG_TEXT[87];
Link.l1.go = "governor";
}
else
{
Link.l1 = DLG_TEXT[88] + GetMyFullName(&Characters[GetCharacterIndex(DLG_TEXT[89])]) + DLG_TEXT[91];
Link.l1.go = "tavernkeeper";
}
if(Rand(1)==0)	
{
Link.l2 = DLG_TEXT[92] + GetMyFullName(&Characters[GetCharacterIndex(DLG_TEXT[93])]) + DLG_TEXT[95];
Link.l2.go = "shipwright";
}
else 
{
Link.l2 = DLG_TEXT[96] + GetMyFullName(&Characters[GetCharacterIndex(DLG_TEXT[97])]) + DLG_TEXT[99];
Link.l2.go = "localtrader";
}
// RobC/Alan_Smithee Blacksmiths -->
Link.l3 = DLG_TEXT[162];
Link.l3.go = "smithy";
Link.l4 = DLG_TEXT[100];
Link.l4.go = "new question";
break;

Redmond--->>>

Code:
case "info":
dialog.snd1 = "";
dialog.snd2 = "";
dialog.snd3 = "";
d.Text = RandPhrase(DLG_TEXT[73] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[74], DLG_TEXT[75] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[76], DLG_TEXT[77] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[78], &Dialog, dialog.snd1, dialog.snd2, dialog.snd3);
if(Rand(1)==0)
{	
Link.l1 = DLG_TEXT[79];
Link.l1.go = "governor";
}
else
{
Link.l1 = DLG_TEXT[80];
Link.l1.go = "tavernkeeper";
}
if(Rand(1)==0)	
{
Link.l2 = DLG_TEXT[81];
Link.l2.go = "shipwright";
}
else 
{
Link.l2 = DLG_TEXT[82];
Link.l2.go = "localtrader";
}
// RobC/Alan_Smithee Blacksmiths -->
if(Rand(1)==0)	
{
Link.l3 = DLG_TEXT[145];
Link.l3.go = "governor";
}
else 
{
Link.l3 = DLG_TEXT[146];
Link.l3.go = "smithy";

}
Link.l4 = DLG_TEXT[83];
Link.l4.go = "new question";
break;

Isla Muelle --->>

Code:
case "info":
dialog.snd1 = "";
dialog.snd2 = "";
dialog.snd3 = "";
d.Text = RandPhrase(DLG_TEXT[72] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[73], DLG_TEXT[74], DLG_TEXT[75], &Dialog, dialog.snd1, dialog.snd2, dialog.snd3);
if(Rand(1)==0)
{	
Link.l1 = DLG_TEXT[76];
Link.l1.go = "governor";
}
else
{
Link.l1 = DLG_TEXT[77];
Link.l1.go = "tavernkeeper";
}
if(Rand(1)==0)	
{
Link.l2 = DLG_TEXT[78];
Link.l2.go = "shipwright";
}
else 
{
Link.l2 = DLG_TEXT[79];
Link.l2.go = "localtrader";
}
// RobC/Alan_Smithee Blacksmiths -->
Link.l3 = DLG_TEXT[133];
Link.l3.go = "smithy";
Link.l4 = DLG_TEXT[80];
Link.l4.go = "new question";
break;

Conceicao --->>

Code:
case "info":
dialog.snd1 = "";
dialog.snd2 = "";
dialog.snd3 = "";
d.Text = RandPhrase(DLG_TEXT[93] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[94], DLG_TEXT[95] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[96], DLG_TEXT[97] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[98], &Dialog, Dialog.snd1, Dialog.snd2, Dialog.snd3);
if(Rand(1)==0)
{	
Link.l1 = DLG_TEXT[99];
Link.l1.go = "governor";
}
else
{
Link.l1 = DLG_TEXT[100] + GetMyFullName(&Characters[GetCharacterIndex(DLG_TEXT[101])]) + DLG_TEXT[103];
Link.l1.go = "tavern_keeper";
}
if(Rand(1)==0)	
{
Link.l2 = DLG_TEXT[104] + Characters[GetCharacterIndex(DLG_TEXT[105])].lastname + DLG_TEXT[106];
Link.l2.go = "Shipwright";
}
else 
{
Link.l2 = DLG_TEXT[107] + GetMyFullName(&Characters[GetCharacterIndex(DLG_TEXT[108])]) + DLG_TEXT[110];
Link.l2.go = "Localtrader";
}
// RobC/Alan_Smithee Blacksmiths -->
Link.l3 = DLG_TEXT[174];
Link.l3.go = "smithy";
Link.l4 = DLG_TEXT[111];
Link.l4.go = "new question";
break;

Falaise de Fleur--->>

Code:
case "info":
dialog.snd1 = "";
dialog.snd2 = "";
dialog.snd3 = "";
d.Text = RandPhrase(DLG_TEXT[84] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[85], DLG_TEXT[86], DLG_TEXT[87], &Dialog, dialog.snd1, dialog.snd2, dialog.snd3);
if(Rand(1)==0)
{	
Link.l1 = DLG_TEXT[88];
Link.l1.go = "governor";
}
else
{
Link.l1 = DLG_TEXT[89];
Link.l1.go = "tavernkeeper";
}
if(Rand(1)==0)  //  Cat FBQ

{
if(characters[GetCharacterIndex("Fred Bob")].quest.help == "agreed")
{
Link.l2 = DLG_TEXT[147];
Link.l2.go = "fredbob";
}
}
else
{
Link.l2 = DLG_TEXT[148];
Link.l2.go = "harbormaster";
}  //  Cat FBQ
if(Rand(1)==0)	
{
Link.l3 = DLG_TEXT[90];
Link.l3.go = "shipwright";
}
else 
{
Link.l3 = DLG_TEXT[91];
Link.l3.go = "localtrader";
}
if(Rand(1)==0)	
{
Link.l4 = DLG_TEXT[157];
Link.l4.go = "info";
}
else 
{
// RobC/Alan_Smithee Blacksmiths -->
Link.l4 = DLG_TEXT[158];
Link.l4.go = "smithy";
}
Link.l5 = DLG_TEXT[92];
Link.l5.go = "new question";
break;


:shrug


:cheers
 
None of the mod-added towns have regular citizens added to them whom you can ask for directions. Who is up for adding them?
Only minimal coding knowledge required: Adding characters and editing copied dialog files.

This will be important for the final Build 14 release, since it is quite useful to be able to ask for directions in Realistic Game Mode.
 
LOL, I forgot about this, well, unfortunately, I have none of the original files I used, but it shouldn't be too hard since I was basically stealing the work of other files and coding the dialog around those, however, with college and work, I'm wondering how much time I'll have, you may have to wait a bit until I really am able to get on this again, however, this weekend, I'll be sure to take a look at those files and get acquainted with them again so that when I do go back into it, I'll know what I'm doing.
 
Anything you can do will be appreciated. Same for anyone else who would be willing to help.
I can explain how to do it; it's not so difficult. If more people pitch in, it'll be less work per person.
Any town we can get down will be one less that still needs doing. :cheeky
 
Question, should Antigua (the British military island thing) have citizens with citizen dialog? If so, I wouldn't put many citizens in anyways since it seems like a navy post type of thing...
 
Back
Top