EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
[SCRIPT] Community Configuration Menu : V1.51 : 03/01/2012
Post new topic Reply to topic Goto page 1, 2, 3 ... 9, 10, 11  Next
View previous topic :: View next topic

Will scripters find this useful ?
Yes
86%
 86%  [ 540 ]
No
1%
 1%  [ 8 ]
Dont Care
11%
 11%  [ 74 ]
Total Votes : 622

Author Message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20457 on topic
Location: London
Thank you for registering your game
modified
PostPosted: Mon, 20. Oct 08, 22:18    Post subject: [SCRIPT] Community Configuration Menu : V1.51 : 03/01/2012 Reply with quote Print

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

Arrow Installation:



    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

    (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.




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



_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui


Last edited by Cycrow on Tue, 25. Aug 15, 08:54; edited 14 times in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Litcube





Joined: 20 Oct 2006
Posts: 4171 on topic
Location: Canada
Thank you for registering your game
PostPosted: Mon, 20. Oct 08, 22:46    Post subject: Reply with quote Print

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

What's a configuration menu?

Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20457 on topic
Location: London
Thank you for registering your game
PostPosted: Mon, 20. Oct 08, 22:50    Post subject: Reply with quote Print

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


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Khaak_Slayer





Joined: 18 Apr 2004
Posts: 383 on topic
Location: Suffolk, UK
Thank you for registering your game
PostPosted: Mon, 20. Oct 08, 22:59    Post subject: Reply with quote Print

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


_________________
Rawr.
Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20457 on topic
Location: London
Thank you for registering your game
PostPosted: Mon, 20. Oct 08, 23:04    Post subject: Reply with quote Print

depends how many ppl use it really.


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Litcube





Joined: 20 Oct 2006
Posts: 4171 on topic
Location: Canada
Thank you for registering your game
PostPosted: Mon, 20. Oct 08, 23:08    Post subject: Reply with quote Print

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.

Back to top
View user's profile Send private message
joelR





Joined: 09 Jul 2007
Posts: 1973 on topic
Location: Seattle
Thank you for registering your game
PostPosted: Tue, 21. Oct 08, 00:21    Post subject: Reply with quote Print

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

Back to top
View user's profile Send private message
s9ilent





Joined: 29 Jun 2005
Posts: 2008 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Tue, 21. Oct 08, 01:55    Post subject: Reply with quote Print

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 Oops. 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!

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Coruskane





Joined: 13 Jun 2008
Posts: 796 on topic
Location: Under LV's Imperial Tasselled-Vintage-Leather Boot
Thank you for registering your game
PostPosted: Tue, 21. Oct 08, 02:31    Post subject: Reply with quote Print

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)

Back to top
View user's profile Send private message
Sandalpocalypse





Joined: 02 Dec 2003
Posts: 4019 on topic

Thank you for registering your game
PostPosted: Tue, 21. Oct 08, 06:41    Post subject: Reply with quote Print

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

Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20457 on topic
Location: London
Thank you for registering your game
PostPosted: Tue, 21. Oct 08, 11:49    Post subject: Reply with quote Print

no abit different to the AL menu, the AL menu is still available Wink

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


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
shinyclef





Joined: 02 Sep 2007

Location: Osaka, Japan

PostPosted: Tue, 21. Oct 08, 22:45    Post subject: Reply with quote Print

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.

Back to top
View user's profile Send private message Send e-mail
ThisIsHarsh





Joined: 19 Oct 2008
Posts: 1132 on topic

Thank you for registering your game
PostPosted: Sat, 25. Oct 08, 07:14    Post subject: Reply with quote Print

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.

Back to top
View user's profile Send private message
s9ilent





Joined: 29 Jun 2005
Posts: 2008 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Sun, 26. Oct 08, 04:42    Post subject: Reply with quote Print

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.

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20457 on topic
Location: London
Thank you for registering your game
PostPosted: Sun, 26. Oct 08, 12:57    Post subject: Reply with quote Print

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


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3 ... 9, 10, 11  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Fri, 20. Oct 17, 00:01

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.55074 seconds, sql queries = 31