Page 1 of 1

Highway Toll Game Script

Posted: 26 Feb 2018 11:00
by kraken
Hi. I just finished my first game script.

http://binaries.openttd.org/bananas/gam ... l-1.tar.gz

This GS works only in multiplayer. The company has to pay road tax for cars driving on roads owned by other companies. Every day for each vehicle, the charge is deducted from the company account and credited to the account of the company owning the road.

Re: Highway Toll Game Script

Posted: 26 Feb 2018 14:25
by acs121
Great ! Too bad it doesn't applicate to sections we choose - it'd be good to have tolled roads, but that's for a patch.

Re: Highway Toll Game Script

Posted: 26 Feb 2018 15:34
by agentw4b
Super Script! But for your script stored on the Bananas server, it would be good to set the URL referencing the discussion in this forum.

Re: Highway Toll Game Script

Posted: 27 Feb 2018 05:38
by kraken
agentw4b wrote:Super Script! But for your script stored on the Bananas server, it would be good to set the URL referencing the discussion in this forum.
Thanks, updated

Re: Highway Toll Game Script

Posted: 27 Feb 2018 05:51
by kraken
acs121 wrote:Great ! Too bad it doesn't applicate to sections we choose - it'd be good to have tolled roads, but that's for a patch.
Hi, I'll look at it. It should be done through toll gates. The entrance or exit of the highway could be marked with a sign, even with a price, and if the car was passing through the gate, it would have to pay.

Edit: The possibility of a price change could be dangerous. The player may raise the price just before the car passes.

Re: Highway Toll Game Script

Posted: 27 Feb 2018 08:05
by agentw4b
I've tested it. Unfortunately, it is easily exploited to steal money from artificially created companies. :P

Re: Highway Toll Game Script

Posted: 27 Feb 2018 08:34
by kraken
agentw4b wrote:I've tested it. Unfortunately, it is easily exploited to steal money from artificially created companies. :P
Hi, yes, it is possible. But how to solve it? If you want, you can create a new company at any time and simply send money to you.

Re: Highway Toll Game Script

Posted: 27 Feb 2018 17:11
by agentw4b
kraken wrote:
agentw4b wrote:I've tested it. Unfortunately, it is easily exploited to steal money from artificially created companies. :P
Hi, yes, it is possible. But how to solve it? If you want, you can create a new company at any time and simply send money to you.
Yes, but here it is with buses to take the money borrowed from the bank. Send money borrowed from the bank is not possible.

Re: Highway Toll Game Script

Posted: 27 Feb 2018 18:33
by acs121
kraken wrote:
acs121 wrote:Great ! Too bad it doesn't applicate to sections we choose - it'd be good to have tolled roads, but that's for a patch.
Hi, I'll look at it. It should be done through toll gates. The entrance or exit of the highway could be marked with a sign, even with a price, and if the car was passing through the gate, it would have to pay.

Edit: The possibility of a price change could be dangerous. The player may raise the price just before the car passes.
The player won't stay forever to change toll prices.
It'd also be good to pay a different tax for different cargoes. For example, because of security reasons, trucks transporting chemicals would pay a lot more than trucks transporting goods.

Re: Highway Toll Game Script

Posted: 28 Feb 2018 10:26
by kraken
acs121 wrote:
kraken wrote:
acs121 wrote: It'd also be good to pay a different tax for different cargoes. For example, because of security reasons, trucks transporting chemicals would pay a lot more than trucks transporting goods.
Okay, I'll try to implement it

Re: Highway Toll Game Script

Posted: 28 Feb 2018 16:34
by acs121
By that, i mean players fixing a price for each cargo.

Re: Highway Toll Game Script

Posted: 01 Mar 2018 12:24
by kraken
Hi, here is alpha version of HighwayToll2.

There are 3 modes.
1. Mode 0 - pay on all foreign roads (same as HighwayToll v1)
2. Mode 1 - pay from sign to sign on foreign roads
3. Mode 2 - pay from sign to sign on all roads

I implemented the option to mark a road section with signs. It does not matter what text on the sign will be. There can be for example name of the road or exit number on highway.
Different cargo feature is not implemented yet. Maybe in next version ;)

Here is example how it works. If vehicle ride from Exit1 to Exit2 the fee will be charged per every day the vehicle will be between the signs.

Image

Please report any problems. Thank you.