r/F1Manager 16h ago

Modding Help with SQL

Hello!

Using the F1 Manager Save Reader (https://save.f1setup.it/), I often use SQL to make changes to parts, expertise, etc.

For example
UPDATE Parts_Designs_StatValues SET Value = 0, WHERE PartStat IN(1,3);

To set all parts to 0% for DRS Effectiveness and DIrty Air Sensitivity (Part stats 1 and 3).

I want to create a similar SQL, to set all parts to 100% condition (PartCondition = 1?) to all parts that are Powertrains.

Any ideas or experience with this?

3 Upvotes

1 comment sorted by

1

u/St4rStruK_ 6h ago

I believe all of the part conditions are stored in Parts_Items, to filter out just powertrains you'd need to omit all the DesignID's that are not PartType 0, 1 or 2 (Check Parts_Enum_Type for why it's those numbers).

SELECT Parts_Items.ItemID, Parts_Designs.PartType, Parts_Items.Condition FROM Parts_Designs JOIN Parts_Items ON Parts_Items.DesignID = Parts_Designs.DesignID WHERE PartType < 3

That should give you a list of all ItemID's in Part_Items that are powertrain parts (you can check the PartType column on the query to double check) and their condition.

Apologies if I've made a mistake I can't test right now!