Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Customizable script actions codes

Open ghost opened this issue 3 years ago • 3 comments

First check

  • [X] The suggestion is NOT related to functionality of Ares, HAres, Kratos or any other YR engine extension.
  • [X] The suggested feature / enhancement is NOT implemented in Ares/Phobos yet and the existing possibilites are not viable or good enough to achieve the wanted result.
  • [X] I agree to elaborate the details if requested and provide thorough testing if the feature is implemented.
  • [X] I added a very descriptive title to this issue.
  • [X] I used the GitHub search and read the issue list to find a similar issue and didn't find it.
  • [X] I thought out how the feature / enhancement should work and described it in the most detailed and clear way.

Description

This might be an overkill at the moment, but could be useful in many ways.

If other extensions like Ares decide to add new script actions that overlap with the Phobos ones, it would be nice to be able to map them manually in some ini file without having to rebuild the whole project.

This could also be used to kinda obfuscate aimd.ini to prevent copy/paste from one mod to another, as well as customizing the codes in modding tools.

Should be relatively easy since it's not a game dependent feature, just define the codes for new actions in some ini file and fallback to the hard-coded values if not defined.

INI code

[SomeSection]
ScriptAction.TimedAreaGuard=199     ; default=71
ScriptAction.LoadOntoTransports=200 ; default=72

Additional context

No response

ghost avatar Apr 29 '22 21:04 ghost

Thanks a lot about the concern for Ares Script Action numbering collission but maybe in 2-5 years Ares wont have a major release so no collission here with the lowest number (71).

Think too that as a Open Source project we can modify those numbers easily if we need it for the next release. Also, we talked about moving the script actions numbers to higher values (for example over 1000) so maybe in the year 3022 Ares will have covered all the script actions until the 999 :-P

I'm against that suggestion because then to learn from other mods that use those script actions would be too hard/time consuming because the author decided weird numbers. Imagine vanilla TS/YR script Actions with such customization... a nightmare if you wanted to learn and be part of this mature RA2 community.

FS-21 avatar Apr 30 '22 10:04 FS-21

@FS-21 No worries, was just a suggestion. But having the code flexible is always a good thing. "Also, we talked about moving the script actions numbers to higher values": this would force modders (me included) to redo their work, this is exactly why I suggested this, to avoid such a future mess. Fixing hundreds of scripts is not THAT easy, but if we the modders can choose the numbers this can be avoided. And it could happen much earlier than 3022 :D

ghost avatar May 01 '22 14:05 ghost

In theory nobody should care about Script Action numbers of the development release because the stable version only exist 2 Actions and those should be the only ones affected for now :-P

But you can do massive renames with Notepad++.

FS-21 avatar May 01 '22 16:05 FS-21