zymex22 / Project-RimFactory-Revived

Project RimFactory Revived
MIT License
46 stars 34 forks source link

Advanced IO Design Limitation #706

Open ComputationalPotato opened 1 year ago

ComputationalPotato commented 1 year ago

Describe the bug

When getting resources for building, pawns will prioritize items on the ground over an Advanced IO port that is connected to a DSU that has pawn access enabled and contains the required resources, even if the Advanced IO port is right next to them while the items on the ground are very far away.(note: only occurs when the item on the ground is closer than the DSU building) To Reproduce Reproducibility: yes Steps to reproduce the behavior:

  1. launch game with just PRF and harmony
  2. click dev quicktest(needs debug mode on)
  3. build DSU in the top right of the map and supply it with power
  4. wall off the bottom right corner of the map with a maze/killbox so walking in there takes forever (godmode is needed so that the walls can reach the edges of the map)
  5. build an advanced IO port in the bot-right corner. set item source to the DSU you made. connect it to power.
  6. have your pawns haul steel into the DSU. it should have a few hundred. make sure that all steel on the ground is in the DSU or forbidden
  7. move one pawn into the bottom right corner, near the advanced IO port. the pawn should be capable of constructing and hauling and be assigned to them in the work tab. make sure other pawns don't interfere. keep pawn drafted when not using them.
  8. turn off godmode and build a steel simple research table. the blueprint should ask for 100 steel. do not actually build it, just place the blueprint.
  9. pause. undraft pawn. tell pawn to prioritize building the research table. unpause then repause. the advanced IO port should have a stack of steel on it and the pawn should be moving at it to get that steel. draft the pawn. unpause and repause. the steel on the advanced IO port should be gone. (this is to check that it works normally)
  10. use the devmode Spawn thing tool to spawn a piece of steel somewhere between the DSU and the corner. the steel should be outside of the mazeboxthing, and should not be too close to the DSU.
  11. undraft the pawn. make it prioritize the research table. unpause. the pawn will path through the entire maze, pick up the piece of steel (if the steel is too close to the DSU then it will grab 74 steel from the DSU), then go back through the maze and deliver the single piece of steel to the blueprint.

Expected behavior The pawn retrieves steel from the Advanced IO port to build the simple research table because the Advanced IO port is the closest source of steel.

Actual Behavior The pawn retrieves steel from the ground first, despite it being much farther away than the Advanced IO port.

Screenshots If applicable, add screenshots to help explain your problem.(this is how the corner is set up) screenshot2

Rimworld (please complete the following information):

Modlist (please complete the following information):

Additional context nothing was output to the log other than command line arguments, rimworld version, save data folder, Project RimFactory Core 1.0.0.0 - Harmony patches successful, and Initializing new game with mods:

Sn1p3rr3c0n commented 1 year ago

I see. This has to do with how the Advanced Port works on a technical level. We don't alter the Paws decision making on what resource to use, we act after that. Only after the pawn decided on what material to use the Advance port has the chance to be used. That is if the selected Resource is in the linked Storage, that resource will be used and teleported to the Advanced port.

The system depends und your storage bening fully utilized or having the DSU in a more favorable location.

tl:dr: support for this specific unease would require a complete redesign of the Advance IO Port. While it could maybe be a part of the attempts to get the Cold Storage Working with the Advanced Ports, I would not expect any changes in the near future (based on past success on that topic).