equivalent_tech_level & <key>techlevel</key>

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

equivalent_tech_level & <key>techlevel</key>

Post by Lestradae »

Hi,

the commands ...

Code: Select all

       <key>hasShipyard</key>
                <true/>
                <key>equivalent_tech_level</key>
                <integer>3</integer>
... for the shipdata.plist and ...

Code: Select all

       <key>techlevel</key>
                <integer>6</integer>
... for the shipyard.plist still don`t work as intended under Oolite 1.71 under Vista. :(

The former doesn`t do anything (shipyard still populated the same as in the main station with main TL), and the latter still means "ship available from this TL+2"; in the example, 8, and not as the wiki would claim, 7). :?

Could someone please look into that?

Thanks in advance,

L
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

I think you should be a little more precise in the description:

equivalent_tech_level does work as intended, setting the techlevel of the station involved to the correct value, thereby influencing the availability of equipment on that station.

However, it seems that equivalent_tech_level does not influence the availability of ships on the shipyard of the station involved.

So your request is that the shipyard on a scripted station (or carrier) shall be made dependent on the equivalent_tech_level-key as well (which it isn't now and never was before).

As I think it makes sense, I second this request.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

.

Post by Lestradae »

I think you should be a little more precise in the description: equivalent_tech_level does work as intended, setting the techlevel of the station involved to the correct value, thereby influencing the availability of equipment on that station. However, it seems that equivalent_tech_level does not influence the availability of ships on the shipyard of the station involved.
Yes, exactly, you`re right.
So your request is that the shipyard on a scripted station (or carrier) shall be made dependent on the equivalent_tech_level-key as well (which it isn't now and never was before).
That too. Isn`t there a Scripting Requests thread? Perhaps I should copy & paste this over there ...
As I think it makes sense, I second this request.
Then we are two. Let`s look if someone from the core programmers would have a look ...

Strange, because Ahruman said concerning exactly that and another request ...

https://bb.oolite.space/viewtopic.php?t=4485

... specifically ...
I suggest you try again in a couple of days’ time. ;-)
... which I took as meaning that the request had already been built in.

Also, it says in the upgrade list to 1.71 ...
Shipyard techlevel bugfix. It now works as described in the wiki (i.e. techlevel=5 will allow ships to appear for sale in systems with technological level 6)
This is not true. All is as it was. The bug is still there, techlevel=5+ will still mean TL 7+ in the game and not 6.

Will notify the programmers of this thread.

Greetings :)

L
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

I'm quite confused, it seems to work here: if a system I witchspace into is level 6, ships with techlevel=5 will be available.

Changing the system techlevel after jumping in will not recalculate the second hand ships market, nor having a specific station set up with equivalent_tech_level.

To repeat this point: the second hand ships market is calculated only once per system, when you jump in. That's it.

Sorry if it's not what you were expecting.

Kaks.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Lestradae wrote:
So your request is that the shipyard on a scripted station (or carrier) shall be made dependent on the equivalent_tech_level-key as well (which it isn't now and never was before).
That too. Isn`t there a Scripting Requests thread? Perhaps I should copy & paste this over there ...
No. This has nothing to do with scripting.
Strange, because Ahruman said concerning exactly that and another request ...

https://bb.oolite.space/viewtopic.php?t=4485

... specifically ...
I suggest you try again in a couple of days’ time. ;-)
To clarify: you pointed out that a bug report said an issue was resolved. The issue covered by that bug report was resolved for 1.71, therefore waiting for the release before questioning whether it was resolved was the thing to do. As it turned out, the bug you were referring to had nothing to do with the problem you had.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

.

Post by Lestradae »

if a system I witchspace into is level 6, ships with techlevel=5 will be available
That`s strange. I have Vista, 1.71, on my system, and: Nope. If a system I witchspace into is level 6, ships with techlevel=4 will be available ... none ever with tl=5.

Still the same here.
Changing the system techlevel after jumping in will not recalculate the second hand ships market, nor having a specific station set up with equivalent_tech_level.
Aha! OK, me blind again perhaps :oops:

So, at least that bug (in my brain :lol: ) was squashed ... on to work on the alternate shipyard.

8)

L
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

!!!

Post by Lestradae »

it seems to work here: if a system I witchspace into is level 6, ships with techlevel=5 will be available
Hold your horses ... you are not talking about an experiment with the Realistic Shipyards version 1.07?

Because RSs 1.07 has a workaround for the problem that will STILL place ships into the correct tech levels ... :?

Just asking to be sure :?:

L
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

I'm talking about my own test oxp, that has many otherwise identical adder ships called adderTech1, adderTech2 etc....
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6628
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

In Universe.m, line 7065:

Code: Select all

double chance = 1.0 - pow(1.0 - [ship_info doubleForKey:KEY_CHANCE], techlevel - ship_techlevel);
If a system's tech level is 8 (i.e. internally 7) and the ship's techlevel key in shipyard.plist is also 7 (which we want it to mean that ship is available on planet tech levels of 8 (external, 7 internal) and above), then the line on top becomes
double chance = 1.0 - pow(1.0 - [ship_info doubleForKey:KEY_CHANCE], 0).

See the problem? This will result to a number being raised to the power of 0 (always 1), then being subtracted from 1.0. Result is that chance of the ship appearing will be 0.0. I believe Lestradae is right. We may need to do something like

Code: Select all

double chance = 1.0 - pow(1.0 - [ship_info doubleForKey:KEY_CHANCE], techlevel - ship_techlevel + 1);
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

!

Post by Lestradae »

Hye @another Commander,
This will result to a number being raised to the power of 0 (always 1), then being subtracted from 1.0. Result is that chance of the ship appearing will be 0.0.
Looks just like it! Now repairs should be possible ... I`ll hold off my release.

Thanks for spotting! :)

L

PS :!: And, if hyperspacing into a system and going to an alternate station with an alternate tech level, now the shipyard will ALSO have ships of the newly defined alternate tech level ... PLUS some ships from the main tech level of the system. Either some variable is again carried over which shouldn`t or some double process is at work here. :idea:
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Intriguing, I'll now have to figure out why I could see my tech6 ship in a tech 6 system...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6628
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Wild guess: Maybe you were looking up techlevel in the debug console? This would report techlevel 6, but in reality the displayed techlevel for the system would be 7 (i.e. in the system info screen). I know that it's trivial and probably you had already taken this into account, but then again, I had the NavArray set to techlevel 8 instead of the intended 7 for the last two versions of the game just because of a similar oversight.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Hmmm, I don't rightly know. It's possible, I suppose.

Hmmm, I could also have targeted a tech 6 system while still in a tech 7 one, gone to the shipyard, then looked at the wrong system data...

I know, I'll probably end up blaming alzheimer...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

@Kaks

Post by Lestradae »

Hi Kaks,

I`m also a bit intrigued, but in the other direction.

I tested the conjunction between programmed tech level & in-game tech level many, perhaps too many times :( ... and I never, ever got a ship programmed to appear from a certain TL on on that TL, ALWAYS only one step further up.

So another_commander`s line of code fits my perception.

Don`t know what you saw though :P Space weirdness? :lol:

Have fun (with alzheimer`s you can experience everything as if new, even if you did it a hundred times before, so enjoy :twisted: )

L

PS: Just fun, obviously 8)
Post Reply