Page 1 of 1

Remove max value of 10 for StaticDetailLevel

Posted: 10 Mar 2021, 14:37
by eolesen
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();
}

Re: Remove max value of 10 for StaticDetailLevel

Posted: 10 Mar 2021, 14:56
by Goku
In next version you can define custom maximum detail level in route trk file:
TsreMaxStaticDetailLevel ( int_value )

Re: Remove max value of 10 for StaticDetailLevel

Posted: 29 Apr 2021, 06:11
by eolesen
Any guess on when the next version might be available?

Re: Remove max value of 10 for StaticDetailLevel

Posted: 05 Sep 2021, 17:28
by Dave Nelson
Open Rails now will allow and use values up to 99.

Re: Remove max value of 10 for StaticDetailLevel

Posted: 06 Sep 2021, 03:51
by eolesen
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.

Re: Remove max value of 10 for StaticDetailLevel

Posted: 06 Sep 2021, 18:14
by Dave Nelson
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.

Re: Remove max value of 10 for StaticDetailLevel

Posted: 09 Sep 2021, 13:58
by eolesen
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...