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

Need Help Trying to fix my custom combined cheat.

Jonesie85

Boarding Master
Storm Modder
Hello all, we have all most lieky seen this line of code before, When you need to make a change to a companion with a cheat.

Code:
if (sti(pchar.Fellows.Passengers.navigator) != -1)

We know that the cheat refers to whatever companion is allocated to the navigators post. I have used navigator, boatswain, cannoner, doctor, treasurer and carpenter as companion refererences. I think all work properly.

I have a large cheat code which obviously affects only one companion slot. My questions are:-

- Can you make a code refer to your fighters either individually or combined?
- Can you make a code refer to your un-allocated passengers?
- Can you make the cheat code apply to allof the companion slots with one click?

Im not to sure how to write the code to make it refer to multiple companions/passengers etc.

The code itself does the following.
- Companion capabilities, abilities and skills set to maximum.
- All perks are added to the companion.
- Companion god-mode on land and sea. (Largely untested).
- Companion health set to 2500. (Just in case).
- Companion malee energy set to 2500.
- Companion loyalty and reputation set to maximum.

Code:
string descF25 = "Jonesies' Ultimate Companion Cheat";
void CalculateInfoDataF25()
{
totalInfo = descF25;
// -->
if (sti(pchar.Fellows.Passengers.navigator) != -1)
{
ref mc;
mc = GetCharacter(sti(pchar.Fellows.Passengers.navigator));
if(LAi_IsImmortal(mc))
{
LAi_SetImmortal(mc, false);
Log_SetStringToLog("Companion god mode OFF");
}else{
LAi_SetImmortal(mc, true);
Log_SetStringToLog("Companion god mode ON");
}
}
else
{
totalInfo = "No officer available to modify";
} 
 
if (sti(pchar.Fellows.Passengers.navigator) != -1)
{
ref chr = GetCharacter(sti(pchar.Fellows.Passengers.navigator));
 
chr.Loyality = sti(chr.Loyality) + 200;
chr.Reputation = sti(chr.Reputation) + 200;
chr.skill.freeskill=sti(pchar.skill.freeskill)=1;
chr.skill.leadership=sti(pchar.skill.leadership)=100;
chr.skill.fencinglight=sti(pchar.skill.fencinglight)=100;
chr.skill.fencing=sti(pchar.skill.fencing)=100;
chr.skill.fencingheavy=sti(pchar.skill.fencingheavy)=100;
chr.skill.pistol=sti(pchar.skill.pistol)=100;
chr.skill.fortune=sti(pchar.skill.fortune)=100;
chr.skill.sneak=sti(pchar.skill.sneak)=100;
chr.skill.commerce=sti(pchar.skill.commerce)=100;
chr.skill.defence=sti(pchar.skill.defence)=100;
chr.skill.accuracy=sti(pchar.skill.accuracy)=100;
chr.skill.sailing=sti(pchar.skill.sailing)=100;
chr.skill.cannons=sti(pchar.skill.cannons)=100;
chr.skill.repair=sti(pchar.skill.repair)=100;
chr.skill.grappling=sti(pchar.skill.grappling=100;
 
ref ch=getcharacter(sti(pchar.fellows.passengers.navigator));
 
ch.perks.list.IronWill = "1";
ch.perks.list.BasicDefense = "1";
ch.perks.list.AdvancedDefense = "1";
ch.perks.list.Ciras = "1";
ch.perks.list.CriticalHit = "1";
ch.perks.list.HPPlus = "1";
ch.perks.list.HardHitter = "1";
ch.perks.list.Tireless = "1";
ch.perks.list.Rush = "1";
ch.perks.list.EnergyPlus = "1";
ch.perks.list.Sliding.descr = "1";
ch.perks.list.BladeDancer = "1";
ch.perks.list.SwordplayProfessional = "1";
ch.perks.list.Gunman = "1";
ch.perks.list.GunProfessional = "1";
ch.perks.list.Grus = "1";
ch.perks.list.Medic = "1";
ch.perks.list.ByWorker = "1";
ch.perks.list.ByWorker2 = "1";
ch.perks.list.SharedExperience = "1";
ch.perks.list.ShipEscape = "1";
ch.perks.list.Trustworthy = "1";
ch.perks.list.FlagFra = "1";
ch.perks.list.FlagSpa = "1";
ch.perks.list.FlagHol = "1";
ch.perks.list.FlagEng = "1";
ch.perks.list.Brander = "1";
ch.perks.list.Aboard = "1";
ch.perks.list.Troopers = "1";
ch.perks.list.LongRangeGrappling = "1";
ch.perks.list.GrapplingProfessional = "1";
ch.perks.list.MusketsShoot = "1";
ch.perks.list.BasicCommerce = "1";
ch.perks.list.AdvancedCommerce = "1";
ch.perks.list.FastReload = "1";
ch.perks.list.ImmediateReload = "1";
ch.perks.list.HullDamageUp = "1";
ch.perks.list.SailsDamageUp = "1";
ch.perks.list.CrewDamageUp = "1";
ch.perks.list.CriticalShoot = "1";
ch.perks.list.LongRangeShoot = "1";
ch.perks.list.CannonProfessional = "1";
ch.perks.list.Carpenter = "1";
ch.perks.list.Builder = "1";
ch.perks.list.LightRepair = "1";
ch.perks.list.InstantRepair = "1";
ch.perks.list.BasicBattleState = "1";
ch.perks.list.AdvancedBattleState = "1";
ch.perks.list.ShipDefenseProfessional = "1";
ch.perks.list.ShipSpeedUp = "1";
ch.perks.list.ShipTurnRateUp = "1";
ch.perks.list.StormProfessional = "1";
ch.perks.list.WindCatcher = "1";
ch.perks.list.SailsMan = "1";
ch.perks.list.Turn180 = "1";
ch.perks.list.SandbankManeuver = "1";
ch.perks.list.SailingProfessional = "1";
ch.perks.list.Doctor1 = "1";
ch.perks.list.Doctor2 = "1";
ch.perks.list.Smuggler = "1";
LAi_SetHP(ch,2500,2500);
ch.PerkValue.EnergyPlus=sti(ch.PerkValue.EnergyPlus)=2500;
SetSPECIAL(ch, 10,10,10,10,10,10,10);
 
}
else
{
totalInfo = "No officer available to modify";
}
totalInfo = totalInfo + NewStr() + NewStr() +
"Companion stats, loyalty, reputation & malee energy set to maximum. All perks and god mode activated";
SetFormatedText("INFO_TEXT",totalInfo);
}
 
Back
Top