Again, the most important thing is what the "one thing" actually means.
For example, one can say
Luna Engine just does 1 thing: To be an extremely customizable custom hud and menu system by giving users extreme degree of control and freedom.
One can also say Luna Engine does ridiculous amounts of stuffs that aren't closely related to each other:
- It changes the window skins
- It changes the window positions
- It changes the window colors
- It changes the bars' positions
- It changes the bars' colors
- It changes the bars' sizes
- It changes how the bars show how much they're filled
- It changes the text fonts
- It changes the text sizes
- It changes the text colors
- It changes the text positions
- etc
(If Luna Engine were divided into the smallest elements possible by implementing each of them in a separate script, I guess it'd lead to 300+ scripts instead)
As in this case, the scripts are designed for more widespread uses, scripters will have to figure out whether the "one thing" the scripters defined will work for their targeting audiences as well.
Then, just like what Galanmereth said, modularity is the key here.
In 1 extreme, everything is integrated into 1 single advanced complex script(up to nearly 10000 lines in some cases).
In another extreme, everything is separated into the smallest possible unit which is implemented by a separate addon(although a core script is probably needed to make those addons manageable).
When everything is integrated into 1 single advanced complex script, the point is modular user interface design.
For example, some advanced complex scripts clearly states which features they've. They're normally classified as core features and optional features.
Core features are those being necessary for the scripts to function, while optional features are to expand the scripts' feature sets.
Those scripts then treat each feature or each group of closely related and/or inherently coupled features as a module, and design the user interface around that so users can clearly view which features belong to which modules and navigate to the desired modules effortlessly..
They're designed in such a way that even if a module left untouched, it still won't interfere with any other module on the user level(whether the same can apply to the code level is entirely another matter).
Users just have to check the listed features and pick what they want to touch, then go to the associated user interface modules to edit what they want/need. Such navigation can be easy and simple if the scripts taught them how to do so effectively and efficiently.
To ensure users won't get lost, each user interface module can even be separated configuration regions each taking a field in the script editor(in incredibly extreme cases, users can even delete those they don't need and the scripts can still work as intended).
When the core and addon script system approach is used, the point is modular addon design.
The core script will contain all/most common base codes that are used by all/most addons, and those addons will just integrate their corresponding feature into the core feature set.
Scripters will then have to decide whether the addons must be placed according to some strict rules(some addons must be placed above/below some other addons) or can be placed as freely as they can achieve.
The former decision will generally avoid complicated
n-way addon dependencies(like having lots of if $imported[:addon_x] stuffs among those addons themselves) but will also generally reduce flexibility given to users(sometimes addon x must be placed above addon y to solve some compatibility issues in some specific cases but doing so would violate the addon relative positioning rules), while the reverse generally holds for the latter.
Usually, the hierarchies among those addons are purely parallel, meaning no addon will need another addon in order to work(That doesn't mean they won't depend on each other though). Each of them just needs the core script in order to work.
Users just have to use the core script and all the addon scripts they're interested. Those getting in their way can be safely ignored and the whole system will still work as intended.
Sometimes the number of features in the same feature set also matters.
For instance, if a feature set has just 4 features, then it'll be easy to use the core addon script system approach.
On the other hand, if a feature set has 20+ features(there's at least 1 advanced complex script I know that's exactly the case), managing 20+ addons in the same system by the same user(let alone scripter) can be really painful(like cluttering the script editor fields).
When the core addon script system approach's used, the scripters will have to think about how many features the feature set will eventually include as they can grow over time. They've to ensure the growth will always be under their control, otherwise they can end up facing insane
n-way addon dependencies which might even kill their systems at the end(you'll likely know what I'm talking about if you're experienced in dealing with such utter messes).