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

Refactor ore mix tracking into per-dimension groups #2516

Closed
richardhendricks opened this issue Jan 25, 2018 · 8 comments
Closed

Refactor ore mix tracking into per-dimension groups #2516

richardhendricks opened this issue Jan 25, 2018 · 8 comments

Comments

@richardhendricks
Copy link
Contributor

Current ore mix information is stored in a large list of all veins. During orevein selection, a weighted roll against the whole list is done. This means that we have to re-roll if the vein is not of the correct dimension.

Look into refactoring ore mix tracking code into separate lists by dimension.

@Dream-Master Looking at the worldgeneration.cfg, there are two ways to enable/disable an oremix. I see that you can do it within the oremix itself, and also do it separately in the dimensions{} tag. Is there a way you prefer? Or do you like being able to do it both ways?

@richardhendricks
Copy link
Contributor Author

Also, I don't like calling the custom oremixes by numbers. We could add a new tag that lists all the oremix names, and then use those names in the list of oremixes. We could do the same thing for small ores as well - I'd like to give them the name small_oretype to make it easy to ignore them when searching for ores in the config file.

This is a low priority ticket.

@richardhendricks
Copy link
Contributor Author

GTNewHorizons/GT5-Unofficial#99 Also take a look at fixing up the mX/mCX naming scheme so we properly track chunks vs blocks.

@Dream-Master
Copy link
Member

Sure by name but be much nicer. Separate config files maybe better too.

@richardhendricks
Copy link
Contributor Author

It would be possible to do that. How far do we want to diverge from upstream?

I need to think on what would be the best way to split it out. I would like at least separate stat files (heights, ores, weights) for stones, smallores, and oreveins. it would help for searching manually. I don't know if it would be easier to maintain if it was broken down more by dimension or all in one file or what.

I think what makes the most sense is to have a single oremix file, and not include dimension info in the oremix, but separate it into a per-dimension file. Something like this
worldgen.cfg - list of all dimensions

  • worldgen_orevein.cfg - list of oremix number stats - no info on which dimension is enabled
  • worldgen_stones.cfg - list of stone config stats
  • worldgen_smallores.cfg - list of small ores config stats
  • worldgen_.cfg - list of all oreveins/smallores/stones enabled in that dimension

This way you can choose to use the same oremix in multiple dimensions, or you can have multiple versions of an oremix - ie have Twilight Forest oremixes with lower heights. It would be easier to see and manage which veins are enabled in a specific dimension.

The other thing that would be nice would be moving away from material IDs to actual names. It would be very nice to use the real ore name instead of 927, 1324, etc.

Long term lower priority project, definitely.

@bartimaeusnek
Copy link
Contributor

@richardhendricks i just made the NEI Ore Plugin work. 😢

@richardhendricks
Copy link
Contributor Author

longer term lower priority - probably years, if it ever gets addressed at all. I'll make sure the NEI ore plugin keeps working. Does it read the ore info from the config files, or does it read it out of the WorldGen container classes?

Also, congrats!

@bartimaeusnek
Copy link
Contributor

it reads out the config file in a do while loop which is 7x recursive

https://github.com/bartimaeusnek/GTNEIOrePlugin/releases/tag/1.0.5

@richardhendricks
Copy link
Contributor Author

Having the files split up will make that 4x easier. ;)

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

3 participants