1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Age of Pirates II ... only for the original version ... from de Zee Roovers « german Team »

Discussion in 'Storm Coding' started by Jan Marten, Jun 4, 2016.

  1. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    I have this weekend time. My wife is not here. We'll see ... how far we get. :monkeydance
    I have Skype on .... janmarten2013
     
  2. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I know. That is my point.

    Look at this line:
    Code:
    if (GetTime() >= 22.00000 && GetTime() <= 5.59999) Islands[iCurLocation].QuestlockWeather = "Storm04";
    
    You want "Storm04" to be used during night, right? So for example, at 03:00 when GetTime() would return 3.0 .
    You then check:
    Code:
    if (3.0 >= 22.00000 && 3.0 <= 5.59999) Islands[iCurLocation].QuestlockWeather = "Storm04";
    
    3.0 is NOT greater than 22, so the first half is false.
    But 3.0 IS smaller than 5.59999, so the second half is true.

    That means:
    Code:
    if (false && true) Islands[iCurLocation].QuestlockWeather = "Storm04";
    
    Which returns 'false' and therefore this will never happen.

    As far as I can tell, what you want is:
    Code:
    if (GetTime() >= 22.00000 || GetTime() <= 5.59999) Islands[iCurLocation].QuestlockWeather = "Storm04";
    
    Or you could do:
    Code:
    Islands[iCurLocation].QuestlockWeather = "Storm04";
    if (GetTime() >= 6.00000 && GetTime() < 10.00000) Islands[iCurLocation].QuestlockWeather = "Storm01";
    if (GetTime() >= 10.00000 && GetTime() < 18.00000) Islands[iCurLocation].QuestlockWeather = "Storm02";
    if (GetTime() >= 18.00000 && GetTime() < 20.00000) Islands[iCurLocation].QuestlockWeather = "Storm03";
    
    And if you want it REALLY safe:
    Code:
    Islands[iCurLocation].QuestlockWeather = "Storm04"; // default for night time, e.g. between 22:00 and 06:00
    if (GetTime() > 6.0) // Time is after 06:00
    {
       if (GetTime() < 10.0) // Time is between 06:00 and 10:00
       {
         Islands[iCurLocation].QuestlockWeather = "Storm01";
       }
       else // Time is after 10:00
       {
         if (GetTime() <  18.0) // Time is between 10:00 and 18:00
         {
           Islands[iCurLocation].QuestlockWeather = "Storm02";
         }
         else // Time is after 18:00
         {
           if (GetTime() <  22.0) // Time is between 18:00 and 22:00
           {
             Islands[iCurLocation].QuestlockWeather = "Storm03";
           }
         }
       }
    }
    
    Anyway, if you believe me to be wrong, then go right ahead. I don't actually care, so have fun! :rolleyes:
     
  3. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    :rolleyes: Pieter a very one-sided way of looking at things. :cheeky
    This is just one element. But I have the entire game on a stand set.
    Therefore, further changes in the time system come.
    The time system is very flawed.

    Day.c ... 11 hours
    ... that is not right
    Code:
      Weathers[n].Hour.Min = 11;
      Weathers[n].Hour.Max = 11;
    correct would be
    Code:
        Weathers[n].Hour.Min = 11.00000;
        Weathers[n].Hour.Max = 11.59999;
     
  4. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
  5. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    This is already done in the German version. Absolutely no errors.
    Extremely fast weather changes. The eyes take the change in the weather was no longer.
     
    Last edited: Jun 18, 2016
  6. Mirsaneli

    Mirsaneli Freebooter Storm Modder

    Joined:
    Nov 21, 2015
    Messages:
    448
    Gender:
    Male
    Day.c ... 11 hours
    ... that is not right
    Code:
      Weathers[n].Hour.Min = 11;
      Weathers[n].Hour.Max = 11;
    correct would be
    Code:
        Weathers[n].Hour.Min = 11.00000;
        Weathers[n].Hour.Max = 11.59999;
    I don't know why, but after I changed the code in day.c, my game freezes just a minute or two after loading the game and I get a crash to desktop. I don't know if this has anything to do with it, but it started after changing the codes in weather...
     
  7. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    226
    For what it's worth, you are correct. This statement:

    if (GetTime() >= 22.00000 && GetTime() <= 5.59999) Islands[iCurLocation].QuestlockWeather = "Storm04";

    Can never resolve TRUE and .QuestlockWeather will never get assigned "Storm04".
     
    Pieter Boelen likes this.
  8. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    Slowly
    I'm not done yet ..
     
  9. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    It must be carried out changes in the files
    Day.c
    DayStorm.c
    Evening.c
    Morning.c
    Night.c
    Special.c

    Reference / Example

    Do they fit the time exactly .... for each hour

    Weathers[n].Hour.Min

    Code:
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(8):    Weathers[n].Hour.Min = 11.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(199):    Weathers[n].Hour.Min = 12.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(384):    Weathers[n].Hour.Min = 13.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(570):    Weathers[n].Hour.Min = 14.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(756):    Weathers[n].Hour.Min = 15.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(940):    Weathers[n].Hour.Min = 16.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(1124):    Weathers[n].Hour.Min = 17.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(1307):    Weathers[n].Hour.Min = 18.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(7):    Weathers[n].Hour.Min = 6.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(195):    Weathers[n].Hour.Min = 10.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(384):    Weathers[n].Hour.Min = 18.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(579):    Weathers[n].Hour.Min = 22.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(774):    Weathers[n].Hour.Min = 6.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(969):    Weathers[n].Hour.Min = 10.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(1165):    Weathers[n].Hour.Min = 18.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(1361):    Weathers[n].Hour.Min = 22.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(7):    Weathers[n].Hour.Min = 19.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(193):    Weathers[n].Hour.Min = 20.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(377):    Weathers[n].Hour.Min = 21.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(562):    Weathers[n].Hour.Min = 22.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(748):    Weathers[n].Hour.Min = 23.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(8):    Weathers[n].Hour.Min = 6.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(194):    Weathers[n].Hour.Min = 7.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(380):    Weathers[n].Hour.Min = 8.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(564):    Weathers[n].Hour.Min = 9.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(748):    Weathers[n].Hour.Min = 10.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(11):    Weathers[n].Hour.Min = 0.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(191):    Weathers[n].Hour.Min = 1.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(371):    Weathers[n].Hour.Min = 2.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(551):    Weathers[n].Hour.Min = 3.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(731):    Weathers[n].Hour.Min = 4.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(911):    Weathers[n].Hour.Min = 5.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Special.c(7):    Weathers[n].Hour.Min = 0.00000;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Special.c(157):    Weathers[n].Hour.Min = 0.00000;
    Weathers[n].Hour.Max
    Code:
     E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(9):    Weathers[n].Hour.Max = 11.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(200):    Weathers[n].Hour.Max = 12.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(385):    Weathers[n].Hour.Max = 13.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(571):    Weathers[n].Hour.Max = 14.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(757):    Weathers[n].Hour.Max = 15.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(941):    Weathers[n].Hour.Max = 16.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(1125):    Weathers[n].Hour.Max = 17.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Day.c(1308):    Weathers[n].Hour.Max = 18.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(8):    Weathers[n].Hour.Max = 9.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(196):    Weathers[n].Hour.Max = 17.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(385):    Weathers[n].Hour.Max = 21.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(580):    Weathers[n].Hour.Max = 5.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(775):    Weathers[n].Hour.Max = 9.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(970):    Weathers[n].Hour.Max = 17.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(1166):    Weathers[n].Hour.Max = 21.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\DayStorm.c(1362):    Weathers[n].Hour.Max = 5.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(8):    Weathers[n].Hour.Max = 19.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(194):    Weathers[n].Hour.Max = 20.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(378):    Weathers[n].Hour.Max = 21.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(563):    Weathers[n].Hour.Max = 22.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Evening.c(749):    Weathers[n].Hour.Max = 23.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(9):    Weathers[n].Hour.Max = 6.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(195):    Weathers[n].Hour.Max = 7.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(381):    Weathers[n].Hour.Max = 8.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(565):    Weathers[n].Hour.Max = 9.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Morning.c(749):    Weathers[n].Hour.Max = 10.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(12):    Weathers[n].Hour.Max = 0.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(192):    Weathers[n].Hour.Max = 1.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(372):    Weathers[n].Hour.Max = 2.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(552):    Weathers[n].Hour.Max = 3.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(732):    Weathers[n].Hour.Max = 4.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Night.c(912):    Weathers[n].Hour.Max = 5.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Special.c(8):    Weathers[n].Hour.Max = 23.59999;
      E:\Age of Pirates 2 - Test\Age of Pirates 2\program\weather\init\Special.c(158):    Weathers[n].Hour.Max = 23.59999;
     
  10. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    This is tested. If it does not go with them, they have made a mistake or use a mod.
     
  11. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    @Jan Marten: Are there any large differences in the PROGRAM and RESOURCE\INI code between the original German and English versions of CoAS?
    The only differences should be related to language and translation, right?
    Maybe you would consider making all corrections to your own game and uploading the files themselves?
    That way people are certain to get the correct versions.
     
  12. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    There's a lot different. We went based on the fact the entire game as a unit to modernize.
    We make almost a year almost only debugging.
     
  13. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    I want to say that I only a debugging for the original game. No Fine Tunning.
    I have the whole in a project folder ... otherwise would not be possible all.
     
  14. Mirsaneli

    Mirsaneli Freebooter Storm Modder

    Joined:
    Nov 21, 2015
    Messages:
    448
    Gender:
    Male
    I also think that uploading the modified files as one patch would make things easier. I didn't do the changes for other files, sorry Jan, I thought that I was supposed to change Day.c. Now that you added more changes, I think it will work.
     
  15. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    In the German version it is running. The weather changes going after to the eye almost not visible in front to himself.
     
  16. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    So, that was it. The original game should be running now stable.
    There no new posts.
     
  17. Mirsaneli

    Mirsaneli Freebooter Storm Modder

    Joined:
    Nov 21, 2015
    Messages:
    448
    Gender:
    Male
    Jan, thank you very much for your contribution on improving original COAS! Danke schöne! :) I hope that I'm not the only one on this forum who has been able to use the benefits of your work.

    Cheers!
     
  18. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    :rofl For them it is not over yet. See you in the database.

    And now something new. The first try. See it on the waves ...

    [​IMG]
     
  19. Mirsaneli

    Mirsaneli Freebooter Storm Modder

    Joined:
    Nov 21, 2015
    Messages:
    448
    Gender:
    Male
    Looking awesome! How are these kind of graphics achieved? Coding or retexturing?
     
  20. Jan Marten

    Jan Marten de ZeeRoovers Group Storm Modder

    Joined:
    Sep 27, 2008
    Messages:
    440
    Gender:
    Male
    Coding. It was all in the game yet. Only has to be used properly.
    At the moment we only use a small part out.
     
    Mirsaneli likes this.

Share This Page