<RetVar> = get transport class of ware <Var/Ware>

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Locked
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

<RetVar> = get transport class of ware <Var/Ware>

Post by mark_a_condren » Sat, 1. Jan 11, 07:35

<RetVar> = get transport class of ware <Var/Ware>


<RetVar> = The command return will be stored in this variable.
<Var/Ware> = The ware that you want the transport class of.


Returns the transports class or size of <Var/Ware>.
'Class' is refered to as a 'Container' size.
Wares come in a variety of classes, from Tiny to Extra Large and Station.
<RetVar> will be the 'long version' of the transport class, for example, 'Small Container' rather than the abbreviated version, 'S'.


Examples:

$ware = Energy cells
$transport.class = get transport class of ware $ware

In this case $transport.class will be 'Small Container'.

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

It is not alway convenient to have the 'long' version displayed in a menu. The 'abbreviated' version is available by using the following code.

$transport.class = get transport class of ware $ware
$transport.class.abbreviation = read text: page = 1999 id= $transport.class

('Extra Large Containers XL' becomes 'XL' etc)
(page 1999 is a stock Egosoft page file)


Additional Information:
  • Transport classes used ingame are;

    Code: Select all

    Transport Class:			Abbreviation:      
    
    Tiny Containers			 -
    Small Containers			S
    Medium Containers		  M
    Large Containers			L
    Extra Large Containers	XL
    Station Containers		 ST
Command Location:


User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 294290

Post by X2-Illuminatus » Wed, 5. Jan 11, 17:13

<RetVar> = get transport class of ware <Var/Ware>


<RetVar> = Der Rückgabewert des Befehls wird in dieser Variable gespeichert.
<Var/Ware> = Die Ware, deren Transportklasse du ermitteln möchtest.


Gibt die Transportklasse oder -größe von <Var/Ware> zurück.
"Klasse" ist hier als "Container"-größe zu verstehen.
Waren gibt es in verschiedenen Klassen, von winzig bis extra groß und Station.
<RetVar> wird die ausgeschriebene Version der Transportklasse anzeigen, z.B. "Kleiner Container" statt der Abkürzung "S".


Beispiele:

$ware = Energiezellen
$transport.class = get transport class of ware $ware

In diesem Fall wäre $transport.class gleich "Kleiner Container".

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

Es ist in einem Menu nicht immer sinnvoll die ausgeschriebene Version angezeigt zu bekommen. Die Abkürzung kann mithilfe des folgenden Codes angezeigt werden:

$transport.class = get transport class of ware $ware
$transport.class.abbreviation = read text: page = 1999 id= $transport.class

("Extra großer Container XL' wird zu "XL" etc.)
(page 1999 ist eine Standard-Egosoft Datei)


Zusätzliche Information:
  • Die im Spiel genutzten Transportklassen sind:

    Code: Select all

    Transportklasse:			Abkürzung:      
    
    kleiner Container			  -
    kleiner Container			  S
    mittlerer Container		   M
    großer Container		 	  L
    extra-großer Container	   XL
    Stationscontainer		     ST
Zu finden unter:


Locked

Return to “MSCI Reference”