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

Guide TEHO modding (tehomod and scripts are here)

We used to use WinMerge to do this, but I'll take a look at Araxis Merge as well. It might be useful to compare 3 files at once. At least WinMerge is free, while Araxis Merge is $129, or $269 if you want the additional features of auto merging and 3 way file compare. We can't ask a user to pay $270 just to use more than one mod at a time. And don't even talk about pirating the program. :)
At work we have "Beyond Compare", which can also do a 3-way comparison.
But that program annoys me for some reason, so I stick to WinMerge anyway. :cheeky
 
Maybe you can try SVN?

OK... what is SVN and why would I want to try it? Sorry, I don't know what you're talking about. The only reference I can find appears to be a version control system, and that has nothing to do with the post you quoted.

I'm not going to bother doing a lot of research on making mods work together until there are mods to work together. Kb31 has already done a lot to help in that direction, but there's still a problem if two people are doing work that conflicts, and that's still going to have to be sorted out by a programmer.

Hook
 
OK... what is SVN and why would I want to try it? Sorry, I don't know what you're talking about. The only reference I can find appears to be a version control system, and that has nothing to do with the post you quoted.
SVN is indeed Version Control.
Definitely useful when working together with multiple people on the same project.
But convincing people to actually use it is.... difficult to say the least:
Notice - Build Mod Version Control
 
Oh lordy... imagine trying to get a bunch of modders from all over the world to use any kind of version control system, even a free one.

The only way that is going to work is still to have a central clearing house for mods similar to what the Community Build Mod/New Horizons does. Some kind of version control system would be useful for whoever is handling that, especially if it's more than one person.

Hook
 
The only way that is going to work is still to have a central clearing house for mods similar to what the Community Build Mod/New Horizons does. Some kind of version control system would be useful for whoever is handling that, especially if it's more than one person.
Exactly true. :yes

I've used SVN at work and I'm convinced it could help a lot.
But I'm no longer handling New Horizons myself, so it would be up to @Grey Roger or @Mad Jack Wolfe, I suppose.
 
1.5.2 RUS scripts uploaded
found activemap there LOL

That's really funny! Too bad they banned you on their site; they could have asked your permission to include Active Map in the official game. As it is, that would be a bit... awkward. Well, at least we know the developers are looking at our mods. :D

Hook
 
tehomod 1.3BETA2(MEGA)

- Some fixes and improvements

- Dynamic scripts system was fixed and rewritten:

Now there is a section LoadCustomScripts for loading scripts without #include
Execute
section was replaced by Events
Alias
sections was replaced by Detours

Now almost everything could be modified without modifying the whole files(except functions in LoadSegment and repeated function detouring)

It can look like this:

tehomod_dynamictest.ini file:
;tehomod_dynamictest.ini
[Mod]
Enabled=1
Binds=1
Advanced=1 ; Enable LoadCustomScripts, Events, Detours sections

[Binds]
DynamicTest.0x72=Log_Info("Message")

[LoadCustomScripts]
Scripts=dynamictest.c

[Events]
Log_Info=Log_SetStringToLog("Log_Info event")

[Detours]
Log_Info=Log_Info2

dynamictest.c:
void Log_Info2(string _str)
{
Log_SetStringToLog("Log_Info called");
Log_SetStringToLog(_str);
}

Now dynamictest.c will be loaded into the gamestate, but will unload before saving data
When Log_Info is being executed(F3) it will trigger event Log_Info (print "Log_Info event"), then detour original Log_Info to Log_Info2 from dynamictest.c and print "Log_Info called" before printing "Message"

Generally, Events can be used to write preceding code for functions, when you don't need to replace any code on it, and Detours are for replacing the whole functions without modifying the whole files.

This version fixes the bug with incorrect unloading of custom scripts, but it's still in BETA, use it at your own risk and always make saves!

UPD:
beta2: version checking fix and code cleanup
 
Last edited:
You mean instead of modifying one line in a large file I can modify only the function I change and not have to include anything else?? WOW! This will also help when more people are making mods so they don't overwrite the same files. Incredible.

Looks like Hookmod will need use a newer version of tehomod. Let us know when you believe it's been tested thoroughly enough. I could release a version of Hookmod with the old TEHO then do an update when tehomod is known to be stable.

Hook
 
You mean instead of modifying one line in a large file I can modify only the function I change and not have to include anything else?
Yes, but since it operates with gamestate it requires to be carefully tested. If someone wants to help with testing, let me know :)
P.S. I rewrote Hookmod for 1.5.1 some time ago to use it with tehomod 1.2(there were Execute and Alias sections) , you can use it as the basis if you decide to make Hookmod for tehomod 1.3
MEGA

UPD:
version checking is broken. will be fixed in the next release
using events throws errors in 'errors.log', but this seems to be normal behaviour
 
Last edited:
1.6.0 RUS scripts uploaded
there are still no promised officially opened scripts
according to the comment in the code, they were testing network mode
 
Back
Top