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

Need Help Reinitialization Code

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
It seems that with the new Pirate_KK code base, all sorts of reinitalization code causes errors.
I haven't figured out why yet, but I suspect it might have to do with the different system for initModels, initializing towns and islands.
However, there is probably a reason for that being rewritten in the first place, related to either Select Storyline filters or Periods code.

I'll try to fix it properly, but if that turns out not to be possible, I think we should discuss how to deal with it.
We could initialize stuff only once when you start a New Game and be done with it, for example.
Which things DO we need to be able to update on savegames? Especially ships would be nice, but I think that still works.
Anything else?
 
ships update? I always had to start a new game to make chances work ??
I don't know..
I can only say that we won't really need to reinitalize the cannons. It is pretty good that it works, but how often do we change the cannons stats?^^
I didn't used to reinitialize other things that much. Only the towns for my citizen dialogs, but that didn't work so :shrug :D
 
Ships definitely update on a Reinit, but you have to re-give your own ship to yourself with that top GiveShip2Character line in the console .
 
ahhh, yes thats right I forgot about that :oops: .. well okay I do relatively often mod ships and want to play with these modded ships further.. seems sensitive to keep that.
As I said, I don't know which is reinitialized, too, besides ships and cannons.
 
Anyway, there's no need NOT to keep that, because that one still works.
 
so the worst problems does the model-reinitalizion, am I correct? What does that do? I don't think we need that o_O
 
It adds new models in mid-game. Not something we do often anymore.
 
hm I thought that.. Well there are many "smaller" things that already require a new game (like my music-pack) so I think it's not that important ;)

BTW: WIP12 and WIP13 are really really different... With which (code)-version we will go on in the future? is WIP13 only for testing?
 
At the moment WIP 13 is only for testing, but I'm trying to continue with that so that we'll be able to fix it and PLAY with it.
I'm trying to compile WIP 14 right now, which is based on WIP 13, but with some stuff fixed and new stuff added/updated.
 
For now, yes. Though I might restore some stuff to its WIP 12 state if required.
 
okay.. hmm I guess I don't have to rewrite that much, it isn't that much new code, is it?
 
Between 12 and 13 there's a lot of difference. Between 13 and 14 not so much. Not in the files you'd generally edit anyway.
 
A short list of files I'm interested in:
-ships_ini
-init_items
-cannons
-sound (besides the new music-code anything else)?
 
I think initItems still works for re-initialization too. Not sure about cannons, but hopefully soon you won't need to edit those anymore.

I thought the sounds were loaded when you load the game, not when you start a New Game, so that is quite odd.
 
ahh :D we talked past each other :D I meant if there are some code-changes that affect these files^^
 
Oh, right. I did edit initItems.c in Beta 3 WIP 14. No massive changes though; WinMerge should help you through it.
 
And all other files are untouched? :D Awesome :)
I think WIP14 should be stable enough? I will rewrite my additional music then ;)
 
The initModels code has been restored to Beta 2.5 default and seems to be working fine like that.
Island and Town init code also appears to be working, even if you start multiple new games.

Main problem left:
- Alias init error message if you edit the Options before having a game loaded
 
Back
Top