Skip to content

Allow custom init script #4649

@aubergineagain

Description

@aubergineagain

Describe the feature you'd like

Allow basic mods to use something other than init.js as their main script.

Describe why do you think it is needed

I want to be able to use multiple mods but can't because they conflict with init.js.

Notes

For example, if my mod is called ScavArtifactMgr, I'd have something like this:

/multiplay/script/mods/ScavArtifactMgr.json
/multiplay/script/mods/ScavArtifactMgr.js

The json file would look something like this:

{
  "mod": "ScavArtifactMgr",
  "author": "aubergine",
  "version": "1.0.0",
  "license": "CC0-1.0",
  "minVersionSupported": "4.6.1",
  "maxVersionTested": "4.6.1",
  "description": {
     "en": "Tweak scavenger artifacts in skirmish/multiplayer games."
  },
}

The json files in the folder would be scanned to see if any match certain criteria, eg. the namespace property, and if so they instantiate the <namespace>.js file in the same folder.

Another benefit is this could eventually lead to having tweakOptions for basic mods. On my ScavArtifactManager I might have an option to replace scav artifacts with oil drums, for example.

Obviously needs more thought, but I think it would greatly improve modding and also usability for end-users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions