[Question] Remapping stock commands
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
[Question] Remapping stock commands
I'm not a fan at how some of the new built in scripts were implemented, especially the explorer software's satellite deployment bug.
Can I remap the global script key COMMAND_DEPLOY_SATELLITE to a new script? I can't seem to get it working, as every attempt seems to result in the command only running the previous, default script.
Redacted for tutorial purposes, for those searching for the same help:
If the original command is assigned to the ship type "Moveable Ship", for example, then your override also needs to be assigned to ship type "Moveable Ship". I.E. assigning the key to ship type "Ship" would not work.
If this method fails, mapping the command using non-group ship types such as "M4" or "TL" seem to override the command just fine.
Also, there are some built in scripts that are assigned to a command by using preload commands., which are not mapped by the usual global key. These preloaded commands are mapped to scripts that launch BEFORE the global map key is launched, for the purposes of gathering user information such as menu data. The code author is expected to RETURN the gathered data from these scripts as an argument array to the actual global command called.
Can I remap the global script key COMMAND_DEPLOY_SATELLITE to a new script? I can't seem to get it working, as every attempt seems to result in the command only running the previous, default script.
Redacted for tutorial purposes, for those searching for the same help:
If the original command is assigned to the ship type "Moveable Ship", for example, then your override also needs to be assigned to ship type "Moveable Ship". I.E. assigning the key to ship type "Ship" would not work.
If this method fails, mapping the command using non-group ship types such as "M4" or "TL" seem to override the command just fine.
Also, there are some built in scripts that are assigned to a command by using preload commands., which are not mapped by the usual global key. These preloaded commands are mapped to scripts that launch BEFORE the global map key is launched, for the purposes of gathering user information such as menu data. The code author is expected to RETURN the gathered data from these scripts as an argument array to the actual global command called.
Last edited by Litcube on Tue, 28. Oct 08, 02:22, edited 2 times in total.
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
It works.
Just assign the new script to the same command.
Just assign the new script to the same command.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Look at this script.
It does exactly that.
http://www.hentschke-keramik.de/rmh/fly ... h-gate.zip
It overrides the Explorer software Fly Through Gate with a version that works with terran gates as well.
It does exactly that.
http://www.hentschke-keramik.de/rmh/fly ... h-gate.zip
It overrides the Explorer software Fly Through Gate with a version that works with terran gates as well.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
I encountered similar problems in X3R as well. When ever you run an overriding map, you can't use groups of ..object classes, you would have to specify each group...
eg.
If you did. Map all ships xxx to this
Then map all fighters xxxxx to this,
It would ignore the second one. Instead you would have to
a)
Map all fighters,
Map all ships
or b) (Sometimes this way is faster)
Map all ships
Map fighter1, map fighter2, etc.
So in order of priority:
1) the last individually selected ship has the highest mapping priority
2) Then the FIRST select run object class
(And then nothing else)
I've found no way around it. I.e. Mapping all, then making all ignore the map, then trying to map another group, will NOT work
eg.
If you did. Map all ships xxx to this
Then map all fighters xxxxx to this,
It would ignore the second one. Instead you would have to
a)
Map all fighters,
Map all ships
or b) (Sometimes this way is faster)
Map all ships
Map fighter1, map fighter2, etc.
So in order of priority:
1) the last individually selected ship has the highest mapping priority
2) Then the FIRST select run object class
(And then nothing else)
I've found no way around it. I.e. Mapping all, then making all ignore the map, then trying to map another group, will NOT work
Last edited by s9ilent on Fri, 24. Oct 08, 00:46, edited 3 times in total.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
-
- Posts: 22500
- Joined: Sat, 23. Apr 05, 21:42
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
-
- Posts: 1135
- Joined: Sun, 19. Oct 08, 18:46
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02
Preloaded command maps to scripts appear to run on Task 17. Whic is not what I want to do.
Certain commands that come with X3TC are "pre-loaded" in some scripts. For example, the deploy satellites command. This command runs on task 17. This is undesirable.
I want to know how to unload the loaded key, and apply my own. I figure it's not possible, but we'll see what the gods say.
Certain commands that come with X3TC are "pre-loaded" in some scripts. For example, the deploy satellites command. This command runs on task 17. This is undesirable.
I want to know how to unload the loaded key, and apply my own. I figure it's not possible, but we'll see what the gods say.
-
- Moderator (Script&Mod)
- Posts: 22432
- Joined: Sun, 14. Nov 04, 23:26
what is the problem with preloads running on task 17 ?
u shouldn't be using those tasks in any scripts you create so theres no problem with it overrighting existing tasks
also note, that althou the preload runs on 17, the main script runs on the main task, preloads are just for the duration of the selection menu.
u shouldn't be using those tasks in any scripts you create so theres no problem with it overrighting existing tasks
also note, that althou the preload runs on 17, the main script runs on the main task, preloads are just for the duration of the selection menu.
-
- Posts: 4254
- Joined: Fri, 20. Oct 06, 19:02