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

Market issues #613

Open
Gicminos opened this issue Oct 10, 2020 · 3 comments
Open

Market issues #613

Gicminos opened this issue Oct 10, 2020 · 3 comments

Comments

@Gicminos
Copy link
Contributor

Gicminos commented Oct 10, 2020

I am on the current master, and last market commits did not solve the problem I am experiencing for more than a week.

The script never managed to buy elements and neither sell them. However I keep getting spammed in the console messages like this:

[16:02:29] [shard3] 22213612 W27N3                       market.deal: KO -6
[16:02:32] [shard3] 22213613 W27N3                       market.deal: X -6
[16:02:32] [shard3] 22213613 W27N3                       market.deal: KO -6
[16:02:36] [shard3] 22213614 W27N3                       market.deal: X -6
[16:02:36] [shard3] 22213614 W27N3                       market.deal: KO -6

In the meantime my terminal has more than 100k mined oxigen and 10k energy but I think that the script never tried to sell its resources. (my Cr balance is 0)

@TooAngel
Copy link
Owner

I don't know the current status too well (I'm more eyeing on code quality improvements and the early game).

My guess is that the energy is too low and filling up the terminal is not properly done (because the terminal was move closed to the mineral and the mineral creep was not updated).

When I implemented it (long long ago), the idea was something like:

  • Keep 100k of the resource which can be obtained in the room, sell the rest
  • Keep 100k of energy in the terminal to be able to sell and transfer
  • Kepp 1-2k of all other minerals (and combinations) in the terminal and request from other room the ingredients
  • The mineral creep fills the labs and made sure that all kind of minerals are produced and the Nuker is filled (Not sure if it was also responsible for the energy)

After that, there were a couple of contributions regarding minerals and the market, which I didn't follow up too much.

I think the mineral and market need a lot of rework or even a complete rewrite. If you or someone else is interested, go ahead, I'm excited to see what your approach will be.

The next step which I would have done is moving the labs to the terminal (place them at the end of the path pathStart-extractor. This would allow having less moving for the mineral creep. Maybe even have one of the links located there, too, and sending the energy via link. The downside is that creeps which want to be boosted need to move over there.

@Gicminos
Copy link
Contributor Author

Gicminos commented Oct 10, 2020

Thank you for your message. I can wait more time and give further update if something changes.

I am totally happy to keep contributing to the project but I think I am still too new to the game mechanics and this code to undertake a complete rewrite of this feature. But I will try to look into it and see if I can do something!

@TooAngel
Copy link
Owner

Well, it helps me usually to have a certain task to explore a code base better.

The mineral handling and creep were initially written by me and I just wanted to have something somehow running. (translates to 'I think the implementation and logic is shitty')
The outcome of mineral handling is not properly used somewhere, boosting is disabled, if I see a Nuker getting filled up I'm happy because I don't expect it, and the market seems broken, too. (translates to 'It's hard to make the status worse')

And is mostly separated from everything else, it works with different resources (ok a bit of energy), and it uses different mechanics (mineral creep has the only proper state machine).

I hope this gives you a bit of motivation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants