EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
[UTILITY] MSCI Reference Formatter
Post new topic This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic
Author Message
Saetan



MEDALMEDAL

Joined: 01 Feb 2006
Posts: 2944 on topic
Location: Vorarlberg (Austria)
Thank you for registering your game
modified
PostPosted: Sun, 12. Dec 10, 19:03    Post subject: [UTILITY] MSCI Reference Formatter Reply with quote Print

Here a small online-utility for those of you, who want some assistance in formatting your descriptions:

MSCI Reference Formatter 1.1 (New Version)

MSCI Reference Formatter 1.0 (BackUp: Old Version)

The usage of this utility is quite self-explanatory. It uses Mark's Template as base for its color sheme. Here what it would look like:

Quote:
@ START|[skip|else] if [not]|while [not]| <RetVar> = <RefObj> call script <Script Name>: [<Parameter>=<Value>] [...]


START|[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar> = If the called script is to 'return' information.
<RefObj> = The 'Object' that the called script is to be run on.
<Script Name> = The script that is to be 'called'.
<Parameter> = The arguments that are to be passed to the 'called' script, if any.


Use this command to call another script from a currently running script. Dependant on the first 'Parameter' used ie START or <RetVar> etc, the called script will be run concurrently with the calling script or the calling script will wait for the called script to finish and return before continuing.

Without START, the script is called to run on the same object and task ID as the calling script.
The calling script is still on the stack but the called script is now on top of the stack and will run until it quits and returns control back to the calling script with a return.

<RefObj> is ignored unless you use START.

Using START and a <RefObj> of null, will run the script as an independent global script.
Global scripts are more difficult to control because they cannot be detected by other scripts.

Using START and an existing <RefObj> will kill all task 0 scripts on <RefObj> and start this script on task 0 instead.
Not all objects are valid. Asteroids and missiles are examples of invalid objects.

A script cannot overwrite itself so a task 0 script can not START on a <RefObj> = [THIS].

START spawns a new process instead of “calling” on top of the current one so control is returned to the calling script immediately.

An '@' character in a scripting statement marks an “interrupt point”.

A return variable can be assigned to the value returned by the called script.
In this case, whatever value is passed to the return statement in the called script is assigned to the specified variable in the calling script. The result of the call can also be used as a condition in an if, skip, or while.
If this is done, then the result can only be tested for whether or not it is null. If it isn't null, then the conditional test passes. If it is null, then it fails.

A 'called' script may have up to 10 arguments, dependant on how many were used when the script was written. All arguments must have their parameter set, this may however be as simple as null if the called script was written to allow for this.


Examples:

@ START = $ship call script The.script.i.want.to.run : argument 1: $do.this, argument 2: $then.do.this ....

Starts the 'called' script The.script.i.want.to.run on the 'object' $ship and pass it the arguments $do.this and $then.do.this. This will result in the 'called' script running concurrently with the 'calling' script. The 'calling' script will continue on while the 'called' script does its thing.

-----------------------------------

@ $return = $ship call script The.script.i.want.to.run : argument 1: $do.this, argument 2: $then.do.this ....

The 'called' script The.script.i.want.to.run will be run and passed the arguments $do.this and $then.do.this. This will result in the 'called' script running sequentially with the 'calling' script. The 'calling' script will wait while the 'called' script does its thing and will only continue on after the 'called' script has finished and returned the variable $return (or the 'called' script is stopped).

-----------------------------------

@ = $ship call script The.script.i.want.to.run : argument 1: $do.this, argument 2: $then.do.this ....

As above but, the 'calling' script will wait for the 'called' script to finish, but no return is required by the 'calling' script.

To obtain the '=' without having 'null' or a '$return.variable' there you select 'No return variable' from the list of possible conditional statements at the bottom of the SE menu.


Unknown Outcomes:

Use this area if there are any 'unknown outcomes' for the command that you wish to mention.



Command Location:

»» General Commands
»» Script Calls
@ <RetVar/IF/Start><RefObj> call script <Script Name> : <Parameter>


Write your description in the text-box of the Formatter, or simply copy an already written one in. After hitting the button, the description will get some bb-tags, based on the "Replacements List". You just have to copy your formatted description, check and revise its formatting and post it in their own topics.

If you have questions or suggestions, just ask and tell here.



Last edited by Saetan on Tue, 14. Dec 10, 16:00; edited 9 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Saetan



MEDALMEDAL

Joined: 01 Feb 2006
Posts: 2944 on topic
Location: Vorarlberg (Austria)
Thank you for registering your game
modified
PostPosted: Sun, 12. Dec 10, 19:04    Post subject: Reply with quote Print

-- reserved --



Last edited by Saetan on Sun, 2. Jan 11, 19:14; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mark_a_condren





Joined: 03 Aug 2005
Posts: 1384 on topic
Location: Newcastle - Australia
Thank you for registering your game
PostPosted: Mon, 13. Dec 10, 15:27    Post subject: Reply with quote Print

Just noticed this,

If you have the arrow '->' showing after <RefObj> it adds another close color tag.

@ [skip|else] if [not]|while [not]|<RetVar/IF> = <RefObj> ->[/color] follow <Var/Ship> with
precision <Var/Number> m : timeout=<Var/Number> ms

Code:
[color=blue]@ [skip|else] if [not]|while [not]|[/color][color=lime]<RetVar/IF>[/color] = [color=lime]<RefObj>[/color] ->[/color] follow [color=lime]<Var/Ship>[/color] with
precision [color=lime]<Var/Number>[/color] m : timeout=[color=lime]<Var/Number>[/color] ms


Mark

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



MEDALMEDAL

Joined: 01 Feb 2006
Posts: 2944 on topic
Location: Vorarlberg (Austria)
Thank you for registering your game
PostPosted: Mon, 13. Dec 10, 16:02    Post subject: Reply with quote Print

Quote:
@ [skip|else] if [not]|while [not]|<RetVar/IF> = <RefObj> -> follow <Var/Ship> with
precision <Var/Number> m : timeout=<Var/Number> ms


Fixed ... there are no References, or something like that, ( <...> ) ending with -> which could cause other problems, right?


edit:
... ehm ... Mark? I just recognized:
Quote:
@ [START|[skip|else] if [not]|while [not]|


It's the one out from your template ... the [ before start, isn't that to much? I see no closing ] for it ...


_________________
-- retired from X --

S.O.P.H.I.E. - Stamp Out Prejudice Hatred and Intolerance Everywhere
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mark_a_condren





Joined: 03 Aug 2005
Posts: 1384 on topic
Location: Newcastle - Australia
Thank you for registering your game
PostPosted: Mon, 13. Dec 10, 19:19    Post subject: Reply with quote Print

Quote:
there are no References, or something like that, ( <...> ) ending with -> which could cause other problems, right?

Not that i can think of off the top of my head.


Quote:
@ [START|[skip|else] if [not]|while [not]|

Damn, hadn't noticed the [ but no ]. I'll take the [ out, it has no need there.


Thanks

Mark

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



MEDALMEDAL

Joined: 01 Feb 2006
Posts: 2944 on topic
Location: Vorarlberg (Austria)
Thank you for registering your game
PostPosted: Tue, 14. Dec 10, 06:03    Post subject: Reply with quote Print

Mark, another question. I have seen you using the -> colored in lime if it's after a variable at the beginning of the command.


Which version would be used more often, respective better to handle for you (all)?

... a "->" in the command line or an uncolored "->" just as description?

... or should I try to add simple AI logics like:

if -> has been found, check the word before ... if it's a Var, that means starting with $, make it lime else let it be uncolored? Wink


_________________
-- retired from X --

S.O.P.H.I.E. - Stamp Out Prejudice Hatred and Intolerance Everywhere
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mark_a_condren





Joined: 03 Aug 2005
Posts: 1384 on topic
Location: Newcastle - Australia
Thank you for registering your game
PostPosted: Tue, 14. Dec 10, 11:34    Post subject: Reply with quote Print

Quote:
... or should I try to add simple AI logics like:

if -> has been found, check the word before ... if it's a Var, that means starting with $, make it lime else let it be uncolored?

This would be ideal, but if its to much of a PITA, i can live with fixing this when final formatting the command post.


I came across another formatting foo foo with the foo foo inserter last night, but for the life of me can't remember what it was now. Will post when i remember.

Thanks Saetan


Mark

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



MEDALMEDAL

Joined: 01 Feb 2006
Posts: 2944 on topic
Location: Vorarlberg (Austria)
Thank you for registering your game
PostPosted: Tue, 14. Dec 10, 15:52    Post subject: Reply with quote Print

mark_a_condren wrote:
This would be ideal, but if its to much of a PITA, i can live with fixing this when final formatting the command post.


Did it ... also $Var's will be automatically colored over the whole length. But that also means (at least for now) that non-alphabetical parts, like quotas or points, at the end of the word will be colored too. But at least on its own in the middle of a sentence, $Var's should be revision-free now.

'cause I had to do major changes in the new version, it's online additionally to the old one. Both links are in the opening post. (If you made bookmarks, they will lead you automatically to the new version)


_________________
-- retired from X --

S.O.P.H.I.E. - Stamp Out Prejudice Hatred and Intolerance Everywhere
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mark_a_condren





Joined: 03 Aug 2005
Posts: 1384 on topic
Location: Newcastle - Australia
Thank you for registering your game
PostPosted: Wed, 15. Dec 10, 05:28    Post subject: Reply with quote Print

Whoa, this just keeps getting better and better ...

Saetan wrote:
If you made bookmarks

Smile ... yep, and,
  • Direct link from browser tool bar.
  • Direct link from desktop.
  • Direct link from inside Notepad ++.

Is that showing a pattern that i'm lazy?

EDIT:
I must remember that the command used as the 'temple' still hasn't been posted as a command post yet. Smile


Mark

Back to top
View user's profile Send private message Send e-mail
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 14901 on topic

Thank you for registering your game
PostPosted: Sat, 5. Feb 11, 15:37    Post subject: Reply with quote Print

Very practical tool so far. Smile I just noticed a little glitch: Sometimes the formatter doesn't marks the subcategory in SE structure under Command Location. For example:

Code:
Command Location:
»» Trade Commands
»» Passengers
<RetVar/IF><RefObj> get passenger array


will be formatted to

Code:
[i]Command Location:[/i]
[color=red]»» Trade Commands[/color]
»» Passengers
[color=lime]<RetVar/IF>[/color][color=lime]<RefObj>[/color] get passenger array



_________________
Schreibwettbewerb der Kreativen Zone
X-BtF Anniversary Screensaver von TVCD
VAGABUND von arragon0815
FAQ - häufig gestellte Fragen einfach beantwortet.
XDownloads - Upload, Link, Download
"...time it seems does not care if you have stuff to do or not, it just goes by regardless." - Ketraar
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic This topic is locked: you cannot edit posts or make replies.
 
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 Sun, 26. May 13, 01:04

All times are GMT + 2 Hours


Board Security

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