... 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).
I think you should be a little more precise in the description:
equivalent_tech_leveldoes 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_leveldoes 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).
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 ...
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.
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.
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 ...
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.
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
So, at least that bug (in my brain ) was squashed ... on to work on the alternate shipyard.
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
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.
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.
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 Space weirdness?
Have fun (with alzheimer`s you can experience everything as if new, even if you did it a hundred times before, so enjoy )