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

Fixed Levelling: Error.log Entries due to Missing Attributes

ANSEL

Corsair
Storm Modder
Hearts of Oak Donator
Dont know what is going on, suddenly drop in performance and this logs.
Just to let you know.
 

Attachments

  • error.log
    299.3 KB · Views: 128
  • compile.log
    54.1 KB · Views: 123
  • system.log
    9.2 KB · Views: 125
Dont know what is going on, suddenly drop in performance and this logs.
Just to let you know.
That's a LOT of scary perk-related error.log entries there!
Do you have a savegame on which this can be replicated?

I think the game is lagging specifically because it is writing all those log files.
 
Dont know what is going on, suddenly drop in performance and this logs.
Just to let you know.
Did you do an F11 when applying the zip on an already existing savegame?
 
Dont know what is going on, suddenly drop in performance and this logs.
Just to let you know.
@Levis: It just occurred to me that error could be BECAUSE of the new "entity" check that you added.
Because I imagine characters may not be an 'entity' when they're at sea, because their SHIPS are, but THEY aren't.

Could that be the reason?
 
@Levis: It just occurred to me that error could be BECAUSE of the new "entity" check that you added.
Because I imagine characters may not be an 'entity' when they're at sea, because their SHIPS are, but THEY aren't.

Could that be the reason?
That could very well be the case. Thats why its removed again now and Done differently
 
So @ANSEL please try my new files and see if it's fixed :).
 
Getting plenty of these ones now:
Code:
RUNTIME ERROR - file: Leveling.c; line: 726
missed attribute: freeskill
RUNTIME ERROR - file: Leveling.c; line: 726
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 726
missed attribute: freeskill
:(
 
I think this is because you're looping through all skill attributes and not skipping the "freeskill" one.
Doing it like this will get past that problem altogether:
Code:
   string skill;
   int n;
   for(n = 0; n < 10; n++)
   {
     skill = GetSkillName(n);
     int skillval = GetEffectiveSkill(chref,skill);
     int modval = CalcCharacterSkill(chref,skill);
     int color = COLOR_NORMAL;
     skill = "skill"+skill;
     GameInterface.strings.(skill) = modval;
     if(skillVal >= modval) color = COLOR_GREEN;
     if(skillVal <  modval) color = COLOR_MONEY;
     if(skillVal==0) color = COLOR_GRAY;
     ChangeStringColor(skill,color);
   }

In other spots you do have something to get past that:
Code:
   for(int n = 0; n < numskills; n++)
   {
     skill = GetAttributeName(GetAttributeN(skills, n));
     if(skill == "freeskill") continue;
But the above solution may still be safer there as well.
 
Freeskill sometimes might be on a other location I noticed so better to use the other solution I made. Could you add it to the interfaces?
Character, ship, passengers
 
^ I have made these changes now everywhere I could find. No error.log entries for those anymore.
Here's to hoping it works. @Levis should probably check the code files I just uploaded.... :wp
 
For now fixed it is?
 
@Levis: Looks like I'm getting plenty of Levelling errors again:
Code:
RUNTIME ERROR - file: Leveling.c; line: 1165
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1165
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 1211
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1211
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 1165
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1165
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 1211
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1211
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 1165
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1165
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 1211
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1211
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 1211
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1211
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 1165
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1165
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 1211
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1211
no rAP data
RUNTIME ERROR - file: Leveling.c; line: 1211
missed attribute: officertype
RUNTIME ERROR - file: Leveling.c; line: 1211
no rAP data

This seems to be related to me trying to capture a colony through code:
Code:
      if(!CheckAttribute(PChar, "officers"))
       {
         ch = CreateOfficer_Cheat(OFFIC_TYPE_QMASTER, "33_Piratess10", 0, PIRATE, false);
         ch.name = "Claire";
         ch.lastname = "Larrousse";

         ch = CreateOfficer_Cheat(OFFIC_TYPE_CANNONEER, "50_Petra2", 0, PIRATE, false);
         ch.name = "Petra";
         ch.lastname = "Borinqueña";

         ch = CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "Barbossa", 3, PIRATE, false);
         ch.name = "Hector";
         ch.lastname = "Barbossa";

         ch = CreateOfficer_Cheat(OFFIC_TYPE_CAPNAVY, "Conorrington", 3, ENGLAND, false);
         ch.name = "James";
         ch.lastname = "Norrington";
         PChar.officers = true;
       }
       pchar.colony_capture = true;
       LaunchCaptureColony(pchar, "Conceicao");
 
In which storyline are you playing?

I just execute the same code but I don't get the error so they must be related to something else ...
 
In which storyline are you playing?
I did the following:
- Select the Free Play storyline
- Choose "Francisco de Almeida"
- Execute that code through console while in port
- Go to Townhall
- Assign any random character as Fort Commander
- Assign the fake "Claire Larrousse" character as Governor
 
Did you use the steps from my above post? Because that does work.
Yes I did. but I executed the console command in port like you said, but in the other topic you said to use it in the townhall
 
Back
Top