[GameMode] PPC_Trucking V1

Quote:
Originally Posted by feheristi97
View Post
You gonna release V2 version? If yes, I hope it's a MySQL version!
When it's finished, it will be released.
And yes, V2 is fully MySQL.



I've modified cargo-types to have a variable price-profit-experience system.
Previously, to increase the payout for passengers at higher levels for example, it was required to have multiple "Passengers" in the database, each for a few select levels.

I had defined 10 different passengers for one class, each having a different profit and experience value.
There were passengers for levels 1 to 5, then another type of passengers for levels 6-10, and another for levels 11-15 and so on.

While you were working (transporting passengers around), the system couldn't select the new passenger-type when you reached the level where passenger-types were changing.
So leveling up from level 5 to 6 didn't automatically select the higher-level passenger-type.
You had to end the job and restart it to get the effects (higher profit and experience).
The script would select the next level-range of passengers and load the new values when a new job is started.

It was also impossible to program this because each cargo-type can have different routes assigned to it.
It would not only need to check for the exact same cargo-type, but also check if the same route was assigned to it and automatically take over all these new values.



Now each cargo can have a multiplier value for price, profit and experience values.

Now there is only one type of passengers for a certain class, which ranges from level 1 to 50.
This profit-multiplier for example is now set to 0,1 for passengers.
The profit for passengers is set to $5 per passenger getting off your vehicle.
But that value is only valid when you're level 1.

It uses a exponential formula to calculate the profit for each level.
Profit * ((multiplier + 1.0) ^ (playerlevel - minlevel))

This is the formula used.
Profit is the $5 mentioned earlier, this value can be found in the database and is the profit for level 1 players.
The multiplier is the 0,1 also mentioned earlier.
The playerlevel is your own level, while the minlevel is the minimum-level of the cargo (this is 1 for this passenger-type).

So when you're lvl 35 for example, your profit per passenger getting off your vehicle is:
5 * ((0,1 + 1,0) ^ (35 - 1)) = 5 * (1,1 ^ 34) = 5 * 25,5476 = 127,738 (rounded to an integer, this would become $128 per passenger getting off).

At level 50, this would become:
5 * ((0,1 + 1,0) ^ (50 - 1)) = 5 * (1,1 ^ 49) = 5 * 106,719 = 533,595 (rounded to an integer, this would become $534 per passenger getting off).

It is not required to use this multiplier value, because when it's kept at 0, the profit stays the same for all levels.
Let's use the same passenger-type for level 50 when the multiplier would be 0:
5 * ((0,0 + 1,0) ^ (50 - 1)) = 5 * (1,0 ^ 49) = 5 * 1,0 = 5,0.

So it's still possible to define the same cargo-type multiple times, each time with different level-requirements, but preset values for price, profit and experience without using this formula like before.

This multiplier can be used for all cargo-types and all classes, not only passengers or a specific class.

The same formula is used for price and experience values.
Price is the buying price of cargo per unit.
Since you don't have to pay passengers to board your bus, plane or train/tram, or even taxi, this value will be set to 0 for passengers.
Experience is the amount of experience points you get per passenger to level up (maximum level for each class is 50).

Now, when you're working and you drop off some passengers and you level up by doing so, the script will automatically recalculate the profit and experience points for dropping off those passengers at the next location.
The same formula is used while you're unloading cargo so it automatically uses the new values when you reach another level.

You don't need to end your job anymore and restart it to get the new values.

Since all 3 values have their own multiplier value, it's possible to allow cargo to rise it's profit much faster than it's experience and vice versa.
It's up to the player to find out which cargo he needs to transport to earn the most experience or profit, whatever he wishes to increase the most.
A player who wants to level up the fastest, should transport cargo which has the highest experience gain.
For pure profit, you can transport cargo which gives the most profit. Those cargo-types will usually give the lowest experience.
It's also perfectly possible to keep the buying price of cargo at the same price throughout all levels, but make the profit and experience to higher and higher per level.

So you can make it that you can buy wooden boards for $7 each and have a profit of only $2 at level 1, but a profit of $75 at level 50, while the buying price stays at $7 each (even at level 50).
Needless to say, the experience can also be kept the same throughout all levels, or even the profit itself.



Caution should be used when setting those multiplier values.

Using much higher multiplier values is un-wise because it would become too much.
Take a multiplier of 0,4 at level 50 for a cargo-type that starts at level 1 (the same passenger as above):
5 * ((0,4 + 1,0) ^ (50 - 1)) = 5 * (1,4 ^ 49) = 5 * 14463511,5998 = 72317557,999 (rounded to an integer, this would become $72.317.558 per passenger getting off).
For an AT400 carrying 250 passengers, you would earn 250 * 72m = 18 billion dollars when they would all get off your plane at once.
Since the limit for an integer is only around 2,1 billion, you'll get problems very soon.
Reply


Messages In This Thread
PPC_Trucking V1 - by PowerPC603 - 05.12.2010, 18:17
Re: My own trucking server (still in development) - by universe - 05.12.2010, 18:27
Re: My own trucking server (still in development) - by SamyRomafia - 05.12.2010, 19:02
Re: My own trucking server (still in development) - by Steven82 - 05.12.2010, 19:08
Re: My own trucking server (still in development) - by Ruffles. - 05.12.2010, 19:16
Re: My own trucking server (still in development) - by PowerPC603 - 05.12.2010, 21:23
Re: My own trucking server (still in development) - by Ash. - 05.12.2010, 21:26
Re: My own trucking server (still in development) - by PowerPC603 - 05.12.2010, 21:29
Re: My own trucking server (still in development) - by PowerPC603 - 06.12.2010, 10:33
Re: My own trucking server (still in development) - by [HUN]Poldzsiii - 06.12.2010, 18:41
Re: My own trucking server (still in development) - by HostiGame - 06.12.2010, 18:54
Re: My own trucking server (still in development) - by Conroy - 06.12.2010, 19:07
Re: My own trucking server (still in development) - by PowerPC603 - 06.12.2010, 19:19
Re: My own trucking server (still in development) - by Miralem - 06.12.2010, 20:37
Re: My own trucking server (still in development) - by PowerPC603 - 06.12.2010, 22:33
Re: My own trucking server (still in development) - by <Jones> - 07.12.2010, 00:22
Re: My own trucking server (still in development) - by [HUN]Poldzsiii - 07.12.2010, 05:56
Re: My own trucking server (still in development) - by PowerPC603 - 07.12.2010, 12:20
Re: My own trucking server (still in development) - by iRana - 07.12.2010, 16:58
Re: My own trucking server (still in development) - by PowerPC603 - 07.12.2010, 21:22
Re: My own trucking server (still in development) - by Stefan_Toretto - 23.12.2010, 19:07
Re: My own trucking server (still in development) - by PowerPC603 - 23.12.2010, 19:44
Re: My own trucking server (still in development) - by PowerPC603 - 25.12.2010, 13:50
Re: My own trucking server (still in development) - by marmigs - 26.12.2010, 10:46
Re: My own trucking server (still in development) - by PowerPC603 - 26.12.2010, 11:40
Re: My own trucking server (still in development) - by PowerPC603 - 26.12.2010, 15:58
Re: My own trucking server (still in development) - by marmigs - 26.12.2010, 16:31
Re: My own trucking server (still in development) - by Pintinhas - 26.12.2010, 19:21
Re: My own trucking server (still in development) - by Jerret - 27.12.2010, 00:30
Re: My own trucking server (still in development) - by marmigs - 27.12.2010, 08:24
Re: My own trucking server (still in development) - by Pintinhas - 27.12.2010, 10:20
Re: My own trucking server (still in development) - by marmigs - 27.12.2010, 13:52
Re: My own trucking server (still in development) - by PsyShotter - 28.12.2010, 12:44
Re: My own trucking server (still in development) - by speedON - 02.01.2011, 16:49
Re: My own trucking server (still in development) - by PowerPC603 - 02.01.2011, 17:11
Re: My own trucking server (still in development) - by Cristiano[TW[ - 23.01.2011, 15:38
Re: My own trucking server (still in development) - by Lookin - 20.02.2011, 23:50
Re: My own trucking server (still in development) - by Maftaca - 21.02.2011, 00:58
Re: My own trucking server (still in development) - by Maftaca - 21.02.2011, 01:02
Re: My own trucking server (still in development) - by Lookin - 21.02.2011, 03:19
Re: My own trucking server (still in development) - by Maftaca - 21.02.2011, 04:04
Re: My own trucking server (still in development) - by [HUN]Poldzsiii - 21.02.2011, 13:59
Re: My own trucking server (still in development) - by PowerPC603 - 21.02.2011, 14:19
Re: My own trucking server (still in development) - by PowerPC603 - 21.02.2011, 14:21
Re: My own trucking server (still in development) - by [HUN]Poldzsiii - 21.02.2011, 16:36
Re: My own trucking server (still in development) - by Maftaca - 21.02.2011, 18:52
Re: My own trucking server (still in development) - by Ligeti Ferenc - 27.02.2011, 10:11
Re: My own trucking server (still in development) - by 12kelvin12 - 09.03.2011, 18:02
Re: My own trucking server (still in development) - by sherlock - 09.03.2011, 19:06
Re: AW: My own trucking server (still in development) - by scuess - 20.05.2011, 14:07
Re: AW: My own trucking server (still in development) - by PowerPC603 - 20.05.2011, 15:30
Re: My own trucking server (still in development) - by [IG] - 20.05.2011, 21:41
Re: My own trucking server (still in development) - by Bring Me The Horizon - 23.05.2011, 21:47
Re: My own trucking server (still in development) - by Bring Me The Horizon - 23.05.2011, 21:52
Re: My own trucking server (still in development) - by Miralem - 02.06.2011, 12:40
Re: My own trucking server (still in development) - by sherlock - 05.06.2011, 15:00
Re: My own trucking server (still in development) - by PowerPC603 - 06.06.2011, 21:47
Re: My own trucking server (still in development) - by chrisB463 - 13.06.2011, 14:34
Re: My own trucking server (still in development) - by PowerPC603 - 15.06.2011, 11:54
Re: My own trucking server (still in development) - by morlox330 - 20.06.2011, 16:30
Re : My own trucking server (still in development) - by Ligeti Ferenc - 20.06.2011, 16:33
Re: Re : My own trucking server (still in development) - by Seba. - 21.06.2011, 11:05
Re : My own trucking server (still in development) - by Ligeti Ferenc - 22.06.2011, 17:33
Re: My own trucking server (still in development) - by Seba. - 22.06.2011, 20:45
Re : My own trucking server (still in development) - by Ligeti Ferenc - 24.06.2011, 07:25
Re: My own trucking server (still in development) - by Rysoku - 24.06.2011, 07:38
Re : My own trucking server (still in development) - by Ligeti Ferenc - 24.06.2011, 08:00
Re: Re : My own trucking server (still in development) - by Seba. - 24.06.2011, 09:57
Re: My own trucking server (still in development) - by [BP]Tony - 24.06.2011, 10:35
Re: My own trucking server (still in development) - by BMB1 - 05.07.2011, 09:42
Re : My own trucking server (still in development) - by Ligeti Ferenc - 05.07.2011, 12:12
Re: My own trucking server (still in development) - by Pintinhas - 06.07.2011, 17:03
Re: My own trucking server (still in development) - by ZachZ - 06.07.2011, 17:38
Re: Re : My own trucking server (still in development) - by PowerPC603 - 06.07.2011, 21:47
Re: My own trucking server (still in development) - by ZachZ - 06.07.2011, 22:06
Re: My own trucking server (still in development) - by PowerPC603 - 07.07.2011, 06:40
Re: My own trucking server (still in development) - by !!--Ryder_RO--!! - 07.07.2011, 06:43
Re : My own trucking server (still in development) - by Ligeti Ferenc - 07.07.2011, 09:28
Re: My own trucking server (still in development) - by Thesmallport - 22.09.2011, 05:23
Re: My own trucking server (still in development) - by ninjahippie - 22.09.2011, 10:23
Re: My own trucking server (still in development) - by Warren - 24.09.2011, 16:29
Re: My own trucking server (still in development) - by Trucker[UK] - 24.09.2011, 16:32
Re: My own trucking server (still in development) - by BlackHaze - 24.09.2011, 16:36
Re: My own trucking server (still in development) - by Brendon_Pawn - 24.09.2011, 17:12
Re: My own trucking server (still in development) - by Warren - 24.09.2011, 19:11
Re: My own trucking server (still in development) - by Richard12254 - 24.09.2011, 19:24
Re: My own trucking server (still in development) - by PowerPC603 - 24.09.2011, 19:41
Re: My own trucking server (still in development) - by cruteX_modshop - 24.09.2011, 20:04
Re: My own trucking server (still in development) - by Trucker[UK] - 30.10.2011, 16:44
Re: My own trucking server (still in development) - by NAPSTER21 - 30.10.2011, 17:09
Re: My own trucking server (still in development) - by PowerPC603 - 30.10.2011, 20:24
Re: My own trucking server (still in development) - by Lookin - 30.10.2011, 22:51
Respuesta: My own trucking server (still in development) - by Nikk123 - 31.10.2011, 16:42
Re: My own trucking server (still in development) - by ZAM - 31.10.2011, 16:49
Re: My own trucking server (still in development) - by ninjahippie - 14.11.2011, 13:00
Re: My own trucking server (still in development) - by NAPSTER21 - 14.11.2011, 17:29
Re: My own trucking server (still in development) - by Michael@Belgium - 14.11.2011, 20:41
Re: My own trucking server (still in development) - by ninjahippie - 14.11.2011, 20:46
Re: My own trucking server (still in development) - by ninjahippie - 14.11.2011, 20:52
Respuesta: My own trucking server (still in development) - by Nikk123 - 14.11.2011, 21:25
Re: My own trucking server (still in development) - by (ETR)Geto244 - 15.11.2011, 16:44
Re: Respuesta: My own trucking server (still in development) - by PowerPC603 - 15.11.2011, 19:41
Re: My own trucking server (still in development) - by warlordkil - 15.11.2011, 19:59
Re: My own trucking server (still in development) - by ninjahippie - 15.11.2011, 21:47
Re: My own trucking server (still in development) - by thimo - 05.03.2012, 19:35
Respuesta: My own trucking server (still in development) - by (F)urbii - 05.03.2012, 21:03
Respuesta: My own trucking server (still in development) - by (F)urbii - 05.03.2012, 22:16
Respuesta: My own trucking server (still in development) - by (F)urbii - 06.03.2012, 05:52
Re: My own trucking server (still in development) - by tyler12 - 06.03.2012, 07:40
Re: My own trucking server (still in development) - by (F)urbii - 07.03.2012, 01:44
Re: My own trucking server (still in development) - by (ETR)Geto244 - 07.03.2012, 08:58
Re: My own trucking server (still in development) - by (ETR)Geto244 - 07.03.2012, 09:01
Re: PPC_Trucking V1 - by PowerPC603 - 13.03.2014, 15:48
Re: PPC_Trucking V1 - by BGTrucker - 13.03.2014, 16:45
Re: PPC_Trucking V1 - by d0nTtoucH - 13.03.2014, 17:08
Respuesta: PPC_Trucking V1 - by Mestre - 13.03.2014, 17:36
Re: PPC_Trucking V1 - by DDR3 - 13.03.2014, 18:22
Re: PPC_Trucking V1 - by Simou - 13.03.2014, 19:00
Re: PPC_Trucking V1 - by PowerPC603 - 13.03.2014, 21:31
Re: PPC_Trucking V1 - by d0nTtoucH - 13.03.2014, 22:11
Re: PPC_Trucking V1 - by PowerPC603 - 13.03.2014, 22:33
Re: PPC_Trucking V1 - by d0nTtoucH - 13.03.2014, 22:53
Re: AW: Re: PPC_Trucking V1 - by BGTrucker - 17.05.2014, 19:48
Re: PPC_Trucking V1 - by Naresh - 19.05.2014, 01:38
Re: PPC_Trucking V1 - by d0nTtoucH - 19.05.2014, 06:10
Re: PPC_Trucking V1 - by Naresh - 19.05.2014, 06:45
Re: PPC_Trucking V1 - by Bubulis - 19.05.2014, 12:09
Re: PPC_Trucking V1 - by ReyGutierrez - 19.05.2014, 12:22
AW: Re: PPC_Trucking V1 - by malaka - 19.05.2014, 12:34
Bubulis - by d0nTtoucH - 19.05.2014, 12:58
Re: AW: Re: PPC_Trucking V1 - by Bubulis - 19.05.2014, 14:54
AW: PPC_Trucking V1 - by malaka - 19.05.2014, 15:59
Re: PPC_Trucking V1 - by kokoshkata - 04.07.2014, 15:10
Re: PPC_Trucking V1 - by Darxeve - 04.07.2014, 18:31
AW: PPC_Trucking V1 - by malaka - 04.07.2014, 18:32
Re: PPC_Trucking V1 - by AntonioCroatia - 04.07.2014, 19:54
Re: PPC_Trucking V1 - by BGTrucker - 04.07.2014, 21:31
Re: PPC_Trucking V1 - by Naresh - 05.07.2014, 00:05
Re: PPC_Trucking V1 - by d0nTtoucH - 05.07.2014, 07:02
Re: PPC_Trucking V1 - by Naresh - 05.07.2014, 07:35
Re: PPC_Trucking V1 - by d0nTtoucH - 05.07.2014, 11:30
Re: PPC_Trucking V1 - by Naresh - 05.07.2014, 12:05
Re: PPC_Trucking V1 - by d0nTtoucH - 05.07.2014, 12:48
Re: PPC_Trucking V1 - by Naresh - 05.07.2014, 13:29
Re: PPC_Trucking V1 - by iOxide - 08.08.2014, 07:28
Re: PPC_Trucking V1 - by Nasim - 08.08.2014, 07:47
Re: PPC_Trucking V1 - by Nasim - 08.08.2014, 08:41
Re: PPC_Trucking V1 - by Naresh - 08.08.2014, 08:48
Re: PPC_Trucking V1 - by Meow22 - 08.08.2014, 09:10
Re: PPC_Trucking V1 - by TLN - 08.08.2014, 10:03
Re: PPC_Trucking V1 - by Naresh - 08.08.2014, 10:19
Re: PPC_Trucking V1 - by CombatFire - 09.08.2014, 11:46
Re: PPC_Trucking V1 - by Naresh - 09.08.2014, 14:43
Re: PPC_Trucking V1 - by BGTrucker - 09.08.2014, 15:17
Re: PPC_Trucking V1 - by Naresh - 10.08.2014, 01:29
Re: PPC_Trucking V1 - by Tuntun - 10.08.2014, 19:24
Re: PPC_Trucking V1 - by Nasim - 11.08.2014, 06:38
Re: PPC_Trucking V1 - by Naresh - 11.08.2014, 09:54
Re: PPC_Trucking V1 - by 0x123456789 - 11.08.2014, 12:01
Re: PPC_Trucking V1 - by Naresh - 11.08.2014, 13:46
Re: PPC_Trucking V1 - by BGTrucker - 23.08.2014, 14:05
Re: PPC_Trucking V1 - by TLN - 23.08.2014, 21:43
Re: PPC_Trucking V1 - by ArchLord - 24.08.2014, 06:21
Re: PPC_Trucking V1 - by ArchLord - 25.08.2014, 11:15
Re: PPC_Trucking V1 - by VenomMancer - 25.08.2014, 12:54
Re: PPC_Trucking V1 - by BGTrucker - 25.08.2014, 14:59
Re: PPC_Trucking V1 - by StoNe- - 25.08.2014, 21:44
Re: PPC_Trucking V1 - by d0nTtoucH - 27.08.2014, 22:28
Re: PPC_Trucking V1 - by BGTrucker - 28.08.2014, 00:54
Respuesta: Re: PPC_Trucking V1 - by hensr - 28.08.2014, 06:39
AW: Re: PPC_Trucking V1 - by malaka - 02.02.2015, 20:47
Re: PPC_Trucking V1 - by PowerPC603 - 02.02.2015, 21:08
Re: PPC_Trucking V1 - by PowerPC603 - 03.02.2015, 20:02
AW: PPC_Trucking V1 - by malaka - 04.02.2015, 10:58
Re: PPC_Trucking V1 - by [HM]Nicky - 04.02.2015, 15:15
Re: AW: PPC_Trucking V1 - by PowerPC603 - 04.02.2015, 17:44
Re: PPC_Trucking V1 - by GameOver153 - 05.02.2015, 15:00
Re: PPC_Trucking V1 - by Locky_ - 05.02.2015, 15:03
Re: PPC_Trucking V1 - by PowerPC603 - 05.02.2015, 15:24
Re: PPC_Trucking V1 - by wahyumahadir - 05.02.2015, 16:32
Re: PPC_Trucking V1 - by [ND]xXZeusXx. - 19.11.2015, 10:39
Re: PPC_Trucking V1 - by BGTrucker - 19.11.2015, 15:51
Re: PPC_Trucking V1 - by PowerPC603 - 08.03.2016, 21:39
Re: PPC_Trucking V1 - by Ducati - 08.03.2016, 23:00
Re: PPC_Trucking V1 - by Darkwood17 - 12.03.2016, 20:01
Re: PPC_Trucking V1 - by PowerPC603 - 13.03.2016, 00:19
Re: PPC_Trucking V1 - by Delete_ - 15.03.2016, 02:41
Re: PPC_Trucking V1 - by PowerPC603 - 17.03.2016, 20:25
Re: PPC_Trucking V1 - by DemME - 20.03.2016, 11:20
Re: PPC_Trucking V1 - by Saifullah - 20.03.2016, 13:38
Re: PPC_Trucking V1 - by PowerPC603 - 20.03.2016, 17:42
Re: PPC_Trucking V1 - by luancalixto - 22.03.2016, 01:50
Re: PPC_Trucking V1 - by PowerPC603 - 24.03.2016, 11:27
Re: PPC_Trucking V1 - by Honey - 31.03.2016, 13:19
Re: PPC_Trucking V1 - by PowerPC603 - 31.03.2016, 20:31
Re: PPC_Trucking V1 - by feheristi97 - 31.03.2016, 21:53
Re: PPC_Trucking V1 - by PowerPC603 - 01.04.2016, 09:32
Re: PPC_Trucking V1 - by PowerPC603 - 07.04.2016, 12:56
Re: PPC_Trucking V1 - by Darkwood17 - 08.04.2016, 20:27
Re: PPC_Trucking V1 - by PowerPC603 - 08.04.2016, 21:09
Re: PPC_Trucking V1 - by MariusTitulescu - 06.07.2017, 08:42
Re: PPC_Trucking V1 - by Tass007 - 08.07.2017, 07:48
Re: PPC_Trucking V1 - by Barnwell - 14.07.2017, 02:44
Re: PPC_Trucking V1 - by Wazowski - 14.07.2017, 15:43
Re: PPC_Trucking V1 - by feheristi97 - 15.07.2017, 05:22
Re: PPC_Trucking V1 - by DonaldDuck - 15.07.2017, 16:47
Re: PPC_Trucking V1 - by Banditul18 - 06.08.2017, 19:58
Re: PPC_Trucking V1 - by Honey - 01.09.2017, 18:40
Re: PPC_Trucking V1 - by Quantella - 01.09.2017, 20:36
Re: PPC_Trucking V1 - by TheBlackstone - 01.09.2017, 21:02
Re: PPC_Trucking V1 - by Erwin. - 21.05.2020, 08:54

Forum Jump:


Users browsing this thread: 1 Guest(s)