method_Assign( objSource:Object Var, objTarget:Object Var, name:String="DATA", mode:Int=0 )
override to output differing log texts
var_Entity_globalWorldSpeedFactor:Float
store the time gone since when the app started - timers rely on this and without, times will differ after "loading" (so elevator stops closing doors etc.) this allows to have "realtime" (independend from "logic updates") effects - for visual effects (fading), sound . Field _Time_timeGone:Long = 0
Store call states as we try a "Non blocking" approach which means, the update loop gets called multiple time. To avoid multiple calls, we save the states. ==== was "startGame()" called already?
varStartMultiplayerSyncStarted:Int
methodUpdate:Int( deltaTime:Float )
override default update
TSettingsWindowthe modal window containing various gui elements to configure some basics in the game
called with the corresponding xmlNode containing the element which the loader registered for loads all recognized values of the node into a tdata-object
methodGetNameFromConfig:String( data:TData )
return a printable identifier of this resource (url, spritename, ...)
returns a data set containing only differing data 1) original contains key->value, customized does not contain key->value -> SKIP key->value 2) original contains key->value, customized contains key->value2 -> add key->value2 3) original contains key->value, customized contains same key->value -> SKIP key->value and key->value2
outputs a string to stdout and/or logfile exactTypeRequired: requires the mode to exactly contain the debugType so a LOG_AI|LOG_DEBUG will only get logged if BOTH are enabled
fill a given string with the args provided examples: print StringHelper.printf("price %3.3f", ["12.12399"]) print StringHelper.printf("My name is %s, write it big! %S is %d", ["John", "John", "12"])
returns a linear interpolated value between startValue and endValue if the result is less than 0.1 away from endValue, endValue is returned this is done to avoid "shaking" between "short before end" and "end" -> percentage 0.99 vs 1.00
OVERWRITTEN to add support for TSprite and TSpritepack running a script configured with values contained in a data-object objects are directly created within the function and added to the registry
returns the image of this sprite (reference, no copy) if the frame is 0+, only this frame is returned if includeBorder is TRUE, then an potential ninePatchBorder will be included
methodGetImageCopy:TImage( loadAnimated:int = 1 )
creates a REAL copy (no reference) of an image
methodGetMinHeight:int( includeOffset:int=TRUE )
methodGetMinWidth:int( includeOffset:int=TRUE )
methodGetName:String( )
methodGetNinePatchBorderDimension:TRectangle( )
methodGetNinePatchContentBorder:TRectangle( )
methodGetPixmap:TPixmap( frame:Int=-1 )
return the pixmap of the sprite' image (reference, no copy)
methodGetWidth:int( includeOffset:int=TRUE )
varid:int
the id is NOT globally unique but a value to make it selectable from a TSpritePack without knowing the name
set the resolution the assets are designed for things get resized according the real resolution
methodSetFlags:Int( value:int = 0 )
methodSetFullscreen:Int( bool:int = TRUE )
ATTENTION: there is no guarantee that it works flawless on all computers (graphics context/images might have to be initialized again)
methodSetHertz:Int( value:int=0 )
methodSetRenderer:Int( value:int = 0 )
methodSetResolution:int( width:int, height:int )
methodSetViewPort( x:int, y:int, w:int, h:int )
methodSetVSync:Int( bool:int = TRUE )
methodSwitchFullscreen:int( )
switch between fullscreen or windowed mode
varvsync:int
method_InitGraphicsDefault:Int( )
method_InitGraphicsWin32:Int( )
cannot "?win32" this method as this disables "?not bmxng" in this method
TVirtualGfx For instance, my monitor's native resolution is 1920 x 1080, and if I set the Graphics mode to 1024, 768, it defaults to stretching that to fill the screen, meaning the image is stretched horizontally, so a square will appear non- square; however, it also provides an option to scale to the correct aspect ratio. Since this is set on the monitor, there's no way to detect or correct it other than by offering the option to the user. Leave it off if unsure.
draws the text in a given block according to given alignment. @nicelyTruncateLastLine: try to shorten a word with "..." or just truncate? @centerSingleLineOnBaseline: if only 1 line is given, is center calculated using baseline (no "y,g,p,...")
= AllocChannel()preallocating channels returns invalid channels if done before the soundengine (eg. FreeAudio) is initialized -> channel.fa_channel is 0 then
TDynamicSfxChannelDer dynamische SfxChannel hat die Möglichkeit abhängig von der Position von Sound-Quelle und Empfänger dynamische Modifikationen an den Einstellungen vorzunehmen. Er wird bei jedem Update aktualisiert.
TMouseManagerHint: "hit": the button was down and is now released "click": the button was hit and the waiting time for another hit is gone now. This means: if you tap tap tap tap on your mouse button, you generate "hits". If you then wait a certain amount of time (eg. 100 ms) all your last hits get converted to "clicks". A "tap tap tap" therefor is no "click" and also no "doubleclick" (in this case "GetClicks()" returns 3 so you might call it "tripleClick" :D).
varcurrentPos:TVec2D
methodDisable( key:int )
methodEnable( key:int )
methodGetAllStatusClicked:int[]( )
returns array of bools describing clicked state of each button
methodGetAllStatusDoubleClicked:int[]( )
returns array of bools describing clicked state of each button
methodGetAllStatusDown:int[]( )
returns array of bools describing down state of each button
methodGetAllStatusHit:int[]( )
returns array of bools describing hit/doublehit state of each button
methodGetAllStatusLongClicked:int[]( )
returns array of bools describing clicked state of each button
methodGetClickPosition:TVec2D( key:Int )
methodGetClicks:int( key:int )
returns the amount of clicks
methodGetDownTime:Int( key:Int )
returns how many milliseconds a button is down
methodGetHitPosition:TVec2D( key:Int )
methodGetMovedDistance:int( )
methodGetPosition:TVec2D( )
methodGetScrollwheelMovement:int( )
returns positive or negative value describing the movement of the scrollwheel
methodGetStatus:Int( key:Int )
returns the status of a button
methodHasMoved:int( )
methodisClicked:Int( key:Int )
returns whether the button got clicked, no waiting time is added
displace each entry by (z-value is stepping). Field _entryDisplacement:TVec3D = new TVec3D.Init(0, 0, 1) displace the entriesblock by x,y. Field _entriesBlockDisplacement:TVec2D = new TVec2D.Init(0, 0) orientation of the list: 0 means vertical, 1 is horizontal
higher strength values have a stronger decrease per percentage higher strength can lead to Value(0.5) > Value(0.7) higher percentages return a higher influence (in 100% = out ~100%) value growth changes at bei 1/strength!! -> we cut "used" percentage" so 100% = 1/strength
the logistic function is a fast-to-slow-growing function higher values are more likely returning nearly the maximum value http://de.wikipedia.org/wiki/Logistische_Funktion returns a value between 0-maximumValue subtracted by "fZero"
functionMouseIn:int( x:Int,y:Int, w:Int,h:Int )
returns whether the mouse is within the given rectangle coords
functionMouseInRect:int( rect:TRectangle )
returns whether the mouse is within the given rectangle
functionTakeOverObjectValues:object( source:object, target:object var, skipFields:string="" )
assigns field properties of one object to another no deep cloning is done but "references" are copied
sets the height of the lists content area (ignoring padding)
methodSetOpen:Int( bool:int )
methodSetSelectedEntry( item:TGUIObject )
methodSetSelectedEntryByPos:Int( itemPos:int=0 )
methodUpdate:Int( )
override default update-method
TGUIDropDownItemas it is similar to a list - extend from a list item using "TGUISelectListItem" provides ability to easily add them to the list contained in TGUIDropDown
tooltip: contentbreiten richtig berechnen - - ueberpruefen dass sie in "Doortooltips", "im-raum-tooltips" und die quoten (+details)-tooltips richtig funktionieren die Toastmessages sind nicht richtig von den Dimensionen (Cheftext ueberlappt)
TDigNetworkbase of all networkevents.'added to the base networking functions are all methods to send and receive data from clients including playerposition, programmesending, changes of elevatorpositions etc.
TAdapterInfobbdoc: Netzwerkadapter-Information about: Enthält Informationen über einen Netzwerkadapter(ggf. Netzwerkkarte). Siehe auch: #GetNetworkAdapter
varAddress:Int
bbdoc: IP-Adresse des Netzwerkadapters about: Siehe auch: #StringIP
varBroadcast:Int
bbdoc: Broadcast-Adresse des Netzwerkadapters about: Siehe auch: #StringIP
varDevice:String
bbdoc: Name des Netzwerkadapters
varMAC:Byte
bbdoc: MAC-Adresse des Netzwerkadapters about: Siehe auch: #StringMAC
varNetmask:Int
bbdoc: Netzmaske des Netzwerkadapters about: Siehe auch: #StringIP, #SetBroadcast
TNetworkbbdoc: Network Type about: Einige Hilfsfunktionen im Umgang mit UDP/TCP
functionGetAdapterInfo:Int( Info:TAdapterInfo Var )
functionGetHostIP:Int( HostName:String )
bbdoc: Gibt die IP-Adresse des angegebenen Hosts zurück returns: 0, wenn ein Fehler auftrat, ansonsten IP-Adresse des angegebenen Hosts about: Ermittelt die erste IP-Adresse des angegebenen Hosts. Siehe auch: #GetHostIPs , #GetHostName, #StringIP
functionGetHostIPs:Int[]( HostName:String )
bbdoc: Gibt die IP-Adressen des angegebenen Hosts zurück returns: Null, wenn ein Fehler auftrat, ansonsten IP-Adressen des angegebenen Hosts about: Ein Host, z. B. "www.google.com" kann mehrere IP-Adressen gleichzeitig besitzen. Diese lassen sich mit dieser Funktion ermitteln. Siehe auch: #GetHostIP , #GetHostName, #StringIP
functionGetHostName:String( HostIp:Int )
bbdoc: Gibt den Namen des angegebenen Hosts zurück returns: "", wenn ein Fehler auftrat, ansonsten den Namen des angegebenen Hosts about: Siehe auch: #GetHostIP, #GetHostIPs
functionIntIP:Int( IP:String )
bbdoc: Wandelt String- in IntegerIP um returns: Umgewandelte IntegerIP about: Die angegebene StringIP muss der Form "X.Y.Z.W" entsprechen. z. B. TNetwork.IntIP("127.0.0.1") -> 2130706433 Sieh auch: #StringIP
bbdoc: ICMP Ping returns: -1 falls ein Fehler auftrat, ansonsten die Zeit in Millisekunden, vom Echo Request zum Echo Reply about: Die Funktion emrittelt, wie lange es gedauert hat, bis der der Host RemoteIP die angegebenen Daten Data mit der Bytegröße Size empfangen und zurück gesendet hat. Erhält der Client keine Antwort innerhalb der Zeit Timeout, liefert die Funktion -1 zurück. Weitere Fehlerquellen können sein, dass die Funktion nicht mit Root/Administratorrechten ausgeführt wurde, das Netzwerk bzw. der Host nicht erreichbar ist oder der Host ICMP Pings nicht akzeptiert. Siehe auch: #GetHostIP, #GetHostIPs, #IntIP
functionStringIP:String( IP:Int )
bbdoc: Wandelt Integer- in StringIP um returns: Umgewandelte StringIP about: Es wird ein String in Form von "X.Y.Z.W" zurückgegeben. z. B. TNetwork.StringIP(2130706433) -> "127.0.0.1" Siehe auch: #IntIP
functionStringMAC:String( MAC:Byte[] )
bbdoc: Wandelt Integer- in StringMAC um returns: Umgewandelte StringMAC about: Es wird ein String in From von "AA:BB:CC:DD:EE:FF" zurückgegeben. AA, BB, CC, DD, EE und FF repräsentieren jeweils ein Byte in hexa- dezimaler Schreibweise. Siehe auch: #TAdapterInfo, #GetNetworkAdapter
TNetStreambbdoc: Net-Stream Type
methodClose:Int( )
bbdoc: Beendet einen Netzstream returns: - about: Der mit dem Netzstream verbundene Socket wird geschlossen. Über ihn kann nichtmehr gesendet und/oder empfangen werden.
methodDelete( )
methodEof:Int( )
bbdoc: Stellt fest, ob Bytes ausgelesen werden können returns: False, wenn noch Bytes ausgelesen werden können, True wenn nicht about: Diese Methode funktioniert auf Basis der #Size Methode und prüft somit die Größe des Empfangspuffers. Siehe auch: #Size
methodFlush:Int( )
bbdoc: Löscht den internen Sende- und Empfangspuffer. returns: - about: Die empfangenen und gesendeten Daten werden gelöscht und die internen Sende- und Empfangsgrößen zu 0 gesetzt. Diese Methode verhindert nicht, dass Nachrichten per #RecvMsg empfangen werden können oder über die allgemeinen Streambefehle, wie z. B. #WriteLine , der Sendepuffer beschrieben werden kann. Siehe auch: #Close , #Size , #Eof
methodInit:Int( )
methodNew( )
methodRead:Long( Buffer:Byte Ptr, Size:Long )
methodRecvAvail:Int( )
bbdoc: Gibt die Anzahl an empfangbaren Bytes zurück returns: -1, wenn ein Fehler auftrat, ansonsten Anzahl an empfangbaren Bytes about: Diese Methode gibt darüber Auskunft, ob eine Nachricht empfangbar ist. Empfangen wird sie über #RecvMsg . Die Methode #Size hingegen, gibt die Anzahl an empfangenen Bytes zurück. Siehe auch: #RecvMsg , #Size
varRecvBuffer:Byte
methodRecvMsg:Int( )
varRecvSize:Int
varSendBuffer:Byte
methodSendMsg:Int( )
varSendSize:Int
methodSize:Long( )
varSocket:Int
methodWrite:Long( Buffer:Byte Ptr, Size:Long )
TUDPStreambbdoc: UDP-Stream Type about: Type für verbindungslose Kommunikation
varfDataGot:Float
varfDataSent:Float
varfDataSum:Float
varfLastSecond:Float
varfSpeed:Float
ron
methodGetBroadcast:Int( )
bbdoc: Gibt den aktuellen Broadcast-Zustand zurück returns: -1, wenn ein Fehler auftrat, True wenn Broadcasting aktiviert ist, False wenn broadcasting deaktiviert ist. about: Siehe auch: #SetBroadcast
methodGetLocalIP:Int( )
bbdoc: Gibt die lokale IP-Adresse in Integerform zurück returns: IntegerIP about: Damit lässt sich NICHT die globale IP ermitteln. Diese Methode ist erst nach #SetLocalPort einsatzbereit. Siehe auch: #SetLocalPort , #GetLocalPort
methodGetLocalPort:Short( )
bbdoc: Gibt den lokalen Port zurück returns: lokaler Port about: Siehe auch: #SetLocalPort, #GetLocalIP
methodGetMsgIP:Int( )
bbdoc: Gibt die IP-Adresse der letzten empfangenen Nachricht zurück returns: IP-Adresse der letzten empfangenen Nachricht about: Wird nach #RecvMsg aktualisiert. Siehe auch: #GetMsgPort
methodGetMsgPort:Short( )
bbdoc: Gibt den Port der letzten empfangenen Nachricht zurück returns: Port der letzten empfangenen Nachricht about: Wird nach #RecvMsg aktualisiert. Siehe auch: #GetMsgIP
methodGetRecvTimeout:Int( )
bbdoc: Gibt Abbruchszeit für das Empfangen zurück returns: Abbruchszeit in Millisekunden about: Siehe auch: #SetTimeouts , #GetSendTimeout
methodGetRemoteIP:Int( )
bbdoc: Gibt die EmpfängerIP zurück returns: EmpfängerIP about: An diese IP-Adresse wird die künftige Nachricht mit #SendMsg geschickt. Dieser Port muss NICHT mit dem lokalen Port übereinstimmen. Siehe auch: #SetRemotePort
methodGetRemotePort:Short( )
bbdoc: Gibt den Empfängerport zurück returns: Empfängerport about: An diesen Port wird die künftige Nachricht mit #SendMsg geschickt. Dieser Port muss NICHT mit dem lokalen Port übereinstimmen. Siehe auch: #SetRemotePort
methodGetSendTimeout:Int( )
bbdoc: Gibt Abbruchszeit für das Senden zurück returns: Abbruchszeit in Millisekunden about: Siehe auch: #SetTimeouts , #GetRecvTimeout
methodInit:Int( )
bbdoc: Initialisiert den UDPStream returns: False, wenn ein Fehler auftrat, ansonsten True about: Intern wird ein neuer Socket erstellt.
varLocalIP:Int
varLocalPort:Short
varMessageIP:Int
varMessagePort:Short
methodNew( )
methodRecvMsg:Int( )
bbdoc: Empfängt eine Nachricht returns: Anzahl der empfangenen Bytes. about: Empfängt eine eingehende Nachricht. Ob eine Nachricht vorliegt, kann mit #RecvAvail geprüft werden. Die AbsenderIP sowie der Absenderport können mit #GetMsgIP und #GetMsgPort ermittelt werden. Die Nachricht wird in einem Puffer gelagert. Das Auslesen der Nachricht erfolgt über übliche Streambefehle wie #ReadLine . Siehe auch: #SendMsg , #GetMsgIP , #GetMsgPort , #RecvAvail
varRecvTimeout:Int
varRemoteIP:Int
varRemotePort:Short
methodSendMsg:Int( )
bbdoc: Sendet eine Nachricht returns: Anzahl der versendeten Bytes. about: Sendet eine Nachricht an den mit #SetRemoteIP und #SetRemotePort festgelegten Empfänger. Dazu sollte sich eine Nachricht schon im Sendepuffer befinden. Dieser lässt sich mit den üblichen Streambefehlen wie #WriteLine beschreiben. Siehe auch: #RecvMsg , #SetRemotePort , #SetRemoteIP
varSendTimeout:Int
methodSendUDPMsg:Int( IP:Int, Port:Int = 0 )
methodSetBroadcast:Int( Enable:Int )
bbdoc: Aktiviert/Deaktiviert das Senden und Empfangen von Broadcast-Nachrichten returns: False, wenn ein Fehler auftrat, ansonsten True. about: Siehe auch: #GetAdapterInfo, #TAdapterInfo, #GetBroadcast
methodSetLocalPort:Int( Port:Short=0 )
bbdoc: Setzt den lokalen Port returns: False, wenn ein Fehler auftrat, ansonsten True about: Wenn bei Port 0 angegeben wurde, so sucht das Betriebssystem einen freihen Port. Diesen kann man mit #GetLocalPort ermittelt werden. Dies ist nur der lokale Port, und muss NICHT mit dem Port des Empfängers übereinstimmen. Siehe auch: #GetLocalPort , #GetLocalIP
methodSetRemoteIP( IP:Int )
bbdoc: Setzt die EmpfängerIP returns: - about: An diese IP-Adresse wird die künftige Nachricht mit #SendMsg geschickt. Benutze diese Methode in Zusammenhang mit SetRemotePort. Siehe auch: #GetRemoteIP , #GetSetRemotePort
methodSetRemotePort( Port:Short )
bbdoc: Setzt den Empfängerport returns: - about: An diesen Port wird die künftige Nachricht mit #SendMsg geschickt. Dieser Port muss NICHT mit dem lokalen Port übereinstimmen. Benutze diese Methode in Zusammenhang mit #SetRemoteIP. Siehe auch: #GetRemotePort
bbdoc: Setzt Abbruchszeiten für das Empfangen und Senden returns: - about: Bestimmt, wie lange #RecvMsg und #SendMsg max. warten dürfen. Angaben in Millisekunden Siehe auch: #GetRecvTimeout , #GetSendTimeout
renews settings whether to display certain effects
functionSetConfiguration:Int( config:TData )
methodSetSpeed:int( newSpeed:int )
varshowClouds:int
varshowLightning:int
varshowMoon:int
varshowRain:int
varshowSkyGradient:int
varshowSnow:int
varshowStars:int
varshowSun:int
varskyGradient:TSprite
the skyGradient draws a little gradient at the background eg. to indicate a sunrise
varskyMoon:TSprite
varskySun:TSprite
varskySunRays:TSprite
varsnowEffect:TWeatherEffectSnow
snow effect (flakes)
varstars:TVec3D
varstarsBrightness:int
=== STARS ===
varsunPoint:TVec2D
starting point of the sun - defines distance to centerPoint
methodUpdate:Int( )
methodUpdateEffects:int( )
methodUpdateEnvironment:int( )
methodUpdateWeather:int( )
varweather:TWorldWeather
TWorldLighting
varcurrentFogColor:TColor
fog color to use now
varcurrentLight:TColor
color to use now
vardawnDuskFog:TColor
scene fog color to use at dawn and dusk.
vardayFog:TColor
scene fog color to use during the day.
varfullDark:TColor
scene ambient color used for full night.
varfullLight:TColor
scene ambient color used for full daylight.
methodGetSkyBrightness:Float( )
returns the brightness compared to full light brightness
methodInit:TWorldLighting( )
Set values for an acceptable day/night cycle effect
varnightFog:TColor
scene fog color to use at night.
methodUpdate:int( )
var_lightIntensity:Float
var_lightIntensityBase:Float
method_UpdateDaylight( )
adjust environment light color between full dark and full light
method_UpdateFog( )
Interpolates fog color between the specified phase colors during each phase's transition. eg. From DawnDusk to Day, Day to DawnDusk, DawnDusk to Night, and Night to DawnDusk
time at which the dawn starts negative = automatic calculation
var_daysPerSeason:int
how many days does each season have? (year = 4 * value)
var_daysPerWeek:int
how many days does a week have?
var_paused:Int
does time go by?
var_timeFactor:Float
Speed of the world in "virtual seconds per real-time second" 1.0 = realtime - a virtual day would take 86400 real-time seconds 3600.0 = a virtual day takes 24 real-time seconds 60.0 : 1 virtual minute = 1 real-time second
var_timeGone:Double
time (seconds) gone at all
var_timeGoneLastUpdate:Double
time (seconds) of the last update (enables calculation of missed time between two updates)
returns whether it is raining or not. returned value ranges from 0 (no rain) to 5 (full rain)
methodIsSunVisible:int( )
returns whether the sun is visible
varlastUpdateTime:Double
methodNeedsUpdate:int( )
varnextUpdateTime:Double
timer values
constPRESSURE_THRESHOLD_CLEAR:int
must be equal to PRESSURE_THRESHOLD_FINE + 8 * positive integer
constPRESSURE_THRESHOLD_CLOUDY:int
constPRESSURE_THRESHOLD_FINE:int
constPRESSURE_THRESHOLD_HEAVYCLOUD:int
constPRESSURE_THRESHOLD_HEAVYRAIN:int
constPRESSURE_THRESHOLD_LIGHTRAIN:int
constPRESSURE_THRESHOLD_RAIN:int
constPRESSURE_THRESHOLD_SEVERESTORM:int
=== PRESSURE THRESHOLDS === all values must be even numbers.
constPRESSURE_THRESHOLD_STORM:int
methodResetUpcomingWeather:int( )
methodSetPressure( pressure:Float )
methodSetTemperature( temperature:Float )
methodSetWeatherInterval( weatherInterval:int )
adjust at which interval the weather gets updated time is in seconds of a day
methodToString:string( )
varupcomingWeather:TList
methodUpdate:int( )
varweatherInterval:int
to get a "prediction" (cold nights, hot days) we need to know at which interval the weather will get updated . 'eg. every 3600 seconds (every hour)
constWEATHER_CLEAR:int
constWEATHER_CLOUDY:int
constWEATHER_FINE:int
constWEATHER_HEAVYCLOUD:int
constWEATHER_HEAVYRAIN:int
constWEATHER_HURRICANE:int
=== WEATHER CONSTANTS ===
constWEATHER_LIGHTRAIN:int
constWEATHER_RAIN:int
constWEATHER_SEVERESTORM:int
constWEATHER_STORM:int
TWorldWeatherConfiguration
varincrement:float
varmultiplier:int
=== CONFIGURE GENERATION VALUES === values determine range of generated random numbers
varsteps:int
values determine granularity of generated random numbers steps defines how quickly the weather will change
varthreshold:int
6treshold determines max deviation from 0 before the generated random number will influence the system. It determines how often velocity of the wind will drift towards 0. Larger values = less randomness (= reduce standard deviation).
TProgrammePlanInformationProviderBasecontains general information of all broadcasts in the programmeplans does not contain specific information (eg. programme licence information)
varadspotsAired:int
varaudienceRecord:TMap
each genre stores its record, newsshows are stored as "newsshow"
Bonus bei Kindern / Jugendlichen. Malus bei Rentnern / Managern.
constBMOVIE:Int
Nochmal deutlich verringerter Preis. Verringert die Nachteile des Filmalters. Bonus bei Jugendlichen. Malus bei allen anderen Zielgruppen. Bonus in der Nacht!
constcount:int
constCULT:Int
Verringert die Nachteile des Filmalters. Bonus bei Rentnern. Höhere Serientreue bei Serien.
constCULTURE:Int
Bonus bei Betty und bei Managern
functionGetAsString:String( key:int = 0 )
functionGetAtIndex:int( index:int = 0 )
constLIVE:Int
Genereller Quotenbonus!
constPAID:Int
Call-In-Shows
constSCRIPTED:Int
Scripted-Shows/Series/Reportages ... Trash-TV!
constSERIES:Int
Ist ne Serie! Vielleicht besser als den ProgrammeType... so kann auch ne Reportage ne Serie sein. -> SERIES bedeutet hier, dass es etwas zusammengehoeriges ist also klassische Serien, oder so "Dokusoaps"
constTRASH:Int
Bonus bei Arbeitslosen und Hausfrauen. Malus bei Arbeitnehmern und Managern. Trash läuft morgens und mittags gut => Bonus!
TVTPersonGenderdon't feel attacked by this naming! "UNDEFINED" includes transgenders, maybe transsexuals, unknown lifeforms ... just everything which is not called by a male or female pronoun
returns the percentage/count of all persons in the group a "MEN + TEENAGER + EMPLOYEES"-group just returns the amount of all male teenager and male employees --- In contrast to "GetGenderGroupPercentage" this allows to have TVTTargetGroup.MEN / WOMEN recognized as gender
TAudienceBaseDiese Klasse repräsentiert das Publikum, dass die Summe seiner Zielgruppen ist. Die Klasse kann sowohl Zuschauerzahlen als auch Faktoren/Quoten beinhalten und stellt einige Methoden bereit die Berechnung mit Faktoren und anderen TAudience-Klassen ermöglichen.
TAudienceAttractionDiese Klasse repräsentiert die Programmattraktivität (Inhalt von TAudience) Sie beinhaltet aber zusätzlich die Informationen wie sie berechnet wurde (für Statistiken, Debugging und Nachberechnungen) und für was sieht steht.
TBroadcastIn dieser Klasse und in TAudienceMarketCalculation findet die eigentliche Quotenberechnung statt und es wird das Ergebnis gecached, so dass man die Berechnung einige Zeit aufbewahren kann.
methodAddMarket( playerIDs:Int[] )
methodAscertainPlayerMarkets( )
Hier werden alle Märkte in denen verschiedene Spieler miteinander konkurrieren initialisiert. Diese Methode wird nur einmal aufgerufen! So legt man fest um wie viel Zuschauer sich Spieler 2 und Spieler 4 streiten oder wie viel Zuschauer Spieler 3 alleine bedient
Berechnet die Attraktivität des Programmes pro Spieler (mit Glücksfaktor) und setzt diese Infos an die Märktkalkulationen (TAudienceMarketCalculation) weiter.
TBroadcastFeedbackDiese Klasse ist dazu da dem UI Feedback über die aktuelle Ausstrahlung zu geben. Vor allem für die Zuschauer vor der Mattscheibe (rechts unten im Bildschirm).'Man kann an dieser Klasse ablesen, welche Personen sichtbar sind und wie aktiv. Und man könnte Statements (Sprechblasen) einblenden und Feedback zum aktuellen Programm zu geben.
TAudienceResultBaseDas TAudienceResultBase ist sowas wie das zusammengefasste Ergebnis einer TBroadcast- und/oder TAudienceMarketCalculation-Berechnung. Sie enthaelt keine Zusatzdaten (ChannelSurfer etc), diese Klasse nutzen um Quoten zu "archivieren"
varAudience:TAudience
Die Zahl der Zuschauer die erreicht wurden. Sozusagen das Ergenis das zählt und angezeigt wird.
returns the average audienceresult for the given results
methodGetAudienceQuote:TAudience( )
instead of storing "audienceQuote" as field (bigger savegames) we can create it on the fly returns audience quote relative to MaxAudience of that time ATTENTION: to fetch the effective total audiencequote use "GetWeightedAverage()" instead of "GetAverage()" as the target groups are not equally weighted.
returns the percentage (0-1.0) of reached audience compared to potentially reachable audience (in front of TV at that moment)
methodGetGenderlessAudienceQuote:TAudienceBase( )
returns a "un-gendered" quote (only target groups)
methodGetPotentialMaxAudience:TAudience( )
methodGetPotentialMaxAudienceQuote:TAudience( )
instead of storing "potentialMaxAudienceQuote" as field we can create it on the fly returns the quote of PotentialMaxAudience. What percentage switched on the TV and checked the programme. Base is WholeMarket ATTENTION: to fetch the effective total audiencequote use "GetWeightedAverage()" instead of "GetAverage()" as the target groups are not equally weighted.
returns the percentage (0-1.0) of practically reachable audience (switched on the TV) compared to technically reachable audience (within range of the broadcast area)
methodGetTitle:string( )
methodGetWholeMarketAudienceQuote:TAudience( )
returns the quote of reached audience to WholeMarket. What percentage of all people having a TV watched the programme ATTENTION: to fetch the effective total audience quote use "GetWeightedAverage()" instead of "GetAverage()" as the target groups are not equally weighted.
returns the percentage (0-1.0) of reached audience (switched on TV and watching your channel) compared to technically reachable audience (within range of the broadcast area)
methodNew( )
varPlayerId:Int
Optional: Die Id des Spielers zu dem das Result gehört.
varPotentialMaxAudience:TAudience
Die Gesamtzuschauerzahl die in dieser Stunde den TV an hat! Also 100%-Quote! Summe aus allen Exklusiven, Flow-Leuten und Zappern
methodReset( )
varTime:Long
time of the broadcast this result belongs to
varTitle:String
Der Titel des Programmes
methodToString:String( )
varWholeMarket:TAudience
Der Gesamtmarkt: Also wenn alle die einen TV haben schauen wuerden
TAudienceResultDas TAudienceResult erweitert die Basis um weitere Daten die aber nicht von allen Elementen benoetigt werden
methodAddResult( res:TAudienceResult )
varAudienceAttraction:TAudienceAttraction
Die ursprüngliche Attraktivität des Programmes, vor der Kunkurrenzsituation
varChannelSurferToShare:TAudience
Summe der Zapper die es zu verteilen gilt (ist nicht gleich eines ChannelSurferSum)
varEffectiveAudienceAttraction:TAudience
Die effektive Attraktivität des Programmes auf Grund der Konkurrenzsituation
methodNew( )
override with same content - so it calls "this" Reset, not Super.Reset()
TPlayerFinanceholds data of WHAT has been bought, which amount of money was used and so on .'contains methods for refreshing stats when paying or selling something
playerID of player who sits in front of the screen adjust this TOO when switching players
methodSet:int( id:int=-1, boss:TPlayerBoss )
TPlayerBossclass containing information/values for the player's boss
varawaitingPlayerAccepted:Int
did the player accept and is on his way to the boss?
varawaitingPlayerCalled:Int
was the player already called (toastmessage for active player)?
varawaitingPlayerVisit:Int
does the player have to visit the boss?
varawaitingPlayerVisitTillTime:Long
time the player has to visit the boss
methodCallPlayer:Int( )
call this method to request the player to visit the boss -> this creates an event the game listens to and creates a toastmessage in the case of the active player, so they can react
methodCallPlayerForced:Int( )
call this method to force the player to visit the boss NOW -> this creates an event the game listens to
methodChangeMood:int( value:Float )
varcreditMaximum:Int
amount the boss is likely to give the player
methodDelete( )
varDialogues:TList
dialogues for the things the boss can talk about
varfavoriteMovieGUID:String
in the case of the player sends a favorite movie, this might brighten the mood of the boss
methodGenerateDialogues( visitingPlayerID:int )
methodGetCreditMaximum:int( )
methodGetMood:int( )
methodInformPlayerAcceptedCall:Int( )
call this so the boss knows: player is on his way to the boss even if it could take a bit longer because of elevator and so on
creates a new filter and sets it up to get displayed in the licence selection menu
vardataFlags:int
vardisplayInMenu:int
methodDoesFilter:Int( licence:TProgrammeLicence )
checks if the given programmelicence contains at least ONE of the given filter criterias ("OR"-chain of criterias) Ex.: filter cares for genres 1,2 and flags "trash" and "bmovie" True is returned genre 1 or 2 or flag "trash" or flag "bmovie"
TBroadcastMaterialSourceBasecould be done as "interface"
methodAddEffectByData:int( effectData:TData )
add an effect defined in a data container effectData should be consisting of: trigger = "broadcast", "firstbroadcast", "happen". 'type = "triggernews" (the key under which the desired effect was registered) news-5
checks if the contract/ad passes specific requirements -> min audience, target groups, . 'returns "OK" when passing, or another String with the reason for failing
returns the price of this news price differs from the (base) price of the newsEvent
methodGetPublishTime:int( )
methodGetQuality:Float( )
methodGetReferenceID:int( )
override default getter to make event id the reference id
methodGetTitle:string( )
override default
varhappenedTime:Double
store the event happenedTime here, so the event could get used multiple times without changing the news
methodIsReadyToPublish:Int( )
varnewsEvent:TNewsEvent
varpaid:int
varpaidPrice:int
the price which was paid for the news
methodPay:int( )
varpriceModAbsoluteNewsAgency:int
varpriceModRelativeNewsAgency:float
modificators to this news (stored here: is individual for each player) absolute: value just gets added relative: fraction of base price (eg. 0.3 -> 30%)
varpublishDelay:Int
delay the news for a certain time (depending on the abonnement-level)
for random generation we split into "min, max" and weighting/slope ratings
varplaceHolderVariables:TMap
placeHolderVariables contain TLocalizedString-objects which are used to replace a specific palceholder. This allows to reuse the exact same random variable for descendants (episodes refering to the same keyword) instead of returning other random elements ("option1|option2")
varpotentialMin:Float
varpriceMin:int
varrandomAssignedRoles:TProgrammePersonJob
contains jobs with randomly assigned jobs so the script knows what to reset in jobs/randomJobs after usage
varrandomJobs:TProgrammePersonJob
contains jobs which could get randomly added during generation of the real script
varrequireAudience:Int
methodReset:int( )
reset things used for random data like placeholders (which are stored there so that children could reuse it)
TRoomcontainer for data describing the room without data attached which is used for visual representation (tooltip, signs...) -> they are now in TRoomDoor usage examples: - RoomAgency - Multiple "Doors" to the same room
figure wants to enter a room "onEnterRoom" is called when successful @param door door to use @param room room to enter (in case no door exists) @param forceEnter kick without being the room owner
creates and returns a player -creates the given playercolor and a figure with the given figureimage, a programmecollection and a programmeplan
methodGetCredit:Int( day:Int=-1 )
overridden
methodGetCreditAvailable:Int( )
overridden
methodGetCreditFormatted:String( day:Int=-1 )
returns formatted value of actual credit
methodGetCreditInterest:int( )
Damit man GetFinance nicht in Lua verfügbar machen muss
methodGetFigure:TFigure( )
methodGetMaxAudience:Int( )
methodGetMoney:Int( day:Int=-1 )
overridden
methodGetMoneyFormatted:String( day:Int=-1 )
overridden returns formatted value of actual money
methodGetNewsAbonnementDaysMax:Int( genre:Int )
return which is the highest level for the given genre today (which was active for longer than X game minutes) if the last time a abonnement level was set was before today use the current level value
ID of a remote player who controls this (ai) player
varplayerType:int
type of the player, local/remote human/ai
constPLAYERTYPE_INACTIVE:int
constPLAYERTYPE_LOCAL_AI:int
constPLAYERTYPE_LOCAL_HUMAN:int
distinguishing between LOCAL and REMOTE ai allows multiple players to control multiple AI without needing to share "THEIR" AI files -> maybe this allows for some kind of "AI fight" (or "team1 vs team2" games)
constPLAYERTYPE_REMOTE_AI:int
constPLAYERTYPE_REMOTE_HUMAN:int
methodSendToBoss:Int( )
remove this helper as soon as "player" class gets a single importable file
holding the object representing a programme started a day earlier (eg. 23:00-01:00) this should not get handled by panels but the list itself (only interaction is drag-n-drop handling)
methodDrawContent( )
methodEmptyList:Int( )
override to remove daychange-object too
methodGetItemBySlot:TGUIobject( slot:Int )
override default to also recognize slots occupied by prior ones
TgfxContractlistthe adspot/contractlist shown in the programmeplaner
methodCreate:TgfxContractlist( x:Int, y:Int )
methodDraw:Int( )
varhoveredAdContract:TAdContract
methodSetOpen:Int( newState:Int )
methodUpdate:Int( )
TAuctionProgrammeBlocksProgrammeblocks used in Auction-Screen they do not need to have gui/non-gui objects as no special handling is done (just clicking)
special events for screens used in rooms - only this event has the room as sender screen.onScreenUpdate/Draw is more general purpose returns the event listener links
RoomHandler_OfficeOffice: handling the players room
methodAbortScreenActions:Int( )
override: clear the screen (remove dragged elements)
- check if dropping on suitcase and affordable - check if dropping own licence on the shelf (not possible for now) (OLD: - check if dropping on an item which is not affordable)
right mouse button click: remove the block from the player's programmePlan left mouse button click: check shortcuts and create a copy/nextepisode-block
only calls the AI "onTick" if the calculated interval passed in our case this is: - more than 1 RealTime second passed since last tick or - another InGameMinute passed since last tick
amounts bigger than the credit taken will repay everything amounts bigger than the owned money will fail
methodbo_doTakeCredit:int( amount:int )
amounts bigger than the available credit just take all possible
methodbo_getBossMoodlevel:int( )
returns the mood of the boss - rounded to 10% steps (makes it a bit harder for the AI) TODO: remove step rounding if players get a exact value displayed somehow
methodbo_getCreditAvailable:int( )
returns how much credit the boss will give (maximum minus taken credit)
methodbo_getCreditMaximum:int( )
returns maximum credit limit (regardless of already taken credit)
Set content of a programme slot ===== materialSource might be "null" to clear a time slot or of types: "TProgrammeLicence" or "TAdContract" returns: (TVT.)RESULT_OK, RESULT_WRONGROOM, RESULT_NOTFOUND
Set content of a programme slot ===== materialSource might be "null" to clear a time slot or of types: "TProgrammeLicence" or "TAdContract" returns: (TVT.)RESULT_OK, RESULT_WRONGROOM, RESULT_NOTFOUND
methodPrintOut:Int( text:String )
methodPrintOutDebug:int( text:string )
only printed if TLogger.setPrintMode(LOG_AI | LOG_DEBUG) is set
switch signs on the given positions. a potential sign on slotA/floorA will get moved to slotB/floorB and vice versa. It is NOT needed to have to valid signs on there