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

Mod Release Gentlemen Of Fortune 2.1.5 mod development

In the coming days I'm going to look for a way that they implemented the picture switch for the compass -at all- in the code, or they just overwritten the picture.

Program\battle_interface == BattleInterface

Code:
 if(!REALISTIC_COMPASS) // = If Realistic Compass is NOT enabled
{
 BattleInterface.navigation.compasTexture = "battle_interface\compass.tga";
 BattleInterface.navigation.cannonsTexture = "battle_interface\indicators_cannons_reload.tga";
 BattleInterface.navigation.emptyTexture = "battle_interface\indicators_dark_and_center_ship.tga";
 BattleInterface.navigation.windTexture = "battle_interface\wind_pointer.tga";
 }
 else // = If Realistic Compass IS enabled
 {
 BattleInterface.navigation.compasTexture = "battle_interface\compass1.tga";
 BattleInterface.navigation.cannonsTexture = "battle_interface\indicators_cannons_reload1.tga";
 BattleInterface.navigation.emptyTexture = "battle_interface\indicators_dark_and_center_ship1.tga";
 BattleInterface.navigation.windTexture = "battle_interface\wind_pointer1.tga";
}
 
Elderlaw:

Can you send me a savegame, that's close to this one? The "start boarding" savegame for example.

I do not think that it has something to do with the changes in that dialog file. But maybe. I do not touched any parts there that using an index. But still, maybe XD have to check it.

Sadly it can very well be part of "cannons do not damage you our your captured ship" instead.
Though I hope so it's not- as that means that sometimes the call for your companions ID's result in a -1 index.... Which is very unlikely, and sad news. But, :D we going to see it.
My only hope is the "Hands down, the ship is ours" message is visible, which means that the setting every companions health to normal function was running as it should.


Does it produced any other errors than the text message? Does this break the quest or the dialog?

Unfortunately that save game is long gone :rumgone. But, the good news is, that error popping up didn't seem to break anything. The quest finished normally and nothing "weird" happened afterwards. The only reason I suspected the "Fixed captains stop talking to you" thing was because the error message popped the instant the dialog ended to trigger that pirate leaving my fleet list. Later tonight I will try to grab another "Proposal" quest and see if I can reproduce the error. If so, I'll keep the save for you.
 
I just got another of those error messages, but this time there was no quest involved. An enemy patrol attacked me on the world map, and by the end of the battle I had captured and released the enemy ship. As soon as I clicked on the option to let them go, this message popped up:

ERROR: Incorrect index for a character! Wrong index is -1

Again, it doesn't seem to be hurting anything that I can tell. And if no one else is getting these messages, it may be that the 8 ship mod isn't playing well with the 1.5 patch. But I've ran winmerge on all the affected files and don't see any conflicts.

Error 2.jpg
 
Program\battle_interface == BattleInterface

Code:
if(!REALISTIC_COMPASS) // = If Realistic Compass is NOT enabled
{
BattleInterface.navigation.compasTexture = "battle_interface\compass.tga";
BattleInterface.navigation.cannonsTexture = "battle_interface\indicators_cannons_reload.tga";
BattleInterface.navigation.emptyTexture = "battle_interface\indicators_dark_and_center_ship.tga";
BattleInterface.navigation.windTexture = "battle_interface\wind_pointer.tga";
}
else // = If Realistic Compass IS enabled
{
BattleInterface.navigation.compasTexture = "battle_interface\compass1.tga";
BattleInterface.navigation.cannonsTexture = "battle_interface\indicators_cannons_reload1.tga";
BattleInterface.navigation.emptyTexture = "battle_interface\indicators_dark_and_center_ship1.tga";
BattleInterface.navigation.windTexture = "battle_interface\wind_pointer1.tga";
}

Thank you very much!
 
Well, here's what I've found out:

Compass.tga.tx and Compass1.tga.tx is -exactly- the same image file, with the new compass.
So the images the system switch between when turning the mod on or off are the - very same-.

(the other pictures in the realistic compass switch list are seems to be different as they should.)


The method of turning mods on or off in the files mod_on_off, battleinterface.c , and option_screen.c seems flawless, no matter how vicious I was sniffing around it...
Maybe can be optimised, but I have not yet have any idea how.



I have a CM 1.5 install, I think I can steal the COAS stock compass image from that.


Elderlaw:
I have a nice idea how to check that my mod causes the index trouble or not :D I don't know what gave it, Im drinking coffee, skipping pushups... ... (as in every day since months) cold, damp Mercian air, and I read your posts here.
So maybe some of the posts.

Edit1:
Replaced the compass.tga.tx with the stock one, now it switches to stock compass, so you can see the texture beneath it, supposedly the radar. The problem is, that the indicators_dark_and_center_ship.tga.tx "stock" texture is currently a texture that intentionally covers the whole area, making the radar blank. So I need to put the stock texture there also.

Im going to check the spyglass mod method, as I think there is a need for this covering picture, just need to be implemented right, like indicators_dark_and_center_ship.tga2.tx so it can be used by that mod, as a third texture.

Edit2:
Yes, one directory deeper (in "battleinterface" dir) theres also a battleinterface.c, realistic spyglass activates there- I can put the covering picture there as a third one- so realistic spyglass if on are going to blank the radar, and if off, going to show stock radar.


Edit3:
Huh, had to add the code

if(!REALISTIC_SPYGLASSES) // = If Realistic Spyglass is NOT enabled
{




}
else // = If Realistic Spyglass IS enabled
{

BattleInterface.navigation.emptyTexture = "battle_interface\indicators_dark_and_center_ship2.tga";

}


To the main battleinterface.c, under the realistic compass switch, because in the spyglasses own file it DOES NOT WORK, but now the situation is this:

If you turn on realistic compasses, wind indicator is not present, new reload picture is there, etc., if you turn it off, wind indicator turns on, stock reload picture, etc.


if you turn on realistic spyglasses, all spyglas info is based on the mod, and theres an artistic covering picture instead of the radar, if you turn it off, stock spyglass info, and stock radar.

As spyglasses mod states that it can bring you the stock radar, but turn it off when its on.


So with these two mod on/off you can have:

-wind indicator, but no radar (real spyglass on, real compass off)
-wind indicator with stock radar, (both off)
-stock radar without wind indicator (cannot be done)
-compass instead of radar without wind indicator. (both on)

At least it now works as it stated in the two mod's ingame info.
 
Last edited:
Another SAD discovery is the following:

To have ANY picture change related mods to work,

1.: you have to start a new game, or load a save,
2.: change mod options ingame
3.: Save the game to xy
4.:quit the game to desktop!!!!
5.: restart game
6.: load xy savegame. And voila!


Sadly It seems that once a texture is loaded into memory, ONLY a quit and reload can change it.
If someone have ANY idea how to force it otherwise, tell me, and I try to test to implement it..
 
Elderlaw:
Can you help me?

I uploaded a file with this here post, can you put it to PROGRAM/SEA_AI ? And overwrite the existing file.

(make a copy of the original aiabordage.c before that XD)

And with this new file can you -exactly- reproduce the bad index error?


RIGHT in the first second after first loading the sea after a boarding, you should hunt for a message on the right-top corner, what states : "Wolf God Mode ON" if you see that, make a screenshot. After 20 seconds there should be another, "Wolf god mode OFF" make a screenshot again there.

So this two new screenshots can rule out the late firing guns fix mod as the perpetrator. I need these two lines "Wolf God Mode ON" and "Wolf God Mode OFF" with the numbers they show, to continue the search for a fix.



Good news is that the "bad index" message only appears when debugmode is on XD so at the worst case we can silent it by publishing the stable mod with debugmode OFF as default. But I want to find this error anyway.


Thank you for your help!!!!

(the first number in my debugmessage shows the companion character index, the first one should be 1 as it shows the captains index, the second one and all the others should state like 357, etc. And also your player's name should show up in every line)
 

Attachments

  • AIAbordage.c
    9.7 KB · Views: 329
Thank you for your hard work on the compass. :cheers It is a minor annoyance but it should be working.


I seem to have run into another bug that is probably a personal problem. :wp

GOF2 has always played well for me but the GOF2.5 mod had a bad hitch in it that was eventually traced to the drivers for my Logitech G500 mouse. That did get cleared up and it runs ok for me now.

Yesterday while playing GOF2.1.5 I noticed that same hitch, but it only appeared during battles. I tested it by sailing far enough away from hostile ships that I could go to the world map and it played smoothly, then turned around and it started jerking again. I sure wish I knew what is causing this, but because I rarely get in battles it is a small annoyance.
 
RIGHT in the first second after first loading the sea after a boarding, you should hunt for a message on the right-top corner, what states : "Wolf God Mode ON" if you see that, make a screenshot. After 20 seconds there should be another, "Wolf god mode OFF" make a screenshot again there.

Hail to the Wolf God!

Here are the screenshots

WolfGodMode ON.jpg
WolfGodMode OFF.jpg
 
Yesterday while playing GOF2.1.5 I noticed that same (mouse) hitch, but it only appeared during battles. I tested it by sailing far enough away from hostile ships that I could go to the world map and it played smoothly, then turned around and it started jerking again. I sure wish I knew what is causing this, but because I rarely get in battles it is a small annoyance.

Hylie, I also had some bad mouse lag yesterday for the first time ever. It only happened while fighting on deck during one particular boarding. May have just been my mouse pad was wonky since it only happened for a short time.
 
Hylie, I also had some bad mouse lag yesterday for the first time ever. It only happened while fighting on deck during one particular boarding. May have just been my mouse pad was wonky since it only happened for a short time.


Well, more play testing is needed then.
 
Ah, thank you :D actually I did nothing to solve the error, so sadly I need more screenshots, as we need to reproduce the error :(
The debug info only makes sense when it's triggered when the -1 error present. If you have any savegame near the last error without the quest, or one during the quest when you first encountered, and you can take shots when the error pops up, that would be wonderful- a base to start from.

Hmm. Im going to dig into the storm engine + mouse lag topic

Edit1:

Wolfgod.. ... XDDDDD I think I wrote that debug script a tad too fast to miss THAT out...
 
Last edited:
Well... I have played for hours today (such hard work), and ever since I put the original AI abordage.c file back into my game, I do not get Index errors anymore! I even started a new game to see if that made a difference. Captured at least 30 ships and not one error message popped up. :shrug
 
Ah, thank you :D actually I did nothing to solve the error, so sadly I need more screenshots, as we need to reproduce the error :(
The debug info only makes sense when it's triggered when the -1 error present. If you have any savegame near the last error without the quest, or one during the quest when you first encountered, and you can take shots when the error pops up, that would be wonderful- a base to start from.

Hmm. Im going to dig into the storm engine + mouse lag topic

Edit1:

Wolfgod.. ... XDDDDD I think I wrote that debug script a tad too fast to miss THAT out...

A good way to capture such errors is to use something like MSI afterburner and record the game as you play and as soon as the error happens you can get a screenshot from the video you recorded showing the exact error message.
 
Well... I have played for hours today (such hard work), and ever since I put the original AI abordage.c file back into my game, I do not get Index errors anymore! I even started a new game to see if that made a difference. Captured at least 30 ships and not one error message popped up. :shrug

Lucky you, I somehow can't play GOF anymore.. it burns my hard drive in the first 5 minutes and my laptop freezes till i turn off and on manually.
I used to play it last year with no problem, but this time I downloaded mine from:
http://www.piratesahoy.net/threads/gentlemen-of-fortune-2-0.19345/

I used original COAS, then the GOF 2.0 as seen in this website, then the following 2 links.. but situation was very bad with me last week when I played. It may be a hardware issue, or that I downloaded the improper patches; who knows.
 
That must be a hardware problem o_O
Or...
You use the same operation system as a year ago, or a different one?

The patches can't really cause anything so bad like this.
As you use a laptop, and if you have 2 video chips, is it possible, that the game uses the "integrated" (intel, etc.) and not the high performance one?

Another tip, is you maybe left something "forced on" in the video card's control panel.
Antialiasing, or similar effect- though COAS does not give a *swearword* about NVIDIA forced effects at least XD but maybe!

Try setting fullscreen to 0 in the engine.ini
 
A good way to capture such errors is to use something like MSI afterburner and record the game as you play and as soon as the error happens you can get a screenshot from the video you recorded showing the exact error message.

Sadly I do not have the hardware. Nor the funds to buy one- but I usually use Fraps for capturing video.

The reason I do not hunt for the bug myself is that it never presented itself to me-
yet Elderlaw was able to reproduce it twice. Capturing a screen when this error is present is quite easy, as the message is there for like 5-10 seconds or more.
And Elderlaw did it right

Elderlaw:
What was the circumstances when you got this index error?

You said that first an NPC captain is left your armada, as the end of the quest?

And the second time you decided to remove a ship, or captured it, set a captain, then you removed him?

That could be the key.


Edit1:
by original aiabordage.c file you mean the one from the last patch?

You still seeing the "hail to the captain!" and "hands down, the ship is ours." messages?
 
I'm not really sure about these technical details.. but I removed GOF from my system a little more than a week ago; now i'm just playing new horizons, it's going alright for me. :)
 

Ok. To make a little order, currently (since 15b) the things YET are the following:


Progress:
-Fixed the way realistic Spyglasses and Realystic compass mod works. Now it works as it's info suggests.

Problems:
-Mouse lag/jittering
-Mysterious -1 index error. (It do exists, just have to reproduce it.) *

Unpleasantries:
The necessity to save, quit, start, reload to make mod options stick, and changes to appear.



* = (a little technical info: the function that shows the -1 index error is the GetCharacter(index) function. Used tons of times, basically it needs a BAD INDEX, a -1 to produce that error.
lots of functions, similar to GetCompanionIndex(player, n) are used to retrieve character index. If a nonexistent character data, bad number is used to ask for a characterindex, then the index WILL be -1.

It's not evidental nor simple where the bad index query is used, as it's not a typo or anything, it's simply a game situation that not yet covered, and need to tend to.

Thats why I need to reproduce that error somehow
)


------------------


Whats next:


Im going to look around in old COAS troubleshooting posts on the net about the mouse lag,

Sadly I do need the -1 index error to be reproduced.

15b stock aiabordage file and the file I posted for Elderlaw is -the very same-, apart from the important debug info I included.


Elderlaw:
I do need that info :( so If you can help by reproducing it, by using the debug aiabordage file again, and shot a screen of the -1 error, it would be wonderful.


The -1 index seems to pop up (Given to the info Elderlaw shared)

1.:when the sea first loaded after a boarding/ship scene,
2.:AND someone departed your fleet, or your passenger list (I think departed fleet as a captain is a more propable cause.)
Either you dismissed one of your own man or ship, or a quest removed a ship/npc captain from your fleet.

if you can reproduce the error, that would be nice- if you can't, just please send me a savegame nearest to the quest that ended with the -1, and point me out where can I get your Huge Fleet mod XDD
(actually I want to implement it sooner or later -if its not already implemented-, in the worst case as an optionally selectable mod, as it is a very big game experience change....!)
 
Back
Top