I saw some discussion about problems with adding flags for a new ship in Shipwrights' Office thread (see <a href="http://forum.piratesahoy.net//index.php?showtopic=13023&view=findpost&p=319831" target="_blank">here</a>), so I decided to quote here my PM which I sent to Pieter some time ago where I was trying to describe how to put pennants on ships to help at least a bit in modding.
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->You should check in which gm files are flag locators (usually *_mast*.gm and *_rey*.gm and then add:
refShip.Flags.Mast<i>m</i>.Flag<i>f</i> = <FLAG_ENSIGN|FLAG_PENNANT|FLAG_NONE>;
<i>m</i> - mast number (i.e, if flag locators is in lugger1_mast2.gm, <i>m</i> = 2
<i>f</i> - flag number on mast no <i>m</i>.
One of: FLAG_ENSIGN - a flag with proportions of ensign taken from RESOURCE\Textures\flags\*flg*.tga.tx files; that's standard flag locators (f1, f2, f3 & f4) in *.gm file; FLAG_PENNANT - a pennant taken from RESOURCE\Textures\flags\*pnt*.tga.tx; that one should have penn locators (f1, f2, f3 & f4) in *.gm file (apart from locator name it's identical as flag - f1,...,f4 are coordinates of flag's corners); finally FLAG_NONE should leave a mast without flag (to be precise, put transparent both ensign and pennant).
One warning though: on some ship models (SuperiorWarship, for example) flag will be set also directly in hull model. In this case mast number m is 0. Example:
refShip.Flags.Mast0.Flag1 = FLAG_ENSIGN;
In *.gm file, every quadruple of flag locators must have also penn equivalent, so amount of those two for one ship is equal. If *.gm files for ship doesn't implement whole system, following paramerter must be set to true:
refShip.Flags.NoPennants = true;
This situation will occur for most of the ships and, I bet, all ships you plan to add.
I hope I explained that clearly and you understood my rabble.<!--QuoteEnd--></div><!--QuoteEEnd-->
pirate_kk
--------------------------------------------------------------------------------------
<b>Adding pennant locators to ships</b>
By Thomas the Terror
1. Always start with shipname_mast1.gm, open that one, click view/locators/view.
2. If you see that there is a flag locator attached to this mast, go to locators/write to file. Then save it under the name shipname_mast1.
3. Go to the folder where you saved the file and open it with wordpad or noteblock.
4. Copy the flag locators (f1, f2, f3, f4) and rename the 'flag' attribute to 'penn' (so if the file says flag2, make it penn2, if it says flag, just make it penn)
5. You can make the flag more narrow by turning up the y-axis of the f4 and f3 attributes, and you can make them longer by extending the x-axis of f2 and f3.
6. Save the file, and exit it.
7. Click locators/read from file and click on the just modified file.
8. Click save .GM
(Do this for all parts of the ship which contain flag locators)
1. To make the game show these pennants, go to ships.init and go to the ship you just modified.
2. Remove the line: refShip.Flags.NoPennants = true;
3. Now change the FLAG_ENSIGN to FLAG_PENNANT for the masts you want pennants on.
refShip.Flags.Mast0.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast1.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast2.Flag1 = FLAG_PENNANT;
refShip.Flags.Mast3.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast4.Flag1 = FLAG_PENNANT;
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->You should check in which gm files are flag locators (usually *_mast*.gm and *_rey*.gm and then add:
refShip.Flags.Mast<i>m</i>.Flag<i>f</i> = <FLAG_ENSIGN|FLAG_PENNANT|FLAG_NONE>;
<i>m</i> - mast number (i.e, if flag locators is in lugger1_mast2.gm, <i>m</i> = 2
<i>f</i> - flag number on mast no <i>m</i>.
One of: FLAG_ENSIGN - a flag with proportions of ensign taken from RESOURCE\Textures\flags\*flg*.tga.tx files; that's standard flag locators (f1, f2, f3 & f4) in *.gm file; FLAG_PENNANT - a pennant taken from RESOURCE\Textures\flags\*pnt*.tga.tx; that one should have penn locators (f1, f2, f3 & f4) in *.gm file (apart from locator name it's identical as flag - f1,...,f4 are coordinates of flag's corners); finally FLAG_NONE should leave a mast without flag (to be precise, put transparent both ensign and pennant).
One warning though: on some ship models (SuperiorWarship, for example) flag will be set also directly in hull model. In this case mast number m is 0. Example:
refShip.Flags.Mast0.Flag1 = FLAG_ENSIGN;
In *.gm file, every quadruple of flag locators must have also penn equivalent, so amount of those two for one ship is equal. If *.gm files for ship doesn't implement whole system, following paramerter must be set to true:
refShip.Flags.NoPennants = true;
This situation will occur for most of the ships and, I bet, all ships you plan to add.
I hope I explained that clearly and you understood my rabble.<!--QuoteEnd--></div><!--QuoteEEnd-->
pirate_kk
--------------------------------------------------------------------------------------
<b>Adding pennant locators to ships</b>
By Thomas the Terror
1. Always start with shipname_mast1.gm, open that one, click view/locators/view.
2. If you see that there is a flag locator attached to this mast, go to locators/write to file. Then save it under the name shipname_mast1.
3. Go to the folder where you saved the file and open it with wordpad or noteblock.
4. Copy the flag locators (f1, f2, f3, f4) and rename the 'flag' attribute to 'penn' (so if the file says flag2, make it penn2, if it says flag, just make it penn)
5. You can make the flag more narrow by turning up the y-axis of the f4 and f3 attributes, and you can make them longer by extending the x-axis of f2 and f3.
6. Save the file, and exit it.
7. Click locators/read from file and click on the just modified file.
8. Click save .GM
(Do this for all parts of the ship which contain flag locators)
1. To make the game show these pennants, go to ships.init and go to the ship you just modified.
2. Remove the line: refShip.Flags.NoPennants = true;
3. Now change the FLAG_ENSIGN to FLAG_PENNANT for the masts you want pennants on.
refShip.Flags.Mast0.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast1.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast2.Flag1 = FLAG_PENNANT;
refShip.Flags.Mast3.Flag1 = FLAG_ENSIGN;
refShip.Flags.Mast4.Flag1 = FLAG_PENNANT;