Ok, thanks guys.
I was able to get it to select loadouts from obsolete ships (Loadout 1 from a basic scout can be selected on an adv scout, with upgraded tech etc) but I wasn't able to do it the other way (saving a loadout on an adv scout couldn't be selected on a basic scout in the next game)...
I think it's todo with the succesor fields not being populated at this stage because the basic scout is not yet obsolete on the client...
So I agree with you on this, it's best to keep it simple and consistent. All ship IDs are treated seperately, so you can have different configurations for slot 1 for basic/adv/hvy scouts...
It isn't ideal for the initial setup, but it shouldn't be too bad.
TurkeyXIII wrote:QUOTE (TurkeyXIII @ Oct 10 2009, 08:45 AM) Any chance of fixing that bug while you're in there?
Yes. I thought this was already fixed, but I believe it was missed in the method I am calling. There are 2 methods that deal with this scenerio: a part is in a cached loadout, but it is no longer Buyable. RestoreLoadout (entering an initial station and docking a lifepod) and ReplaceLoadout
RestoreLoadout looked good, but ReplaceLoadout seems to have had a simple error:
Code: Select all
IpartTypeIGC* ppt;
if (pstation->CanBuy(cpl.ppt))
{
ppt = (IpartTypeIGC*)(pstation->GetSuccessor(cpl.ppt));
}
else
ppt = pstation->GetSimilarPart(ppt);
Where ppt wasn't defined in this case. Changing it to cpl.ppt seemed to fix it in my tests...
Flaps, if the community wants, it will be very easy to remove the save and load methods, so this is just in game memory... Personally, I wouldn't want to have to reset up a probing loadout every game if I didn't have to...
I've been running through these tests, and I think everything looks ok:
Saved loadouts from different ships in the same number, closed and joined another game and was able to load them Entered a game with different factions, couldn't load the previous loadouts. Saved loadouts for a different faction, loaded them fine and made sure the previous faction loadouts where unaffected Saved loadouts and loaded them from all numbers (0-9) Saved loadouts for a basic scout, saved loadouts for an adv scout, closed and rejoined and we can still load the basic scout loadout Picked up and mounted unbuyable tech (Gat 2), docked it, saved the loadout while it is still mounted on my ship, restored the default, then tried to load it again. A similar, buyable part (Gat 1) is loaded Repeated this test for Belters, DF 2 is saved and avaliable in the loadout Saved a loadout for a item that costs money (sanc) confirmed that it is reloaded correctly, and the user is prompted to buy the item if they dont have enough money Got tech up, saved a loadout for a basic belter fig with Mini 2, rejoined another game and a similar buyable part is mounted (Mini 1) Default loadout functionality still works, and when switching between different ships on the loadout screen, the previous loadout is still being cached and restored. Started a game on a different core and confirmed that the previous loadouts are not being loaded, and a new file is saved. renamed the first loadout file (cc_02b) so it would be loaded by the other core (cc_05b) "loadouts_cc_05b.dat" Previous loadouts loaded! It will check for valid parts so this should be ok?
I know this wont make it into R5, I understand it's probably too late, but that's ok. I'm just happy to learn a bit about the game and add something.
See you in space!