'Replacing standard tool with mod' question

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

'Replacing standard tool with mod' question

Post by Greenlaw »

I haven't tried yet but was wondering: When replacing a native Moho script with a modified version, do the mod files have to physically replace the original files, or does adding the mod files to the relative folder in the Content folder virtually 'replace' the native files on load?

Currently, I've been making backups of the native scripts folder and directly replacing the scripts with the mods, and then regressing the files if the mod doesn't work out for me. I was wondering if using the Content folder for mods is a proper way to add/test mods non-destructively. That would certainly seem like a safer way to do this.

I know I could just check this myself but I was hoping somebody here could just tell me before I start messing around with it.

Thanks in advance for any helpful info.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: 'Replacing standard tool with mod' question

Post by synthsin75 »

Custom content folder scripts with the same names override the native scripts. Moho, always looks there first.

It's generally a better idea for mods to have unique names, but everyone makes/uses lm-stock-named mods at some point. Just have to be aware if the modded tool is updated in future versions, where you'd want to use/test the new native version.

There's also a way to suppress native tools, like in favor of a unique-named mod, but that seems beyond what you're asking.
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: 'Replacing standard tool with mod' question

Post by Greenlaw »

Hey Wes,

Thanks for the prompt reply!

I had set up a fresh Moho install on a new computer at home and was going to add your Curvature mod (the one that adds the Show Bezier Handles button to the Transform Points tool options.) On my old computer, I overwrote the original scripts in the Program folder, but now I was wondering if it was possible to add the modified scripts to the Content folder instead.

Glad to hear that works, and will proceed with it this evening.

And you're right: I'll need to keep mindful of official changes made to the original scripts in future releases. Thanks for the advice!
Last edited by Greenlaw on Thu May 24, 2018 6:18 pm, edited 1 time in total.
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: 'Replacing standard tool with mod' question

Post by Greenlaw »

Update: It works fine!

I should have been adding mods this way all along. Thanks again for your help!
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: 'Replacing standard tool with mod' question

Post by synthsin75 »

Glad I could help.
Post Reply