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

Hull texture spawning

modernknight1

Field Marshall of Hot Tubs
Staff member
Storm Modder
Fellow modder Mates,

I thought this was just happening with a few ships, but as I get further in my test game it seems Hull1 is the only one spawning in ALL ships.

Requesting your help in 1) veryfying this (title self explanatory) and 2) helping me to fix it. 3) Where to start digging. I'm guessing AIShip.c

Anywhere else I should be looking?

In AIShips.c I found:

GetHullPercent(rOurCharacter) <= 14 && !LAi_IsDead(rOurCharacter))

Anyone know what the 14 value refers to?

Also this:

string sPath = "ships\" + refBaseShip.name + "\";

if(CheckAttribute(refBaseShip, "ship.Upgrades.hull")) // boal 16/07/06 ïðîñòî ðàçíûå êîðïóñà, áåç ÍÏÑ
{
sPath = sPath + "hull" + refBaseShip.ship.upgrades.hull + "\"; //"
}
SetTexturePath(0, sPath);

Seems like there should be some values there.

And this:

//<-- àíàëèçèì ôîðò
if (!CheckAttribute(rCharacter, "SinkTenPercent")) // ýòî íå ×Æ è íå èäóùèå íà àáîðäàæ ïèðàòû
{
int SailsPercent = sti(rCharacter.Ship.SP);
float HPPercent = GetHullPercent(rCharacter);
int CrewQuantity = sti(rCharacter.Ship.Crew.Quantity);
int MinCrewQuantity = GetMinCrewQuantity(rCharacter);
int iCharactersNum1, iCharactersNum2

and:

float HPp = GetHullPercent(&rCharacter);

Where is the HullPercent generated?

Any ideas? Jonathan? Buho?

Thanks

MK
 
GOF 1.2 is NOT generating the random hulls:

Code:
// Program\scripts\ShipsUtilites.c, GenerateShip

ref rRealShip = GetRealShip(iShip);
ref rBaseShip = GetShipByType(sti(rRealShip.BaseType));
// boal 26/05/06 èçìåíèì
// rRealShip.ship.upgrades.hull  = 1 + rand(2); // Philippe, bloqué //ïðèçíàê êîðàáëÿ òåïåðü <---------------
rRealShip.ship.upgrades.sails = 1 + rand(2);// Philippe, bloqué   // òîëüêî âèçóàëüíàÿ ðàçíèöà

Why Philippe commented it out? Any ideas?

And the sails are not commented out, notwhitstanding the comment saying "bloqué".

Uncomment the line "rRealShip.ship.upgrades.hull = 1 + rand(2);" an it will work. We need to generate a fix for GOF 1.2.10.

Cheers.
buho (A).
 
Buho,

You are the freaking man!!! :onya Well done Mate! :dance

Phillipe was trying to generate the same functions in the shipyard from old AOP. He might have left it off for testing and just forgot to unblock it after his imports.

Way to find the problem! You are getting pretty darned good at this.

MK
 
This modding-group sets a new record codingwise, way above what both individual working legends Screwface and Hook produced to the Build. Be proud guys and my deepest respect :)
 
In this very moment Craiggo is the man. :bow

He is Superman and Batman and Robin all in one, the One Called to Save the Day.

Cheers.
buho (A).
 
GOF 1.2 is NOT generating the random hulls:

Code:
// Program\scripts\ShipsUtilites.c, GenerateShip

ref rRealShip = GetRealShip(iShip);
ref rBaseShip = GetShipByType(sti(rRealShip.BaseType));
// boal 26/05/06 èçìåíèì
// rRealShip.ship.upgrades.hull  = 1 + rand(2); // Philippe, bloqué //ïðèçíàê êîðàáëÿ òåïåðü <---------------
rRealShip.ship.upgrades.sails = 1 + rand(2);// Philippe, bloqué   // òîëüêî âèçóàëüíàÿ ðàçíèöà

Why Philippe commented it out? Any ideas?

And the sails are not commented out, notwhitstanding the comment saying "bloqué".

Uncomment the line "rRealShip.ship.upgrades.hull = 1 + rand(2);" an it will work. We need to generate a fix for GOF 1.2.10.

Cheers.
buho (A).


Not sure what uncomment means. Does that mean take out everything after the double slash?

Maybe make instructions with two snippets from the code: before and after?
 
Uncommenting is taking the slashes out:

// Commented line
Uncommented line

But this is not the only form of commenting/uncomenting a code line. And not all comemented lines are code lines. And usually commented code lines are commented out for a good reason.

- o -

The right answer for a question like yours is: "if you need to ask, better you don't knowing". Seriously. No joke. And no offence either.

Better you taking a crash-course on C or Java if you are interested, Sharks. There are plenty in the 'net.

Getting spare bits here and there is going to hurt more than help you.

Cheers.
buho (A).
 
In this very moment Craiggo is the man. :bow

He is Superman and Batman and Robin all in one, the One Called to Save the Day.

Cheers.
buho (A).

I don't know what you are talking about?
dunno.gif
I'm so not the man. You are the man buho!
icon_wink.gif
 
Go read that 6 pages posts about ships I started in the modders forum, Craiggo sahib.

The only real problem we still have are the ships, you are the one fixing them and you have 67% fixing rate.

Cheers.
buho (A).
 
Back
Top