[SCRIPT] Community Configuration Menu : V1.51 : 03/01/2012

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Post Reply

Will scripters find this useful ?

Yes
582
87%
No
8
1%
Dont Care
82
12%
 
Total votes: 672

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

[SCRIPT] Community Configuration Menu : V1.51 : 03/01/2012

Post by Cycrow » Mon, 20. Oct 08, 22:18

================================================================
Script: Community Plugin Configuration
Created: 03/01/2012
Author: Cycrow
Version: 1.51
Game: X3: Terran Conflict V2.5+
================================================================

:arrow: Installation:
  • Image (SPK)

    :idea: Required: Plugin Manager Lite

    Make sure the Plugin Manager Lite is installed and setup. Then Download and install using the Manager

    NOTE: This script is mainly for use for other scripts and can be included with them

    Image (RAR)
:arrow: Introduction:
  • This script is designed to allow the community of a central location for thier configuration menus.
    This creates a menu that lists all the scripts that have configuration, selecting them will open up the scripts own configuration menu.

    Image
:arrow: Users:
  • This script will only work if other scripts have been added to its list. To use it, simply set the hotkey and press it to open the menu.

    if no menu opens, then most likly there is no configurable scripts available.
:arrow: Scripters:
  • To make use of the configuration menu, simply call the script, plugin.config.addscript, from your setup script.
    It takes 3 arguments, the script name and script author (ie you) and the config script.

    The menu will split the scripts into sections for each author and display the name, which you set as the first argument.

    The 3rd argument, config script, is the string name of the script to run. Ie, you create your own script and type in the name of it here.
    When your script is selected from the menu, it will run this script so you can have your own menu open up to do what ever config is required

    The 4th is a boolen (true/false) if you want the author to be displayed

    The 5th is the section you wish it to appear in, leaving this null will put it in the first section in the menu. Anything else will add a new section below to seperate your script from the rest

    WARNING: When calling the config scripts, you must call them normalling, and not use START to create a new process, otherwise it could lock up someones game if they dont have this installed
:arrow: Additional Options:
  • As well as adding your own package menu, you can also add single options.

    There are currently 3 types of options you can add. The options will display the option in the menu, as well as thier current value. Selecting the value allows you to change the option.

    All options have the same basic 4 arguments, these are:
    Unique ID: This is a string id to identify your option from someone elses, can be anything you like
    Option Text: This is the text of your option, and is what will be displayed on the menu
    Setting Script: This is an optional script that can be run when your option is selected, althou until the packages, this is not needed. Scripts need 2 arguments, the first is the Unique ID, the second is the value its been set to
    Section: Like with the package list, this allows you to add your option to a certain section in the menu

    As said, when the user selects your option, the value will change depending on the type of option, you can use the script to do anything else you might need to

    Boolean Option
    This is a simple On/Off switch, selecting it turns the option, on, or off.

    To use this, you need to call the script, plugin.config.addboolean, which has the first 4 arguments above, plus the default value.
    This is the value that it will start at, ie TRUE, or FALSE.

    Selecting this option in the menu simply cycles between on and off.

    Cycle Option:
    This is an extension to the Boolean, but it allows you to cycle between more entries that you define.

    To use this, you need to call the script, plugin.config.addcycle, The 5th argument is an array of your options. The default will be set to the first entry

    When selecting this option, it will cycle between your available options from the array

    Select Option:
    This is simplar to the Cycle Option, its created in the same way, using the script, plugin.config.addselect. And uses the option array.

    The difference with this options, is how the user selects it. Instead of cycling between the available options, it'll open a seperate menu with all the options for the user to pick.

    If your scripts need to check the status of your values, there is a script you can call, plugin.config.getvalue, you send it your Unique ID, and it returns the currently set value
:arrow: Additional Menus:
  • You can also create your own menus, and have the menus open up from other menus. All scripts used to add options also now has a Menu Argument, this specifies the menu you want the option to be added to
    Leaving this option blank, or null will add the options to the main menu (ie the same as normal)
    Otherwise, you can set this to the unique menu id, and the option will then only display when viewing that specific menu.

    To create a new menu to add your options in, you use the plugin.config.addmenu script, setting the unique menu id that you use to add menus too.
    The menu will display the same as the scripts, with the name, and other display, but when selecting it, instead of running your script, it opens the menu and displays all items with the same menuid

    If you want to open your created menu from your own scripts/menus, etc. Then you can call the 'plugin.config.displaymenu' script, with the menuid of your menu and your menu will then be displayed
Last edited by Cycrow on Tue, 25. Aug 15, 08:54, edited 14 times in total.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Mon, 20. Oct 08, 22:46

Cycrow, you're miles ahead of everyone in terms of scripting for TC. Can you explain what this is?

What's a configuration menu?

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 20. Oct 08, 22:50

well, remember in X3 when some scripts have a configuration. Ie, my Xenon migration script.

well, this acts a central place for them all. So instead of having a seperate command or hotkey to config the script, it can be added to this menu.

so if you want to configure ur script, jsut open this menu and it will list all scripts that can be configured

Khaak_Slayer
Posts: 403
Joined: Sun, 18. Apr 04, 17:04
x4

Post by Khaak_Slayer » Mon, 20. Oct 08, 22:59

Very nice. So this is going to become one of those essentials then i presume?
Rawr.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 20. Oct 08, 23:04

depends how many ppl use it really.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Mon, 20. Oct 08, 23:08

Ok, cool.

Was kind of hoping TC would implement a script command that would add configuration items to the global options menu. This is the next best thing, though.

Thanks.

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Tue, 21. Oct 08, 00:21

Think we could sticky this like the plugin manager thread? Seems like an incredibly valuable "tool".

User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent » Tue, 21. Oct 08, 01:55

Horay for Cycrow!!

I tried to make something like this before.. but it failed miserably (It works.. just that no one uses it, including me) Not to mention it was hard to use. But luckily, if you start early, you can standardize anything (Especially so if your Cycrow).
I'm guessing that one of the key improvements of TC is the "call script with name $Variable" ?


I just wish that TC was released in Australia... I've still got to wait another day :S. I've finished coding the script for my resupply thingy... but I haven't written the UI yet (As I knew there was going to be a new one, nor have I done the buying bit)

Standardization is key!

Coruskane
Posts: 849
Joined: Fri, 13. Jun 08, 13:14
x4

Post by Coruskane » Tue, 21. Oct 08, 02:31

yey!

i really hope the great scripters out there decide to use this as a standard. My final install of X3:R needed about 10 dedicated hotkeys (no easy task on a laptop)

User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse » Tue, 21. Oct 08, 06:41

So this is like an Artificial Life menu of the Future?

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 21. Oct 08, 11:49

no abit different to the AL menu, the AL menu is still available ;)

things like Xenon Migration that has a seperate setup menu, ie it had a hotkey that you can set how hard to the xenon attacks were.

this allows it to be added to this menu isntead of using seperate hotkeys and menus for it.


i will be releasing SEWN to that makes use of this

shinyclef
Posts: 32
Joined: Sun, 2. Sep 07, 13:25

Post by shinyclef » Tue, 21. Oct 08, 22:45

I'm not a scripter, but I voted yes cause this would be very useful! One key bind is better than many! I really hope this catches on.

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh » Sat, 25. Oct 08, 07:14

Hey, I've used this for a script I'm working on and just have one comment/suggestion:

I don't really see the need to have a separate section for each author. I can imagine a case where people use, say, 30 scripts, with authors only being attributed to 1 or 2 each... lots of clutter.

I would suggest instead simply *sorting* the options by author name, that way they stay grouped, but don't come under a separate title. If the authors want to include their name, then they can do so as part of the 'Plugin Name' parameter.

Just a thought.

User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent » Sun, 26. Oct 08, 03:42

Hey

Just an idea,

What if you changed the very of plugin.config.menu.xml end such that:

066 ||= null -> call named script: script=$ret, null, null, null, null, null
067 |end
068 end
069
070 return null

such that the script returns some true/false checker variable. And if it was false, it will be marked as N/A; *and* then if there was an option to hide/delete all N/A marked menu's.



This way its like a "am I installed" checker each time the script is run.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 26. Oct 08, 11:57

well if it appears in the list, then it would be installed.

because, the menu uses an init file, it can whip the script list on load and then all the scripts can re add themselves in the setup scripts.

so if they are in the list, then they must have run at that time.

so to check it if its installed, u can just check the script array

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Update 1.10

Post by Cycrow » Tue, 28. Oct 08, 19:47

New Update available: V1.10

* removed seperating out into Author
* Added option to display author in the script name, ie Author: Script name
* Added optional section display, set an option section to split the script into a seperate section. Those without sections defined will be displayed at the top

Cornelius Orion
Posts: 4
Joined: Sat, 18. Oct 08, 01:03

Installation of the Community Configuration Menu?

Post by Cornelius Orion » Sun, 2. Nov 08, 18:05

Hy everybody!

So, I followed all the listed instructions:

1. Enabled my script editor in the game.

2. Download the file. Here it cames the first surprise - what should I actually extract? It is only a SPK file????

3. Copy (not extracted, as it was impossible:)) to my X terran conflict dirrectory.

4. Coppied other scripts in the same directory.

Question:
1. How can I configure the hot key for the Community Configuration Menu? I don´t have this option in my Control Configuration Menu.

2. I noticed I also have a folder named "scripts" in my game dirrectory. I tried to copy both the Comunity Configuration Menu and the other scripts there. Stil not working.

Any suggestions?

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 2. Nov 08, 18:23

u need to use the Plugin Manager to install spk files

DasFlo
Posts: 50
Joined: Sun, 3. Dec 06, 15:52
xr

Post by DasFlo » Tue, 4. Nov 08, 20:26

Hi cycrow,

incredible work on this one, I love it. I can't see why any sctipt author would chose to use a sepearte hotkey instead of this control centre, it makes everything really easy and stops the keyboard from getting cluttered up with hotkeys in a formidable way. Thumbs up, WAY up! Keep up your great work Mate.

User avatar
odie forever
Posts: 2649
Joined: Thu, 29. Jul 04, 19:59
x3tc

Post by odie forever » Sun, 16. Nov 08, 12:57

I just downloaded and installed this script successfully. But in the menu "Oberfläche" (dunno english expression) where i define a hotkey it's called "Readtext7000-1". Then when I press the hotkey it's called "Readtext7000-2". So the script for itself works fine, but I wanna get rid of those readtexts. Any suggestions?

edit: It doesn't even work. My settings aren't saved. As long as i don't reload any changes work but when I load a savegame the settings are default ones.

mfg Odie

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”