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

Questions about level scaling and officer spawning

BTW. Is aphotecary quest still unfinished? Stumbled upon it and it got me very interested, but later found info from 2016 that it is not finished and can eventually bug you out if you pursue it

It should be playable. I have every intention in the next few weeks/months to fix it properly
 
I wanted to tweak the gunboat to fit my intended progression. It looked like this:
//-------------------------------------------------------------------------
// Gunboat -- Skeleton Bob & Fred Bob -- 05/16/2004
// <SWS - Willemstad Builders' Trials Winter 09 S/N 049> (WBT3)
//-------------------------------------------------------------------------
makeref(refShip,ShipsTypes[n]);
n++;
refShip.Name = "Gunboat";
refShip.All = "Tartane1";
refShip.sname = "Gunboat";
refShip.rigtype = "tar";
refShip.ClosestPoint = 0.15;
refShip.BestPoint = 0.6;
refShip.id = refShip.Name; // PSX
refShip.Class = 8;
refShip.Cannon = CANNON_TYPE_CARRONADE_LBS12;
refShip.MaxCaliber = 6;
refShip.Weight = Tonnes2CWT(15);
if(SHIPS_WEIGHT) refShip.Capacity = 100;
else refShip.Capacity = 4000; // PB: Just enough to allow installing Navarone Carronades
refShip.SupplyScalar = 1.0;
refShip.CannonsQuantity = 5;
// NK cannon qtys 05-04-18 -->
refShip.Cannons.Borts.cannonf.qty = 1;
refShip.Cannons.Borts.cannonb.qty = 0;
// NK <--
refShip.MaxCrew = 20; // PB: was 10
refShip.MinCrew = 7; // PB: was 3
refShip.Price = 7000;//BB was 9000

refShip.HP = 250;
refShip.SP = 100;
I changed the following lines:

else refShip.Capacity = 300; // PB: Just enough to allow installing Navarone Carronades

refShip.MaxCrew = 10; // PB: was 10
refShip.MinCrew = 3; // PB: was 3

When I later found a gunboat in a shipyard (dutch design), it still had like 5000 cargo space, but I think the crew was smaller, tried again today and both crew and the cargo space remains the same (save made before entering a shipyard)
 
"Just enough to allow installing Navarone Carronades"
^ Ah, THAT was the reason! And indeed that doesn't apply unless that SHIPS_WEIGHT mod is enabled, which it isn't.
So that shouldn't apply one way or another.

When I later found a gunboat in a shipyard (dutch design), it still had like 5000 cargo space, but I think the crew was smaller, tried again today and both crew and the cargo space remains the same (save made before entering a shipyard)
If you are using your existing savegame, you have to press F11 as well to update the numbers.
Unless you've already done that, that is... ;)
 
F11 worked. Thanks!
Is there a way to remove randomness in ship generation? Hulls and sail HP, cargo space - these are reasonable. What I find strange is how one gunboat of the same design fits 9 people, and the other 11

EDIT: also, sorry for all these questions, my knowledge of programming is nonexistent, I just know you can change numbers in some files of some games sometimes :D
 
You can remove randomness entirely by adding this to your ship's definition in "Ships_init.c":
Code:
refShip.unique           = true;
That means the stats will be exactly what you've written without any randomisation. But it's all or nothing - either you allow randomisation on everything or you don't allow it at all.
 
Is there a way to remove randomness in ship generation? Hulls and sail HP, cargo space - these are reasonable. What I find strange is how one gunboat of the same design fits 9 people, and the other 11
At the top of ships_init.c, you can find the "national modifiers".
Set all those to 1.0 and that should at least vastly reduce the randomness applied to all ships in the game.

Also, what @Grey Roger said. :cheeky

sorry for all these questions
No need to apologize. Answering those questions is what we're here for. ;)

my knowledge of programming is nonexistent, I just know you can change numbers in some files of some games sometimes :D
That's how we all started. Good way to learn!
 
I'm not sure that changing the national modifiers will help. The code which does the randomising seems to be this in "Ships.c":
Code:
arShip.(atrname) = makefloat(refShip.(atrname)) * (fStatMod * RandMult(SHIPSTAT_VARIANCE));
if(isint) arShip.(atrname) = round(stf(arShip.(atrname)));
arShip is the ship being modified, atrname is the attribute being modified, fStatMod is the national modifier (or 1.0 if national modifiers are disabled), and SHIPSTAT_VARIANCE is defined in "Ships.h" as 0.03. RandMult produces a random multiplier taking a percentage as its argument. So the national modifier will just shift the base up or down a bit, then it's randomised by +/- 3%. And then it's rounded.

If the base is 10 then any randomisation will shift it by +/-1, which means it will vary from 9 to 11.

This is a tiny boat with a huge gun on the bow. The one with only 9 crew is a bit untidy and needs the extra space for a cannonball. On the one with 11, the crew are really good friends. xD
 
Back
Top