The 2cc Bus Set

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: The 2cc Bus Set

Post by planetmaker »

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
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: The 2cc Bus Set

Post by Voyager One »

@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
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: The 2cc Bus Set

Post by Transportman »

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
Jyratos
Engineer
Engineer
Posts: 71
Joined: 31 Mar 2014 19:47
Location: A small village near Paris, France

Re: The 2cc Bus Set

Post by Jyratos »

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
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: The 2cc Bus Set

Post by Voyager One »

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
Jyratos
Engineer
Engineer
Posts: 71
Joined: 31 Mar 2014 19:47
Location: A small village near Paris, France

Re: The 2cc Bus Set

Post by Jyratos »

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?
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

Re: The 2cc Bus Set

Post by Eddi »

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.
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: The 2cc Bus Set

Post by Voyager One »

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
Jyratos
Engineer
Engineer
Posts: 71
Joined: 31 Mar 2014 19:47
Location: A small village near Paris, France

Re: The 2cc Bus Set

Post by Jyratos »

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: Select all

        speed:                          param_max_speed km/h;
for the speed of the vehicle

Code: Select all

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 ?
Eddy Arfik
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 09 Apr 2014 11:10

Re: The 2cc Bus Set

Post by Eddy Arfik »

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: Select all

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: Select all


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;
             }
Jyratos
Engineer
Engineer
Posts: 71
Joined: 31 Mar 2014 19:47
Location: A small village near Paris, France

Re: The 2cc Bus Set

Post by Jyratos »

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 ?
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: The 2cc Bus Set

Post by Wahazar »

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.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
User avatar
Phreeze
Director
Director
Posts: 514
Joined: 12 Feb 2010 14:30
Location: Luxembourg

Re: The 2cc Bus Set

Post by Phreeze »

waiting for the webtranslator ^^
Jyratos
Engineer
Engineer
Posts: 71
Joined: 31 Mar 2014 19:47
Location: A small village near Paris, France

Re: The 2cc Bus Set

Post by Jyratos »

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: Select all

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 ?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: The 2cc Bus Set

Post by Alberth »

You cannot push the resulting .grf file to the repository, by the looks of it
Being a retired OpenTTD developer does not mean I know what I am doing.
Jyratos
Engineer
Engineer
Posts: 71
Joined: 31 Mar 2014 19:47
Location: A small village near Paris, France

Re: The 2cc Bus Set

Post by Jyratos »

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.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: The 2cc Bus Set

Post by Alberth »

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 retired OpenTTD developer does not mean I know what I am doing.
Jyratos
Engineer
Engineer
Posts: 71
Joined: 31 Mar 2014 19:47
Location: A small village near Paris, France

Re: The 2cc Bus Set

Post by Jyratos »

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.
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: The 2cc Bus Set

Post by Voyager One »

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
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 7 guests