Ludeon Forums

RimWorld => Releases => Mods => Outdated => Topic started by: Cpt.Ohu on November 17, 2016, 05:20:20 AM

Title: [A17] Faction Colors 1.5 (25.08.2017)
Post by: Cpt.Ohu on November 17, 2016, 05:20:20 AM
(http://i.imgur.com/S6M1HCv.png)


Description:

At its most basic this mod contains a DLL that allows for apparel to use the CutoutComplex Shader, thereby enabling tintmaps for apparel and coloring by XML-coding. So, this is targeted mainly at modders, and all of the content inside is there for demonstration purposes.

An example is included in the mod in the form of reinforced leather armor:

(http://i.imgur.com/WLeEoYj.png)

This is a composite apparel, consisting of any kind of leather lying around, and some steel. Base color derives from leather, shoulderpads are defined in the code.

If you're only interested in using the CutoutComplex shader, you can simply define it in the graphicdata-block of your XML. Tintmap required of course, otherwise it won't be colored at all.


The big feature of this mod and its namegiver is the ability to define two lead colors for your custom advanved faction. Instead of ragtag outlanders/mercenaries coming in colored like they're in a circus parade, you'll have uniformed soldiers. Additionall you can define one main faction with several subfactions, each with their own color-scheme, and at game-start one of those will be randomly selected to represent this faction for the current game.

And yes, you can do that whole faction-specific apparel color thing right now by simply recoloring the textures, but for any given apparel this means editing at least 16 files (+ 4 for each headgear) + texture-bloating when you want to have different color schemes available. With this mod you can make 1 setup (normal textures + tintmap) and then recolor everything by editing one xml file.


(http://i.imgur.com/9iveZKk.png)


Additional features:

Camouflage Colors
Say you create a faction that's supposed to havea regular modern day military. Why would they try to sneak up on your colony wearing bright red and pink power armor during winter assaults, or bright white coats while assaulting your forest-fortress. Not really what you'd associate with tactical brilliance.

You can define your new apparel to be colored according to the biome and season colors. This means green/brown for the temperate regions, khaki for deserts/shrublands, and white/grey for both winter seasons and ice-sheets. Examples are the snipers from the image above.

Note that apparel is colored the second it is created by the game, so all those white armors you got from a winter-assault will remain white in the summer.

Weapon-Sizing

Sometimes you want to have a cyborg shouldering an enormous gun, but the game will still render it tiny. In that case you can use this mod to define the drawing-size of your weapon.

Take a look at hulky Janwaat and his sidekick for comparison:

(http://i.imgur.com/hNnDane.png)


There are of course limitations as an increased meshsize will eventually yield weird looking ways of actually wielding the weapon.

How it works

I'm detouring the ResolveApparelGraphics method. This is what's blocking multi-colored apparel since it locks down the shader-type. Additionally I'm detouring DrawEquipmentAiming to alter the drawing mesh size.

Author/Mod Team
Cpt.Ohu

Downloads

Release 1.3 [A16] (https://www.dropbox.com/s/xipwgyrrmwdx6do/FactionColors_1.3.zip?dl=0)

Release 1.5 [A17] (https://github.com/Cpt-Ohu/FactionColors/releases/tag/v1.5)


Example Mod [A16] (https://www.dropbox.com/s/zqae8i6smg3m9we/FactionColors_Examples.zip?dl=0)

Acknowledgements
Using Harmony for detouring.

How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mods in the mod menu in the game.

Licence

As this is basically a helper-dll, you are heavily encouraged to use it for whatever ideas you're working on. Just mention that you've used this framework as a basis.

The textures are taken out of my upcoming Warhammer 40k mod (https://ludeon.com/forums/index.php?topic=25040.0). Please ask before redistributing them with your mod or including them in a modpack.

The source files are included, and you are free to edit whatever you like about them.
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: Shinzy on November 17, 2016, 07:14:30 AM
Oooo now you've done did it Ohu!
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: skullywag on November 17, 2016, 08:40:00 AM
Great work ohu. Glad you got this out.
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: kaptain_kavern on November 17, 2016, 12:16:09 PM
You're a real chief Captn o7
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: The13thRonin on November 17, 2016, 03:17:20 PM
This is awesome.
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: mabor0shi on November 24, 2016, 06:43:22 PM
I'm gonna download this in the hope that I can come up with some clever way to make use of it. It seems like a very useful modder's resource and those are uncommon. Good stuff!
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: Smexy_Vampire on November 26, 2016, 10:31:10 PM
how to use ?
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: Cpt.Ohu on November 27, 2016, 05:44:29 AM
Quote from: Smexy_Vampire on November 26, 2016, 10:31:10 PM
how to use ?

This is primarily aimed at modders. You can install this mod like any other, however it only contains 3 kinds of armor and one sword. To add your own custom colored stuff, take a look at the examples present and adapt them to your needs. Same goes for factions.

I may write a proper tutorial for this if I find the time.
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: koni on December 23, 2016, 03:06:28 PM
Is there an update to A16 in sight?
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: Cpt.Ohu on December 25, 2016, 06:43:57 AM
Yes, it's basically updated already for my 40k mod (https://ludeon.com/forums/index.php?topic=28422.0) and I will release the standalone once I get back to my main computer.
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: koni on December 28, 2016, 08:08:16 AM
Quote from: Cpt.Ohu on December 25, 2016, 06:43:57 AM
Yes, it's basically updated already for my 40k mod (https://ludeon.com/forums/index.php?topic=28422.0) and I will release the standalone once I get back to my main computer.

I can't really await it. That would be essential to Ancient Rim (https://ludeon.com/forums/index.php?topic=27621.0) :)
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: Cpt.Ohu on December 31, 2016, 08:43:21 AM
Released Update to A16.
Title: Re: [A15] Faction Colors 1.0 (17.11.2016)
Post by: koni on January 01, 2017, 05:15:43 AM
That's good. Thank you
Title: Re: [A15] [A16] Faction Colors 1.0 (31.12.2016)
Post by: solidcordon on February 05, 2017, 07:19:01 PM
Not sure if this is specifically a faction color issue but it pops up when I am trading with an exotic goods merchant. The trade menu screen glitches but if I use the mouse to scroll past the last item displayed past a blank screen, I get the rest of the menu.
Trading still works but it's weird.

QuoteException filling window for RimWorld.Dialog_Trade: System.NullReferenceException: Object reference not set to an instance of an object
  at FactionColors.ApparelUniform.get_DrawColor () [0x00000] in <filename unknown>:0
  at Verse.Widgets.ThingIcon (Rect rect, Verse.Thing thing, Single alpha) [0x00000] in <filename unknown>:0
  at RimWorld.TransferableUIUtility.DrawTransferableInfo (ITransferable trad, Rect idRect, Color labelColor) [0x00000] in <filename unknown>:0
  at RimWorld.TradeUI.DrawTradeableRow (Rect rect, RimWorld.Tradeable trad, Int32 index) [0x00000] in <filename unknown>:0
  at RimWorld.Dialog_Trade.FillMainRect (Rect mainRect) [0x00000] in <filename unknown>:0
  at RimWorld.Dialog_Trade.DoWindowContents (Rect inRect) [0x00000] in <filename unknown>:0
  at HugsLib.GuiInject.WindowDetour+<>c__DisplayClass1.<_WindowOnGUI>b__0 (Int32 x) [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
HugsLib.GuiInject.<>c__DisplayClass1:<_WindowOnGUI>b__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle)

To make this slightly less useless as a repoty, the issue is likely compatibility with one of these mods... :P
    HugsLib, ED-Embrasures, Miscellaneous_Core, Miscellaneous_Robots, EPEO - Hardcore LITE Version 1.1, FloorLights, LT_DoorMat, TilledSoil, Trap Defence V1.1 A16, , Miscellaneous_BeeAndHoney, Miscellaneous-TrainingFacility, Robots_PlusPlus_Misc_Robots_Xtension, MadSkills-A16-1.2.1, CheaperComponents, , MoreTradeShips, RT_Fuse-A16-1.0.4, StackXXL, RimFridge, Tranq Turrets, LessArbitrarySurgery, MarvsPleaseHaulPerishables, ReclaimFabric-ReclaimFabric1.7,
We Care Less About Prisoners, Miscellaneous_Objects, TechAdvancing, Synthmeat, ExpertQuality, RemoteExplosives, RiotShield, AutoFlicker, MiningCo. MiningHelmet, MiningCo. MMS, WM Smarter food selection, Miscellaneous_MAI, MiningShaftA16, DyeVat, Mind Altering Device, FactionColors.

With MoreTradeShips, ReclaimFabric-ReclaimFabric1.7 and DyeVat being likely candidates (in my humbly pinion)
I can't reclaim materials from armoured robes, which is fine.

You are aware that a thrumbofur armoured robe at legendary quality is significantly better than powered armour aren't you? :)
Title: Re: [A15] [A16] Faction Colors 1.0 (31.12.2016)
Post by: Cpt.Ohu on February 10, 2017, 03:46:37 AM
It is a FactionColor problem that I fixed a while ago, i just forgot that the uploaded version isn't updated yet. Should work normally now.

Quote from: solidcordon on February 05, 2017, 07:19:01 PM
You are aware that a thrumbofur armoured robe at legendary quality is significantly better than powered armour aren't you? :)

Well, it is the hide of the legendary Thrumbo, a creature equivalent to the Nemean Lion! Puny sci-fi armors pale in comparison  ;)

In all seriousness, it's mainly there for modders to have a template on how to use the assembly, balancing wasn't on my mind when creating it.
Title: Re: [A15] [A16] Faction Colors 1.0 (31.12.2016)
Post by: Tenshi~Akari on March 04, 2017, 08:54:22 PM
I just updated to the most recent version because I was also having trouble with the orbital pirate & combat traders... but now, I seem to be getting two errors thrown at me on startup:

Failed to find RimWorld.WorldObjectDef named PlayerFactionStoryTracker. There are 9 defs of this type loaded.
Verse.Log:Error(String)
Verse.DefDatabase`1:GetNamed(String, Boolean)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
Verse.GenGeneric:InvokeStaticMethodOnGenericType(Type, Type, String, Object[])
Verse.GenDefDatabase:GetDef(Type, String, Boolean)
RimWorld.DefOfHelper:BindDefsFor(Type)
RimWorld.DefOfHelper:RebindAllDefOfs(Boolean)
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__735()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__733()


Could not load UnityEngine.Texture2D at UI/Buttons/Banner in any active mod or in base resources.
Verse.Log:Error(String)
Verse.ContentFinder`1:Get(String, Boolean)
FactionColors.FactionColorUtilities:.cctor()
System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor(IntPtr)
System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor(RuntimeTypeHandle)
Verse.StaticConstructorOnStartupUtility:CallAll()
Verse.PlayDataLoader:<DoPlayLoad>m__6F8()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update()
Verse.Root_Entry:Update()


Not sure if the last one was anything related, but it was a red error as well. Either way, nothing changed other than me deleting & replacing the old files w/ new ones for Faction colors... I'll probably try re-ordering to see if it goes away, but it worked fine before in the very same order it's currently in...

<modNames>
<li>Core</li>
<li>HugsLib</li>
<li>Camera+</li>
<li>Zhentar's Vanilla Fixes</li>
<li>Animal Tab</li>
<li>Medical Tab</li>
<li>Wildlife Tab</li>
<li>Zhentar's Vanilla Tweaks</li>
<li>Blueprints</li>
<li>Lockable Doors</li>
<li>FactionColors</li>
<li>EdB Prepare Carefully</li>
<li>AnimuHair</li>
<li>Nackblad Inc Rimhair</li>
<li>Rimsenal - Rimhair</li>
<li>Spoons Hair Mod</li>
<li>xeva - Rimhair</li>
<li>Better Pathfinding</li>
<li>DeadMansClothing</li>
<li>Hospitality</li>
<li>WM Smarter food selection</li>
<li>LongRangePodLauncher</li>
<li>Miniaturisation</li>
<li>Core Driller</li>
<li>Core Driller - Stone Addon</li>
<li>JTReplaceWalls</li>
<li>I Can Fix It!</li>
<li>Animal Feed Trough V1.1</li>
<li>Barn Stall V1.0</li>
<li>Area Rugs v1.04</li>
<li>Improved Increased Stack</li>
<li>Tilled Soil</li>
<li>Stuffed Vents A15</li>
<li>TrueMods - cloth sandbags</li>
<li>TrueMods - ship engine size adjustment</li>
<li>TrueMods - plasteel reinforced power conduits</li>
<li>QualityBuilder</li>
<li>Allow Tool</li>
<li>Vein Miner</li>
<li>Defensive Positions</li>
<li>Mad Skills - Tiered</li>
<li>Master Dihtung Metals </li>
<li>Master Dihtung's More Stones </li>
<li>FashionRIMsta</li>
<li>RIMkea</li>
<li>[sd] round tables</li>
<li>Vegetable Garden </li>
<li>GouRIMet 1.0</li>
<li>More Vanilla Turrets</li>
<li>JTBetterShipReactor</li>
<li>JTMoreHydroponicOptions</li>
<li>Fluffy Breakdowns</li>
<li>Medieval Asian Weapons</li>
<li>Realistic Moods and Needs</li>
<li>[T] ExpandedCrops (for Vegetable Garden)</li>
<li>Animal Hoods</li>
<li>Primitive Floors</li>
<li>Hand Me That Brick</li>
<li>LT-Gardening</li>
<li>[T] RawCropThoughts</li>
<li>Miscellaneous 'CORE'</li>
<li>Misc. MAI</li>
<li>Misc. Robots</li>
<li>Misc. Robots++</li>
<li>Misc. Training</li>
<li>Mending</li>
<li>Trading Spot</li>
<li>Glass+Lights</li>
<li>MeerkatMod</li>
<li>PrisonExtensions</li>
<li>CaravanSpot</li>
<li>Componentsx10</li>
<li>Cheaper Components</li>
<li>More Trade Ships</li>
<li>Crafting Hysteresis</li>
<li>Better Shooting Skill</li>
<li>Big Batteries</li>
<li>FishIndustry</li>
<li>Set-Up Camp</li>
<li>RimFridge</li>
<li>Path Avoid</li>
<li>Camping Stuff</li>
<li>Fences And Floors</li>
<li>Snowy Trees</li>
<li>Dubs Rimkit(Medkit)</li>
<li>Hygiene</li>
<li>Conduit Deconstruct</li>
<li>Haulpriority_lite</li>
<li>Pests</li>
<li>LED Lights</li>
<li>Clutter Furniture Module</li>
<li>Additional Joy Objects</li>
<li>JTExport</li>
<li>MiningCo. MMS</li>
<li>Clutter Weapon Hands</li>
<li>More Furniture</li>
<li>[T] MoreBedsVanilla (for More Furniture)</li>
<li>[sd] medicaddons (more furniture compatible version)</li>
<li>Craftable Personal-Shields</li>
<li>Area Unlocker</li>
<li>Stack Merger</li>
<li>Better Terrain</li>
<li>ThrumboWool</li>
<li>SS Lightning Rod</li>
<li>Research Scrollbars</li>
<li>MorePackAnimals</li>
<li>MiningCo. MiningHelmet</li>
<li>Dog Bowl</li>
<li>Ugh You Got Me</li>
<li>Reverse Commands</li>
<li>CleaningArea</li>
<li>SS Clocks</li>
<li>Sync growth</li>
<li>ZWAnimals A16</li>
<li>Rumours And Deception</li>
<li>RomanceDiversified</li>
<li>Ofuton</li>
<li>Shibainu</li>
<li>Roof Support A16</li>
<li>ishidourou plus</li>
<li>iroriplus</li>
<li>fusuma plus</li>
Title: Re: [A15] [A16] Faction Colors 1.0 (31.12.2016)
Post by: koni on March 05, 2017, 11:44:29 AM
As you may know, I am working on a mod which is using this framework.
But I have a little problem: The different colors weren't show on the item lying on the ground

(https://ludeon.com/forums/index.php?action=dlattach;topic=27459.0;attach=19327;image)

The mistake comes probably from myself, but please tell what I've done wrong

[attachment deleted by admin due to age]
Title: Re: [A15] [A16] Faction Colors 1.0 (31.12.2016)
Post by: Cpt.Ohu on March 06, 2017, 06:03:05 AM
@ Tenshi: There is a feature missing that enables setting the player faction colors. That was an error on my part since I uploaded the advanced version of the assembly without adjusting the defs / textures.

@ Koni: It looks like the tintmap for your item texture can't be located, hence the texture remains white. Look at the filenames and check for spelling errors.

Update:

- new Tab: Coat of Arms. Allows you to specify your faction colors and a bannertype to rally around:

(http://i.imgur.com/ZfiMaOF.png)

I'm still trying to get the actual preview onto the GUI. There is now a flag pole under Misc which lets you design your banner.
Title: Re: [A16] Faction Colors 1.2 (06.03.2017)
Post by: koni on March 06, 2017, 01:01:43 PM
Quote from: Cpt.Ohu on March 06, 2017, 06:03:05 AM

Update:

- new Tab: Coat of Arms. Allows you to specify your faction colors and a bannertype to rally around:

(http://i.imgur.com/ZfiMaOF.png)

I'm still trying to get the actual preview onto the GUI. There is now a flag pole under Misc which lets you design your banner.

Very nice to see this, but here I found a small bug: generated faction pawn spawn only  with one color, which is the second defined one. Also Pawns with your camouflage armor generate with the second camo-color AND the second faction color.
At this point I won't criticize you, I'm just informing.
Title: Re: [A16] Faction Colors 1.2 (06.03.2017)
Post by: Cpt.Ohu on March 06, 2017, 04:48:18 PM
Thanks, didn't spot that on my setup. Should be fixed now.
Title: Re: [A16] Faction Colors 1.2 (06.03.2017)
Post by: Multistream on March 25, 2017, 12:37:49 PM
hey, you are using old version of Harmony in your mod, which may cause conflicts. Can you provide an update?
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: Cpt.Ohu on April 04, 2017, 04:00:09 AM
Updated the mod to current Harmony version.

Also disentangled the base assembly and the example mod for those who do not want the examples provided in the game.
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: The-Eroks on April 04, 2017, 09:50:16 PM
This is great work! Do you mind if I incorporate this into a fantasy core that I am designing?
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: Cpt.Ohu on April 07, 2017, 07:12:30 AM
For purposes of updating I think it would be easier to link a dependency, but if you want you can ship the DLL with it.
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: koni on May 14, 2017, 09:10:12 AM
I have a little suggestion/wish to this framework mod, if it's possible: shields that can go with camouflage, composite or coat of arms colors. It also would be great  if this shields can be worn by any alien races like the apini who deny any non-apini clothing(shield cover whole body instead of specific parts).


And spawning with composite armor doesn't work right: the random non-stuff color is not generated.
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: AngleWyrm on May 15, 2017, 08:53:06 AM
Would it be possible to make faction insignia banners with this tool? Maybe a place-able banner for fortress insignia, with different colors for different factions, and a variety of basic stencils that apply colors?
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: Cpt.Ohu on May 15, 2017, 12:27:13 PM
Quote from: koni on May 14, 2017, 09:10:12 AM
I have a little suggestion/wish to this framework mod, if it's possible: shields that can go with camouflage, composite or coat of arms colors. It also would be great  if this shields can be worn by any alien races like the apini who deny any non-apini clothing(shield cover whole body instead of specific parts).


And spawning with composite armor doesn't work right: the random non-stuff color is not generated.

I noticed the latter too recently. At least when it's spawned on pawns directly. Will try and fix that.

Shields are doable, since there are a lot of them out there already. I'm just currently busy with other stuff.

Quote from: AngleWyrm on May 15, 2017, 08:53:06 AM
Would it be possible to make faction insignia banners with this tool? Maybe a place-able banner for fortress insignia, with different colors for different factions, and a variety of basic stencils that apply colors?

It should be very much possible. Just look at the Comp for drawing the flag. In theory this can be applied to anything you can build. Right now the graphical options are limited though since I haven't included directory modification in the XML. Also right now this was intended for player colonies only, so if the AI builds one of these, it will draw the player graphic.
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: koni on May 26, 2017, 05:06:09 AM
How goes updating to A17? Faction Colors is an essential framework to my Ancient Rim and it would be great to get it too into A17.
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: Cpt.Ohu on May 26, 2017, 08:01:51 AM
Unfortunately I'm currently quite busy with RL, so I can't say how long it will take to update.
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: Cpt.Ohu on June 23, 2017, 10:17:37 AM
Update



I've put up an initial release for A17. The examples remain for A16, however barring some basic XML differences, everything else remained the same.
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: koni on June 24, 2017, 12:26:32 PM
Oh thank you so much.
Quote from: Cpt.Ohu on May 15, 2017, 12:27:13 PM
Quote from: koni on May 14, 2017, 09:10:12 AM
I have a little suggestion/wish to this framework mod, if it's possible: shields that can go with camouflage, composite or coat of arms colors. It also would be great  if this shields can be worn by any alien races like the apini who deny any non-apini clothing(shield cover whole body instead of specific parts).


And spawning with composite armor doesn't work right: the random non-stuff color is not generated.


And when do you think you can do that
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: Tenshi~Akari on July 14, 2017, 03:35:21 AM
Question, since I'm feeling kinda dumb on this issue: has anyone been successful in getting this to work? I know it's just the initial release, but just wondering since I haven't been able to figure out how to get 1.4 working in A17 in my own game as of yet. (Tried to update my own clothes mods that relied on this, but they keep showing up as red & black like the masks themselves, instead of the stuff + color2 they originally showed in A16. Still a texture to them, not the block colors. Nothing has changed other than the alteration to xml files to fit the changes to A17 apparel thing defs, so I'm at a loss of what to do...)  :'(
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: koni on August 01, 2017, 11:31:23 AM
Quote from: Tenshi~Akari on July 14, 2017, 03:35:21 AM
Question, since I'm feeling kinda dumb on this issue: has anyone been successful in getting this to work? I know it's just the initial release, but just wondering since I haven't been able to figure out how to get 1.4 working in A17 in my own game as of yet. (Tried to update my own clothes mods that relied on this, but they keep showing up as red & black like the masks themselves, instead of the stuff + color2 they originally showed in A16. Still a texture to them, not the block colors. Nothing has changed other than the alteration to xml files to fit the changes to A17 apparel thing defs, so I'm at a loss of what to do...)  :'(


By me it works relative fine. Maybe you could show me your mod, so I can take a look on it?

But I have detected an other problem: The random generated color of composite armors is always white, even when my pawns put of and on the clothes.
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: Tenshi~Akari on August 02, 2017, 11:22:17 PM
^^ I had to go ahead & remove this altogether in the end... currently playing around with Children & Pregnancy mod and turns out this doesn't play friendly with that. But what I know, like I said, the only things that I changed were the coding parts in the defs that required changing in order to not crash the game's mod loading on startup, but came across the issue mentioned earlier. Also noting I came across errors when trying to put armor/clothing that relied on this on pawns during creation, it would simply not appear & red errors would pop up, but would act just fine in game. Strange because that also never happened before the transition from A16.

Short version: I wasn't having much luck getting the masks to work & I wasn't 100% sure if the only available files in 1.4 were the ones needed or if I had to transfer certain files from 1.3 to fix stuff.
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: sirskips on August 18, 2017, 06:40:25 PM
Could you help make this work with the corruption 40k mod
Title: Re: [A16] Faction Colors 1.3 (04.04.2017)
Post by: Cpt.Ohu on August 25, 2017, 03:57:48 PM
Quote from: Tenshi~Akari on August 02, 2017, 11:22:17 PM
^^ I had to go ahead & remove this altogether in the end... currently playing around with Children & Pregnancy mod and turns out this doesn't play friendly with that. But what I know, like I said, the only things that I changed were the coding parts in the defs that required changing in order to not crash the game's mod loading on startup, but came across the issue mentioned earlier. Also noting I came across errors when trying to put armor/clothing that relied on this on pawns during creation, it would simply not appear & red errors would pop up, but would act just fine in game. Strange because that also never happened before the transition from A16.

Short version: I wasn't having much luck getting the masks to work & I wasn't 100% sure if the only available files in 1.4 were the ones needed or if I had to transfer certain files from 1.3 to fix stuff.

In theory the only thing that needs fixing going from 1.3 to 1.5 is ThingDef commonality and adding the drawsize to the graphicData if you want the item to be drawn bigger when not equipped.

I released a patch that fixes recent issues with items not being properly loaded after the game was shut down. Also fixed a glitch whereby the Color of armors wasn't properly saved and therefore changed after restarting the game.

Quote from: koni on June 24, 2017, 12:26:32 PM
Oh thank you so much.
Quote from: Cpt.Ohu on May 15, 2017, 12:27:13 PM
Quote from: koni on May 14, 2017, 09:10:12 AM
I have a little suggestion/wish to this framework mod, if it's possible: shields that can go with camouflage, composite or coat of arms colors. It also would be great  if this shields can be worn by any alien races like the apini who deny any non-apini clothing(shield cover whole body instead of specific parts).

And when do you think you can do that

I don't know when I come around to doing that. Having proper faction emblems that can appear on shields would be nice, but that probably takes another few weeks of work to get in.

Getting such shields to be worn by Aliens with race restriction would require a patch that adds the shield to the whitelist. No built in way to enable that from this mod.
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: CannibarRechter on August 28, 2017, 08:32:40 PM
Is the weapon size feature supposed to be working in A17? I downloaded your mod, and put it ahead of a texture mod I am working on. I added this:

   <Operation Class="PatchOperationAttributeAdd">
      <xpath>*/ThingDef[@Name = "BaseWeapon"]</xpath>
      <attribute>Class</attribute>
      <value>FactionColors.FactionItemDef</value>      
   </Operation>
   <Operation Class="PatchOperationReplace">
      <xpath>*/ThingDef[@Name = "BaseWeapon"]/thingClass</xpath>
      <value><thingClass>FactionColors.FactionItem</thingClass></value>      
   </Operation>   
   <Operation Class="PatchOperationAdd">
      <xpath>*/ThingDef[@Name = "BaseWeapon"]</xpath>
      <value><ItemMeshSize>(4,4,4)</ItemMeshSize></value>      
   </Operation>

The very large size was to make it obvious that it was working. Note, in addition to attempting to patch  BaseWeapon, I also tried a specific weapon with slightly different patch code (the Replace is an add instead, as the weapon doesn't have a thingClass). Nothing happens.
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: Cpt.Ohu on August 29, 2017, 01:20:06 AM
Due to some weird errors that popped up recently when overriding the way how the graphic gets colored, I had to rewrite both apparel and weapons. The item mesh size now gets called only when drawing on a pawn. To get the base item bigger, you'll have to edit the drawSize property in graphicData.
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: CannibarRechter on August 29, 2017, 06:21:48 AM
The above doesn't render on a pawn or on the ground.
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: koni on August 29, 2017, 08:47:55 AM
Can you please make a patch or something, that makes the shields of CE colorable with camo, composite or uniform? Or at least CE-compatible? That would be nice
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: Cpt.Ohu on August 30, 2017, 12:43:38 PM
Quote from: koni on August 29, 2017, 08:47:55 AM
Can you please make a patch or something, that makes the shields of CE colorable with camo, composite or uniform? Or at least CE-compatible? That would be nice

That's easier said than done I'm afraid. It requires either inheriting or directly patching the CE class, which wasn't laid out in a way that encourages that. I cannot promise to do this any time soon.
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: koni on August 30, 2017, 02:16:50 PM
Quote from: Cpt.Ohu on August 30, 2017, 12:43:38 PM
Quote from: koni on August 29, 2017, 08:47:55 AM
Can you please make a patch or something, that makes the shields of CE colorable with camo, composite or uniform? Or at least CE-compatible? That would be nice

That's easier said than done I'm afraid. It requires either inheriting or directly patching the CE class, which wasn't laid out in a way that encourages that. I cannot promise to do this any time soon.

Or just without CE, *with voice of a 8 years old girl:* pleeeaaase
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: Lilairen on August 31, 2017, 06:41:04 PM
Just a note, I'm playing with my mod layout for a new game and this is turning out to have incompatibilities with a bunch of things.  Not sure if that's an easy fix but I figured I'd mention it.

Thus far I've found incompatibilities with it and:
Apparello 2
Medieval Times
Vegetable Garden
Misc. Weapon Repair

I know the first two have clothing-based researches, which may be where the issue is.  Vegetable Garden likely on the cloth stuff?  Dunno.  Not sure about the repair mod.  Anyway, that's enough incompatibilities that I'm not going to see if anything else doesn't work.

Incompatibilities found by trying to build a modlist and then when I hit a crash loading Core, HugsLib, this mod, and then whatever the other mod was to doublecheck.  The other mods are versions loaded from the Steam Workshop.
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: Cpt.Ohu on September 01, 2017, 04:37:14 PM
Interesting to know. First of all, do you mean the base module, or the examples?

Apparello and Vegetable Garden when downloaded from here do not throw any messages about being incompatible. I'm not sure what I could possibly be touching on that doesn't work with Apparello.

Is there anything more specific than being incompatible you can tell me?
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: Lilairen on September 05, 2017, 11:16:30 PM
(Sorry about the delay, I don't check the forums regularly.)

I can go through and run the test again and see whether the error log says anything useful if you like. Basically, I got the "some of your mods have incompatibilities or are the wrong version so I'm loading everything without mods" errorbox when I loaded those mod combinations.

I downloaded the .zip from https://github.com/Cpt-Ohu/FactionColors/releases/tag/v1.5 .
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: Harry_Dicks on March 07, 2018, 06:42:53 AM
Will this mod ever be updated for B18? I'm fairly confident that I saw in the WH40K Corruption thread that this mod will no longer be needed for that, but does that mean that there will no longer be any updates/support for this as a standalone mod? And was this fully integrated into WH40K Corruption?
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: Tenshi~Akari on March 08, 2018, 06:48:48 AM
Missing this... if anything, just to have the ability to classify apparel with cut-out shaders. I had to put aside the apparel project I was doing, for one due to lack of time & patience to finish, but mostly because it relied on the ability to mask out colors. I don't know why vanilla lacks this ability, I like the fact of having a bit more detail to my apparel items without having to make multiple versions because I don't want certain details having set stuff colors bleeding into them.  :'(
Title: Re: [A17] Faction Colors 1.5 (25.08.2017)
Post by: Harry_Dicks on March 08, 2018, 09:24:12 PM
I'll give it a shot by my next day off if there hasn't been any progress since then. Might not require too much.