Caribbean Legend

Caribbean Legend

Caribbean Legend Workshop
The true treasure chest of Caribbean Legend. Publish your mods, add new content or change the exisiting one. Learn more via the button below!
Learn More
Justice island max ship class and smuggling.
Has anybody knows how to chage max ship class than can moore justice island and for smuggling? I would like to change this for no limit.
< >
Showing 1-3 of 3 comments
GqM 2 2 Apr @ 7:31am 
Program\characters\QuestUtilite.c


Line 5236 to 5246:

if(4-sti(RealShips[sti(pchar.Ship.Type)].Class) > 0 || sti(RealShips[sti(pchar.ship.type)].basetype) == SHIP_FLEUT) return false;
for(int i = 0; i < COMPANION_MAX; i++)
{
iTemp = GetCompanionIndex(PChar, i);
if(iTemp > 0)
{
sld = GetCharacter(iTemp);
if(4-sti(RealShips[sti(sld.Ship.Type)].Class) > 0 || sti(RealShips[sti(sld.ship.type)].basetype) == SHIP_FLEUT) return false;
}
}
return true;

Let me explain to you what it means.



if(4-sti(RealShips[sti(pchar.Ship.Type)].Class) > 0 || sti(RealShips[sti(pchar.ship.type)].basetype) == SHIP_FLEUT) return false;

just means that if you sail any class 3, 2 and 1 ship OR a fluyt, you cannot dock at Justice Island,
because (4 - 3) or (4 - 2) or (4 - 1) are all > 0, and the fluyt line is self-explanatory.

return false just disables docking at Justice Island.


So, what you wanna do, is to change the equation to suit your needs.

Like, you can change 4-sti(RealShips[sti(pchar.Ship.Type)].Class) > 0 to let's say
sti(RealShips[sti(pchar.Ship.Type)].Class) < 0
as no ship has a negative class number, you can dock at JI with any ship except for a fluyt.
Therefore, if you really want to sail a fluyt (why would you?) to JI,

just remove || sti(RealShips[sti(pchar.ship.type)].basetype) == SHIP_FLEUT.
Yes, remove the "II" because these two vertical lines represent "or".


The lines below the first two are basically the same but for your companions. The game checks if you have companions, then evaluates their ship class(es).


Also, this chunk of code is linked to line 2000 in quests\Sharlie\Saga.c, which is the actual code that determines whether you are allowed to dock or not.

Hopefully this explanation is decent enough for people to not make any mistakes while editing the codes. Reply to me if it doesn't work please, because I may be wrong.
Last edited by GqM; 2 Apr @ 7:33am
Thanks. I will let u know when i reach island. What about smuggling? Where to change the value to be able to smuggle even with 1 class ships?
MJY 3 May @ 3:17am 
just slap the cheat engine mod here in workshop, u can mod everything almost
Last edited by MJY; 3 May @ 3:17am
< >
Showing 1-3 of 3 comments
Per page: 1530 50