Captain_Vane
Landlubber
I was a bit disappointed to find CoAS doesn't have the sail color changer that CT has. At least not anywhere I could find it. I mainly wanted a tanbark color for my schooner and a black sail color. After finding a post showing some old code in the pirate shipyard file for a guide,I decided to add it to my MainHero_dialog.c file.
So, if anyone want's a free and simple way to change their sail colors in CoAS, here's an option.
I'm running the GOF mod, so I would suggest pasting the code into your file.I will attach my file so you can look at it as a guide. Make sure to backup your file first.
Edit: If your trying this in the Eras mod and it doesn't work, try changing
to:
The colors could use some work still.Some are duplicates. The reds and tanbark are similar. Some of the others like yellow need help. Tried to give at least 3 shades of each color. Not sure how many there are.If you find a nice color or other improvements,please post it.
This site has some codes to play with >>> Purple color codes - RGB purple colors
To use it, you need to talk to yourself, on shore or in your cabin, then go from shore to ship or from cabin to sea to world map and back to sea.
edit: "Number One" is my imaginary First Officer the developers seem to have forgotten. I am considering that outdoor merchant to sell the dye. Doing it with the self-talk dialog makes testing easier. If anyone can come up with something more fitting, please share.
This works for me with saved games. Use the down arrow to see all options.
If I got this right, it should work for you.
The file to change is "MainHero_dialog.c" in program/dialogs/russian
Make sure to backup your original first.
To install it, first find near the top of your MainHero_dialog.c:
then at the bottom of that select case statement find this code.Hopefully this part will be common to all versions:
now copy this new code below, then in the above code ,delete the last "break;" with your mouse and paste this new code right there (the break is included in it) Don't miss the semicolon:
examples:
P.S.
I left some misc colors commented in the code on purpose.
P.P.S.
The first number is for alpha,If you notice where I set the color to black, I tried to add a little transparency (an experiment, I guess). I don't really notice a big change there, so I might try lowering mine a bit more
Changing it back to 255 will remove the transparency.
I also did that to my dirty white, figuring the sail is worn out and letting light through more.
So, if anyone want's a free and simple way to change their sail colors in CoAS, here's an option.
I'm running the GOF mod, so I would suggest pasting the code into your file.I will attach my file so you can look at it as a guide. Make sure to backup your file first.
Edit: If your trying this in the Eras mod and it doesn't work, try changing
Code:
pchar.ship.sailscolor
Code:
pchar.ship.sails.color
This site has some codes to play with >>> Purple color codes - RGB purple colors
To use it, you need to talk to yourself, on shore or in your cabin, then go from shore to ship or from cabin to sea to world map and back to sea.
edit: "Number One" is my imaginary First Officer the developers seem to have forgotten. I am considering that outdoor merchant to sell the dye. Doing it with the self-talk dialog makes testing easier. If anyone can come up with something more fitting, please share.
This works for me with saved games. Use the down arrow to see all options.
If I got this right, it should work for you.
The file to change is "MainHero_dialog.c" in program/dialogs/russian
Make sure to backup your original first.
To install it, first find near the top of your MainHero_dialog.c:
Code:
case "TalkSelf_Main":
then at the bottom of that select case statement find this code.Hopefully this part will be common to all versions:
Code:
// захват города
if (GetCharIDXForTownAttack(pchar.location) != -1)
{
Link.l6 = DLG_TEXT_BASE[23];
Link.l6.go = "TalkSelf_TownAttack";
}
Link.l10 = RandPhraseSimple(DLG_TEXT_BASE[24], DLG_TEXT_BASE[25]);
Link.l10.go = "exit";
break; //<< replace this line with the new code
now copy this new code below, then in the above code ,delete the last "break;" with your mouse and paste this new code right there (the break is included in it) Don't miss the semicolon:
Code:
///**********************************************************************************************************************
/// Start of Sail Color Code
/// Charles_Vane (BJI) 1/7/2019
///**********************************************************************************************************************
///
link.l11 = "Number One, I want you to go find dye to color our sails with.";
link.l11.go = "TalkSelf_change_sail_color";
break; /// <<<---- this is from original code
case "TalkSelf_change_sail_color":
NextDiag.TempNode = "First time";
dialog.Text = "So, what color ye be wantin' capt'n";
Link.l1 = "Make it tanbark Number One!";
Link.l1.go = "sail_color_tanbark";
Link.l2 = "Make them dark Number One!";
Link.l2.go = "sail_color_black";
Link.l3 = "Make it blue Number One!";
Link.l3.go = "sail_color_blue";
Link.l4 = "Make it red Number One!";
Link.l4.go = "sail_color_red";
Link.l5 = "Make it green Number One!";
Link.l5.go = "sail_color_green";
Link.l6 = "Make it orange Number One";
Link.l6.go = "sail_color_orange";
Link.l7 = "I'm feelin' purple today Number One!";
Link.l7.go = "sail_color_purple";
Link.l8 = "What do you think of yellow Number One?";
Link.l8.go = "sail_color_yellow";
Link.l9 = "Let's have white sails again Number One!";
Link.l9.go = "sail_color_white";
break;
case "sail_color_tanbark":
Dialog.Text = "Aye,Aye Captain.You want light, medium or dark tanbark?";
Link.l1 = "dark, Number One!";
Link.l1.go = "set_tanbark_dark";
Link.l2 = "medium, Number One!";
Link.l2.go = "set_tanbark_med";
Link.l3 = "light, Number One!";
Link.l3.go = "set_tanbark_light";
Link.l4 = "Extra dark, Number One!";
Link.l4.go = "set_tanbark_exdark";
break;
///SailsColors[8].color = argb(255, 180, 40, 60);
///SailsColors[9].color = argb(255, 125, 25, 25);
///SailsColors[10].color = argb(255, 90, 25, 25);
///dark reddish argb(255,180, 40, 60);
/// very light brownish pchar.ship.sailscolor = argb(255, 200, 170, 170);
case "set_tanbark_exdark":
pchar.ship.sailscolor = argb(255, 95, 35, 45); /// 90, 25, 25);
DialogExit_Self();
break;
// pchar.ship.sailscolor = argb(255, 95, 35, 35);// argb(255, 225, 180, 100); ///255, 220, 200
case "set_tanbark_dark":
pchar.ship.sailscolor = argb(255, 125, 35, 45); /// 90, 25, 25);
DialogExit_Self();
break;
case "set_tanbark_med":
pchar.ship.sailscolor = argb(255, 155, 55, 0);
//pchar.ship.sailscolor = argb(255, 190, 75, 75); //150, 75, 75
DialogExit_Self();
break;
case "set_tanbark_light":
pchar.ship.sailscolor = argb(255, 220, 100, 80); /// 190, 50, 60 .. 180, 40, 60 .. 220, 100, 100);
DialogExit_Self();
break;
///finished
case "sail_color_black":
Dialog.Text = "Aye,Aye Captain.You want light, medium or dark Black?";
Link.l1 = "Make it light grey, Number One!";
Link.l1.go = "set_black_light";
Link.l2 = "Make it medium grey, Number One!";
Link.l2.go = "set_black_med";
Link.l3 = "Paint it black, Number One!";
Link.l3.go = "set_black_dark";
break;
case "set_black_dark":
pchar.ship.sailscolor = argb(155, 55, 55, 55);
DialogExit_Self();
break;
case "set_black_med":
pchar.ship.sailscolor = argb(155, 100, 100, 100);
DialogExit_Self();
break;
case "set_black_light":
pchar.ship.sailscolor = argb(155, 160, 160, 160);
DialogExit_Self();
break;
case "sail_color_blue":
Dialog.Text = "Aye,Aye Captain.You want light, medium or dark blue?";
Link.l1 = "Dark Number One!";
Link.l1.go = "set_blue_dark";
Link.l2 = "Medium Number One!";
Link.l2.go = "set_blue_med";
Link.l3 = "Light Number One!";
Link.l3.go = "set_blue_light";
break;
case "set_blue_dark":
pchar.ship.sailscolor = argb(255, 40, 40, 125); ///good!
DialogExit_Self();
break;
case "set_blue_med":
pchar.ship.sailscolor = argb(255, 100, 150, 200); /// 34, 34, 125); ///med to light
DialogExit_Self();
break;
case "set_blue_light":
pchar.ship.sailscolor = argb(255,153, 204, 255); //pchar.ship.sailscolor = argb(255,160, 160, 255);
DialogExit_Self();
break;
/// RED
case "sail_color_red": ///";
Dialog.Text = "Aye,Aye Captain.You want light, medium or dark red?";
Link.l1 = "Dark Number One!";
Link.l1.go = "set_red_dark";
Link.l2 = "Medium Number One!";
Link.l2.go = "set_red_med";
Link.l3 = "I'm feelin' like a woman today.Make it pink Number One!";
Link.l3.go = "sail_color_pink";
Link.l4 = "How about salmon Number One!";
Link.l4.go = "set_red_salmon";
Link.l5 = "How about cerise Number One!";
Link.l5.go = "set_red_cerise";
Link.l6 = "Bright red Number One!";
Link.l6.go = "set_red_bright";
break;
///salmon 253 171 158
///cerise 222 49 99
///ruby 224 17 95
case "set_red_dark":
pchar.ship.sailscolor = argb(255, 100, 15, 15);
DialogExit_Self();
break;
case "set_red_med":
pchar.ship.sailscolor = argb(255, 200, 10, 10); //134, 34, 95) ;//170, 70, 70);
DialogExit_Self();
break;
case "set_red_salmon":
pchar.ship.sailscolor = argb(255, 255, 171, 150); ///blue purple med //pchar.ship.sailscolor = argb(255,160, 160, 255);
DialogExit_Self();
break;
case "set_red_cerise":
pchar.ship.sailscolor = argb(255, 222, 49, 99); ///bluish purple
DialogExit_Self();
break;
case "set_red_bright":
pchar.ship.sailscolor = argb(255, 255, 50, 50); ///argb(255, 200, 25, 25); //brite red
DialogExit_Self();
break;
case "sail_color_pink": /// argb(255, 200, 125, 125); //pink // pchar.ship.sailscolor = argb(255, 255, 153, 153);
Dialog.Text = "Arrrgghh....PLEASE,PLEASE NOT PINK!!"; //Aye,Whatever my Lady Captain desires";
Link.l1 = "You heard me. That's an order!Move it or you'll be swabbin' the decks!!";
pchar.ship.sailscolor = argb(255, 255, 155, 155); ///bright
/// pchar.ship.sailscolor = argb(255, 253, 155, 153);
Link.l1.go = "exit";
Link.l2 = "Never mind then, I'll pick another color you crybaby";
Link.l2.go = "TalkSelf_change_sail_color";
break;
///
case "sail_color_green":
Dialog.Text = "Aye,Aye Captain.You want light, medium or dark green?";
Link.l1 = "Dark Number One!";
Link.l1.go = "set_green_dark";
Link.l2 = "Medium Number One!";
Link.l2.go = "set_green_med";
Link.l3 = "Light Number One!";
Link.l3.go = "set_green_light";
Link.l3 = "I feel like chartuse Number One!";
Link.l3.go = "set_green_chartuse";
break;
case "set_green_dark":
pchar.ship.sailscolor = argb(255, 34, 125, 34);
/// pchar.ship.sailscolor = argb(255,95, 95, 0);
DialogExit_Self();
break;
case "set_green_med":
// pchar.ship.sailscolor = argb(255, 70, 170, 70);
//pchar.ship.sailscolor = argb(255, 155, 155, 50);
pchar.ship.sailscolor = argb(255, 95, 95, 0);///nice med green
DialogExit_Self();
break;
case "set_green_light":
pchar.ship.sailscolor = argb(255,255, 255, 153);
// pchar.ship.sailscolor = argb(255,153, 255, 200);//very light green
// pchar.ship.sailscolor = argb(255,195, 195, 100);///light green
DialogExit_Self();
break;
case "set_green_chartuse":
Dialog.Text = "Umm....WTF Captain, were Pirates, we don't do no effin' chartuse! How about a nice lime green?";
Link.l1 = "Uhh... yea...sorry, that's what I meant, a lime green!";
Link.l1.go = "set_green_lime";
Link.l2 = "Never mind then,make it a manly dark green";
Link.l2.go = "set_green_dark";
break;
case "set_green_lime":
pchar.ship.sailscolor = argb(255, 153, 255, 153);
DialogExit_Self();
break;
case "sail_color_orange":
Dialog.Text = "Aye,Aye Captain.You want light, medium or dark orange?";
Link.l1 = "Dark Number One!";
Link.l1.go = "set_orange_dark";
Link.l2 = "Medium Number One!";
Link.l2.go = "set_orange_med";
Link.l3 = "Light Number One!";
Link.l3.go = "set_orange_light";
break;
case "set_orange_dark" :
pchar.ship.sailscolor = argb(255, 150, 64, 0);
DialogExit_Self();
break;
case "set_orange_med" :
pchar.ship.sailscolor = argb(255, 255, 95, 0);
DialogExit_Self();
break;
case "set_orange_light" :
pchar.ship.sailscolor = argb(255, 249, 166, 2);
DialogExit_Self();
break;
case "sail_color_purple":
Dialog.Text = "Aye,Aye Captain.You want light, medium or dark purple?";
Link.l1 = "Dark Number One!";
Link.l1.go = "set_purple_dark";
Link.l2 = "Medium Number One!";
Link.l2.go = "set_purple_med";
Link.l3 = "Light Number One!";
Link.l3.go = "set_purple_light";
///fuchsia
break;
case "set_purple_dark" :
pchar.ship.sailscolor = argb(255, 80, 0, 80);
DialogExit_Self();
break;
case "set_purple_med" :
pchar.ship.sailscolor = argb(255, 170, 0, 170);
// argb(255, 222, 49, 99); ///bluish purple
DialogExit_Self();
break;
case "set_purple_light" :
pchar.ship.sailscolor = argb(255,255, 80, 255); //255, 0, 255
DialogExit_Self();
break;
case "sail_color_yellow":
Dialog.Text = "Aye,Aye Captain.You want light, medium or dark yellow?";
Link.l1 = "Dark Number One!";
Link.l1.go = "set_yellow_dark";
Link.l2 = "Medium Number One!"; //argb(255, 200, 170, 20);
Link.l2.go = "set_yellow_med";
Link.l3 = "Light Number One!";
Link.l3.go = "set_yellow_light";
break;
case "set_yellow_dark" :
//pchar.ship.sailscolor = argb(255,95, 85, 50); ///
pchar.ship.sailscolor = argb(255, 255, 255, 0);///nice med green
DialogExit_Self();
break;
case "set_yellow_med" :
pchar.ship.sailscolor = argb(255, 255, 255, 50); ///
DialogExit_Self();
break;
case "set_yellow_light" :
pchar.ship.sailscolor = argb(255,255, 255, 100); /// good light yellow
///83, 80, 10); 255, 255, 153
DialogExit_Self();
break;
case "sail_color_white":
Dialog.Text = "Aye,Aye Captain.Would that be bright or dirty white?"; //Whatever my Lady Captain desires";
Link.l1 = "Bright, if you please,Number One";
Link.l1.go = "set_white_bright";
Link.l2 = "Dirty, if you please,Number One";
Link.l2.go = "set_white_dirty";
break;
case "set_white_bright":
pchar.ship.sailscolor = argb(255, 255, 255, 255);
DialogExit_Self();
break;
case "set_white_dirty":
pchar.ship.sailscolor = argb(200, 220, 220, 220);
DialogExit_Self();
break;
///**********************************************************************************************************************
/// End of Sail Color Code
///**********************************************************************************************************************
examples:
P.S.
I left some misc colors commented in the code on purpose.
P.P.S.
The first number is for alpha,If you notice where I set the color to black, I tried to add a little transparency (an experiment, I guess). I don't really notice a big change there, so I might try lowering mine a bit more
Changing it back to 255 will remove the transparency.
I also did that to my dirty white, figuring the sail is worn out and letting light through more.
Attachments
Last edited: