some economic changes and more

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

ks
Engineer
Engineer
Posts: 8
Joined: 20 Apr 2004 16:16

some economic changes and more

Post by ks »

at first, sorry for my englisch :D

why i post? the AI lose or dont loan more money to build his first train
a Suggestions to fix it is, ....

if (p->player_money > 1.1 * _economy.max_loan ) { // Decrease loan
else if (p->player_money < _economy.max_loan) { // Increase loan

are not optimal, but better as now(i think)

a 2nd mod are a new news(for the Player/AI, bases on a idea to implements shares&co),
it prints with startig a new year

revenue
operation profit
and compare it with the years before, ......a little statistic

the code work, only few text are missing

at last, it is unfortunate openTT are in C/C++, but it's not hard to modify it with new things(how i can help?). Only more documentation are need! :(

the 0.3.0 release are great, crash only sometimes,.......the best release :), few bugs i know only.....
SF3
Engineer
Engineer
Posts: 41
Joined: 06 Apr 2004 16:46
Location: Almere, The Netherlands
Contact:

Post by SF3 »

I would like the idea of a more detailed year balance than the one we get now. Including at least turnover, operation profit etc. And maybe more detailed economic stuff. The one we get now is so limited and doesn't really make me feel like I'm running a company.
'Misschien zullen onze kleinkinderen middelen ontdekken om naar de sterren te reizen; ze zullen dan om ons glimlachen, die moeizaam over de onbekende plekken op aarde rondkropen.'
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Re: some economic changes and more

Post by Bjarni »

ks wrote:at first, sorry for my englisch :D
Spelling English right might make it more understandable :P (that was the only error I saw, so if you didn't wrote that, nobody would have said anything about poor spelling)
ks wrote:at last, it is unfortunate openTT are in C/C++, but it's not hard to modify it with new things(how i can help?). Only more documentation are need! :(


Why is it unfortunate, that OpenTT is written in C?
And the way you can help is getting the newest svn, modifying it and upload a diff to sourceforge patch section with a description of what it does
ks
Engineer
Engineer
Posts: 8
Joined: 20 Apr 2004 16:16

Re: some economic changes and more

Post by ks »

Bjarni wrote:
ks wrote:at first, sorry for my englisch :D
Spelling English right might make it more understandable :P (that was the only error I saw, so if you didn't wrote that, nobody would have said anything about poor spelling)
ks wrote:at last, it is unfortunate openTT are in C/C++, but it's not hard to modify it with new things(how i can help?). Only more documentation are need! :(


Why is it unfortunate, that OpenTT is written in C?
And the way you can help is getting the newest svn, modifying it and upload a diff to sourceforge patch section with a description of what it does
i "hate" C/C++ :D but it is a other story :D

i have always the newst svn code ;) but, upload?! and a diff? i can try it ;)
ks
Engineer
Engineer
Posts: 8
Joined: 20 Apr 2004 16:16

Post by ks »

here, a png with a news :)
Attachments
Hanfurt Transport, 14. Jan 1951.png
Hanfurt Transport, 14. Jan 1951.png (58.68 KiB) Viewed 4810 times
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: some economic changes and more

Post by MagicBuzz »

ks wrote:i "hate" C/C++ :D but it is a other story :D
ways the newst svn code ;) but, upload?! and a diff? i can try it ;)
I agree, this language is too much permissive and can become quickly unmaintenable.
But it's a "high performance" level and very common language, so I is still a good choice.
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Post by MagicBuzz »

ks wrote:here, a png with a news :)
Could you post an english version of your picture :)
ks
Engineer
Engineer
Posts: 8
Joined: 20 Apr 2004 16:16

Post by ks »

MagicBuzz wrote:
ks wrote:here, a png with a news :)
Could you post an english version of your picture :)
here :)
Attachments
Hanfurt Transport, 12th Jan 1951.png
Hanfurt Transport, 12th Jan 1951.png (77.53 KiB) Viewed 4801 times
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

For now:
1. You appear to be missing some control codes at the end of each line before the )
2. Revenue should be the sum of the four income values, plus any income from selling shares in another company. This last part is bundled into the "other" line, and can't easily be extracted, so you are looking at just using the four "income" lines and titling them "operating revenue". What you have done there is added up the unsigned values of all the rows, i.e. revenue + expenditure. There is another word for this, but I can't think what it is.
3. Similarly, "operating profit" = "operating revenue" - "running costs", which I think is similar to EBITDA. The figure you're probably aftre there is "total profit"
4. Disable display of the "last year" field for the first game year, or when the date is changed (should such a feature ever be incorporated).

For reference:
1. The usual name for such figures in English English is "Results" rather than "Values", so "That Company publishes their results for (period)"
2. Possibly include a change, as well as previous year figures, e.g. "Profit: £xxxxx (Last year: £xxxxx : +1.0%)" though this is easy enough to do.

Nide idea, though. That way, people can kill the balance sheet every year, and just look at some key figures. They cna pull up their balance sheet later if they need the details.

A more general suggestion for the team: any chance of (optionally) accounting the financial year rather than the calendar year, i.e. popping up the accounts on April 6, showing the figures from 06/04/Previous to 05/04/Current?
ks
Engineer
Engineer
Posts: 8
Joined: 20 Apr 2004 16:16

Post by ks »

it was only a sample, not finished ;)

1. atm ott draw each line, with out using {} = \n
because, better revenue/profit are printed in gold, worst in red, last year are allways in gray

2.-3. i change it, but it is hard to find in ott the right lines, .....
with the selling shares, the "other" line are other ;)

Revenue = all icome + all running cost + other , should be better
pre-profit = all icome + other(if only it is profit)
profit = no change....

4. hm, but is more code ;) last year shows after the first game year allways 0,....

------
1. thanks
2. i try it to change it ;)

A more general suggestion for the team: any chance of (optionally) accounting the financial year rather than the calendar year, i.e. popping up the accounts on April 6, showing the figures from 06/04/Previous to 05/04/Current?
atm no, should be possible ;)
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

ks wrote:it was only a sample, not finished
We know, just providinde some helpful hints. :)
pre-profit = all icome + other(if only it is profit)
The problem here is that "Other" has +ve and -ve parts to it that we don't see, so it would be an underestimate, since any -ve costs would reduce the figure from what we need. A revenue figure (which is what that line *should* read) should be absolute, and include no deductions whatsoever, which is why I suggested not taking "Other" into account on that line ;)

One more thing, typically we know which year a company started, but if we know in which quarter they started (since some AI companies will start maybe in Q2 or Q3), a possibility might be those companies publishing their results at the same time in the year as they were originally founded, i.e. a company started in September publishes results in September. Just a suggestion, and I'll see if I get time to actually work on it. In the meantime, drum up a set of patches so people can play with it (preferably against the latest code in the subversion repo), and try fiddling.

This news item could turn out ot be an interesting "feature" :)
ks
Engineer
Engineer
Posts: 8
Joined: 20 Apr 2004 16:16

Post by ks »

the ai saved only his start year or? not the year and quartal?! (doku are missing ;( )

a next idea/proof of concept are creates some tax, why?(0%-50%)
a city has money to build own buildings ;)
has own tax for each company(so earn money)
with captivate/bribery(babblefish *g*) you can move the tax down
city tax only for passengers, valubres and mail

all other have industry tax, are global..... i am working on a concept which are easy to implements and more economic ;)
ks
Engineer
Engineer
Posts: 8
Joined: 20 Apr 2004 16:16

Post by ks »

here the new "news"
profit should profit and not Profit (translation error only ;) .....)

Code: Select all

STR_C0060_UMSATZ_BETTER_BETTER			:{BLACK}{STRING} meldet seitegenden Umsatz {GREEN}{COMMA32}% {BLACK} und Gewinn {GREEN}{COMMA32}%
STR_C0061_UMSATZ_BETTER_WORST			:{BLACK}{STRING} setzte auf starke expansion und steigerte somit Umsatz {GREEN}{COMMA32}%{BLACK} aber verlor an Gewinn {RED}-{COMMA32}%
STR_C0062_UMSATZ_WORST_BETTER			:{BLACK}{STRING} setzte auf optimierung und verlor damit an Umsatz {RED}-{COMMA32}%{BLACK} steigerte dafür den Gewinn {GREEN}{COMMA32}%
STR_C0063_UMSATZ_WORST_WORST			:{BLACK}Schwere Krise bei {STRING} weder Umsatz {RED}-{COMMA32}%{BLACK} noch Gewinn über {RED}-{COMMA32}% {BLACK}stiegen sondern stürzten ab
german

Code: Select all

STR_C0060_UMSATZ_BETTER_BETTER			:{BLACK}{STRING} announces more Revenue {GREEN}{COMMA32}% {BLACK} and profit {GREEN}{COMMA32}%
STR_C0061_UMSATZ_BETTER_WORST			:{BLACK}{STRING} sets on expansion and get more Revenue {GREEN}{COMMA32}%{BLACK} but lose profit {RED}-{COMMA32}%
STR_C0062_UMSATZ_WORST_BETTER			:{BLACK}{STRING} optimize his self and lose Revenue {RED}-{COMMA32}%{BLACK} but get more profit {GREEN}{COMMA32}%
STR_C0063_UMSATZ_WORST_WORST			:{BLACK}Hard Crisis at {STRING}, it lose Revenue {RED}-{COMMA32}%{BLACK} and profit {RED}-{COMMA32}%{BLACK}
english worst translation :D
Attachments
Hanfurt Transport, 5th Jan 1952.png
Hanfurt Transport, 5th Jan 1952.png (76.18 KiB) Viewed 4758 times
Hanfurt Transport, 15th Jan 1952.png
Hanfurt Transport, 15th Jan 1952.png (75.62 KiB) Viewed 4738 times
m1lamb3r
Engineer
Engineer
Posts: 3
Joined: 19 Apr 2004 20:59

Post by m1lamb3r »

in the last picture you have got -33,000,000% but it's imposibble to heve a minus lower than 100%.
User avatar
Lilman424
Tycoon
Tycoon
Posts: 2743
Joined: 20 Oct 2002 14:55
Location: Georgia
Contact:

Post by Lilman424 »

yes it is.

What if you go from $100 to -$100?
that's a -200% change.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction. - Albert Einstein
m1lamb3r
Engineer
Engineer
Posts: 3
Joined: 19 Apr 2004 20:59

Post by m1lamb3r »

i meant the revenue, taht can't be under 0% (unless you pay people to get on your bus/train)
User avatar
Lilman424
Tycoon
Tycoon
Posts: 2743
Joined: 20 Oct 2002 14:55
Location: Georgia
Contact:

Post by Lilman424 »

hmm
what's the calculation for percent?
it should be this_year/last_year*100, which should provide correct percentage for zero...
(0/anynumber * 100) == 0, and if the last year has no revenue, it should have an exception, of course, because of division by zero....
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction. - Albert Einstein
ks
Engineer
Engineer
Posts: 8
Joined: 20 Apr 2004 16:16

Post by ks »

right, but i add one zu old and new value => no division by zero :)
not 100% correct buy nobody recalculate it with a calculator :D

any more ideas? how to calculate ? ;) it is not easy :/
Giggel
Engineer
Engineer
Posts: 2
Joined: 02 Apr 2004 16:10

Post by Giggel »

What happened with this idea until now?

I like this Idea very mutch...

By,
Giggel
DavidPartay
Engineer
Engineer
Posts: 2
Joined: 13 Jul 2004 00:04
Location: NSW, Australia
Contact:

Post by DavidPartay »

Why not just tell it to test if the value it will divide by is zero before doing the calculation?

If you tell it to test, then you can tell it to 'assume' a value instead of doing that risky little calculation ;).

Even if it's a float value of 0.0001, you can still divide by that number, you only need to test for true 0 unless it's rounded which I'm pretty sure float values aren't.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 18 guests