Page 4 of 4

Posted: Tue May 13, 2008 8:59 am
by Selezen
Cat from Red Dwarf wrote:
I think everybody's right. Except me. So just forget I said anything.
I want to ask a question, but I don't want to be thought of as trying to provoke another argument. It's mainly directed at Ahruman, but is related to Realistic Shipyards.

Let's say that someone has Oolite installed with a bunch of OXPs. They then install RS which contains the updated RS versions of those OXPs along with their textures and model data. Will Oolite load in two copies of that OXP into memory along with the texture and model data, or will the first version literally be replaced in memory by the RS memory?

I'm not sure on Oolite's memory model, so I may be barking up the wrong tree if Oolite only loads a model and texture when it is actually being used. In that case, if on hyperspacing into a system and the ships present are loaded up, will the game load both models as outlined above or, again, will the original version be replaced in memory by the RS version?

Posted: Tue May 13, 2008 9:44 am
by JensAyton
The game is only ever aware of one item with a given identifier. If there are multiple shipdata.plist entries with the same name, the game will only ever see one. If there are multiple models with the same name, the game will only ever see one. If there are multiple textures with the same name, the game will only ever see one. If there are multiple character.plist entries with the same name, the game will only ever see one. If there are multiple scripts using the same mission variable name, there will only ever be one variable of that name. If there are multiple JavaScript scripts with the same name, the game will only ever see one.

This is why I keep grumbling about unique names. :-)

Posted: Tue May 13, 2008 10:54 am
by Kaks
Unfortunately for Leastradae, this means that whenever any ship OXP is updated, RS needs to be updated too, otherwise the player will get the old version of the ship: if you change your ship's ai and the new feature works in your system, it won't necessarily work with RS, since RS will overwrite your new ai with an older version. The only way around this problem would be to constantly change ship and ai (and model & texture etc...) names, so they won't be the same as the one inside RS.

This way you'll get two 'near twins': the new, hopefully bug-free one inside your updated oxp, and the older version still inside RS.

Once Lestradae updates RS with the new data, you'll be back to just one ship. Thanks to the way Oolite loads OXPs, the one ship in question will be the one inside RS. To further update the ships inside your oxp, you'll have to change all the ships, model etc names again, then Lestradae will have to update RS once again, etc, etc...


If everyone suddenly changes their ship, model, texture, ai etc names, and RS isn't updated to reflect this, you would have oolite trying to juggle twice as many things in memory, which would definitely slow it down.

One possible way to avoid all this would be to closely co-ordinate the launch of an oxp update with Lestradae, so that your oxps can be kept in sync.

Hmmm, I'm suddenly spotting a strong resemblance between Ultimate RS & the Borg Collective. I better stop here before I start to sound really silly! :)

Posted: Tue May 13, 2008 11:18 am
by Selezen
This is the concern I had with the original release of RS, although it's a bit of a double edged sword.

As long as the RS OXP data and the original author's OXP data are the same, then there's no issue. If the author updates and OXP and releases it, and an RS user has that original OXP installed, then depending on what has been modified there will either be two versions of the same OXP in the game or the new release will be lost. The big problem comes if the OXP author changes some of the naming conventions but not all. For example in my Eagle 2 OXP, if the special edition black Eagle is given a new ship identifier (ship_name?) in shipdata.plist then it will become a duplicate, with the original black Eagle still being present from RS.

Unless, of course, Lestradae is notified of all the changes. Which brings us back to the One OXP to Rule Them All joke.

:?

Posted: Tue May 13, 2008 1:23 pm
by Scoopy
Maybe I'm being simple but if RS was re-named to get loaded first then at least new versions of ships would work as intended by the author until such time as RS was updated. At this point the player need only remove the ship OXP.

Posted: Tue May 13, 2008 3:46 pm
by JensAyton
Kaks wrote:
Unfortunately for Leastradae, this means that whenever any ship OXP is updated, RS needs to be updated too, otherwise the player will get the old version of the ship: if you change your ship's ai and the new feature works in your system, it won't necessarily work with RS, since RS will overwrite your new ai with an older version. The only way around this problem would be to constantly change ship and ai (and model & texture etc...) names, so they won't be the same as the one inside RS.
I’m sure I’ve mentioned at least three times that this problem has been solved for 1.72…

Posted: Tue May 13, 2008 6:41 pm
by Kaks
Sorry, I thought Lestradae would use the upcoming overrides just for the 'minimalist RS' version, while keeping the ultimate RS more or less as it is now.

Posted: Tue May 13, 2008 9:37 pm
by JensAyton
Well, obviously I can’t speak for Lestradae. I just know what the right way of doing it will be in 1.72. :-)

...

Posted: Wed May 14, 2008 4:30 am
by Lestradae
I just know what the right way of doing it will be in 1.72. :-)
And when 1.72 is out and I also know the right way of doing it, I will!

There will surely be a way of achieving this (upgraded ship-oxps + RS) with the 3.02 (the "ultimate" version), too.

Perhaps it is relevant information that, to the best of my knowledge, the only ship oxp of the 85 which I merged that has been worked on since I started the whole oxp (Beginning march or so?) is the Dream Team, one in two months, and they restarted because Selezen got inspired to do something about it again after seeing that some of his older works had been merged & resurrected in RS ...

It probably won`t be such a frequent occurence, and in the future, there will be the override.plists which will solve potential conflicts.