Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Feb 20, 2017 11:08 am

All times are UTC




Post new topic  Reply to topic  [ 196 posts ]  Go to page Previous 16 7 8 9 10 Next
Author Message
 Post subject: Re: The 2cc Bus Set
PostPosted: Fri Feb 13, 2015 8:56 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 8995
Location: Sol d
Yes, very much so. The web translator is automatically updated with the new base language (=english) string file, whenever that is changed. And the repository is updated once per day with the new translations made by the translators. That changeset then is built by the DevZone and published to http://bundles.openttdcoop.org/cc-bus-set/push/LATEST - that is once the compile-on-push is activated. Will do that now.

I made some changes, updating Makefile and fixing some upper/lower case errors when including source files in order to make it build. However the names of at least one, probably many PNG files are such that they contain "strange" characters which make the build fail (äöüß and those which I cannot type like the S for Skoda). These characters are in an encoding in the filenames which does not work well and makes the build fail. There are more files to rename than I have time right now to look at. I suggest your coder looks at it and renames them and their references in the code to use only ascii chars.
https://jenkins.openttdcoop.org/job/cc- ... /2/console

_________________
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
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Sat Feb 14, 2015 10:04 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Dec 28, 2009 9:47 am
Posts: 10888
Location: Rijeka, Croatia
@Jyratos - I've found some time and tested the set, all seems OK and correct except... one small remark and one question/remark.

Remark: I load ONLY the 2cc bus set (no other GRF) and I still get and can't get rid of the original RVs. Is that code-related and a parametere should be added?

Question/remark: I assume you've let the game calculate the TE of all vehicles. IMO it seems a bit too high. What adhesion coefficient did you use? The value of 0,3 (for trains) is too low, for RVs (tyres on asphalt) should be approximately 0,7.

EDIT:

A third issue:
IMO you should TRIPLE all purchase costs and DOUBLE all running costs and then add two separate parameters for these to be adjusted (Very low x0.25, Low x0.50, Normal x1, High x2 Very high x4)

_________________
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Sat Feb 14, 2015 12:35 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2446
Voyager One wrote:
Remark: I load ONLY the 2cc bus set (no other GRF) and I still get and can't get rid of the original RVs. Is that code-related and a parametere should be added?

A set needs to explicitly disable the original vehicles, and that piece of code is not present in this NewGRF (quick check).

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Sat Feb 14, 2015 6:34 pm 
Offline
Engineer
Engineer

Joined: Mon Mar 31, 2014 7:47 pm
Posts: 71
Location: A small village near Paris, France
Voyager One wrote:
Remark: I load ONLY the 2cc bus set (no other GRF) and I still get and can't get rid of the original RVs. Is that code-related and a parametere should be added?


Like transportman said, I forgotten to code the removal of the default vehicles.

Voyager One wrote:
Question/remark: I assume you've let the game calculate the TE of all vehicles. IMO it seems a bit too high. What adhesion coefficient did you use? The value of 0,3 (for trains) is too low, for RVs (tyres on asphalt) should be approximately 0,7.


Yes, I used a TE coefficient of 0,3. I will correct everything (I think) tomorrow.

Voyager One wrote:
IMO you should TRIPLE all purchase costs and DOUBLE all running costs and then add two separate parameters for these to be adjusted (Very low x0.25, Low x0.50, Normal x1, High x2 Very high x4)


No problem, I'll do that.

Thank you finding those problems :D


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Sun Feb 15, 2015 8:52 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Dec 28, 2009 9:47 am
Posts: 10888
Location: Rijeka, Croatia
Jyratos wrote:
Thank you finding those problems

Not problems at all. Fine tuning... :wink:

_________________
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Mon Feb 16, 2015 11:13 am 
Offline
Engineer
Engineer

Joined: Mon Mar 31, 2014 7:47 pm
Posts: 71
Location: A small village near Paris, France
Hi !

I corrected the tractive effort, modified the costs, added parameters and removed illegal characters. But I have a question : does the ' or - characters are ascii or I need to remove them from the images?


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Mon Feb 16, 2015 10:02 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 6895
if you want to be really sure, only use letters (A-Z,a-z), numbers (0-9) and underscore (_) in filenames.

anything else will sooner or later be encountered by an unsuspecting tool and cause problems.

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Tue Mar 24, 2015 12:16 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Dec 28, 2009 9:47 am
Posts: 10888
Location: Rijeka, Croatia
Any progress Jyratos? :wink:

_________________
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Tue Mar 24, 2015 5:37 pm 
Offline
Engineer
Engineer

Joined: Mon Mar 31, 2014 7:47 pm
Posts: 71
Location: A small village near Paris, France
Voyager One wrote:
Any progress Jyratos? :wink:


For the moment, not a lot, sorry. I'm trying to code speed limits,but I have problems.

This is more a question to transportsman : I coded the limits like this :

Code:
        speed:                          param_max_speed km/h;


for the speed of the vehicle

Code:
if ((param_max_speed == 0) | (param_max_speed >= 128))
{
  item (FEAT_ROADVEHS, ACFBrillIC41)
  {
    property
    { speed: 128 km/h; }
    }
}

for the modifier when there is no speed limit.
But when I set a upper limit, for example to limit the vehicles like the Autosan Eurolider 12, limited to 155 km/h. I set the limit to 150 but it shows 127 km/h in max speed so I think there is a limit for the parameters to 127. Do you agree with me or I made a mistake ?


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Wed Mar 25, 2015 2:11 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Apr 09, 2014 11:10 am
Posts: 262
Jyratos wrote:
I'm trying to code speed limits,but I have problems.
...


I can see a few problems with how you've attempted to code the speed limits, first is as you've discovered the maximum value for a parameter is 127. The second is I don't think having a parameter where the player types in a number that becomes the speed limit for all vehicles is the ideal solution. From what I can tell the purpose of a speed limit parameter is if players wish to have buses respect some kind of road speed limit instead of travelling at speeds that while realistic in terms of vehicle capability are not legal in most countries. As far as I know speed limits can be set between stops in the vehicle orders, this can allow for lower speeds within towns and higher speeds on the motorways linking towns, this is probably the most sensible and realistic way. If however you still want to code a maximum speed, the way that should be done is rather than using the parameter number as the literal maxspeed, have a parameter with values such as 100km/h, 110km/h, 150km/h etc, then adjust each vehicle with a callback that interprets this setting as a speed. This will give a reasonable choice as to the maximum permitted highway speed across various countries.

Without having the full source of the set it's hard for me to test this properly, but hopefully the following code fragments will help...

In the grf block (I've put 4 speed limits plus unlimited as default, you can add more easily)
Code:
param {
             max_speed {
             type: int;
             name: string(STR_PARAM_MAX_SPEED);
             desc: string(STR_PARAM_MAX_SPEED_DESC);
             min_value: 1;
             max_value: 5;
             def_value:5;
             names: {
                          1: string(STR_MAX_SPEED_100);
                          2: string(STR_MAX_SPEED_110);
                          3: string(STR_MAX_SPEED_130);
                          4: string(STR_MAX_SPEED_150);
                          5: string(STR_MAX_SPEED_UNLIMITED);
                          }
              }
         }


In the vehicle definition ( for vehicle called "bus01" with limit 165km/h)
Code:

switch (FEAT_ROADVEHS, SELF, bus01_speed_limit_switch, param_max_speed) {
            1: return 100;
            2: return 110;
            3: return 130;
            4: return 150
            5: CB_FAILED;       // use the speed defined in vehicle property in case of unlimited speed setting
            }

item(FEAT_ROADVEHS, bus01) {
           property {
           speed: 165km/h)
          }

graphics {
          speed: bus01_speed_limit_switch;
             }


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Wed Mar 25, 2015 11:40 am 
Offline
Engineer
Engineer

Joined: Mon Mar 31, 2014 7:47 pm
Posts: 71
Location: A small village near Paris, France
Thanks for your help. I coded the speed limits,but for an unknown reason, the limits were multiplied by 2 (90km/h was at 180 for example). It does not create a big problem, but I think it's strange.
Do you have an idea about this ?


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Wed Mar 25, 2015 12:27 pm 
Offline
Chairman
Chairman
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 841
Jyratos wrote:
the limits were multiplied by 2 (90km/h was at 180 for example). It does not create a big problem, but I think it's strange.
Do you have an idea about this ?

Please note "Units are not (yet) available" statement on http://newgrf-specs.tt-wiki.net/wiki/NML:Vehicles page.
You must multiply those values by factor 2 to achieve real kmsh speed for road vehicle ans ship (or in other words, use 2x smaller value than those which you want to set).
Similar apply to power.

PS. Nice idea with different cargo_age_speed and loading_speed for urban/IC buses.
I'm using similar approach, but instead of "magic" values, function depending on sitting/standing places ratio+air conditioning bonus
is used for cargo_aging, and function depending on door leaf number + lowered floor bonus, is used for loading speed calculation.

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP-0.17.1 http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Thu Mar 26, 2015 11:59 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Fri Feb 12, 2010 2:30 pm
Posts: 504
Location: Luxembourg
waiting for the webtranslator ^^


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Wed Apr 15, 2015 6:14 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Oct 17, 2005 8:56 pm
Posts: 3224
Location: Estonia
Bus-Semi... We do have one, why not to have another... older one! :)

http://www.busaustralia.com/forum/viewt ... 10&t=22071

_________________
TT-Screenshot Of The Month - 2012 July, winner!
TT-Screenshot Of The Month - 2013 May, winner tie with Purno!
TT-Screenshot Of The Month - 2014 February, winner!
TT-Screenshot Of The Month - 2014 June, winner tie with alluke!
TT-Screenshot Of The Month - 2014 April, winner!

My screen shot thread ---> Have a look


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Tue May 12, 2015 4:32 pm 
Offline
Engineer
Engineer

Joined: Mon Mar 31, 2014 7:47 pm
Posts: 71
Location: A small village near Paris, France
Finally, I had time to continue and I made a lot of corrections and fixes, but for some reason, I cannot push the revisions to the repository.

The TortoiseHg Workbench says (in litteral translation from french to english) : "No pushing revision to ssh://hg@hg.openttdcoop.org/cc-bus-set"

And the log says:
Code:
pushing to ssh://hg@hg.openttdcoop.org/cc-bus-set
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 7 changesets with 103 changes to 96 files
remote: File "2ccBusSet.grf" may not be added to the repository.transaction abort!
remote: rollback completed
remote: abort: pretxnchangegroup.check hook failed
[la commande a retourné le code 1 Tue May 12 18:22:50 2015]
2CCbus%


Any help ?


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Tue May 12, 2015 4:37 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4261
Location: home
You cannot push the resulting .grf file to the repository, by the looks of it

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Tue May 12, 2015 4:39 pm 
Offline
Engineer
Engineer

Joined: Mon Mar 31, 2014 7:47 pm
Posts: 71
Location: A small village near Paris, France
Alberth wrote:
You cannot push the resulting .grf file to the repository, by the looks of it


I removed it and made a revision to remove it from the repo, but it looks like tortoise keeps trying to push it.


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Wed May 13, 2015 6:19 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4261
Location: home
Of course, hg preserves history.

Every revision (all history) is being pushed. You can add new ones on top (add new history), but that does not change the previous revisions (previous history).
Deleting anything in hg does not mean 'delete', it means 'delete from now forward in time'. In older revisions (older points in time) the file will still exist.

Note that this is actually the core reason why you want a repository.
Say you make a GRF version 1, with a bunch of files, and then change it all to version 2, where you don't need those files, and you delete them.
If you go back to version 1, you also want those deleted files back, otherwise you cannot build GRF version 1 again!


What you have to do is change the revision that adds the .grf file (that is, not add it). I don't know how exactly how to do that though, you may want to ask for help somewhere (#openttd channel for example).

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Thu May 14, 2015 6:32 pm 
Offline
Engineer
Engineer

Joined: Mon Mar 31, 2014 7:47 pm
Posts: 71
Location: A small village near Paris, France
Thanks for your reply, I searched on how to modify revisions but I only found how to remove revisions. So I removed all the revisions that caused problem and I recoded speed limits. I commited and pushed everything.

If you have suggestions for paremeters or everything else, tell me.


Top
   
 Post subject: Re: The 2cc Bus Set
PostPosted: Fri May 15, 2015 6:59 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Dec 28, 2009 9:47 am
Posts: 10888
Location: Rijeka, Croatia
Jyratos, one question please. You've added a "max vehicle speed" parameter, is it for all buses in one go or are these 3 separate parameters (first for IC, second for Suburban, third for Urban buses)?

Since we already have the 3-types division of buses, I think this should be 3 parameters but also they should have different values for possible max speed. E.g. (I'm putting stupid numbers here) IC buses could have Unlimited/150/130/110, Suburban buses could have 130/110/90/70, Urban buses could have 110/90/70/50... IMO of course...

_________________
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 196 posts ]  Go to page Previous 16 7 8 9 10 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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-2017 phpBB Limited

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