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

Topics - Nirahiel

#1
Help / Resource altenative.
January 17, 2015, 02:13:48 PM
Taken from a PM to Tynan :
Quote from: Nirahiel
Hi, i'd like to know if there is a way (I suppose not) to make it so we can provide alternatives to resources.
Example, let's say I add a special, really nutritive plant, that's worth 2 regular plants.
Now a basic meal can be crafted with 10 basic plants, or maybe 8 basic and 1 special, or 6 basics and 2 specials, etc ... well you get the idea.

Thanks in advance :)
Quote from: Tynan
You would just make a plant that produces a double-size harvest.

And please ask this sort of thing on the forums.
I guess i wasn't clear enough.
I don't want to produce twice as much items per plant, I want a single item to be worth 2 items (or more).
Same could apply to other stuff. Let's say I create a new metal that's really good, twice as good as steel, and now all recipes that require steel can use this new metal instead, even with a ratio. (Example, recipe needs 50 steel to craft something, pawns use 15 of this special metal (which is worth 30 steel) and 20 steel instead. Or maybe 5 special metal and 40 steel. Or 25 special metal and 0 steel.
Of course if the recipe asks for e.g. 5 steel, you can't go with pure special metal only. You'd need at least 1 steel for 2 special metal for this recipe.

Or the other way around. If I have a recipe that requires 10 meat and 10 veggies (the lavish meal) and instead of meat i have this weird paste that tastes a bit like meat but isn't meat, and I need 3 times more to feel like it's meat, then a pawn could make this meal using 10 veggies and 30 of this weird paste instead :)

Hope it's clear enough, and hope someone can tell me if it's doable.
Thanks :)
#2
Help / Question about mod loading
January 16, 2015, 06:42:35 AM
Hi.
I'd like to know if there is a way to create a DLL mod that's always loaded, no matter what.
Like, it doesn't even have to appear in the mod list, as it should always be there, much like a core mod.
If you want a concrete example, think minecraft forge. I'm currently implementing something similar, but I have several design choices to make.
Currently, my mod does a few things.
It allows modders to register a "main" class for their mod, that is automagically instantiated when the game loads, using a special attribute system.

[Mod("My super mod")]
public class MySuperMod
{
    ...
}

I developed this because (one of the reason was that) I needed to be able to add recipes to vanilla production buildings like the Machining Table for example.
My custom code (the one from the forge like mod) is loaded only if the mod is enabled in the config.
When it's loaded, it can register all classes using this attribute whenever they are loaded as well, even if the player then disables the other mods (the ones using my tool) the classes stays registered (but I mark them as disabled in my code).
The problem is, what if a player enables my tool, and another mod using it, my tool loads, the other mod as well, my tool then register the other mod's custom recipes, and then the player disables my tool only.

Hoping to get an answer from Tynan directly regarding this, but I started a new thread instead of sending him a PM just to let everyone say something about this :)