View Issue Details

IDProjectCategoryView StatusLast Update
0006336The Dark ModCodingpublic17.11.2023 23:30
Reporterstgatilov Assigned Tostgatilov  
PrioritylowSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionTDM 2.11 
Target VersionTDM 2.12Fixed in VersionTDM 2.12 
Summary0006336: Support several independent user addon scripts.
DescriptionThanks to 0005179, there is a hardcoded script file which is included in tdm_main.script, and hardcoded global function name which is called on start.

However, several people make addons, and players want to install them by merely putting them into a proper directory.
For this to work, we need to include existing all script files matching a hardcoded template, and execute all global functions matching a hardcoded template.
Additional InformationDiscussion thread: https://forums.thedarkmod.com/index.php?/topic/22261-support-for-multiple-user-addons/
TagsNo tags attached.

Relationships

related to 0005179 resolvedDragofer Add support for scripts in user addons 

Activities

stgatilov

stgatilov

14.11.2023 11:29

administrator   ~0016174

Implemented in svn revs 10503 and 16844.

The new interface for user addons can be seen in tdm_main.script:

// dragofer: add support for users to add custom addon scripts to their base installation, without relying on tdm_custom_scripts.script which is often already in use by FM authors
// legacy approach 0005179: include one script which can be overrided by players
#include "script/tdm_user_addons.script"
// new approach 0006336: include all scripts with predefined prefix
#include "script/tdm_user_addons_*.script"

void tdm_main() {
...
    // dragofer: initialises any user addons included
    // legacy approach 0005179: run single function (immediately)
    user_addon_init();
    // new approach 0006336: run all functions with predefined prefix (in new threads)
    sys.callFunctionsByWildcard("user_addon_init_*");
}
Dragofer

Dragofer

17.11.2023 23:30

developer   ~0016179

Updated instructions for creating user addons:
https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Script_addons_for_players

Announcement thread in the editor's guild subforum (set to hidden for now until some points are cleared up):
https://forums.thedarkmod.com/index.php?/topic/22274-support-for-multiple-addons/

Issue History

Date Modified Username Field Change
12.11.2023 11:43 stgatilov New Issue
12.11.2023 11:43 stgatilov Status new => assigned
12.11.2023 11:43 stgatilov Assigned To => stgatilov
12.11.2023 11:43 stgatilov Relationship added related to 0005179
12.11.2023 16:11 Dragofer Additional Information Updated
14.11.2023 11:29 stgatilov Note Added: 0016174
14.11.2023 11:29 stgatilov Status assigned => resolved
14.11.2023 11:29 stgatilov Resolution open => fixed
14.11.2023 11:29 stgatilov Fixed in Version => TDM 2.12
17.11.2023 23:30 Dragofer Note Added: 0016179