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

WIP Updating the Island Models

Uh? ONE cannon fired? Just one! :shock
OneCannon.jpg


Edit:
Tried swapping out the commander with the Cartagena one, which we know DOES work.
No go. The game DOES load the locator file and it DOES know where the cannons are. It just won't fire them.
Could it be that since the fort was rotated compared to Martinique, the locators now point the wrong way or something?
 
Last edited:
All Curacao-related files are included in the latest update now: http://www.piratesahoy.net/threads/build-14-beta-3-progress.20686/

Things I checked already:
- Checked if the game does LOAD the locator file: it does as the game crashes if it is removed
- WinMerge comparison with the Martinique Town, Island and Fort Commander code to ensure nothing is missed out
- Swap between Cartagena and Willemstad Commanders to see if that makes any difference: Indeed I DO get a Spanish flag instead, but still no firing cannons

Also I noticed I had forgotten to update the Cartagena fort number of cannons in the Fort Commander file, so I fixed that too.
However, that does prove that the number of cannons is completely ignored for actually firing them, because Cartagena DOES fire.

Edit: One thing I DO notice, looking at the locators, is that between Martinique and Curacao, the cannon/culverin locators appear to be swapped.
Martinique has 22 culverines and 16 cannons, but Curacao has 13 culverines and 25 cannons.
Definitely different there. :confused:
 
Last edited:
The locators were imported into Maya, rotated accordingly, and exported without issues. Here's how they look in Maya with their local rotation axes visible; cannons fire along their z-axes.
Curacao_fort_locators.jpg


I did move a few of them and change some culverines to cannons, but that shouldn't make any difference.
Otherwise, this is exactly the same as what I did with the San Felipe fort for Cartagena.
 
That does look al-right as far as I can tell. But I did another test. This time, I changed Colombia to use the Curacao model files:
Code:
  // Cartagena
     rIsland.id = "Colombia";
     rIsland.model = "Curacao";
     rIsland.filespath.models = "islands\Curacao";
     rIsland.refl_model = "Curacao_refl";
     rIsland.locators = "Curacao_locators";
     rIsland.Enc_enable = false;   // PB: To prevent ships being generated IN the mainland
     rIsland.smuggling_nation = SPAIN;
     rIsland.towns.quantity = 1;
     rIsland.towns.1 = "Cartagena";

     rIsland.reload.l1.label = "#stown_name# Port";
     rIsland.reload.l1.name = "reload_1";
     rIsland.reload.l1.go = "Cartagena_Port";
     rIsland.reload.l1.emerge = "reload3";
     rIsland.reload.l1.ships.l0.ay = 2.5;
     rIsland.reload.l1.radius = 200.0;
     rIsland.reload.l1.pic = 3;
     rIsland.reload.l1.tex = "t1";
     rIsland.reload.l1.goto_enable = false;

     rIsland.reload.l2.label = "San Felipe Fort"; // KK
     rIsland.reload.l2.name = "reload_fort1";
     rIsland.reload.l2.go = "Fort"; // KK
     rIsland.reload.l2.GoAfterBoard.location = "reload_1";
     rIsland.reload.l2.emerge = "see";
     rIsland.reload.l2.radius = 250.0;
     rIsland.reload.l2.commander = "Cartagena Commander"; // KK
     rIsland.reload.l2.fort.model = "Curacao_fort1";
     rIsland.reload.l2.fort.locators = "Curacao_fort1_locators";
     rIsland.reload.l2.pic = 21;
     rIsland.reload.l2.tex = "t1";
     rIsland.reload.l2.goto_enable = false; // Screwface: Disable Sail-To
All the code remained the same; the only thing that was changed was the model file.
Same effect as before: only one cannon fires. :modding
 
I'm pretty damn confused, to say the least. :rumgone
I managed to get another small cluster of cannons to fire once I got just past the furthest left-hand side of the fort. And the cannon balls never seem to hit the ship, either.
Now that I think of it, does it even fire cannon balls at all??? o_O

It almost does seem as though the locators were exported the wrong way round, but I can't figure out whether that DID happen or what could have caused it.
 
When that cannon on the furthest right corner fires, I did see a splash in the water.
So that would suggest that it DOES fire cannonballs. Or, more accurately, bombs.

Could it be that if the cannons DO fire the wrong way, they'd hit the rocks right behind the fort and therefore not cause a cannonball to be seen?
When the fort fired its one cannons, I didn't see a flash effect either; just the smoke afterwards.
That also suggests that it is firing in another direction; if it is firing AT you, wouldn't you see the fire effect?
Also, that one cannon does NOT fire on me when I'm lying right in front of it,
only when I go to the left side of the fort, suddenly that one cannon on the right does fire.
 
The definition in (Locator name) must agree absolutely.
Not all of the 3 gun types work. Mortar is in POTC
firmly defined, I know. Try it in the times of the Locator.gm.

rIsland.reload.l2.fort.locators = "Curacao_fort1_locators";

Locator Name
cannon1
cannon2
cannon3
cannon4
cannon5
culverine1
culverine2
culverine3
culverine4
culverine5
mortar1
mortar2
mortar3
mortar4
mortar5

The (Locator Group) has always the name (Fort1)
 
The problem does seem to be that the locators are all pointing the wrong way; the naming, grouping, code and file name are all correct.
In TOOL, I found several of the locators with the default settings that point them along the Z-axis, when in fact they should be facing the opposite direction.
This means they were somehow flipped by Maya, probably because I made a mistake with a -1 somewhere...
 
Stupid computers! :whipa

Oh well, at least the search led me to find some other things I had forgotten to set up properly for those forts.
So it wasn't a waste of effort. :no
 
OH YES.
Curacao_power.png

FIREPOWER!!! :pirate41:

Turns out it was the parent group of the locators in Maya; it also had its own transformations left over, which were rotating all the locators by around 160 degrees.
Gave them a new parent group with no transformations and they exported properly this time. See attached.
 

Attachments

  • Curacao_fort1_locators.7z
    1.4 KB · Views: 80
Rotated by 160 degrees!?! Well, I certainly hadn't expected that one! :shock

And.... COOOOL! This gives the Dutch some proper teeth. Ouch! :boom:
 
The rotation was from when I moved the locators from their Martinique positions; I guess I just forgot to 'cancel out' that rotation.
 
There's something very odd going on with the Marigot fort: It fires its cannons just fine, but when I fire back, I never hit any of them and therefore cannot destroy the fort.
When I look through the spyglass, I don't see the fort when I look at the firing cannons. But if I look at the RIGHT side of the town, I DO see the fort.
So it seems to me like something with the locators is confused. Any chance you could have a look at it, Armada?
 
Ugh... :rumgone

That sounds more like a collision detection problem, to me. Does this also affect the fort on the other side of the island?
 
Re-exported the fort and managed to get it to show up in the right place with a spyglass, but it cannot be read in TOOL and therefore still won't register cannon ball hits.
I'm trying to find a way around the "cannot be read" issue, but no luck so far. :facepalm
 
Does this also affect the fort on the other side of the island?
I tested the Philipsburg fort and that one seems quite fine.

In any case, this is a long-standing problem and is unrelated to your earlier work on the island.
I was just hoping that, since you had worked on it anyway, you could make it work in the end. Somehow.
 
Never mind, it's working now:

Marigot_burning.png

BURN BABY, BURN! :aar

Note it will need new COL files again. I also used a slightly lighter texture, because I already had that in my TGA collection for Maya models, so since it fits the fort perfectly, I couldn't be bothered to get the darker one from TX to TGA. :p

The only changes I made to try to get around the "cannot be read" issue were to plug some gaps in the geometry (which the player can't see).
You see the short walls next to the towers? They consisted of what could be described as a box with two sides and the bottom cut off, leaving a 2D shape with two folds in it to make it 3D.
What I did was add the two missing sides, in case the exporter doesn't like having vertices that only connect to two edges instead of three or more.
As this seemed to do the trick, maybe that IS a potential cause of the infamous error. Probably not THE cause, though.
 

Attachments

  • Marigot_Fort_FIX.7z
    39 KB · Views: 88
Wow, that is AWESOME! I do believe that was the worst of the Capture Colonies issues we had left!
Thanks, Armada! :woot
 
Back
Top