changing predefined string messages
Moderator: OpenTTD Developers
changing predefined string messages
I was wondering if there is a way to change the predefined string messages from openttd.
For example: "First bus arrived at....
Is this message appear hard coded automatically when first bus arrive to a station, or I can changed it somehow for one vehicle with other message like: First "train" arrived at....?
So ,if I create a vehicle then automatically I will have message: First bus arrived at....?
Thanks
For example: "First bus arrived at....
Is this message appear hard coded automatically when first bus arrive to a station, or I can changed it somehow for one vehicle with other message like: First "train" arrived at....?
So ,if I create a vehicle then automatically I will have message: First bus arrived at....?
Thanks
- Redirect Left
- Tycoon
- Posts: 7419
- Joined: 22 Jan 2005 19:31
- Location: Wakefield, West Yorkshire
Re: changing predefined string messages
I believe these are in the translations, rather than coded into the game itself, so you can edit them, but you need to essentially edit the translation for whichever language you are using.
Re: changing predefined string messages
Yes I know. But I want to add some text like First trolley.... and keep also the old one like First bus....
But my trolley bus is basically a bus and keep giving message like: fist buss arrive.... and this is what I want to change
And keep all the buses to give message like: first bus arrived...
But my trolley bus is basically a bus and keep giving message like: fist buss arrive.... and this is what I want to change
And keep all the buses to give message like: first bus arrived...
- Redirect Left
- Tycoon
- Posts: 7419
- Joined: 22 Jan 2005 19:31
- Location: Wakefield, West Yorkshire
Re: changing predefined string messages
You'd need to add code i suspect so the game can differentiate between each one, if it isn't done already. then refer to a different translation string on that event. It's probably possible, but may be convoluted depending on if its all done on OTTDs side, or if it relies on the GRF telling it information that needs to be accurate & standardised between all of them.
Re: changing predefined string messages
the main thing you have to do is to come up with a system that can tell a bus and a trolley apart. then you can add a newgrf extension so you can provide a string in your newgrf that replaces bus/train/plane/whatever.
Re: changing predefined string messages
But now is it possible to somehow showthis message: first train arrive at..... to a bus?
Or the code knows by default that this is a bus and automatically show message: first bus arrive at....?
Or the code knows by default that this is a bus and automatically show message: first bus arrive at....?
Re: changing predefined string messages
The code goes something like:
There is nothing asking the vehicle what it wants to be identified as, the vehicle has its intrinsic transport type and that's it.
Code: Select all
If the vehicle is a train, and no trains have arrived at station before:
Show news about first train arriving
else, if the vehicle is a road vehicle and carries only passengers, and no bus has arrived at the station before:
Show news about first bus arriving
else, if the vehicle is a road vehicle and does not carry passengers, and no truck has arrived at the station before:
Show news about first truck arriving
else, if the vehicle is a tram, and no tram has arrived at the station before:
Show news about first tram arriving
else, if the vehicle is a ship, and no ship has arrived at the station before:
Show news about first ship arriving
else, if the vehicle is an aircraft, and no aircraft has arrived at the station before:
Show news about first aircraft arriving
done.
Who is online
Users browsing this forum: No registered users and 12 guests