• 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!

Devlin Opera for the 65742th time

The aspect ratio of the image does not change how much headroom is available for the "Pirates of the Caribbean" frame. Remember, the image will be resized by the game anyway to fit the screen, which is why the 1024x1024 image looks stretched vertically. If the 1024x1024 image looks right then the 1024x768 image on screen in the game will look squashed vertically.

Do you have the original image from which the current "Quest_DevlinOpera.tga.tx" was taken? If you can upload that, I can probably do some resizing and cropping to get it to fit properly.

If you're looking at locators, you don't open the island model itself. There's a separate locator file for every island. For example, for Martinique, the island model is "FalaiseDeFleur.gm" and the locator file is "FalaiseDeFleur_locators.gm". In general, look at "PROGRAM\ISLANDS\Islands_init.c", find the island you want, and look for the 'rIsland.locators' line; that is what sets the locator file for the island.
 
loadscr1 in my zip is the one from which I tried to resize and crop. The current one was probably taken from this here (can't find it on the computer anymore, found this one online again).

94875.jpg (1440×900) (alphacoders.com)

But doesn't the loadscr1 one allow for more freedom in cropping etc. as it shows the complete image?

I can see the names of the available sea locators when I just open the file with the editor. The idea was to chose a "neutral" locator to reload to sea after the Martinica debriefing, as the ship could be either at the port or at the beach. But I have a better idea already, I just do:

Code:
if (PChar.location.from_sea == "Falaise_de_fleur_shore")
{
               QuestToSeaLogin_PrepareLoc("FalaiseDeFleur", "reload", "reload_2", false);
               QuestToSeaLogin_Launch();
}
else
{
               QuestToSeaLogin_PrepareLoc("FalaiseDeFleur", "reload", "reload_1", false);
               QuestToSeaLogin_Launch();
}
}
This should be correct, right?

Just like the GM Viewer I haven't really used and thus don't really understand this Tool. But I guess in the future I'll need it on two occasions. 1) to add some locators to an existing location, 2) for a quest part that I haven't fully planned out yet because I want to choose the location models first and use those as inspiration for the exact details, and I guess it would be very useful to be able to look at location models quickly to see which ones would qualify.
 
loadscr1 in my zip is the one from which I tried to resize and crop. The current one was probably taken from this here (can't find it on the computer anymore, found this one online again).

94875.jpg (1440×900) (alphacoders.com)

But doesn't the loadscr1 one allow for more freedom in cropping etc. as it shows the complete image?
Yes, I was hoping for a higher resolution version of "loadscr1" with at least 1024 horizontal. "loadscr1" is 693x950 so it will look a bit fuzzy when expanded to 1024 or larger in the game. Anyway, here's what I've been able to do with "loadscr1":
Quest_DevlinOpera.jpg
That's 1024x768 so it should look like that in the game. The .tga version is 1024x1024 like other storyline loading screens.

I can see the names of the available sea locators when I just open the file with the editor. The idea was to chose a "neutral" locator to reload to sea after the Martinica debriefing, as the ship could be either at the port or at the beach. But I have a better idea already, I just do:

Code:
if (PChar.location.from_sea == "Falaise_de_fleur_shore")
{
               QuestToSeaLogin_PrepareLoc("FalaiseDeFleur", "reload", "reload_2", false);
               QuestToSeaLogin_Launch();
}
else
{
               QuestToSeaLogin_PrepareLoc("FalaiseDeFleur", "reload", "reload_1", false);
               QuestToSeaLogin_Launch();
}
}
This should be correct, right?
That does look correct, though you could put one 'QuestToSeaLogin_Launch();' outside the 'if' block. That's going to happen regardless; the only conditional part is the 'QuestToSeaLogin_PrepareLoc' line determining where you will be. (And there's an excess '}' at the end. ;))

Just like the GM Viewer I haven't really used and thus don't really understand this Tool. But I guess in the future I'll need it on two occasions. 1) to add some locators to an existing location, 2) for a quest part that I haven't fully planned out yet because I want to choose the location models first and use those as inspiration for the exact details, and I guess it would be very useful to be able to look at location models quickly to see which ones would qualify.
One odd thing is that if you add locators to an island's locator file, they won't take effect until you start a new game. By contrast, if you add locators to a land location, they'll be usable right away. I got caught out by that once when I wanted to move a locator for one of Hispaniola's beaches and then wondered why I still had to go to the original position to moor - I was trying to use a savegame with my ship on the sea at Hispaniola. It worked when I started a new game and then sailed to the beach in question.
 
Yes, I was hoping for a higher resolution version of "loadscr1" with at least 1024 horizontal. "loadscr1" is 693x950 so it will look a bit fuzzy when expanded to 1024 or larger in the game. Anyway, here's what I've been able to do with "loadscr1":
View attachment 39018
That's 1024x768 so it should look like that in the game. The .tga version is 1024x1024 like other storyline loading screens.
:bow:bow:bow

That does look correct, though you could put one 'QuestToSeaLogin_Launch();' outside the 'if' block. That's going to happen regardless; the only conditional part is the 'QuestToSeaLogin_PrepareLoc' line determining where you will be. (And there's an excess '}' at the end. ;))
Yeah, I'll test it once more from the beach, but it should be okay. Thanks for the tip about the Launch-part outside of the if. There are definitely more cases where I could shorten the code and save some space, e.g. quest cases that can be reused or SetActorType cases that are unneccessary because the character still is ActorType etc. I doscovered a few yesterday.

Now it's toward Santiago (was Santo Domingo initially, but I find Santiago better and more interesting than the capital of Dom Rep, which is the blandest of the VCO towns for me).

One odd thing is that if you add locators to an island's locator file, they won't take effect until you start a new game. By contrast, if you add locators to a land location, they'll be usable right away. I got caught out by that once when I wanted to move a locator for one of Hispaniola's beaches and then wondered why I still had to go to the original position to moor - I was trying to use a savegame with my ship on the sea at Hispaniola. It worked when I started a new game and then sailed to the beach in question.
I'm only talking land locators. Sounds fairly doable judging from the tutorial, I'd only need maybe some help with how to use the Tool and some insight whether to just expand the locatorfile or do a new one. But that's still a bit in the future and of low priority until I get to this part.
 
Yeah, I'll test it once more from the beach, but it should be okay. Thanks for the tip about the Launch-part outside of the if. There are definitely more cases where I could shorten the code and save some space, e.g. quest cases that can be reused or SetActorType cases that are unneccessary because the character still is ActorType etc. I doscovered a few yesterday.
It's not that critical. Though it's worth remembering for future, don't bother searching for every line that can be moved out of a condition just to save a bit of space. As for 'LAi_SetActorType', be careful - you may need to keep the extra lines in as some actions may end up changing the character to a different type.

Now it's toward Santiago (was Santo Domingo initially, but I find Santiago better and more interesting than the capital of Dom Rep, which is the blandest of the VCO towns for me).
On the other hand, Santo Domingo could do with some more action. I had my "Crystal Skull" quest start there for that reason. Santiago features in the "Bartolomeu" story, is heavily used in "Ardent", also sees some action in the "Peter Blood's Crew" sidequest, and will probably be used for another sidequest in the future. Of course, the storylines don't clash with whatever you're doing.

I'm only talking land locators. Sounds fairly doable judging from the tutorial, I'd only need maybe some help with how to use the Tool and some insight whether to just expand the locatorfile or do a new one. But that's still a bit in the future and of low priority until I get to this part.
Whether to add locators to the general file or create a new locator file just for your storyline is up to you. The only difference would be that if you put the locators into the general file, other modders can use them as well.

Land locators are a lot easier to work with than sea locators. Edit "InternalSettings.h" to enable VISIBLE_LOCATORS. In game, go to the area where you want to put your new locator, and save game. Add your locator, start the game, load that savegame, and see if you can find it. If it's not where you want, use GM Viewer to see which way X, Y and Z are pointing in relation to the scene model, then change the co-ordinates of the locator. Repeat until the locator is where you want it.
 
On the other hand, Santo Domingo could do with some more action. I had my "Crystal Skull" quest start there for that reason. Santiago features in the "Bartolomeu" story, is heavily used in "Ardent", also sees some action in the "Peter Blood's Crew" sidequest, and will probably be used for another sidequest in the future. Of course, the storylines don't clash with whatever you're doing.
All of those could do with more characters in general, a few of the typical empty houses and such stuff. I wanted to polish up the VCO towns anyway, but I've read there seem to be strict limitations of how many citizens should be put in there, so I don't know if im "allowed" to add more regular citizens.

[QUOTE="Grey Roger, post: 588051, member: 7679"Add your locator [...] use GM Viewer to see which way X, Y and Z are pointing in relation to the scene model, then change the co-ordinates of the locator.[/QUOTE]
This will probably be the tricky part for me when the time comes.
 
All of those could do with more characters in general, a few of the typical empty houses and such stuff. I wanted to polish up the VCO towns anyway, but I've read there seem to be strict limitations of how many citizens should be put in there, so I don't know if im "allowed" to add more regular citizens.
Yes, there's an absolute maximum of 32 characters in a location. Look through any quest code which involves Tortuga and you'll probably see this:
Code:
Locations[FindLocation("Tortuga_Port")].vcskip = true;
That's because there are a lot of permanent citizens. Add in a few random ones, and Tortuga can easily reach that limit of 32, which means the quest character you're supposed to meet there doesn't show up. The 'vcskip' line prevents any random walkers from spawning, giving the quest character a better chance. When the quest has finished with the area, this will put it back to normal so that random walkers can appear again:
Code:
DeleteAttribute(&Locations[FindLocation("Tortuga_Port")],"vcskip");

I tried adding a few more citizens to Santiago to make it look more lively. All that meant was that fewer random walkers could appear. Another thing I tried was raising the maximum number of random characters who could appear in some of the big places such as Havana town centre, but the 32 character limit overrides that. Even though more random characters could in theory be allowed, there were only at most one or two, which is a negligible difference in a place the size of Havana.

So basically, don't add more permanent citizens. You may find that there are fewer random walkers to compensate, and if you overdo it too much, quest characters who you really need to be there, won't be there.

This will probably be the tricky part for me when the time comes.
It does involve a lot of trial and error. Start by giving your new locator the same co-ordinates as an existing locator near where you want it to be. Change the co-ordinates. Load up the savegame, see that the locator is still very near the other one. Change the co-ordinates some more, load up the savegame, now you can't see the locator at all because you've just moved it half way across town. Put it back where it was, change the co-ordinates but not quite as far, load up the savegame, now the locator is closer to where you want it but still not quite there, but now you're getting a feel for how far it will move when you add 1, or 2, or 10 to the co-ordinates. Repeat until the locator is where you want it. Been there, done that, including one in Santiago which I added for "Ardent". "Goto10" is next to the wall of the town hall, on the street leading to the church - that's mine. :D
 
So basically, don't add more permanent citizens.
Which is a shame. Santiago could have done with a few more, some shipwrights at the port, a few more street merchants... I even had the idea of adding a few sit locators to the benches in town.

The tricky part would be figuring out the gm viewer and tools. But it's going to work out somehow when I get there. I'm going to need a few sit locators, basically I want to cram as many people as possible into a quest tavern...

Speaking of sit locators in taverns, have you got any tips which ones to use in Santiago? I entered and left a few times and sit1 and sit2 in my picture are the only ones I think that never spawned a character. Also I've heard of some recent changes to sit locators in several taverns, anything I need to factor in? Or should I even use a vskip?

And something else: How would i base a single quest case on five different other quest cases? So those five could be fulfilled in any order. I don't know if I can do this with the typical l1, l2 etc. win conditions in my case. I thought perhaps I can give every quest case a pchar.quest.firstthing = "done"; then a pchar.quest.secondthing = "done"; etc. and in the end check if those five all have status done.
 

Attachments

  • sitlocators.png
    sitlocators.png
    1.3 MB · Views: 154
The tricky part would be figuring out the gm viewer and tools. But it's going to work out somehow when I get there. I'm going to need a few sit locators, basically I want to cram as many people as possible into a quest tavern...

Speaking of sit locators in taverns, have you got any tips which ones to use in Santiago? I entered and left a few times and sit1 and sit2 in my picture are the only ones I think that never spawned a character. Also I've heard of some recent changes to sit locators in several taverns, anything I need to factor in? Or should I even use a vskip?
The changes to locators are in those which use the "SmallTavern" model, e.g. San Juan and Sao Jorge. For the purposes of gambling, one or two seat locators in each tavern are in group "candles" to prevent random characters from using them, so that you won't have someone sitting on your lap when you sit down for a game of dice or cards. But "candles" is intended for candles, so the lighting system puts a candle glow on them. So I changed these locators from "candles" to "sit2" - and then had to check where they're used for character definitions and in storylines. Santiago tavern never had a gambler until the latest update, therefore never had a "candles" seat locator. I've added a gambler and changed the seat opposite him to group "sit2". You should find him further back in the tavern.

Using a vcskip is a good idea, it prevents random characters from appearing, so the only characters who will be in the tavern are those who are permanently there. You should find those defined in "PROGRAM\Characters\init\Taverns.c" and "PROGRAM\Characters\init\Usurers.c" - the local smuggler agent is in the latter.

And something else: How would i base a single quest case on five different other quest cases? So those five could be fulfilled in any order. I don't know if I can do this with the typical l1, l2 etc. win conditions in my case. I thought perhaps I can give every quest case a pchar.quest.firstthing = "done"; then a pchar.quest.secondthing = "done"; etc. and in the end check if those five all have status done.
Using "l1", "l2" etc. is the way to require five different conditions to be met. For example, in "Ardent", I used that to check that two different soldiers are dead, it's night time, you're standing by the door and you own a lockpick. If you want five quests to be completed then setting those attributes is the way to go. If you want them to be completed in any order then each of the five quests, upon completion, must check all four of the attributes for the other quests, and trigger the end quest if they're all set.

As for TOOL, here's how it looks:
tool.jpg
That's how you open the "Locators" window:
tool_locators.jpg
"PositionX", "PositionY" and "PositionZ" are the coordinates of the locator. "XX", "XY", "XZ" etc. control which way the locator is facing. The easiest way to set those is to find another locator which already exists and is facing the way you want your locator to face, then copy the values from that locator to your new one. The locator's facing is the way a character will face when sent to that locator.

TOOL has a nifty trick, it can export the locators to a text file:
tool_write_locators.jpg
You can then edit the text file with the text editor of your choice. That way you can put a new "goto" locator with all the others, instead of tacking it onto the bottom. It also means you can play the game with "VISIBLE_LOCATORS" set, find an existing locator near where you want your new one, then edit the text file to copy that locator and rename the copy. Then use "Read from File" to import the text file back into the locator file and use TOOL to edit the coordinates. Another good trick is to export the locators to a text file, then open the location model, read in the text, and save the result as a new file. You can then open this file with GM Viewer and see the location with all the locators.
 
A vcskip it is then! I don't want to sit on anybodys lap...

The reason I asked is that most of the five planned mini-parts end with a character running to a locator. So this is then followed by a quest case that moves those characters to a different location (e.g. "none") as soon as they've reached the locator. I figured I could use l1, l2 etc. with the running away characters to check for them being in that new location, but the problem would be that this would take quite a while, especially in Santiago. So when completing the last of the five I'd have to wait maybe for a minute or so until the last character reached and disappeared at the gate on the other side of town, before anything continues. This means setting attributes seems right and checking the other four every time is a great hint. I still need to figure out how exactly to check for four different attributes, haven't found an example for that in a speedy manner, but it sounds doable.

I need to study the Tool and GM Viewer accordingly to your tips soon, especially since I've reconsidered; I want to make a new reload locator sooner than expected. Until now I haven't been able to open much in the Tool except for white, untextured location outlines, and "view" - "locators" has given me what your second screenshot shows but with no entries. And sometimes there seems to be some kind of error message.
 
A vcskip it is then! I don't want to sit on anybodys lap...
Some other storylines use 'vcskip' in taverns for the same reason. Just remember to use 'DeleteAttribute(&Locations[FindLocation("insert_location_here")],"vcskip")' to cancel it as soon as possible afterwards so that the tavern can get back to normal.

The reason I asked is that most of the five planned mini-parts end with a character running to a locator. So this is then followed by a quest case that moves those characters to a different location (e.g. "none") as soon as they've reached the locator. I figured I could use l1, l2 etc. with the running away characters to check for them being in that new location, but the problem would be that this would take quite a while, especially in Santiago. So when completing the last of the five I'd have to wait maybe for a minute or so until the last character reached and disappeared at the gate on the other side of town, before anything continues. This means setting attributes seems right and checking the other four every time is a great hint. I still need to figure out how exactly to check for four different attributes, haven't found an example for that in a speedy manner, but it sounds doable.
Code:
case "done_first_thing":
    if (CheckQuestAttribute("secondthing", "done") && CheckQuestAttribute("thirdthing", "done") && CheckQuestAttribute("fourththing", "done") && CheckQuestAttribute("fifththing", "done"))
    {
     // You've just done "firstthing", and that big check means all four other things have already been done.
    }
You'll need something similar for each of the five mini-parts - each one needs a 'CheckQuestAttribute' for all of the others.

I need to study the Tool and GM Viewer accordingly to your tips soon, especially since I've reconsidered; I want to make a new reload locator sooner than expected. Until now I haven't been able to open much in the Tool except for white, untextured location outlines, and "view" - "locators" has given me what your second screenshot shows but with no entries. And sometimes there seems to be some kind of error message.
TOOL uses .tga files for its textures - not the .tga.tx files used by the game. But that doesn't matter because if you're looking at an untextured model with nothing in the "locators" window then you're looking at the model file (e.g. "tavern_1.gm"), whereas what you want to look at is the locator file (e.g. "tavern_1_l.gm").
 
Doesn't look too bad! When reloading at this locator I can't move as I am walking in place and it seems I need to change the name because reload7 from a different locator file is already used in this location, so I'll call mine reload8 instead. But it's a start and serves for my current purposes because right now I don't even need a locator to enter, just one for some acting.

When I eliminate the teething problems I could make one or two more for public use, or if nothing else to add a few accesible houses. I guess as soon as a locator leads somewhere I'd have to add three officer reload locators too.
 

Attachments

  • myfirstlocator.png
    myfirstlocator.png
    1.6 MB · Views: 149
The locator is probably too close to the building and off the walkable path. Move it slightly away from the door, then see if you can reload to it and then walk away. If not, move it some more until you can.
 
I think so too, at first I thought that wasn't possible because I used the coordinates of my character standing in front of the door, but slightly simplifying a few of the decimal numbers must have pushed it just a little bit outside of the walkable area.

The shape of the green bubble is strange, but doesn't matter since the range of reload locators is determined in the location file.

I still didn't manage to visually view the sea locators though, and I need one near Cuba that's not too far from Santiago but outside the range of the fort, just in case someone has managed to piss of the spanish.
 
I think so too, at first I thought that wasn't possible because I used the coordinates of my character standing in front of the door, but slightly simplifying a few of the decimal numbers must have pushed it just a little bit outside of the walkable area.
When you get round to adding the officer locators, test them by hiring a full party of three officers. Teleport yourself to the "reload" locator - either go inside the linked building or use console. Then walk away and see if all three officers follow you. If one of them stays still, that locator needs to be moved as well. I speak from personal experience here. ;)

The shape of the green bubble is strange, but doesn't matter since the range of reload locators is determined in the location file.
That probably means "XX", "XY", "XZ" etc. are not correctly proportioned. If possible, find another doorway pointing the same way as yours, then copy all these values from that one. (Unless, when you visit that other door, its locator is a funny shape as well.) The location file may very well have set the range but if you're seeing an odd shape in the game when you have "VISIBLE_LOCATORS" set in "InternalSettings.h", the odd shape has simply been scaled to match that range.

I still didn't manage to visually view the sea locators though, and I need one near Cuba that's not too far from Santiago but outside the range of the fort, just in case someone has managed to piss of the spanish.
From "PROGRAM\ISLANDS\Islands_init.c", you can see that the locator leading into Santiago port is "reload_1". Use TOOL, open "RESOURCE\MODELS\Islands\Cuba_locators.gm", find the coordinates of "reload_1", then find a ship locator whose coordinates are somewhere nearby. (Or check the player's relations with Spain and reload to different locators depending on whether the player is friendly or hostile to Spain.)
 
I've already corrected the locator to be inside the walkable area, but haven't done much else over the weekend because I had too much fun working on the actual quest.

The officer locators should hopefully not be much of a problem, as there's plenty of space in front of the door, and I think in e.g. Santiago, the officer locators are generally a bit further away from the door than in the original towns. Do officer locators work as soon as they're in the "officer" category and named according to the reload locator, e.g. reload8_1? Or do I have to do something else to connect the officer locators to the reload locator?

Also which of the numbers determines the angle the character is looking at when reloading? I've changed only the X-value from my first attempt, but now the player doesn't stand straight after leaving, he's turned a bit diagonally from the door.

I'm not even using an actual location for my purposes, but everything should be correct in case someone else wants to put a location there, or maybe I'll just make an empty house, Santiago has none of those.
 
The officer locators should hopefully not be much of a problem, as there's plenty of space in front of the door, and I think in e.g. Santiago, the officer locators are generally a bit further away from the door than in the original towns. Do officer locators work as soon as they're in the "officer" category and named according to the reload locator, e.g. reload8_1? Or do I have to do something else to connect the officer locators to the reload locator?
Putting the locators in the "officers" group with names to match the base "reload" locator should be enough - I don't recall doing anything else when I added "officers" locators.

Also which of the numbers determines the angle the character is looking at when reloading? I've changed only the X-value from my first attempt, but now the player doesn't stand straight after leaving, he's turned a bit diagonally from the door.
"PositionX" is one of the coordinates. "XX", "XY", "XZ", "YX", "YY", "YZ", "ZX", "ZY", "ZZ" are the ones which control the locator's facing, and therefore the facing of a character who spawns on the locator. Changing "XX" will indeed make the player point a different way and probably also cause the locator to be an ellipsoid rather than a sphere.

@Jack Rackham wrote a guide to locator facing - see the attached file. More precise adjustment of facing probably requires some calculations involving sine and cosine to keep the values balanced if the locator is to remain a sphere.
 

Attachments

  • Locator facing.txt
    460 bytes · Views: 109
Okaydokay. I'm not sure why the facing changed when I just changed the position x, but I will look into it. Worst case I'll set completely new coordinates with the console, that wouldn't take too long.

I'm still having fun with the five-parted search quest in Santiago, this starts at 22.00 and thus should take place at night just for story logic and "cosmetic" reason. But because it involves some very long walking distances (Santiago after all) I'm worried about players making it until sunrise. I was thinking I could either manually set the time to e.g. 22.00 again in some of the many quest cases (but that would be no guarantee, you could wait as long as you want between the quest cases) or maybe I could set a win condition that sets the time to 22.00 again when the clock reaches e.g. 05.30. Would the latter be an option?
 
Walking from one end of Santiago to the other won't take hours, but remember, players don't know what you want them to do and might not co-operate. They could go to the tavern for the night so that they can visit all the normal places which are only open by day - store, shipyard, town hall, street traders or blacksmith.

If this is supposed to be a sequence of quests happening at night, perhaps disable the reloads to the tavern, the port and the gate, and also disable fast travel. That should stop the player from going to the tavern or back to the ship to skip to the next day. Perhaps each quest case could check if the time has somehow advanced to day time and if so, set it to 22:00 again. Beyond that, let time take its natural course. (If you do disable reloads and fast travel, remember to re-enable them again when all five quests are completed. ;))
 
Jungle gates and sea entrance are locked, but the tavern and the port area are involved in the quest action, and it takes more than just crossing the town once. My main concern is actually less about players deliberatery trying to skip ahead in time for whatever reason (they'll have themselves to blame...) but about reaching sunrise anyway when solving the five small scavenger hunts which involve some searching and exploring with those long walking distances. Sunrise wouldn't actually break it at all I guess, but it would hurt the immersion so to speak, e.g. the quest considers the store being closed because it's late in the evening - it would work with an open store, but it would somewhat oppose the quest logic.

As comparison imagine some of the "Sea Hawk" scenes at night (like Hawk luring drunk Massoni out of town or Hawk saving Danielle from the bandits) that would look somewhat stupid at daytime, except those are more like short cutscenes. Or imagine what I did with the book at Martinica during nighttime, like the frenchman going to the store at 4 in the morning (if the store was opened manually).

Could I make the quest cases to check if a specific time has been reached or surpassed? For example set the time to midnight when 4 in the morning has been reached, so it would start at 22.00 and after six in-game hours it would go into a loop of 00.00-04.00 until I end the cycle?
 
Back
Top