What Kinds Of Mods Are Needed?

Started by Project 06, February 17, 2017, 02:54:51 PM

Previous topic - Next topic

Project 06

All my modding I've done on Rimworld has been pretty much just simple content additions, but I'm curious if there things that people still want out of the modding community. The mod I've been working on is kind of adding a bit to parts of the game. I've added Guns, Turrets, Defensive Structures, Wine, Floors, Buildable Soil, Jewelery, Lower Tier Armor, Concrete, Gunpowder, and a Toggled Vent.

Essentially I'm asking if there's anything that these additions can be categorized in, that needs a mod to further enhance it. I know excellent gun and turret mods exist. I'd like to see your opinions and requests if you have any.

RawCode


SpaceDorf

Quote from: RawCode on February 17, 2017, 11:57:22 PM
z-levels please!

:o :o :o :o :o

Thank you, that made me laugh :)

I would like a mod that condenses the meat and leather types down to a few.


Bird ( everything with wings )
Insect ( same as now )
Venison ( deer, antilope, reindeer .. )
Pork ( all pigs )
Mutton ( all kinds of goat and sheep )
Beef ( cows and muffalos )
Dog ( dogs and wolves )
something for cougars and other hunters ..
and one for small animals ..
Human

you get the idea.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Pink Omega

A tough insect hide would be cool to make armors and clothes...! Right!?

<=To Be Continued/\/

Project 06

Quote from: SpaceDorf on February 19, 2017, 11:37:50 AM

I would like a mod that condenses the meat and leather types down to a few.


Bird ( everything with wings )
Insect ( same as now )
Venison ( deer, antilope, reindeer .. )
Pork ( all pigs )
Mutton ( all kinds of goat and sheep )
Beef ( cows and muffalos )
Dog ( dogs and wolves )
something for cougars and other hunters ..
and one for small animals ..
Human

you get the idea.

Yea having a vast array of different meats is bad for storage, I'll see if i can do something. However I have a feeling this type of mod would cause compatibility issues with mods that also changed vanilla meats and animals.

Shinzy

Quote from: Project 06 on February 19, 2017, 01:48:38 PM
Yea having a vast array of different meats is bad for storage, I'll see if i can do something. However I have a feeling this type of mod would cause compatibility issues with mods that also changed vanilla meats and animals.

With the meat defs being generated automatically by the game it seems like it would maybe definitely break every "additional animals" mod out there if you were to change how that works

But then I'm not too familiar with that side of things :p

SpaceDorf

Both Pigs and Wild Boars produce Pork,
Some Birds produce Bird Meat, ( I don't know which )
And all Insects produce Insect Meat ..
So it should be possible.

But to not Break Anything, Like the Miniturisation Mod it would be last in the Load Order.

And I don't think it would break the additional Animals, but rather it would ignore their meat types.

But again, the additional Animals make the point for this mod more obvious.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Project 06

#7
After some digging I've found that animal meat is generated through a class file. It grabs the name of the animal and generates the meat item into existence. One way I think categorized or simplified meat would have to work, is by adding statements that check the name of the animal, but instead of naming the meat after the animal, it would instead give it the more generalized name. I think its possible but any mods that added more animals would require "addons" or "plugins" whenever those mods are installed.

Here is the code for the meat generator class in case someone wants to try to understand it as I have a tiny amount of knowledge about this.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Verse;

namespace RimWorld
{
public static class ThingDefGenerator_Meat
{
[DebuggerHidden]
public static IEnumerable<ThingDef> ImpliedMeatDefs()
{
List<ThingDef>.Enumerator enumerator = DefDatabase<ThingDef>.AllDefs.ToList<ThingDef>().GetEnumerator();
try
{
while (enumerator.MoveNext())
{
ThingDef current = enumerator.Current;
if (current.category == ThingCategory.Pawn)
{
if (current.race.useMeatFrom == null)
{
if (!current.race.IsFlesh)
{
CrossRefLoader.RegisterObjectWantsCrossRef(current.race, "meatDef", "Steel");
}
else
{
ThingDef thingDef = new ThingDef();
thingDef.resourceReadoutPriority = ResourceCountPriority.Middle;
thingDef.category = ThingCategory.Item;
thingDef.thingClass = typeof(ThingWithComps);
thingDef.graphicData = new GraphicData();
thingDef.graphicData.graphicClass = typeof(Graphic_Single);
thingDef.useHitPoints = true;
thingDef.selectable = true;
thingDef.SetStatBaseValue(StatDefOf.MaxHitPoints, 100f);
thingDef.altitudeLayer = AltitudeLayer.Item;
thingDef.stackLimit = 75;
thingDef.comps.Add(new CompProperties_Forbiddable());
CompProperties_Rottable compProperties_Rottable = new CompProperties_Rottable();
compProperties_Rottable.daysToRotStart = 2f;
compProperties_Rottable.rotDestroys = true;
thingDef.comps.Add(compProperties_Rottable);
thingDef.comps.Add(new CompProperties_FoodPoisoningChance());
thingDef.tickerType = TickerType.Rare;
thingDef.SetStatBaseValue(StatDefOf.Beauty, -20f);
thingDef.alwaysHaulable = true;
thingDef.rotatable = false;
thingDef.pathCost = 15;
thingDef.drawGUIOverlay = true;
thingDef.socialPropernessMatters = true;
thingDef.category = ThingCategory.Item;
thingDef.description = "MeatDesc".Translate(new object[]
{
current.label
});
thingDef.useHitPoints = true;
thingDef.SetStatBaseValue(StatDefOf.MaxHitPoints, 50f);
thingDef.SetStatBaseValue(StatDefOf.DeteriorationRate, 10f);
thingDef.SetStatBaseValue(StatDefOf.Mass, 0.03f);
thingDef.BaseMarketValue = ThingDefGenerator_Meat.GetMeatMarketValue(current);
if (thingDef.thingCategories == null)
{
thingDef.thingCategories = new List<ThingCategoryDef>();
}
CrossRefLoader.RegisterListWantsCrossRef<ThingCategoryDef>(thingDef.thingCategories, "MeatRaw");
thingDef.ingestible = new IngestibleProperties();
thingDef.ingestible.foodType = FoodTypeFlags.Meat;
thingDef.ingestible.preferability = FoodPreferability.RawBad;
CrossRefLoader.RegisterObjectWantsCrossRef(thingDef.ingestible, "tasteThought", ThoughtDefOf.AteRawFood.defName);
thingDef.ingestible.nutrition = 0.05f;
thingDef.ingestible.ingestEffect = EffecterDefOf.EatMeat;
thingDef.ingestible.ingestSound = SoundDef.Named("RawMeat_Eat");
if (current.race.fleshType == FleshType.Insectoid)
{
thingDef.ingestible.specialThoughtDirect = ThoughtDefOf.AteInsectMeatDirect;
thingDef.ingestible.specialThoughtAsIngredient = ThoughtDefOf.AteInsectMeatAsIngredient;
}
if (current.race.Humanlike)
{
thingDef.graphicData.texPath = "Things/Item/Resource/MeatFoodRaw/MeatHuman";
}
else
{
if (current.race.baseBodySize < 0.7f)
{
thingDef.graphicData.texPath = "Things/Item/Resource/MeatFoodRaw/MeatSmall";
}
else
{
thingDef.graphicData.texPath = "Things/Item/Resource/MeatFoodRaw/MeatBig";
}
thingDef.graphicData.color = current.race.meatColor;
}
thingDef.defName = current.defName + "_Meat";
if (current.race.meatLabel.NullOrEmpty())
{
thingDef.label = "MeatLabel".Translate(new object[]
{
current.label
});
}
else
{
thingDef.label = current.race.meatLabel;
}
thingDef.ingestible.sourceDef = current;
current.race.meatDef = thingDef;
yield return thingDef;
}
}
}
}
}
finally
{
}
yield break;
}

private static float GetMeatMarketValue(ThingDef sourceDef)
{
if (sourceDef.race.Humanlike)
{
return 1.75f;
}
return 2.7f;
}
}
}


EDIT: I would first have to remove this code from the vanilla game so it won't keep trying to generate the specific meats. However I don't know if thats possible. The only other solution would be to change the meats AFTER they've been created, which, if possible could be buggy or just messy.

SpaceDorf

You can Inject a new Method into the Game that overwrites this one to create a function that renames the meat types .. even to a point where it automatically renames unknown meatsources into "mod meat" or something.

There might be an easier solution though.
I checked the defs and found this :


<ThingDef ParentName="BigBirdThingBase">
    <defName>Cassowary</defName>
    <label>cassowary</label>
    <description>A large flightless bird with brightly-colored feathers. While it looks beautiful, its kick is vicious.</description>
    <statBases>
      <MoveSpeed>4.5</MoveSpeed>
      <ComfyTemperatureMin>-8</ComfyTemperatureMin>
      <MarketValue>300</MarketValue>
    </statBases>
    <race>
      <herdAnimal>false</herdAnimal>
      <baseBodySize>0.9</baseBodySize>
      <baseHungerRate>0.3</baseHungerRate>
      <baseHealthScale>0.9</baseHealthScale>
      <foodType>VegetarianRoughAnimal</foodType>
      <wildness>0.80</wildness>
      <lifeExpectancy>45</lifeExpectancy>
      <leatherColor>(80,80,80)</leatherColor>
   [b]   <meatLabel>bird meat</meatLabel>[/b]
      <manhunterOnTameFailChance>0.030</manhunterOnTameFailChance>
    </race>


     <meatLabel>bird meat</meatLabel>

That is the line the code example you gave checks in the beginning.
The meatDef, if none exists it creates one on the fly.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Project 06

Quote from: SpaceDorf on February 19, 2017, 06:04:45 PM
You can Inject a new Method into the Game that overwrites this one to create a function that renames the meat types .. even to a point where it automatically renames unknown meatsources into "mod meat" or something.

There might be an easier solution though.
I checked the defs and found this :


<ThingDef ParentName="BigBirdThingBase">
    <defName>Cassowary</defName>
    <label>cassowary</label>
    <description>A large flightless bird with brightly-colored feathers. While it looks beautiful, its kick is vicious.</description>
    <statBases>
      <MoveSpeed>4.5</MoveSpeed>
      <ComfyTemperatureMin>-8</ComfyTemperatureMin>
      <MarketValue>300</MarketValue>
    </statBases>
    <race>
      <herdAnimal>false</herdAnimal>
      <baseBodySize>0.9</baseBodySize>
      <baseHungerRate>0.3</baseHungerRate>
      <baseHealthScale>0.9</baseHealthScale>
      <foodType>VegetarianRoughAnimal</foodType>
      <wildness>0.80</wildness>
      <lifeExpectancy>45</lifeExpectancy>
      <leatherColor>(80,80,80)</leatherColor>
   [b]   <meatLabel>bird meat</meatLabel>[/b]
      <manhunterOnTameFailChance>0.030</manhunterOnTameFailChance>
    </race>


     <meatLabel>bird meat</meatLabel>

That is the line the code example you gave checks in the beginning.
The meatDef, if none exists it creates one on the fly.

How would i go about "Injecting a new method"?

Dopper

#10
Can you add a way to show a listing of all the resources in stockpiles much like the overlay on the left side of the screen?
Im running lots of mods and i have a huge list to fit the screen, i then need to keep opening and closing categories all the time, trying to keep track of resources, and its a pain in the but.
In my personal opion it would be a usefull adition something like a windows with all items in stockpiles present in something like a list (weapons and apparel would be a bonus but i dont want to ask too much).
I think there was a mod that added a tab in something like alpha 14 that did something similiar to what im asking.
Sry for the bad english.
Note: Sry if this is not focused on your first post :S, i decided to keep the post as it might grab your atention or desire to make a mod like the one im asking

SpaceDorf

Quote from: Dopper on February 19, 2017, 09:21:13 PM
Can you add a way to show a listing of all the resources in stockpiles much like the overlay on the left side of the screen?
Im running lots of mods and i have a huge list to fit the screen, i then need to keep opening and closing categories all the time, trying to keep track of resources, and its a pain in the but.
In my personal opion it would be a usefull adition something like a windows with all items in stockpiles present in something like a list (weapons and apparel would be a bonus but i dont want to ask too much).
I think there was a mod that added a tab in something like alpha 14 that did something similiar to what im asking.
Sry for the bad english.
Note: Sry if this is not focused on your first post :S, i decided to keep the post as it might grab your atention or desire to make a mod like the one im asking

I want this too, but for a quick fix, you can create a caravan .. this shows you everything they could pick up.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

SpaceDorf

Quote from: Project 06 on February 19, 2017, 08:09:28 PM

How would i go about "Injecting a new method"?

There are mods out there which do it, for myself, I have no f***ing clue :)
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Tammabanana

You CAN combine the meats in XML only - see Cassowary and Emu within Races_Animals_Birds.xml:

Cassowary uses:
      <meatLabel>bird meat</meatLabel>

Emu uses:
      <useMeatFrom>Cassowary</useMeatFrom>

It would involve overwriting vanilla animals, so it would be incompatible with (for example) that mod that makes deer/antelope/caribou milkable.  There would be a couple ways around that -

  • to make patches for such mods;
  • to talk with those mods authors and see if you can work together to create compatability between the mods;
  • to browse around and see what other folks are changing about vanilla animals, and talk to the authors about combining into one mod that changes all those things at once, since they're clearly vanilla elements that annoy somebody.

Mods that add new animals, maybe you could drop a line into the forums to tip them off to the <useMeatFrom> tag and point them to the animal that is using the generic meat. Or make a compatch.

There's a thread that Hydromancerx started somewhere, about merging animal mods... might be worth bringing these two discussions together.
https://ludeon.com/forums/index.php?topic=30541.0

Tam's tiny mods: forum thread: Kitchen Counters and other shelving *** Smoked meat *** Travel rations: MREs *** Pygmy Muffalo

Project 06

Quote from: Tammabanana on February 20, 2017, 07:38:45 AM
You CAN combine the meats in XML only - see Cassowary and Emu within Races_Animals_Birds.xml:

Cassowary uses:
      <meatLabel>bird meat</meatLabel>

Emu uses:
      <useMeatFrom>Cassowary</useMeatFrom>

It would involve overwriting vanilla animals, so it would be incompatible with (for example) that mod that makes deer/antelope/caribou milkable.  There would be a couple ways around that -

  • to make patches for such mods;
  • to talk with those mods authors and see if you can work together to create compatability between the mods;
  • to browse around and see what other folks are changing about vanilla animals, and talk to the authors about combining into one mod that changes all those things at once, since they're clearly vanilla elements that annoy somebody.

Mods that add new animals, maybe you could drop a line into the forums to tip them off to the <useMeatFrom> tag and point them to the animal that is using the generic meat. Or make a compatch.

There's a thread that Hydromancerx started somewhere, about merging animal mods... might be worth bringing these two discussions together.
https://ludeon.com/forums/index.php?topic=30541.0

Yea, most meat types are already categorized from meat label. If i wanted to I could probably use the meatLabel option to generalize the meats together. However, as you said this can cause compatibility issues. But again, since I don't have the knowledge on how to inject the new code to overwrite the old, I may have to do this.