--------------------------------------------
Script Identification Library
by Osiris_sam
--------------------------------------------
Download: [.rar]
(only available in .rar, since i don't see the need for it to be in .spk)
Installation:
Unzip the .rar file to your x3 reunion directory
Usage:
Call the library from your script. the only argument should be one of the following short names:
Bonus pack scripts:
Station Manager: SM
Ship Tools: ShT
Remote Transporter Device: RTD
Manual Trade Commands: MTC
Commodity Logistics Software: CLS
Group Management System: GMS
Group Hotkeys: GHK
Fleet Support Sfotware: FSUP
Explorer Software: Expl
Dockware Manager: DwMr
Missile Defense Mosquito: DefM
Commercial Agent: CAg
Cartel Shield Hacker: CSH
Afterburner: AftBn
Scrap Ship At HQ: HqSS
Mods:
Xtended Mod: XTM
Unsigned Scripts:
Terracorp Combat Pilots Taskforce (part of Terracorps Fleet Package): CPTF
Sector Takeover: ScTo
Trade Distribution Network: TDN
Taxi Software: TaSw
Station Trader: STrd
Sector Mother: SecSup
Ship Factory: ShFac
Station Naming System: StNS
Ship Naming System: SNS
Terracorp Combat Pilots (part of Terracorps Fleet Package): CPilots
Advanced Jumpdrive: AJD
Bank Account 1.5b: Banking
Install Factory To Station Or Ship: IFTSOS
Terracorp Combat Pilots Fighter Base Commander (part of Terracorps Fleet Package): CPFB
Anarkis Carrier Commands: ACC
x0ne Turret Control System: TCS
Fight Command Software Mk3: FCSMK3
**Please add your scripts to this library**
The library will return [TRUE] if the script is installed and [False] if it is not.
To add a script to this library please provide the following information:
>Script name
>Script Short (as short as possible and not conflictin with any of the ones already existing)
>a GLOBAL variable that can identify if the script is installed or not
Unistallation:
Remove lib.os.script.identification from the X3 Reunion\Scripts Directory
Version History:
-V1.00 - Initial Release
Thanks to Moggy2 for his help with the bonus pack scripts
[Utility Script]Script Identification Library v1.00
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 422
- Joined: Thu, 24. Aug 06, 13:45
-
- Moderator (Script&Mod)
- Posts: 22437
- Joined: Sun, 14. Nov 04, 23:26
-
- Posts: 7168
- Joined: Sat, 7. Jan 06, 16:01
-
- Posts: 422
- Joined: Thu, 24. Aug 06, 13:45
-
- Moderator (Script&Mod)
- Posts: 22437
- Joined: Sun, 14. Nov 04, 23:26
yes, thats the same feature as the Plugin Manager.
http://www.xpluginmanager.co.uk/Install ... ckage.html
http://www.xpluginmanager.co.uk/Install ... ckage.html
-
- Posts: 422
- Joined: Thu, 24. Aug 06, 13:45
yes, but even as good as it is, not everyone uses the plugin manager, and therefore some scripts are not accounted for in its function (FCS mk3 for example), i felt the need to make the library which can identify the scripts a user is running without the need for external programs.
also, for the feature on the plugin manager to work, the script can only be distributed in .spk format, limiting its availability, since a script cannot be called if it does not exist (hence the purpose of this library)
also, for the feature on the plugin manager to work, the script can only be distributed in .spk format, limiting its availability, since a script cannot be called if it does not exist (hence the purpose of this library)
-
- Moderator (Script&Mod)
- Posts: 22437
- Joined: Sun, 14. Nov 04, 23:26
-
- Posts: 422
- Joined: Thu, 24. Aug 06, 13:45
-
- Moderator (Script&Mod)
- Posts: 22437
- Joined: Sun, 14. Nov 04, 23:26
problem about using global vars, is that not all scripts that use them, will unset them when they are removed.
so if someone removes the script, it will still come up as active, which could cause problems.
thats one reason i added this feature, as there isn't really a good way to detect these.
you could do something like my keepstock scripts, but the scripters will have to specifically use them for it to work.
how it works, is when the script runs, it adds itself to an array, then the check scripts can check the array for whats installed.
the main problem is how to remove it from the array when the script is removed.
this could be done via an uninstall script.
or, the array could be cleared each time on startup, so all the setup scripts will add them again, just as long as the clearning happens before the other setup scripts are run.
possibly by using an Init script instead of a setup script.
but like i said, scripters will have to add the call script in thier setup scripts for it to work
so if someone removes the script, it will still come up as active, which could cause problems.
thats one reason i added this feature, as there isn't really a good way to detect these.
you could do something like my keepstock scripts, but the scripters will have to specifically use them for it to work.
how it works, is when the script runs, it adds itself to an array, then the check scripts can check the array for whats installed.
the main problem is how to remove it from the array when the script is removed.
this could be done via an uninstall script.
or, the array could be cleared each time on startup, so all the setup scripts will add them again, just as long as the clearning happens before the other setup scripts are run.
possibly by using an Init script instead of a setup script.
but like i said, scripters will have to add the call script in thier setup scripts for it to work