Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Gredfe

#1
Ideas / Re: Your Cheapest Ideas
November 20, 2015, 10:36:11 AM
My idea for a product drop off radius is detailed in https://ludeon.com/forums/index.php?topic=16897.0

I just thought I'd repost it here in case it gets missed.
#2
We have an ingredient pick up radius. I would like a product drop off radius.

For example, say you have multiple high priority stockpiles for meals around the map. A person cooking at the stove will create the meal and personally carry it all the way across the map to one of the stockpiles.

However, with a product drop off radius, they can take it to a nearby low priority stockpile, get back to cooking quickly, then all your haulers can carry the meals to where they need to go.

The best part is the minimal amount of code changes involved:

In Bill.cs, Dialog_BillConfig.cs, BillUtility.cs, etc. (Just grep "ingredientSearchRadius" across the project)
> Copy the code for "IngredientSearchRadius", replacing it with "ProductDropOffRadius"

Then the main processing happens in StoreUtility.cs:
> Add an optional parameter ", float productDropOffRadius = 999f" at the end of the method signature for "TryFindBestBetterStoreCellFor".
> Change the "if (lengthHorizontalSquared <= num)" line to "if (lengthHorizontalSquared <= productDropOffRadius * productDropOffRadius && lengthHorizontalSquared <= num)"

Finally, in Toils_Recipe.cs
> Add the optional parameter ", curJob.bill.productDropOffRadius" to the "StoreUtility.TryFindBestBetterStoreCellFor" function call.

I think that's all? I got all the way through creating this as a "mod" before realising you can't actually change core game files.