Namen von Konstruktionen

Willkommen in der Transport Fever Community

Wir begrüßen euch in der Fan-Community zu den Spielen Transport Fever und Train Fever, den Wirtschaftssimulatoren von Urban Games. Die Community steht euch kostenlos zur Verfügung damit ihr euch über das Spiel austauschen und informieren könnt. Wir pflegen hier einen freundlichen und sachlichen Umgang untereinander und unser Team steht euch in allen Fragen gerne beiseite.

 

Die Registrierung und Nutzung ist selbstverständlich kostenlos.

 

Wir wünschen euch viel Spaß und hoffen auf rege Beteiligung.

Das Team der Transport-Fever Community


  • Gibt es eigentlich irgendeine Möglichkeit, den Namen einer Konstruktion skripttechnisch zu ändern? Zum Verständnis: Ich meine weder den Dateinamen noch die in Menüs auftauchende Bezeichnung, sondern das, was man als Objekt-Info beim Hovern über die Map angezeigt bekommt und normalerweise im Kopfbalken des Konstruktions-Upgrade-Infofensters mit dem Bleistiftsymbol editieren kann. Bei vielen Assets steht da bekanntlich "no name" oder bei Bahnhöfen z.B. ein durch die KI generierter Stationsname.


    Der Parameter "name" taucht auch in den Upgrade-Params auf, aber erst, wenn man diese abfragt. Mich würde aber interessieren, ob ich den Namen möglichst gleich beim ersten FnUpdate irgendwo/irgendwie selber via Skript festlegen kann.

    ... don't know much trigonometry ... don't know much about algebra ... don't know what a slide rule is for ...

  • Did you ever get an answer to this? The short answer to your question is yes, it can be done. Not from within the construction file, but rather with a game script.

    Sorry for responding in English to a question you asked a month ago in German. I just saw the post now.


    Google Translate:

    Haben Sie darauf jemals eine Antwort bekommen? Die kurze Antwort auf Ihre Frage lautet: Ja, es ist machbar. Nicht aus der Konstruktionsdatei, sondern mit einem Spielskript.

    Entschuldigung, dass Sie auf eine Frage auf Englisch geantwortet haben, die Sie vor einem Monat auf Deutsch gestellt haben. Ich habe den Beitrag erst jetzt gesehen.

  • When you build a construction, the GUI thread receives a notification - the name of the event is "builder.apply" The name of the construction file will be located in param.proposal.toAdd[1].filename

    Here is my test code:

    On receiving the notification and comparing the filename to that of your construction, you could pass the notification over to the Engine thread using SendScriptEvent.

    A bit clunky, to be sure, but it should let you get prompt notification so that you can apply the name you want, without having to consistently poll all the construction entities.

    A word of warning if you want to do further testing yourself - with a modular construction, the param table is quite large...

  • Many thanks for this code. I knew that the name is part of a params block, but the idea to change it using sendScripEvent seems interesting to me though the problem could be to change the name while still building. I think that this would mean to make a complete construction upgrade.

    ... don't know much trigonometry ... don't know much about algebra ... don't know what a slide rule is for ...

BlueBrixx