Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(balance): more vehicle repairs besides tires and solar panels require materials now #4293

Merged

Conversation

chaosvolt
Copy link
Member

Purpose of change

This finally implements a lil something I had on the backburner for a while: making more vehicle repairs have a material cost associated with them. Reasoning being:

  1. It's already consistent with the item forms of items needing materials to repair.
  2. Several vehicleparts like solar panels, tires, and the like already have a material cost to repair.
  3. Game-balance wise, once you have a welding rig and enough solar panels repairing your vehicle is 90% completely free. It's not much since so far all the material costs I had in mind are easy enough to get, but it will at least mean deathmobile mains have to actually leave their vehicle every so often if they're doing repairs a lot.

Describe the solution

  1. Defined a crafting requirements: vehicle_repair_electronics, for general material cost of generic electronic vehiclepart repairs. Adds a component cost of 1 scrap metal and 3 copper wire (used in place of steel_tiny to make it less metal-intensive for small parts). vehicle_repair_small_metal add vehicle_repair_small_wood meanwhile are workarounds for the inability to specify , used in the same way plastics and tire_repair called for as a way to cite single components in a vehicle repair that only really seems to support using.
  2. Reworked a couple unused tailoring-related crafting requirements for use in vehicle repairs.
  3. Set alternator repairs to use vehicle_repair_electronics, also downgraded any uses of welding_standard to soldering_standard. Bike alternators stay at merely using adhesive instead of welding or soldering.
  4. Added use of steel_tiny to rebar and spring plates.
  5. Added requirements of vehicle_repair_electronics and plastics to repair entries for lead-acid batteries, and downgraded welding_standard to soldering_standard for them.
  6. Added use of steel_tiny and wood_structural_small to relevant quarterpanels and boards, fabric_standard to cloth panels (also swapping use of adhesive for sewing_standard). Simple sheet metal boards/panels meanwhile use 2 vehicle_repair_small_metal to make their material cost lower than most all-metal parts.
  7. Added material costs to cargo items, swapping adhesive for sewing_standard in the case of cloth baskets, vehicle_repair_small_metal for the light baskets.
  8. Added use of steel_tiny to combustion engines, steel_standard and a bit more welding for turbine and steam engines.
  9. Made use of steel_tiny for door repairs.
  10. Made use of steel_tiny for most engineering part repairs, or vehicle_repair_small_metal in the case of kickstands.
  11. Added appropriate material costs to frame parts as well, typically steel_tiny for most, just scrap for foldable light feames, aluminum for regular light frames, wood_structural_small for wood frames, etc.
  12. Added in appropriate use of vehicle_repair_electronics for lighting vehicleparts, and swapping any cases of welding_standard for soldering_standard instead.
  13. Added use of steel_tiny to foot pedals and hand rims.
  14. Added use of plastics to mirror repair. Picked that instead of adding glass shards since for now it still uses adhesive instead of soldering or welding.
  15. Added use of vehicle_repair_electronics to all motor repairs.
  16. Added material costs to repairing rams. steel_tiny for most standard rams, steel_standard for composite rams, wood_structural_small for wooden rams, and alloy sheets for alloy rams. Also fixed chitin not being repairable when chitin plates are.
  17. Added use of steel_tiny to rotor repairs, additionally toning homemade gyro rotors down to using adhesive plus wood_structural_small in place of welding since the rotors are made of wood.
  18. Added use of steel_tiny for seat repairs, scrap in the case of saddles.
  19. Added appropriate use of steel_tiny, plastics, and wood_structural_small for vehicle tank repairs.
  20. Added use of steel_tiny plus copper wire (to not call for redundant scrap) for utility part repairs.
  21. Added appropriate uses of steel_tiny, wood_structural_small, vehicle_repair_electronics, scrap metal, splintered wood etc for unsorted parts in vehicle_parts.json. Also in the process fixed sails and handle paddles being 100% free to repair. I went ahead and added requirements to install/remove sails too, but kept hand paddles easy to put on and take off since logically the idea is they're just being slapped on top of the vehicle and declared a part. Also in the process downgraded vehicle controls, robot controls, and drive by wire controls from welding to soldering.
  22. Added material requirements to wheel hubs. Also in the process fixed casters and 10-inch tires still using old welding method.

Describe alternatives you've considered

  1. Rigging it so seats and saddles can be repaired solely by sewing and appropriate fabric instead of welding the underlying metal back together.
  2. Beefing more headlights up to needing soldering instead of adhesive.

Testing

  1. Checked affected files for syntax and lint errors.
  2. Load-tested in compiled test build.

So something delightfully fucking cursed I learned: vehicle repair interactions cannot actually use using and components at the same time without erroring and claiming that the latter counts as undefined JSON (when it treats it as defined if it's used WITHOUT using being in the same action). This is likely why we have cursed crafting requirements like tire_repair being just single rubber chunks, because its only vanilla usage has it promptly paired with the adhesive crafting requirement and therefore it has to be added by using instead of components.

Additional context

DDA if I recall has done a very limited take on this concept via welding repairs costing metal, but they also use it to force the player to use welding rods plus they basically only seem to have expanded it to metal repairs, other stuff like wood is still stiched back together with just glue.

Checklist

@github-actions github-actions bot added the JSON related to game datas in JSON format. label Mar 4, 2024
Copy link
Contributor

autofix-ci bot commented Mar 4, 2024

The Autofix app has found code style violation and automatically formatted this Pull Request.

I locally edit my commits (e.g: git, github desktop)

Please choose following options:

I'd like to accept the automated commit
  1. Run git pull. this will merge the automated commit into your local copy of the PR branch.
  2. Continue working.
I do not want the automated commit
  1. Format your code locally, then commit it.
  2. Run git push --force to force push your branch. This will overwrite the automated commit on remote with your local one.
  3. Continue working.

If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT.

This PR is complete and I don't want to edit it anymore

It's safe to ignore this message.

I edit this PR through web UI

You can ignore this message and continue working.

I have no idea what this message is talking about

You can ignore this message and continue working. If you find any problem, please ask for help and ping @scarf005.

@github-actions github-actions bot added the tests changes related to tests label Mar 4, 2024
Copy link
Contributor

@Lamandus Lamandus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have my blessing

@scarf005
Copy link
Member

scarf005 commented Mar 6, 2024

been three days and no objection, looks like good to merge

@scarf005 scarf005 merged commit 02113e7 into cataclysmbnteam:main Mar 6, 2024
12 checks passed
@chaosvolt chaosvolt deleted the vehicle-repair-material-need branch March 6, 2024 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format. tests changes related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants