magico13

[1.4.1] ScrapYard - The Common Part Inventory - 1.1.0.107 (2018-03-18)

Recommended Posts

Just now, magico13 said:

Were any parts replaced with their inventory versions? You can check by right clicking them and looking for "Inventoried: true" rather than "Inventoried: false".

Did not even think to check that, I have seen that on craft before, though.

Share this post


Link to post
Share on other sites
9 minutes ago, vardicd said:

Did not even think to check that, I have seen that on craft before, though.

Eventually I'll replace all that debug info with a single line that's a summed up version (since the full ID isn't needed by 99% of people unless debugging).

Share this post


Link to post
Share on other sites
On 6/13/2017 at 11:46 PM, Errol said:

I like being able to apply inventory only at the at the end of a build, as with all my mods I already run at about 30fps max.

Man, I wish I ran at 30fps. My laptop was top of the line... Five years ago when I first bought it.

Share this post


Link to post
Share on other sites
1 minute ago, theonegalen said:

Man, I wish I ran at 30fps. My laptop was top of the line... Five years ago when I first bought it.

I can run Overwatch at 4K and 60fps without any problems, but KSP will only run at 40 (but that's with Scatterer). I should maybe set up an "average" computer to test performance with at some point since I don't notice performance issues as much on my desktop :wink: 

Share this post


Link to post
Share on other sites

I actually have KerboKatz FPS limiter set for 24fps, because I'm a film snob and thought that was sufficiently cheekier of a number to pick then 30. I tank down to 6 fps for up to a full second for garbage collection stutters though, can't wait for memgraph to work in 1.3 again. I don't mind lower fps, but the stutters make it really difficult to do precise manoeuvring, because you input doesn't always go through the same way on keyboard. Really need to get a proper flight stick one of these days...

Edited by Errol

Share this post


Link to post
Share on other sites
Just now, magico13 said:

I can run Overwatch at 4K and 60fps without any problems, but KSP will only run at 40 (but that's with Scatterer). I should maybe set up an "average" computer to test performance with at some point since I don't notice performance issues as much on my desktop :wink: 

Oh man, with Scatterer, it is literally a slideshow. I get about 4 frames.

I am currently saving up money to build my own serious desktop, but its not easy in a basic retail job. :-/

Share this post


Link to post
Share on other sites
3 minutes ago, Errol said:

I actually have KerboKatz FPS limiter set for 24fps, because I'm a film snob and thought that was sufficiently cheekier of a number to pick then 30. I tank down to 6 fps for up to a full second for garbage collection stutters though, can't wait for memgraph to work in 1.3 again. I don't mind lower fps, but the stutters make it really difficult to do precise manoeuvring, because you input doesn't always go through the same way on keyboard. Really need to get a proper flight stick one of these days...

30+Vsync is alright for gaming, since your monitor is probably at 60hz. Then you get a full frame every second refresh with no tearing. Some people are really against vsync but I personally prefer slightly lower framerates with correct images. Though FreeSync / GSync are really the best solutions for that.

1 minute ago, theonegalen said:

Oh man, with Scatterer, it is literally a slideshow. I get about 4 frames.

I am currently saving up money to build my own serious desktop, but its not easy in a basic retail job. :-/

I built this rig after a summer internship and have progressively updated it through the years. The first incarnation of it was a few months after I started playing KSP but about a month before I started modding, so November/December of 2013. It's got an i7-4790k (gotta get that nice single core performance for KSP), GTX 1070, and 32 gigs of RAM (I bought 16 more when I was going to need to run some big simulations for work a year ago). The motherboard was replaced due to it failing, and the CPU and GPU were swapped out at different points (from an i5-4690k and a GTX 770). You can build something pretty capable for around $750 these days if you've got peripherals. A 1060 is plenty capable and even i3s are capable of a lot (but an i5 is a good middle-ground).

Share this post


Link to post
Share on other sites

I always play with vsync on, tearing hurts my eyes/brain. I don't think that my computer was able to  even really hold 30 FPS consistently in flight scene, so that also led me to picking 24 for my limiter. 

Also; I haven't tried scatterer in 1.3 yet. While 1.3 is smoother then anything before it, for sure, I'm still a little apprehensive about if the drop in FPS will be worth it...

Edited by Errol
spelling; b

Share this post


Link to post
Share on other sites

@magico13 Just as a follow up to my scrapping and rebuilding issue earlier, continued testing through the day have left me unable to duplicate the issue, so I'm going to call it a random KSP being KSP moment. everything seems to be working as intended. Thanks for your time, sorry to report what seems to have been a null-issue.

Share this post


Link to post
Share on other sites
14 minutes ago, vardicd said:

@magico13 Just as a follow up to my scrapping and rebuilding issue earlier, continued testing through the day have left me unable to duplicate the issue, so I'm going to call it a random KSP being KSP moment. everything seems to be working as intended. Thanks for your time, sorry to report what seems to have been a null-issue.

Let me know if you see it again and try to send the logs if you do. I wouldn't be surprised if it did mess up but hopefully it'd be something I could fix.

Share this post


Link to post
Share on other sites

I'm currently in the process of migrating my career game to 1.2.2 from 1.1.3, and I seem to come to a halt.

As we probably know KCT/ScrapYard doesn't migrate PartTracker nor PartTracker section.

But I was wondering if it would be possible to migrate it somehow (at least partially). Anyone would have an idea how to do it?

I do see that two identical crew pods, with different content regarding RealFuels - are considered two separate parts... thus I'm certainly having a problem here...

Share this post


Link to post
Share on other sites

You can migrate the tracker, but not the inventory. It might be easiest if you just send me your save file from 1.1.3. The tracker really just uses the name like KCT's tracker did, but the inventory is way different.

Share this post


Link to post
Share on other sites
2 hours ago, magico13 said:

You can migrate the tracker, but not the inventory. It might be easiest if you just send me your save file from 1.1.3. The tracker really just uses the name like KCT's tracker did, but the inventory is way different.

Save file's quite large. I'm only interested in tracker (inventory is less important)

I can see fragments like:

TrackedItem
			{
				buildsTotal = 4
				buildsNew = 4
				buildsInventoried = 0
				usesTotal = 4
				usesNew = 4
				usesInventoried = 0
				ScrapYard.InventoryPart
				{
					_name = liquidEngine2
					_dryCost = 381.429016
					_id = 18c4ef17-5d23-4058-a1eb-daef322951db
					_timesRecovered = 0
					_inventoried = False
				}
			}

my questions would be:

- I understand from forum that dry cost is tracked to 1 credit.
- is _id necessary here? (to distinguish between different tank types, ie. Aerozine50/NTO RealFuel procedural tank vs. MMH/NTO RF PT ?)
- isn't "timesRecovered" & "inventoried" redundant due to ScrapYard.InventoryPart fragments?

Share this post


Link to post
Share on other sites
16 minutes ago, Arivald Ha'gel said:

- I understand from forum that dry cost is tracked to 1 credit.
- is _id necessary here? (to distinguish between different tank types, ie. Aerozine50/NTO RealFuel procedural tank vs. MMH/NTO RF PT ?)
- isn't "timesRecovered" & "inventoried" redundant due to ScrapYard.InventoryPart fragments?

1. This is true, but isn't important for the tracker.

2. Every instance of every part has a unique ID. The tracker is indexed by a full InventoryPart and so all of the InventoryPart's fields are required or else it will break the game while loading, _id is one of those fields. Those specific examples are actually individualized by their stored MODULEs.

3. No, every part can be turned into an InventoryPart, even if it hasn't ever been part of an Inventory. That's actually how comparisons are made, by turning every part on a vessel into an InventoryPart and then calling IsSameAs. The extra fun that resulted in Inventoried having to exist is that you can put a part in the inventory without recovering it. For example, KCT does this if you build a vessel and then scrap it without ever launching it. Other mods (or ScrapYard itself) may come out that allow you to purchase parts ahead of time in bulk for reduced per-unit costs, without counting as a recovery.

 

I only need the tracker section from KCT_Data to convert things, but you're free to attempt it as well. You'd have to take the count from the old save and put it minimally into buildsTotal and usesTotal. You can split the usesTotal into usesNew and usesInventoried however you like (those must add up to usesTotal). Splitting buildTotal into buildsNew and buildsInventoried is fun because those don't have to add to buildsTotal (they just can't exceed it), since a build could have used a new instance of a part and an inventoried one. The actual counts don't ultimately matter that much.

As for the ScrapYard.InventoryPart, copy an existing one but change the _dryCost to 0, keep the _id the same, _timesRecovered as 0 and _inventoried as False. Only the _name matters and it just has to be the actual name of the part (if the name in the tracker section of KCT_Data mentions anything about size,like "liquidEngine2,2.5" then don't keep the size part, just the base name). The reason the rest of the stuff doesn't matter is that the tracker is (by default) only set to compare by name, but it is capable of comparing by any amount of strictness (including all the way up to ID) if desired (by the modder using it).

Share this post


Link to post
Share on other sites
On 17/06/2017 at 2:23 AM, theonegalen said:

Oh man, with Scatterer, it is literally a slideshow. I get about 4 frames.

I am currently saving up money to build my own serious desktop, but its not easy in a basic retail job. :-/

Once it's updated, have a look at:

 

Share this post


Link to post
Share on other sites
4 hours ago, CSE said:

Once it's updated, have a look at:

 

Yep, that's the EVE config,i use, when I use one at all. :)

Share this post


Link to post
Share on other sites

Is there a way to prevent parts going into inventory on recover?

EDIT: I realize that sounds insane. But I want to hijack this mod to implement a manufacturing line system, so the way parts will appear in inventory is when you build them on your lines. And in real life, most things aren't recoverable (Falcon 9 excepted--even STS took incredible amounts of refurbishment). Well, ok: Ideally is there a way to specify per-part whether that part can be recovered?

Share this post


Link to post
Share on other sites

@NathanKell it's not actually that crazy, @severedsolo does something similar when a part has reached the end of its useful life. Right now you could take advantage of the forbidden modules and either pop a new module on the part so that it matches a forbidden one, or change a flag on an existing module and write a matching forbidden template.

I should probably also just add a flag on ModuleSYPartTracker so that people don't have to implement workarounds, but can just call a method on a part to mark it to not be recovered. I'm away from a computer for a week, so for now you're stuck with the forbidden module/template approach.

 

Hmm, there's also some merit to just completely disabling ScrapYard's event listened for the recovery event if a mod wanted to implement an alternative processor for that. I may look into that as well.

Edited by magico13

Share this post


Link to post
Share on other sites

@magico13 no worries, haven't even started coding yet. Mostly just happy that there's something that does, like 80+% of the work for me. :)

Share this post


Link to post
Share on other sites
9 hours ago, NathanKell said:

@magico13 no worries, haven't even started coding yet. Mostly just happy that there's something that does, like 80+% of the work for me. :)

All of the module templates are Module Manager-able so that should make things even simpler.

Share this post


Link to post
Share on other sites

Hey @magico13, I have an idea for a mod that would build off of Scrapyard and also provide a project for me to learn some coding. 

The mod would apply a deviation to the stats of individual parts, such as max temp/pressure. Quality control (reduced deviation) would be improved with facility upgrades.

 

Does this sound like it would work with Scrapyard? Also, does it sound like a reasonable difficulty level for a beginner to attempt?

 

Share this post


Link to post
Share on other sites
On 7/4/2017 at 2:57 PM, Nightside said:

Hey @magico13, I have an idea for a mod that would build off of Scrapyard and also provide a project for me to learn some coding. 

The mod would apply a deviation to the stats of individual parts, such as max temp/pressure. Quality control (reduced deviation) would be improved with facility upgrades.

Does this sound like it would work with Scrapyard? Also, does it sound like a reasonable difficulty level for a beginner to attempt?

I haven't messed with the max temp or other attributes like that on parts, so I'm not sure how simple they are to interact with, but I don't expect it to be too hard. You might be able to do it pluginless with , but it'd probably be way easier with a plugin, but it doesn't sound like it'd require anything too fancy so it should be alright to learn through. I'd maybe create a new module, read your data off the module, then apply it to the parts. If you wanted it to work with ScrapYard, you'd just create a new module template so that your module gets loaded. Then when the part gets instantiated you'd pull your data off your module and reapply it to the part. Nothing really ScrapYard dependent actually.

Share this post


Link to post
Share on other sites

Uhm... I just wanted to make sure I understand it all correctly. ScrapYard doesn't seem to do anything in my game right now. I'm running KSP 1.2, KCT 1.3.4 and ScrapYard build 51 (I think). Is that the intended behavior due to those being beta, or am I doing something wrong? Is the KCT 1.3.4 a normal release and as such it does not utilize ScrapYard? Or is this the case of me doing something wrong?

Share this post


Link to post
Share on other sites
3 hours ago, AlekM said:

Uhm... I just wanted to make sure I understand it all correctly. ScrapYard doesn't seem to do anything in my game right now. I'm running KSP 1.2, KCT 1.3.4 and ScrapYard build 51 (I think). Is that the intended behavior due to those being beta, or am I doing something wrong? Is the KCT 1.3.4 a normal release and as such it does not utilize ScrapYard? Or is this the case of me doing something wrong?

KCT 1.3.4 is for KSP 1.1.3 and was before ScrapYard existed. If you're on 1.2.2 then you should be running KCT 1.3.5.7 and you may want ScrapYard build 55 (but 51 should be fine). Updating KCT to the latest should allow them to work together, but remember that with ScrapYard you have to manually apply the inventory. It's not automatic like it was when the inventory was only in KCT.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.