Hi everyone,
Forgive me if this post is a bit rough—this is my first time writing anything on a forum ever. I read all the FAQs I could find before posting.
I've been playing with a friend, and I think the game would benefit greatly from more player-to-player or player-to-bot interaction. One idea I had was the ability to ask another player or bot to sell you a station. I looked online for a game script that could do this, but I couldn’t find one.
I have very limited programming experience, but here’s how I think it could be implemented:
The GUI for clicking on an existing station could have a "Buy Station" button.
Clicking this button would send a popup to the owner (player or bot) with the offered price and buttons to accept or deny the sale.
If the owner denies the offer, nothing happens.
If the owner accepts, ownership of the station switches to the buyer, similar to how hostile takeovers currently work—except it would transfer just the selected station.
There’s also the issue of vehicles assigned to that station. Since there’s already a button in the GUI to "list all vehicles with this station", I imagine the script could handle removing those Vehicles without much difficulty?
In the case of Trains or something at the station when its transferred I think it could just wait and check to see if its left before transference. then only when its empty transfer the object.
I tried looking into the source code to see how hostile takeovers are currently handled but couldn’t find it (if you could tell me where that is, would appreciate it). However maybe parts of the code could be reused or adapted for this new function? Would like to see how train tracks transfer as well, that's a potential problem.
I’m open to feedback on this idea and would love any advice! I wouldn’t mind trying to create a game script for this myself if others think it’s a good idea. But I am a complete noob at programming...
Thanks for taking the time to read this!
Buying Stations from Players or Bots
Moderator: OpenTTD Developers
Who is online
Users browsing this forum: No registered users and 52 guests