Feature #56

rework region availability parameter

Added by planetmaker over 10 years ago. Updated over 8 years ago.

Status:NewStart date:2009-05-19
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:General NFO
Target version:2.0

Description

The switching parameter for regions could be merged into a single parameter which is interpreted as a bit register (e.g. bit 1=africa, bit2=asia, bit3=east european etc...)

it would IMO clean up the parameter zoo nicely.

2cc-0.png (25.4 KB) Ammler, 2011-03-21 15:24

2cc-4.png (20.8 KB) Ammler, 2011-03-21 15:24

History

#1 Updated by Ammler over 10 years ago

Another idea:

Instead of just using a switch to disable/enable the region. What about making trains differently available per company?

#2 Updated by planetmaker over 10 years ago

if we drop the oceanic region and merge that with Asia, we have 8 regions only and it would fit the bit mask contained in one byte.

#3 Updated by DJNekkid over 10 years ago

i've thought about makeing it a bit-type (tho, i dont know how), but we currently have 9 regions...

but i've thought about the following
one "part" for europe (1 = western, 2 = scandinavia etc)
one "part" for america (1 = north, 2 = south)
one "part" for "world" (africa, asia and oceania)

#4 Updated by Ammler over 10 years ago

  • Target version changed from 2.0 to 10

#5 Updated by DJNekkid about 9 years ago

  • Target version changed from 10 to 2.0

#6 Updated by Purno over 8 years ago

How's the regional parameter progressing? Considering the list of engines grows a lot, it'd be nice if players had something to make a selection of the engines to play with.

I see target version is 2.0, and that's expected soon, isn't it? :P

#7 Updated by DJNekkid over 8 years ago

It have not progressed at all :D Just 'on paper' (i.e. i have a quite good idea on how things should be done :D

#8 Updated by Purno over 8 years ago

Care to share your 'on paper' ideas? :P

#9 Updated by DJNekkid over 8 years ago

its basicly how to code it, nothing more.

#10 Updated by Purno over 8 years ago

Then we got a clear picture of how the regional parameter is gonna work on the user's end?
(because TBH, I don't :P)

#11 Updated by DJNekkid over 8 years ago

It probably dont need to be as 'large' as the old one, but i was thinking:
  • Western Europe - All european countries that pre 1990 used to be a non-'east block' I.e. mostly everything west of (and including) finland/germany/italia (except greece).
  • Eastern Europe - All european countries that pre 1990 used to be a 'east block' country. I.e. mostly everything east of finland/germany/italia (except greece)
  • America
  • Africa
  • Asia
  • Australia & New Zealand

I see little reason to split north and south america, as most south american engines are of US design. Especially the diesel units.
I also do not see a reason to separate the 'western europe' into 3 'sub regions', as the (especially after about 1980) trains in country X usually is built in country Y, and/or vica verca.

There have also been wishes about the ability to remove certain 'type' trains, and imho is that a good idea.

#12 Updated by Purno over 8 years ago

I guess there indeed is no need to divide the regions any further. One question: Will a player be able to play with several regions or can he only choose to play with one region or all regions? (For example: Can I play with America and Africa only?)

About the train type selection, I already mentioned at the forums I'm not entirely happy with that one. Could we continue there, as I don't think it's wise to have the same discussion running in two places, and we could use the opinions of our 'fanbase' :P

#13 Updated by Ammler over 8 years ago

the disabling/enabling itself works with clima availability so this switches don't break compatibility, then it should also not matter, if you decide to make any changes here

#14 Updated by Voyager1 over 8 years ago

Another issue about this:
- all wagons available no matter what parameter is selected or... (?)

#15 Updated by DJNekkid over 8 years ago

Ammler wrote:

the disabling/enabling itself works with clima availability so this switches don't break compatibility, then it should also not matter, if you decide to make any changes here

It does? My plan were to skip (via action 7/9) the entire action 0-1-2-3 chain if the particular region is 'off'...

and ofcourse, one can play with everything or only one region, or two, or three, of as many or few as you want :)

#16 Updated by planetmaker over 8 years ago

Just changing the climate availability of vehices has the same effect as leaving them out completely. And it has much less severe impact on the game, if you find people changing parameters during the game / after map creation.

Actually setting the climate availability to 'none' is also THE method to keep backward compatibility: It removes the vehicle from purchase lists, but old games which are 'updated' can continue to use the vehicle. The backdraw is, of course, that you'll need to keep the vehicle around for as long as you want to keep compatibility.

#17 Updated by DJNekkid over 8 years ago

planetmaker wrote:

Just changing the climate availability of vehices has the same effect as leaving them out completely. And it has much less severe impact on the game, if you find people changing parameters during the game / after map creation.

Actually setting the climate availability to 'none' is also THE method to keep backward compatibility: It removes the vehicle from purchase lists, but old games which are 'updated' can continue to use the vehicle. The backdraw is, of course, that you'll need to keep the vehicle around for as long as you want to keep compatibility.

I know that its a 'good' method to keep backward compatability, and i've used it before (when a single vehicle changed VehicleID), but changeing parameters ingame does (afaik) not change a thing, but you might prove me otherwise?

#18 Updated by Purno over 8 years ago

Voyager1 wrote:

Another issue about this:
- all wagons available no matter what parameter is selected or... (?)

I guess specific wagons could be added to specific regions, though I guess most of them will end up being 'universal'.

#19 Updated by Voyager1 over 8 years ago

I'm not sure if Jake has planned it this way. In fact, most pax/mail wagons have an assigned region. Freight ones would be universal. OTOH, I would like to play with all of them regardless the region I choose (if that ever happens :-P).

Hmmm... I don't know... I'm really interested in hearing all of your thoughts...

#20 Updated by EmperorJake over 8 years ago

Actually, I intended that the American wagons would not be available in Europe, and vice versa. The rest of the world might use either or both.

#21 Updated by Voyager1 over 8 years ago

So if I want to play with american wagons, I should emigrate to the USA... OK. :-)))

Seriously now, regarding your suggestion, all wagons would be available when playing without parameters?

#22 Updated by Ammler over 8 years ago

DJNekkid wrote:

but changeing parameters ingame does (afaik) not change a thing, but you might prove me otherwise?

You really should do it once then ;-)

#23 Updated by Purno over 8 years ago

EmperorJake wrote:

Actually, I intended that the American wagons would not be available in Europe, and vice versa. The rest of the world might use either or both.

I guess for each type of wagon you should ask the question whether that type of wagon is specific for one (or more) regions, or universal. I doubt you can divide the wagons only between Europe and America. (I can't imagine the Asians, Africans or Australians don't have something unique).

For example, I've seen pictures of double-decked container wagons from America while I haven't seen those in Europe. But I wouldn't be surprised if they're used in Australia, which means that when you're playing with the Australian region, you'd still get those double-decked container wagons.

I don't know how hard this is code-wise, but I guess for each wagon you should set values like "America: Yep. Europe: Nope. Africa: Nope. Australia: Yep. Asia: Nope.".

Voyager1 wrote:

So if I want to play with american wagons, I should emigrate to the USA... OK. :-)))

Seriously now, regarding your suggestion, all wagons would be available when playing without parameters?

When you're not using parameters you got all trains in the set. That was the plan from the start wasn't it? :P
It just means that if you set a parameter that you only want to play with American trains, you also only get American wagons :P The regional parameter just applies to all types of vehicles, including MUs, metro, pax wagons and freight wagons.

Though I guess a lot of wagons will be universal, like the tanker and flatbed.

#24 Updated by Voyager1 over 8 years ago

Purno wrote:
It just means that if you set a parameter that you only want to play with American trains, you also only get American wagons

That raises the question of other continents. What wagons would you assign to lets say Africa? American types or European types? Or you're suggesting that each wagon has a yes/no parameter for each region?

#25 Updated by EmperorJake over 8 years ago

Generally, African countries used more European style wagons early on, having been colonised by Europe, and American style wagons later. The same applies for Australia, where all freight wagons today would fall under the "American" category, although more European styled ones were still being used in the 1950s

#26 Updated by Purno over 8 years ago

Voyager1 wrote:

Purno wrote:
It just means that if you set a parameter that you only want to play with American trains, you also only get American wagons

That raises the question of other continents. What wagons would you assign to lets say Africa?

African wagons, of course.

Or you're suggesting that each wagon has a yes/no parameter for each region?

Yep.

#27 Updated by Ammler over 8 years ago

maybe the whole thing should be done by a kind of better filter from openttd side, filter by newgrf and different types, maybe setable by a properity, that would rock ;-)

#28 Updated by Voyager1 over 8 years ago

Purno wrote:

African wagons, of course.

What "African" wagons? :-))

Ammler wrote:

maybe the whole thing should be done by a kind of better filter from openttd side

I've asked some devs about a thing like this but they basically said no-go. OK...

#29 Updated by DJNekkid over 8 years ago

Ammler wrote:

DJNekkid wrote:

but changeing parameters ingame does (afaik) not change a thing, but you might prove me otherwise?

You really should do it once then ;-)

But unless OpenTTD-1.1.0-RC3 is really old, nothing happened. I did:
Start a new game with only the 2cc trainset loaded. Checked the price of an engine
Opened up the newgrf setting, changed the purchase costs
Fast forwareded a few months.

No change on the purchase price.

#30 Updated by Ammler over 8 years ago

#31 Updated by Ammler over 8 years ago

Does it needs words?

#32 Updated by Voyager1 over 8 years ago

IIRC, new versions of OTTD don't allow any tampering with NewGRFs in-game. Anything that has been set when the game was created, remains set that way and you can't change it.

Therefore, changing parameters doesn't do anything. The parameters always remain as you've entered them on game creation.

#33 Updated by EmperorJake over 8 years ago

You can still change NewGRFs in game, but you have to be smart and responsible.

#34 Updated by Voyager1 over 8 years ago

AFAIK the only thing you can change is one NewGRF with another which has the same filename (i.e. 2cctrainset.grf has the same filename regardless nightly version). However, if any ID sequence is changed, you get a mess.

Parameters still don't get changed. AFAIK...

#35 Updated by EmperorJake over 8 years ago

No, you can still change parameters, add/remove newgrfs while in game, you have to change a setting in the config file, and be smart and responsible.

#36 Updated by Voyager1 over 8 years ago

OK, me are probably stupidish... :-) How do you do that? How do you change the cfg file?

#37 Updated by DJNekkid over 8 years ago

open "My Documents"\openttd\openttd.cfg in a texteditor (notepad will do), and search up something like "Newgrf_developer", and set that option to 'true'.

@Ammler:
Wanna give me steps to reproduce? As i assume that might have something to do with saveing, quitting and loading?

#38 Updated by Voyager1 over 8 years ago

Thanks DJ!

#39 Updated by Purno over 8 years ago

Now we have a lot of passenger wagons, some specifically based upon American, European or even Indian stuff, will we divide those under the regional parameters too?

#40 Updated by DJNekkid over 8 years ago

i do not see why not

#41 Updated by Voyager1 over 8 years ago

They MUST be divided like that. There are some specific for Americas, some specific for Europe, some universal... I.e. those "Indian Coaches" with people on roofs are definitely Asian...

#42 Updated by EmperorJake over 8 years ago

The regions they are supposed to be available in are specified in the spreadsheet.

Also available in: Atom PDF