• 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 Levis' Stuff [October 7th (v2)]

Attachments

  • Udklip.PNG
    Udklip.PNG
    461.2 KB · Views: 182
@Levis, you should really WinMerge your code with my latest ZIP here:
Mod Release - Build 14 Beta 4 Internal WIP For Testing | PiratesAhoy!
You missed out on my recent changes, one of which is probably quite important to your work. ;)

What is the idea with this "Improved Fight AI"? Maybe worth making a new thread on that one.
It looks like a lot of changes, so hopefully the toggle doesn't leave anything out.
I didn't check every line.... :oops:

And what is the new "Can Reload" function for?
 
@Levis, you should really WinMerge your code with my latest ZIP here:
Mod Release - Build 14 Beta 4 Internal WIP For Testing | PiratesAhoy!
You missed out on my recent changes, one of which is probably quite important to your work. ;)

What is the idea with this "Improved Fight AI"? Maybe worth making a new thread on that one.
It looks like a lot of changes, so hopefully the toggle doesn't leave anything out.
I didn't check every line.... :oops:

And what is the new "Can Reload" function for?
I believed i did... Did i forgot?
I'm gone now so I can't change it.

Canreload is to check if you can reload your gun.

The fightai is wip, it's completely disabled atm.
 
@ANSEL: Save Leveling.c to your PROGRAM folder and LAi_CreateOfficer.c to Loc_ai .
Looks like Levis made some typos in the code.
 

Attachments

  • Leveling.c
    70 KB · Views: 182
  • LAi_CreateOfficer.c
    5.9 KB · Views: 220
Some long overdue fixes are finally included in the first post :).
Tomorrow I wont be able to do much I'm afraid. But wednesday I can work on this again and thursday also :).
 
@Levis: The following code may not do 100% what you want:
Code:
sti(GetAttribute(PChar,"quest.mysterious_plants.crewmembers_killed_by_indians")) + 1
If the attribute isn't there, GetAttribute returns "-1" so the end result would become "0" instead of "1" as I figure you intend.

Code:
ChangeRMRelation(PChar, GetCurrentLocationNation(), 1);
^ Should that contains a check to ensure you don't get more points than 0 with a nation you don't have a LoM with?
We normally do that. Though perhaps that check could also be built INTO the ChangeRMRelation function itself.
 
@Levis: The following code may not do 100% what you want:
Code:
sti(GetAttribute(PChar,"quest.mysterious_plants.crewmembers_killed_by_indians")) + 1
If the attribute isn't there, GetAttribute returns "-1" so the end result would become "0" instead of "1" as I figure you intend.
Right ... will fix that this week

Code:
ChangeRMRelation(PChar, GetCurrentLocationNation(), 1);
^ Should that contains a check to ensure you don't get more points than 0 with a nation you don't have a LoM with?
We normally do that. Though perhaps that check could also be built INTO the ChangeRMRelation function itself.
I'd say build it into ChangeRMRelation
 
I'd say build it into ChangeRMRelation
I think this should do the trick then:
Code:
//changes RMRelation between char and iNation, calling setRMR.
float ChangeRMRelation(ref char, int iNation, float relch)
{
   relorg = GetRMRelation(char, iNation);
   if (relch > 0.0 && !IsInServiceOf(iNation))         // If GAINING points when not in their service
   {
     relch += relorg;
     if (relch >= REL_NEUTRAL)   relch = REL_NEUTRAL;   // Prevent becoming MORE than Friendly
     if (relch < relorg)       relch = relorg;       // But don't ever LOSE points while you're meant to be gaining them!
   }
   else                           // Losing points OR in the service
   {
     relch += relorg;                   // Simple behaviour, no extra checks
   }
   SetRMRelation(char, iNation, relch);
 
Updates the first post.
@Pieter Boelen the following files can be deleted:
Code:
PROGRAM\Leveling.c
PROGRAM\officers.c
INTERFACE\Perks\*.c

they have been moved to better locations now
 
Cool!

Please mark it in the fixes thread; I should install this tomorrow after work.
 
I reinstalled the latest exe last night and then I installed this Jan 21 fix. There are a lot of new things in the log files. Note that the compile.log is so big I had to 7zip it.
 

Attachments

  • error.log
    17 KB · Views: 191
  • system.log
    6.6 KB · Views: 174
  • compile.7z
    116.8 KB · Views: 166
@Hylie Pistof I forgot to turn off a debug toggle. It's off now. and I forgot to add 2 lines back which where removed for testing purposes, so they are back now too that should prevent the errors. new zip in first post

@ANSEL what do you mean?
 
I think you just say it. The line in the dialog box: Show me Your skills.
they should be gone now. it was because I had the debug toggle still on by accident
 
Back
Top