• 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

I made a new folder in RESOURCE\MODELS\Locations\outside, and so far copied all the files from the corresponding VCO folder. They're quite different. There are .gm and .col files that look familiar, but also a lot of other stuff, including text files.

But where should the textures go? RESOURCE\Textures\Locations is structured differently, it has folders for nations, jungles etc.
 
But where should the textures go?
Long answer:
By default, textures just go into "RESOURCE\Textures". If you want to put the textures somewhere specific, the location definition will need to point to it, using a 'Locations[n].filespath.textures' line in its definition. The nation folders, for example, are why you see San Pedro in "Early Explorers" looking different from St. Pierre in all other periods. In "PROGRAM\Locations\init\FalaiseDeFleur.c", in the definition for "Falaise_de_fleur_location_03":
Code:
    Locations[n].filespath.models = "locations\Town_FalaiseDeFleur\town_02";
    Locations[n].filespath.textures = "locations\FRANCE";
But in "PROGRAM\Periods.c", function 'InitTownNationalities()':
Code:
    if(GetTownNation("Falaise de Fleur") == SPAIN)
    {
...
        locations[FindLocation("Falaise_de_fleur_location_03")].filespath.textures = "locations\SPAIN";
So the location normally takes its texture from the "France" folder, but in "Early Explorers" it uses the "Spain" folder.

Short answer:
The textures can go wherever you like, provided you tell your location where you put them. :D
 
The textures can go wherever you like, provided you tell your location where you put them.
Yes but there's no reason in this case to create a specific folder for these VCO textures. All the other VCO locations in POTC normally have there texture files in TEXTURES.
 
Okay Dokay, I copied the textures files in the top PoTC texture folder (not in one of the sub folders). One texture file had a similar name, but not the same. And the first location, now seen in PotC, seems to look good. Of course the trees and everything are still missing, but they are a separate .gm file that I assume somehow gets added on top of it in the PROGRAM location file.

Meanwhile, some quest action starts to take shape in my head. It's still a long way to go before it's all complete, but the imagination has been triggered.

gmviewer.PNG
 
Okay Dokay, I copied the textures files in the top PoTC texture folder (not in one of the sub folders). One texture file had a similar name, but not the same. And the first location, now seen in PotC, seems to look good. Of course the trees and everything are still missing, but they are a separate .gm file that I assume somehow gets added on top of it in the PROGRAM location file.
Take a look at "PROGRAM\Locations\init\cuba.c", specifically the definition for "Santiago_port", most specifically this part:
Code:
    //Models    
    //Always
    Locations[n].models.always.l1 = "SCport";
    Locations[n].models.always.l1.foam = "1";    
    Locations[n].models.always.locators = "SCport_l";
    Locations[n].models.always.add = "light";
    Locations[n].models.always.tree = "tree";
    //Locations[n].models.always.grassPatch = "SCport_g";
    Locations[n].models.always.add2 = "xiao";
    Locations[n].models.always.add3 = "pole";
    Locations[n].models.always.add4 = "chimneys";    //JRH-->
    Locations[n].models.always.add5 = "palmsPA";        
    Locations[n].models.always.add6 = "palmsPB";        
    Locations[n].models.always.add7 = "cannons";        
    Locations[n].models.always.add8 = "wagons";        
    Locations[n].models.always.add9 = "boats";        
    Locations[n].models.always.add10 = "ladder";    //<--JRH
You can see there the lines which add "tree" and "xiao", another model file which is also present in your new location folder. (As you can see, @Jack Rackham added some more items to make the port more interesting.)

Meanwhile, some quest action starts to take shape in my head. It's still a long way to go before it's all complete, but the imagination has been triggered.
:onya
 
Here's the walk_patch you'll need. Don't use walk_patch.gm but this one: walk_patch .ptc
I have not been able to test it so we'll see...
 

Attachments

  • walk_patch.7z
    851.4 KB · Views: 42
Now I made a first attempt to put this into place. Copied from a jungle, then looked at Gold-Bugs Bishop Hostel for inspiration and understanding. How does it look so far?

I set Monsters to "false".

In the models section, I added the re-named locator file, and the .gm files, two of them as grassPatch and exit (whatever that means) and the other two als l1 and l2. Commented out the jungle line.

For the two "patch" lines (day and night) I don't know if it's correct. I now have both walk_patch.gm and walk_patch.ptc in the folder. Since this code doesn't seem to include the file ending, how do I use the correct one? Delete walk_patch.gm?

Never mind the reload directions, they're still from a different location. I first need to get into the location and create locators with TOOL to define all the reloads.

Code:
    Locations[n].filespath.models = "locations\Outside\Forest";

    Locations[n].id = "Sacred Forest";
    locations[n].id.label = "Sacred Forest";
    Locations[n].image = "Outside_Jungle_6.tga";
    //Sound
    locations[n].type = "jungle";
    LAi_LocationMonstersGen(&locations[n], false);
    LAi_LocationSetMonstersTime(&locations[n], 22, 6);

    //Models
    //Always
    Locations[n].models.always.locators = "locator_forest";
    //Locations[n].models.always.jungle = "Jungle06";
    Locations[n].models.always.grassPatch = "gr1001029";
    Locations[n].models.always.exit = "1001029";
    Locations[n].models.always.l1 = "tree";
    Locations[n].models.always.l2 = "xiao";

    //Day
    Locations[n].models.day.charactersPatch = "walk_patch";
    //Night
    Locations[n].models.night.charactersPatch = "walk_patch";
    //Environment
    Locations[n].environment.weather = "true";
    Locations[n].environment.sea = "false";
    //Reload map
    Locations[n].reload.l1.name = "reload1";
    Locations[n].reload.l1.go = "Devlin_Cayman_02";
    Locations[n].reload.l1.emerge = "reload2";
    Locations[n].reload.l1.autoreload = "1";
    Locations[n].locators_radius.reload.reload1 = 2.5;
    Locations[n].reload.l1.label = "Jungle.";

    Locations[n].reload.l2.name = "reload2";
    Locations[n].reload.l2.go = "Cayman_Shore_01";
    Locations[n].reload.l2.emerge = "reload2";
    Locations[n].reload.l2.autoreload = "1";
    Locations[n].locators_radius.reload.reload2 = 2.5;
    Locations[n].reload.l2.label = "Eden Rock.";

    Locations[n].reload.l3.name = "reload3";
    Locations[n].reload.l3.go = "Devlin_Fort_Camp";
    Locations[n].reload.l3.emerge = "reload1";
    Locations[n].reload.l3.autoreload = "1";
    Locations[n].locators_radius.reload.reload3 = 2.5;
    Locations[n].reload.l3.label = "Pirate Fort.";

    Locations[n].reload.l4.name = "reload2_back";
    Locations[n].reload.l4.go = "Cayman_Shore_01";
    Locations[n].reload.l4.emerge = "reload2";
    Locations[n].reload.l4.autoreload = "1";
    Locations[n].locators_radius.reload.reload2_back = 2.5;
    Locations[n].reload.l4.label = "Eden Rock.";

    Locations[n].reload.l5.name = "reload3_back";
    Locations[n].reload.l5.go = "Devlin_Fort_Camp";
    Locations[n].reload.l5.emerge = "reload1";
    Locations[n].reload.l5.autoreload = "1";
    Locations[n].locators_radius.reload.reload3_back = 3;
    Locations[n].reload.l5.label = "Pirate Fort.";

    Locations[n].reload.l6.name = "reload1_back";
    Locations[n].reload.l6.go = "Devlin_Cayman_02";
    Locations[n].reload.l6.emerge = "reload2";
    Locations[n].reload.l6.autoreload = "1";
    Locations[n].locators_radius.reload.reload1_back = 2.5;
    Locations[n].reload.l6.label = "Jungle.";


    Locations[n].island = "Aruba"; // NK 04-08-29
 
Looking at some other files, 'Locations[n].models.always.exit' typically refers to a town exit such as "Santiago_outskirts". Jungle locations which aren't outskirts tend to have 'Locations[n].models.always.jungle' instead. It probably won't matter, though.

The "charactersPatch" lines look fine. At a guess, the system automatically looks for a matching .ptc file, but it wouldn't do any harm to remove "walk_patch.gm" - at the very least, it's saving a little space by removing a file which isn't used.

Remember to add "Sacred Forest" (or whatever else you choose to put for 'locations[n].id.label' into "RESOURCE\INI\TEXTS\ENGLISH\interface_strings.txt". It will need to be translated into the Spanish and Russian versions of the file - you don't need to do that, other folks are working on the translation, but the text does need to be in the English file so that the translators can find it.

Once you have the location working, you can visit it in game and take a screenshot. Edit "InternalSettings.h" to enable FREE_CAMERA, then you can move the viewpoint around and even show Beatrice exploring the forest. (Ever noticed how a lot of loading screens show Bartolomeu o Portugues or Howard Pyle, and a few show Charles Ardent? That's how it was done.) Put the picture into "RESOURCE\Textures\Loading\English", then change the 'Locations[n].image' line to point to it.
 
Here's a textblock to add in your console.c
Place it after case 2.
Don't forget to change the switch to 20 at the beginning of the file.

Start your storyline anywhere and press F12.
It first teleports you to "Sacred forest" and when you're there to check the coordinates for new locators with new F12:s.
Also guess you have namechanged the original locator file to "locator_forest".
 

Attachments

  • for the console.txt
    961 bytes · Views: 51
One more thing. Grass in VCO-locations I have never got to work at all. There is program for that (GrassGenerator) but no luck so far.
So outcomment the grassline for now.
 
F12 doesn't do anything so far. Error.log says

Code:
COMPILE ERROR - file: locations\locations_init.c; line: 234
function 'LocationInitAruba' not found
COMPILE ERROR - file: locations\locations_init.c; line: 234
function 'CreateGameLocations' stack error

And compile.log

Code:
Reload: Process started for locator_name = fakeReload and lockedReloadLocator =
Can't reload...
Location not found: id = Sacred Forest
 
Does "error.log" say anything else? My guess is that there's a problem with "PROGRAM\Storyline\DevlinOpera\locations\init\Aruba.c". Line 234 in "locations_init.c" is part of this block in function 'CreateGameLocations':
Code:
    if (FindFile("PROGRAM\" + sl + "Locations\init", "*.c", fname) != "") {     // <-- Look for storyline-specific version of a location file
        if (LoadSegment(sl + "Locations\init\" + fname)) {                      // <-- If it exists, try to load it
            call func(&n);                                                      // <-- This is line 234 - call the code in the storyline location file
            UnloadSegment(sl + "Locations\init\" + fname);
        }
    }

If that didn't work, "Sacred Forest" doesn't exist. The 'DoQuestReloadToLocation' in "console.c" therefore failed and caused the message in "compile.log".
 
No it doesn't say anything else. That's Sacred Forest":

Probably some mistake here, but how to find it, if error.log doesn't point out the line in that file?
 

Attachments

  • Aruba.c
    1 KB · Views: 51
I added one of the yet unused music pieces which I already added to the game and it's even more beautiful.

I need to rethink stuff. I probably won't need the other VCO location (beach with a shipwreck) just for the shipwreck, if there's already a stock PotC beach with shipwreck. Instead, I can focus on this forest and do much more stuff here.

There's a neat hole in the ground which could be where you climb up from the burial ground via the hanging rope. This would pose the question what to do with the fourth of the giant monster caves. Again, need to think...
 
I need to rethink stuff. I probably won't need the other VCO location (beach with a shipwreck) just for the shipwreck, if there's already a stock PotC beach with shipwreck. Instead, I can focus on this forest and do much more stuff here.
Have you found the model and texture files for the beach already? If so, could you upload them anyway? If you haven't found all the files, don't bother taking time to find them; but if you have, we may as well make use of them. I could perhaps use them as a replacement for the stock beach somewhere, just for the sake of having one less duplicate stock location.

If you can't figure out a way to use the last cave for quest purposes, you could simply link it to a basic stock cave interior of some sort and leave it at that.
 
I'm having so much fun with my forest :D Now you can climb the rope in the cave and emerge from a hole in the ground in the woods above it. Because there are several holes in different places that look very similar, a friendly Indian marks the entrance/exit point.

signpost.png
 
The location looks fine even without the use of COL-files, I guess. If you want to use VCO COL-files you can rename them to POTC names:
VCO POTC
1 DAY1
2 MORNING1
0 EVENING3
3 NIGHT1

so 1001029_1.COL becomes 111029_DAY1.COL if your main model still has the name 1001029.gm.
And the same style for tree and xiao. 4 COL/model.
 
Back
Top