Remove max value of 10 for StaticDetailLevel

Forum for ideas and new feature requests.
Post Reply
eolesen
Posts: 36
Joined: 28 Feb 2021, 02:39
Dave Nelson and I are looking to remove the constraint of 10 on the static detail level parameter.

We've already validated that ORTS can support values higher than 10 for this field, however TSRE reformats any SDL greater than 10 to the value of 10.

This is in WorldObj.cpp:

Code: Select all

int WorldObj::getCurrentDetailLevel(){
    if(staticDetailLevel >= 10)
        return 10;
    if(staticDetailLevel >= 0)
        return staticDetailLevel;
    else
        return getDefaultDetailLevel();
}

void WorldObj::setCustomDetailLevel(int val){
    if(val < 0) val = -1;
    if(val > 10) val = 10;
    staticDetailLevel = val;
    setModified();
}
If you change it to this, that would help support a change to the W file standard that Dave and I are looking to make.

Code: Select all

int WorldObj::getCurrentDetailLevel(){
    if(staticDetailLevel >= 0)
        return staticDetailLevel;
    else
        return getDefaultDetailLevel();
}

void WorldObj::setCustomDetailLevel(int val){
    if(val < 0) val = -1;
    staticDetailLevel = val;
    setModified();
}

User avatar
Goku
Site Admin
Posts: 355
Joined: 15 Jan 2019, 18:10
Location: Poland
Contact:
In next version you can define custom maximum detail level in route trk file:
TsreMaxStaticDetailLevel ( int_value )

eolesen
Posts: 36
Joined: 28 Feb 2021, 02:39
Any guess on when the next version might be available?

Dave Nelson
Posts: 19
Joined: 24 Dec 2019, 03:38
Open Rails now will allow and use values up to 99.

eolesen
Posts: 36
Joined: 28 Feb 2021, 02:39
That's great news...

Since there's no word when Goku will have the next build of the editor out, my route development will have to stay on hold for the time being.

Dave Nelson
Posts: 19
Joined: 24 Dec 2019, 03:38
Yeah... that or postpone implementing more than 10 values.

Have you settled on a new numbering scheme yet? I know I want the files in \global\shapes to all have the lowest numbers and that I want roads and track to have different numbers but I'm not sure a using only 0 and 1 are the right move (not that I can immediately think of a need for more).

I do know I want unique numbers for substituted files replacing roads and track. Same issue of how many. Two? Or do I assign a unique number for some subset of these substitute files -- different ballast types for instance.

Another series of numbers for interactives.

Another series for track ROW objects and road ROW objects, some low (e.g., berms), some high (e.g., street signs).

Buildings, again maybe more than one number.

etc., etc.,

tools, certainly more than one number. In OR they're suggesting we assign values of 50 or above to tools so they can set a default in options that will suppress them.

eolesen
Posts: 36
Joined: 28 Feb 2021, 02:39
I've been considering a couple different schemes... one is to continue iterating upward as I find need, but the bigger idea I'm toying with is taking a quasi-bitmask approach where the first digit and second digit have implied meaning e.g. 30-39 will have a third rail piece, 40-49 will have trolley wire, 50-59 will have catenary...

Post Reply