#GaloreLib

1 messages · Page 1 of 1 (latest)

rose canopy
#

Some bonus features (planned/implemented);

  • Improved automatic property assigmend; localisation properties, data.RecipePrototype.allow_productivity, data.RecipePrototype.main_product, etc.
  • A full procuderal icon library. (tiering, overlays, Galore-like icons)
  • A enormous amount of high performance prototype manipulating functions. (Optimised for prototypes made through the vgal.data.extend function.)

And a example.

wheat willow
#

ok so prefixes right

#

it takes like 10 seconds to write a name function that prefixes things for you

#

and sure you have to go name("thing") in prototype defs but its easier than typing the prefix every time

rose canopy
#

But luckily you dont have to type the prefix every time, see linked example

wheat willow
#

how does it decide when to add the prefix?

rose canopy
#

And yea while a name function takes a few second to create, it did not take a few second for me to create the inherited prefix and domain system

rose canopy
#

(from the example)

wheat willow
#

becuse surely youre not automatically prepending it to recipe ingredients etc

rose canopy
#

Nono

#

Only propotype names that get created in the function call

#

So the nested prototypes and ofc the main prototype

normal raptor
#

That sounds great. Might try it in a new project

prisma tulip
#

Or does Lua have dynamic bindings that i don't know about

rose canopy
still forge
#

When does this preprocessing happen? At the end of your mod’s execution of each data stage? A combined preprocessing at some point in data-final-fixed?

#

E.g. if my mod using this lib adds a ItemPrototype with a recipe field, is the recipe added to data.raw alongside the item?

#

You also seem focused on performance a couple of times but I’ve literally never run into a case where performance in data stage is an issue. Even naively iterating through data.raw is completely fine in my experience.

wheat willow
rose canopy
# still forge When does this preprocessing happen? At the end of your mod’s execution of each ...

When does this preprocessing happen?
In the function call. vgal.data.extend processes the input table and calls data:extend for the contained prototypes.

if my mod using this lib adds a ItemPrototype with a recipe field, is the recipe added to data.raw alongside the item?
Yes.

You also seem focused on performance a couple of times but I've literally never run into a case where performance in data stage is an issue. Even naively iterating through data.raw is completely fine in my experience.
Even though Lua's performance is great, I have seen some performance cost originating from looping through prototypes in combination with other actions. My best example is looping through prototypes and figuring out if they belong to a specific mod. Either through icon paths, trying to trim the prefix (if the mod has one) or other methods. (This is not needed for prototypes added by this library.)

But I must say that this library is more of a QOL lib than one focussed on increasing prototype loading performance, the performance improvements are just a bonus.