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

Fixed Attack of the Clones at Antigua

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
This is what happens if you go to Antigua and talk to the port admiral, and you're hostile to England:
admiral_attacks.jpg

He has his own army of Nathaniel clones.
 
Search for the "Ambush" call in his dialog file. Probably that one refers to a non-existent character model (group).
 
@Grey Roger: The problem is due to this line:
Code:
Ambush("navy", 3, LAI_GROUP_ENEMY, LAI_GROUP_NEUTRAL, "");

"navy" is not an existing model ID.
It IS an existing character model GROUP though, which contains all the various navy uniforms.
However, since the function call here doesn't specify nation, I think you may get random models for ALL nations.
But only in PERIOD_COLONIAL_POWERS and later as before that navy uniforms are disabled in the game.

Probably the easiest solution:
Code:
Ambush("Soldiers", 3, LAI_GROUP_ENEMY, LAI_GROUP_NEUTRAL, "");
Would that be good enough or should we want something more special?
 
That is exactly what I did. I was waiting until I'd tested it before reporting back. This is the result:
admiral_attacks2.jpg

"Ambush" looks for a model type, e.g. "Soldiers". However, it passes through a whole succession of intermediate functions before ending up at "GetRandomModelForTypeEx", which checks if the type is actually a specific model and returns it straight back if it is. For some reason "Ambush" (and some of the intermediates) has this:
Code:
if(modeltype == "Soldiers" || modeltype == "Navy_office4" || HasSubStr(modeltype, "Soldier")) // PB: Add ANY soldiers
Why is it looking specifically for "Navy_office4"? There are other naval uniforms besides that one.

In any case, for this purpose "Soldiers" is fine. There don't seem to be any specific uniforms for marines, i.e. naval soldiers, so when the Admiral calls for the guards, they'll be basic redcoats - the guards outside the door are also "Soldiers".
 
Why is it looking specifically for "Navy_office4"? There are other naval uniforms besides that one.
That's specifically for the "Merchant Guild" ambush that gets triggered if you kill an item trader.
 
Here's "antigua_portadmiral.c" with the "Ambush" line changed to call for "Soldiers". This is the dialog file which I used for the test which produced the picture of the redcoats. It works. :doff
 

Attachments

  • antigua_portadmiral.c
    5.8 KB · Views: 127
Back
Top