Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Feb 23, 2019 5:56 pm

All times are UTC




Post new topic  Reply to topic  [ 53 posts ]  Go to page Previous 1 2 3
Author Message
PostPosted: Thu Dec 20, 2018 5:50 pm 
Offline
Engineer
Engineer

Joined: Mon May 15, 2017 12:48 pm
Posts: 31
[removed]


Last edited by srschacher on Thu Dec 20, 2018 6:39 pm, edited 1 time in total.

Top
   
PostPosted: Thu Dec 20, 2018 6:35 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9177
Location: Sol d
Please don't double-post questions.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Thu Dec 20, 2018 6:39 pm 
Offline
Engineer
Engineer

Joined: Mon May 15, 2017 12:48 pm
Posts: 31
Sorry, I didn't intend to. At first, I thought it was a script error so I posted to the script thread. Then I thought it was an API error so I posted to the general thread with the intent to come back here and delete the original thread.

Steve


Top
   
PostPosted: Thu Dec 20, 2018 8:14 pm 
Offline
Engineer
Engineer

Joined: Mon May 15, 2017 12:48 pm
Posts: 31
If anyone wants to try this variant of the script, replace these two attached files into your game script folder. Be sure to make copies of the original files.

I added four game script parameters to control the behavior of the script changes:

1. Penalty Type (1=Original, 2=Easy, 3=Hard *default*)
2. Initial penalty percent (default is 10)
3. Growth of penalty percent (default is 5)
4. Duration of penalty in years (default is 7)

Zero is a valid value, so penalties can be turned off, too. Duration must be greater than 0.

Penalty Types are:

1. Original - 1% of current balance each month per expired goal.
2. Easy - 10% of balance at time of expired goal, paid out over the entire duration in monthly payments.
3. Hard - 10% of balance at time of expired goal, annually for the duration, paid monthly.

For #1, each subsequent expired goal adds 1% to the penalty.
For #2 and #3, the starting penalty and growth rate are script settings.

One thing you can do is mimic the original penalty but based on the balance at the time of the expired goal. To do this, use Penalty Type=2, Initial Penalty Percent = 12, Growth of Penalty Percent = 12, Duration = 100. This will keep the penalty from escalating when the Company balance increases.

Steve


Attachments:
File comment: Main script file
main.nut [47.76 KiB]
Downloaded 24 times
File comment: Script settings file
info.nut [10.22 KiB]
Downloaded 25 times


Last edited by srschacher on Wed Dec 26, 2018 5:52 pm, edited 4 times in total.
Top
   
PostPosted: Fri Dec 21, 2018 5:00 am 
Offline
Engineer
Engineer

Joined: Sat Dec 10, 2016 10:46 pm
Posts: 21
Thanks Steve. Good stuff!


Top
   
PostPosted: Fri Dec 21, 2018 5:47 am 
Offline
Engineer
Engineer

Joined: Mon May 15, 2017 12:48 pm
Posts: 31
Thanks.

I updated the info.nut file to make the minimum duration of 1 to avoid a zero divide error if someone makes that value zero.

Please redownload the info.nut file for the latest version.

Steve


Top
   
PostPosted: Sun Dec 23, 2018 11:57 pm 
Offline
Engineer
Engineer

Joined: Mon May 15, 2017 12:48 pm
Posts: 31
I'm thinking that I was still too cheap in assessing the penalty. I think what I wanted was to assess a 10% penalty on the current balance, assessed each year in 12 monthly payments for seven years. Instead, what I coded was assessing the 10% penalty of the current balance, assessed monthly over seven years.

As an example, suppose you missed a goal with a $1,000,000 balance. A penalty of 10% would be $100,000 each year, made in 12 monthly payments per year. This would result in monthly payments of $8,330 for seven years.

Instead, what I coded was a penalty of $100,000, made in monthly payments of $1,190 over seven years.

My goal in the change was to assume that the company would continue to grow, so a payment of $8,330 today won't be as sever in seven years as it is today. To be sure, it's still severe enough to question the worth of ignoring a goal.

Comments? Look for a change in the files in the coming days.

Steve


Top
   
PostPosted: Wed Dec 26, 2018 5:54 pm 
Offline
Engineer
Engineer

Joined: Mon May 15, 2017 12:48 pm
Posts: 31
I uploaded new versions of both files.

Hopefully, this is the last revision.

Steve


Top
   
PostPosted: Thu Jan 31, 2019 12:16 pm 
Offline
Engineer
Engineer

Joined: Thu Jan 31, 2019 11:03 am
Posts: 4
Hello there!

I have a question. How can I play with this script & FIRS 30.0.10? I've read a lot, tried to fix cargo list by using cargo.nut and Debug mode, tried onother Renewed_City_Growth and Simple_City_Builder... Still "cargoes don't match the list etc.".
May be someone have the right cargo.nut and can upload it... It's my favorite way to play OTTD so far :bow:
Do I something wrong?


Top
   
PostPosted: Sat Feb 02, 2019 9:32 pm 
Offline
Engineer
Engineer

Joined: Mon May 15, 2017 12:48 pm
Posts: 31
Which FIRS cargo setting are using in the game script options?

Steve


Top
   
PostPosted: Thu Feb 07, 2019 11:37 pm 
Offline
Engineer
Engineer

Joined: Thu Jan 31, 2019 11:03 am
Posts: 4
srschacher wrote:
Which FIRS cargo setting are using in the game script options?

I prefer "Nightmare", but i also tried Steel City for example.


Top
   
PostPosted: Fri Feb 08, 2019 3:52 pm 
Offline
Engineer
Engineer

Joined: Mon May 15, 2017 12:48 pm
Posts: 31
I play with Extreme, and that works. I don't think I ever tried to realign the other settings (note: I'm not the author of the script, so I only changed the penalty section of the code).

Can you try the Extreme setting to see if that one gives the error, too?

Steve


Top
   
PostPosted: Mon Feb 11, 2019 9:04 am 
Offline
Engineer
Engineer

Joined: Thu Jan 31, 2019 11:03 am
Posts: 4
srschacher wrote:
Can you try the Extreme setting to see if that one gives the error, too? Steve

Thank you so much, Steve!!!
There was a problem with the translation of the FIRS GRF (i'm russian). So i set game lang to eng, reset GS & GRF parameters - and no error appeared! Awesome!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 53 posts ]  Go to page Previous 1 2 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.