[A14] Community Core Library v0.14.3.1

Started by RWCCLTeam, October 20, 2015, 12:08:13 PM

Previous topic - Next topic

Krush

Working on the ability to define custom outfits to be loaded in new games. It's nearly done just need to test it a bit more than i'll toss up a PR for it to get merged into development :)

notfood

Is it possible to override core stats in a mod friendly way with CCL?

1000101

Quote from: 123nick on July 28, 2016, 05:59:00 PMthe CCL vanilla tweaks- do they overwrite any core files that would cause problems with other mods?

As stated in the very first post for CCL, the vanilla tweaks uses injection and does not override any defs.

Quote from: notfood on July 28, 2016, 11:45:50 PMIs it possible to override core stats in a mod friendly way with CCL?

Short answer "no", long answer "yes but".  The "but" is that only certain things on certain defs can be modified in a friendly way.  See the modders resource and the def description for ModHelperDef.

We have been discussing in the dev team with doing some "magic" to allow any def to have overrides without being destructive.  This will be a long way coming before it ever hits a release build.  Currently it is only hypothetical talk about the mechanism to do this.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

viperwasp

#273
I'm getting tons of errors when using most recent version v0.14.1 without any mods. I load Core, then CCL, then vanilla tweaks using DRM-Free Non-Steam Version A14E. 

See screenshot.  I am only using CCL.

P.S When I get into the game it's very messed up and I need to Alt+F4 to quit out of the game.

Update - Okay it seems this is because of Extendedstorage mod. I had the mod Xed out but it still gives errors based on it. I will report this where it belongs. Here ---> https://ludeon.com/forums/index.php?topic=14177.0

[attachment deleted by admin - too old]
•  Lian Li Lancool II MESH RGB
•  Intel Core i7-12700K Alder Lake 12-Core
•  64 GB Corsair Vengeance LPX 3600Mhz
•  WD Black SN850 2TB GEN4
•  2x WD Black 8TB
•  Windows 10 OS
•  RTX 4080 GIGABYTE Gaming OC 16GB
•  Dark Rock Pro 4 (CPU Cooler)
•  TUF Gaming Z690-Plus- WIFI D4

notfood

#274
Quote from: 1000101 on July 29, 2016, 01:50:50 AM
We have been discussing in the dev team with doing some "magic" to allow any def to have overrides without being destructive.  This will be a long way coming before it ever hits a release build.  Currently it is only hypothetical talk about the mechanism to do this.

I'm not totally certain, I'd need to experiment but... Editable.ResolveReferences() is the method we are looking for. Either by injection or other magic. Though, the modinjection available in specialinjectors happens after ResolveReferences have been called so can't do it with the current available tools in CCL.

Something like...
public override void ResolveReferences () {
  if (do_we_have_overrides_for_this_ThingDef) {
    // do override magic
  }
  base.ResolveReferences();
}


Around this time, defs haven't been fully initialized and you can override everything with no buts.

I'd do it, but I need that pre-ResolveReferences injector. And I can't compile CCL it uses C# 5 features BAAWW!

1000101

CCL does some of it's own early injections (detours) when the first custom XMLs start loading via a module initializer.  Unfortunately a module initializer isn't a replacement for DLLMain (which is called when a DLL is loaded).  As stated above, currently it's still in hypothetical discussion as to the best approach for certain things such as xml overrides via an xml attribute along the lines of 'Override="True"' and/or 'AddToExisting="True"'.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

biship

Sorry for the newbie post, but how do I go about working out what mod is causing this? My peons just stand around now :(

Eve threw exception while determining job (main): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at CommunityCoreLibrary.Detour._FoodUtility._ThoughtsFromIngesting (Verse.Pawn ingester, Verse.Thing t) [0x00000] in <filename unknown>:0
  at CommunityCoreLibrary.Detour._FoodUtility._FoodSourceOptimality (Verse.Pawn eater, Verse.Thing t, Single dist) [0x00000] in <filename unknown>:0
  at RimWorld.FoodUtility.SpawnedFoodSearchInnerScan (Verse.Pawn eater, IntVec3 root, System.Collections.Generic.List`1 searchSet, PathEndMode peMode, TraverseParms traverseParams, Single maxDistance, System.Predicate`1 validator) [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  at CommunityCoreLibrary.Detour._FoodUtility.SpawnedFoodSearchInnerScan (Verse.Pawn eater, IntVec3 root, System.Collections.Generic.List`1 searchSet, PathEndMode peMode, TraverseParms traverseParams, Single maxDistance, System.Predicate`1 validator) [0x00000] in <filename unknown>:0
  at CommunityCoreLibrary.Detour._FoodUtility._BestFoodSourceOnMap (Verse.Pawn getter, Verse.Pawn eater, Boolean desperate, FoodPreferability maxPref, Boolean allowPlant, Boolean allowLiquor, Boolean allowCorpse, Boolean allowDispenserFull, Boolean allowDispenserEmpty, Boolean allowForbidden) [0x00000] in <filename unknown>:0
  at RimWorld.FoodUtility.TryFindBestFoodSourceFor (Verse.Pawn getter, Verse.Pawn eater, Boolean desperate, Verse.Thing& foodSource, Verse.ThingDef& foodDef, Boolean canRefillDispenser, Boolean canUseInventory, Boolean allowForbidden, Boolean allowCorpse) [0x00000] in <filename unknown>:0
  at CommunityCoreLibrary.Detour._JobGiver_GetFood._TryGiveJob (RimWorld.JobGiver_GetFood obj, Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_JobGiver.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at RimWorld.ThinkNode_Conditional.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at RimWorld.ThinkNode_Conditional.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_JobTracker.DetermineNextJob (Verse.ThinkTreeDef& thinkTree) [0x00000] in <filename unknown>:0  lastJobGiver=

1000101

As posted in the Vegetable Garden thread, please attach a save file to a post with just CCL + Vegetable Garden which has this issue.

Further, if you can give steps to reproduce this it would help.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

lordi

hello :)

i'm getting font errors with activated CCL-mod. already searched for a solution, but can't find one. :/

i'm using the actual steam game version 0.14.1249 with CCL 0.14.1 (from the steam workshop) and i'm getting wrong letters, seems to be character encoding errors or something like that. for testing i only activate the core and CCL-mod and nothing else.

anybody else getting similar errors?

i attached a screenshot from the main menu for better illustration. sometimes i get these errors on tooltips from mods ingame too.

thx for help.

best regards
lordi

[attachment deleted by admin - too old]

1000101

#279
Sorry about that, there is a lack of translation files for CCL for other languages and those buttons aren't using labelKey.  I'll fix that up the next release so it will at least show the proper English for them.

Edit:  The defs are using the correct translation keys, will need to dig deeper as to why it's not using them.

Edit 2: The only def using the wrong translation key was for the LoadGame button.  This is now fixed (in the repo).  The translation files for core, however, all use "LoadGameButton" when it is now "LoadGame."  There is nothing I can do about this as the core game needs to correct it's non-English language packs.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

biship

Thanks for the help 1000101. It turned out to be a change to Vegetable Garden that reclassified tofu from a vegetable to meat, and for some reason this freaked out my pawns, causing them to not move. Thanks for the great library (and tweaks).

DariusWolfe

Is there any work being done on the Backstories feature of CCL? I'm thinking of doing a stream/recorded series, but I'd like to be able to override the existing pawns, names and backstories (rather than just adding to them). If something in this vein is being worked on, I'll hold off for a bit, but if it's not, there's not much reason to wait.

1000101

mipen is the goto guy regarding the backstories.  I asked him about it but nothing definite was planned.

We'll be doing a new CCL release soon with some bug fixes and new features but as of now nothing regarding backstories has changed.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Lockdown

I grabbed the source code in order to troubleshoot that problem I have with minimap settings resetting to default after a game restart, but I'm having issues generating the library DLL: compiler throws an error every time the => operator is used.

Am I missing a step to get the library to compile, or something?

biship

I just compiled successfully today's (dev branch) github code with VS2015 (so the code's good).
It looks correct in your screenshot, but as a reminder, the 3 references need to be correct.