• 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 Build 14 GAMMA [Last Update: 31st December 2021]

Status
Not open for further replies.
If I understand you correctly, you want something like this:
Code:
if(CURSES_DISABLED > 1) do_cortes_stuff;
if(CURSES_DISABLED > 2) do_albatross_stuff;
No, the idea of doing binary arithmetic, or doing the messy calculations, is that 'do_cortes_stuff' and 'do_albatross_stuff' are independent. That simpler version will mean that if you set CURSES_DISABLED to 2 then both curses are disabled, whereas I want 2 to only disable the albatross but leave Cortes. You'd set it to 3 to disable both. Or, if someone comes up with another curse, you could set CURSES_DISABLED to 4 to disable that while leaving the albatross and Cortes curses alone.

PROGRAM\INTERFACE\itemsbox.c, if I remember correctly.
Thanks, I've found the relevant section. Now trying to incorporate variable using the calculations on CURSES_DISABLED...
 
No, the idea of doing binary arithmetic, or doing the messy calculations, is that 'do_cortes_stuff' and 'do_albatross_stuff' are independent. That simpler version will mean that if you set CURSES_DISABLED to 2 then both curses are disabled, whereas I want 2 to only disable the albatross but leave Cortes. You'd set it to 3 to disable both. Or, if someone comes up with another curse, you could set CURSES_DISABLED to 4 to disable that while leaving the albatross and Cortes curses alone.
Then maybe:
Code:
if(CURSES_DISABLED == 1 || CURSES_DISABLED == 3) do_cortes_stuff;
if(CURSES_DISABLED == 2 || CURSES_DISABLED == 3) do_albatross_stuff;
You can also use '!=' for 'is not'.
 
That turned out to be quick and easy. Unzip this, merge it into the game's "PROGRAM" folder, and then edit "InternalSettings.h". If you want to be able to get rid of cursed coins without having to bother with Isla de Muerte, set "CURSES_DISABLED" to 1. If you want to be able to get rid of albatrosses without diverting to Bridgetown, set it to 2. If both of them are annoying you too much, set it to 3. Note that this doesn't actually disable the curses entirely, it just allows you to dump the cursed items.

I haven't had a chance to test the coins yet, but it didn't take me long to find an albatross. "InternalSettings.h" is read when you start playing, which means "CURSES_DISABLED" works on a game in progress. If you're already carrying an albatross and want to dump it, you can install these files, edit "CURSES_DISABLED", load up your savegame and either drop the bird in a chest, give it to an officer you don't like, or kill someone and dump the albatross when you loot the corpse.

The setting for Clint Eastwood's weapon is also included, but that will require a new game to take effect. And in "Realistic" mode it has no effect anyway, he always gets the brace of four horse pistols.
 

Attachments

  • PROGRAM.zip
    48.2 KB · Views: 123
That turned out to be quick and easy.
That's good news! :woot

I haven't had a chance to test the coins yet
Console "GiveItem2Character(pchar, "cursedcoin");" , I think.

"InternalSettings.h" is read when you start playing, which means "CURSES_DISABLED" works on a game in progress.
Technically, it doesn't matter when InternalSettings.h is read; it depends when the code that uses the toggle is read.
Generally, interfaces and dialogs are read at the moment you need them, which means you can edit them in mid-game and they'll be updated the next time you open the dialog/interface.
A lot of the general game functionality is read when you start the game, so changes to that require you to close the game, but not to start a new game.

The 'init' files are initialized when you start a new game, so often you need to start a new game when making changes to those.
But this isn't always the case, because the mod-added "reinitialization" functionality allows you to reload several 'init' arrays at will.
This works very well for ships, items and models; but not so much for characters and locations.

Virtually all specific changes could also be manually implemented through lines of code in the console.
In the past, this was even implemented in the "reinitialization" functionality for many examples.
But that does mean that every change requires accompaning "apply update" code, which is a lot of work to write.
So eventually we stopped doing that...
 
Console "GiveItem2Character(pchar, "cursedcoin");" , I think.
It's not quite that simple. You'd also need a console command to take a coin out of the chest on Isla de Muerte because the curse depends on the function 'GetCursedCoinCount()', which is the number of coins missing from that chest. If it's 0 then the curse isn't in effect.

Perhaps starting a FreePlay game as a cursed character would work? That empties the chest on Isla de Muerte, stuffs your ship's locker with almost enough coins to lift the curse (exact number depending on difficulty level), then puts one in your inventory. Your task is then to find enough coins from looting random chests to make up the 882, then go to Isla de Muerte. Setting "CURSES_DISABLED" to 1 should bypass all that, allowing you to dump the whole lot somewhere - and, of course, missing the whole point of playing as a cursed character! But it might work for a test.

Technically, it doesn't matter when InternalSettings.h is read; it depends when the code that uses the toggle is read.
True. But if "InternalSettings.h" wasn't read when you run the game then "itemsbox.c" would either not work because it uses the value of "CURSES_DISABLED" set when you first started the current campaign, or would crash because the variable hadn't been defined at that time.
 
It's not quite that simple. You'd also need a console command to take a coin out of the chest on Isla de Muerte because the curse depends on the function 'GetCursedCoinCount()', which is the number of coins missing from that chest. If it's 0 then the curse isn't in effect.
True, if you also want to check the effect of the curse.
But if you can get rid of the coin, then that should be enough; the cursed effect relies on having a coin in your inventory.

Perhaps starting a FreePlay game as a cursed character would work? That empties the chest on Isla de Muerte, stuffs your ship's locker with almost enough coins to lift the curse (exact number depending on difficulty level), then puts one in your inventory. Your task is then to find enough coins from looting random chests to make up the 882, then go to Isla de Muerte. Setting "CURSES_DISABLED" to 1 should bypass all that, allowing you to dump the whole lot somewhere - and, of course, missing the whole point of playing as a cursed character! But it might work for a test.
Sounds like a quick and effective test to me. :onya

True. But if "InternalSettings.h" wasn't read when you run the game then "itemsbox.c" would either not work because it uses the value of "CURSES_DISABLED" set when you first started the current campaign, or would crash because the variable hadn't been defined at that time.
Also true. :cheeky

Technically every single file is read when you run the game; with the exception of the dialog, interface and init files which are read when needed.
Anyway, I just posted all that as extra explanation, in case anyone was interested in my excessive details. :rofl
 
I'm hoping to put out another update soon - next week if possible. If anyone has anything they'd like included, please post it!
 
Very good, I've got 47 files ready. They are uploaded on Dropbox as "JRH files 3469 18-06-29":
I'd guessed as much - that's one reason why I posted the intent to release an update. ;)

In your version of "PROGRAM\Locations\init\Antigua.c", you've removed one entrance to the store and duplicated the entry for the bedroom. I've put back the store entrance and removed the duplicate bedroom entry in the version which will go into the update archive.
 
Here it is.

I've also grouped both the "Woodes Rogers" specific parts together. (You might want to move them into your "StartStoryline.c" as they won't do anything except in "Woodes Rogers", when "Antigua_port" is set to use one of your custom locator files.)
 

Attachments

  • Antigua.c
    42.5 KB · Views: 132
Hi,

When can we expect beta 4.1 to be finished i am looking forward to play New Horizons again but once i heard that beta 4.1 is in development i wanted to wait a bit.
Also what kind of new feutures can we expect or it strictly bug fixing? (wich is very important in my opinion)
 
The mod is in a state of perpetual evolution. Even if we decide that this is Beta 4.1 finished, it won't be long before there's another update, even if that is then called "Beta 4.2" or something else.

Most of what's in the current update is bug-fixes, though there are a few visible changes if you know where to look for them. For example, a few townhalls have been redecorated and now have completely new interiors. On the other hand, if the most recent version you've played before is Beta 4.0 then you'll see several differences in Beta 4.1 - some new ships, some new characters to choose in FreePlay, and some new sidequests, among others.
 
@Grey Roger: You know better than me these days, but as far as I remember, not a lot of things are changed these days that require a New Game to be started.
Right?

Also what kind of new feutures can we expect or it strictly bug fixing?
No real big of features are in the works, as far as I'm aware, so it is mainly fixing and adding new content.
The biggest new feature is this one, which I think is pretty cool: Ideas for the future!
 
Alright sounds good to me but why not put the current version on moddb? It still has the old version 4.0
Main reason: Because nobody bothered to upload it there.
It should be done, really; but who has the time? I haven't and I don't think @Grey Roger and @Mad Jack Wolfe have had the chance either.
If you would be willing to help us out with that, that would be very welcome! :cheers
 
Status
Not open for further replies.
Back
Top