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

[HELP] Need help with starting modification

Madoxx

Landlubber
Hi guys I am trying to change two spanish ships at start of peter blood carier to soleil royals. They spawn alright but I wanted to ask which command to use to make them with stats exactly copied from ships_init not just randomly generated ones. I am getting really desperate here. What shall I put in code to make them spawn as REAL_SHIPS? It Is definetly possible because french quest line Soleil (SOLEYLRU) spawn always with same stats. Please help me with that.





string sGroup = "SpaCrew";
Group_FindOrCreateGroup(sGroup);
Group_SetType(sGroup,"war");
Group_SetTaskAttackInMap(sGroup, PLAYER_GROUP);
Group_LockTask(sGroup);

//Ship_SetTaskAbordage(SECONDARY_TASK, sti(chref.index), sti(Pchar.index)); // fix PRIMARY_TASK
//chref.Ship_SetTaskAbordage = true; // çàïîìíèì, ÷òîá íå ñáèâàòü
//chref.ShipTaskLock = true;

for (i=0; i<2; i++)
{
iChar = NPC_GenerateCharacter("SpaBoat_"+i, "Sleu_spa1_1", "man", "man", 7, SPAIN, 1, true));
makeref(chref, Characters[iChar]);
chref.Ship.Type = generateship(SHIP_SOLEILROYAL, 1);
SetRandomNameToCharacter(chref);
SetRandomNameToShip(chref);


setbaseShipData(chref);
hcrew = GetMaxCrewQuantity(chref);
SetCrewQuantity(chref, 1);

DeleteAttribute(chref,"ship.sails");
DeleteAttribute(chref,"ship.masts");
DeleteAttribute(chref,"ship.blots");

Fantom_SetCannons(chref, "war");
Fantom_SetBalls(chref, "war");
SetFantomParamHunter(chref); //êðóòûå ïàðíè
SetCaptanModelByEncType(sld, "war");//
Group_AddCharacter(sGroup, chref.id);
if (i == 0) Group_SetGroupCommander(sGroup, chref.id);
}
Group_SetAddress(sGroup, "Barbados", "IslandShips1", "ship_3");
 
Try changing

chref.Ship.Type = generateship(SHIP_SOLEILROYAL, 1);

to

chref.Ship.Type = CreateBaseShip(SHIP_SOLEILROYAL);

No warrants.

Cheers.
buho (A).
 
Back
Top