RimWorld art source

Started by Tynan, March 02, 2014, 06:47:58 PM

Previous topic - Next topic

dearmad

I replaced some of the texture\ui\commands\ files in a mod. And they aren't working while my designators directory IS working. Anyone have an idea why. I sued the same psd size, everything, etc.

Help?

Moogie

#196
I'm having the same trouble. I'm trying to replace snow/ice textures.

The ice texture replaced fine. Its path is: Textures\Terrain\Surfaces\Ice.png

But the snow refuses to work. Its paths are:  Textures\Terrain\Other\Snow.png and Textures\Weather\Overlays\SnowWorldOverlay.png

The filenames are correct and the paths, according to the art source, should also be correct.


Hmm. Had a closer look in the code and the actual path seems to be Materials\Misc\Snow and Materials\Weather... I think? But that's materials, right? Not textures? I couldn't find any mention of where "MatLoader" gets its texture paths from.

"MatBases" is the only place in the whole code where the word Snow even appears. I think it's forced to load from the resources.assets archive and not able to be modded without entirely changing how the whole darn thing works. But I don't know. I'm firing into the dark with all this.

Any clues?

using System;
using UnityEngine;

namespace Verse
{
// Token: 0x02000451 RID: 1105
[StaticConstructorOnStartup]
public static class MatBases
{
// Token: 0x040013FF RID: 5119
public static readonly Material LightOverlay = MatLoader.LoadMat("Lighting/LightOverlay", -1);

// Token: 0x04001400 RID: 5120
public static readonly Material SunShadow = MatLoader.LoadMat("Lighting/SunShadow", -1);

// Token: 0x04001401 RID: 5121
public static readonly Material SunShadowFade = MatBases.SunShadow;

// Token: 0x04001402 RID: 5122
public static readonly Material EdgeShadow = MatLoader.LoadMat("Lighting/EdgeShadow", -1);

// Token: 0x04001403 RID: 5123
public static readonly Material IndoorMask = MatLoader.LoadMat("Misc/IndoorMask", -1);

// Token: 0x04001404 RID: 5124
public static readonly Material FogOfWar = MatLoader.LoadMat("Misc/FogOfWar", -1);

// Token: 0x04001405 RID: 5125
public static readonly Material Snow = MatLoader.LoadMat("Misc/Snow", -1);
}
}


using System;
using System.Collections.Generic;
using UnityEngine;

namespace Verse
{
// Token: 0x02000453 RID: 1107
public static class MatLoader
{
// Token: 0x060020C2 RID: 8386 RVA: 0x000C86D8 File Offset: 0x000C68D8
public static Material LoadMat(string matPath, int renderQueue = -1)
{
Material material = (Material)Resources.Load("Materials/" + matPath, typeof(Material));
if (material == null)
{
Log.Warning("Could not load material " + matPath, false);
}
MatLoader.Request key = new MatLoader.Request
{
path = matPath,
renderQueue = renderQueue
};
Material material2;
if (!MatLoader.dict.TryGetValue(key, out material2))
{
material2 = MaterialAllocator.Create(material);
if (renderQueue != -1)
{
material2.renderQueue = renderQueue;
}
MatLoader.dict.Add(key, material2);
}
return material2;
}

// Token: 0x04001406 RID: 5126
private static Dictionary<MatLoader.Request, Material> dict = new Dictionary<MatLoader.Request, Material>();

// Token: 0x0200161C RID: 5660
private struct Request
{
// Token: 0x06008192 RID: 33170 RVA: 0x0029BF63 File Offset: 0x0029A163
public override int GetHashCode()
{
return Gen.HashCombineInt(Gen.HashCombine<string>(0, this.path), this.renderQueue);
}

// Token: 0x06008193 RID: 33171 RVA: 0x0029BF7C File Offset: 0x0029A17C
public override bool Equals(object obj)
{
return obj is MatLoader.Request && this.Equals((MatLoader.Request)obj);
}

// Token: 0x06008194 RID: 33172 RVA: 0x0029BF94 File Offset: 0x0029A194
public bool Equals(MatLoader.Request other)
{
return other.path == this.path && other.renderQueue == this.renderQueue;
}

// Token: 0x06008195 RID: 33173 RVA: 0x0029BFB9 File Offset: 0x0029A1B9
public static bool operator ==(MatLoader.Request lhs, MatLoader.Request rhs)
{
return lhs.Equals(rhs);
}

// Token: 0x06008196 RID: 33174 RVA: 0x0029BFC3 File Offset: 0x0029A1C3
public static bool operator !=(MatLoader.Request lhs, MatLoader.Request rhs)
{
return !(lhs == rhs);
}

// Token: 0x06008197 RID: 33175 RVA: 0x0029BFCF File Offset: 0x0029A1CF
public override string ToString()
{
return string.Concat(new object[]
{
"MatLoader.Request(",
this.path,
", ",
this.renderQueue,
")"
});
}

// Token: 0x04005488 RID: 21640
public string path;

// Token: 0x04005489 RID: 21641
public int renderQueue;
}
}
}

Napoleonite

Did anybody extract the 1.1 textures yet?

SargBjornson

They are pinned at the art channel in RimWorld's Discord

IngoKnieto



Tynan

I have updated the art source files with the latest art.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

ethouiche

#202
Could it be possible to have a link to the raw png results ?
I feel these textures are more useful as an inspiration than as a working tools which psd files with layers are.
Png files are easier to browse through. 2 versions, with and without the folder structure, would be interesting too.

Tynan

Can't you just extract those from the game using the usual tools?
Tynan Sylvester - @TynanSylvester - Tynan's Blog

ethouiche

I think you are refering to this : https://rimworldwiki.com/wiki/Modding_Tutorials/Assets
I dont have these tools. My feeling is that if one person makes the textures available, it allows hundreds of other people to not download the tools and process the files. I think it would be a nice download/hard drive space/processing saving overall.
I imagine you dont want your assets to be directly available without any effort to provide and it makes sense too.

Undeadbanana

#205
Quote from: ethouiche on September 08, 2020, 12:59:52 PM
I think you are refering to this : https://rimworldwiki.com/wiki/Modding_Tutorials/Assets
I dont have these tools. My feeling is that if one person makes the textures available, it allows hundreds of other people to not download the tools and process the files. I think it would be a nice download/hard drive space/processing saving overall.
I imagine you dont want your assets to be directly available without any effort to provide and it makes sense too.

UnityEx is free. There's another called uTinyRip(?) and it works pretty fast.

llunak

Will Ideology art be made available too?

And how does one extract the assets from Ideology? It seems to be some newer format, and I couldn't extract them with any of the recommended tools.

Tynan

Yes it will, though no date on that yet.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Holgast

Hi Tynan, could you please update the Dropbox with the 1.4 vanilla art source? I'd like to take a look at the stump art but we only have the polluted ones from Biotech there currently.

korvas

Hi Tynan!

I was wondering if you could provide an updated version of this texture reference library for the newest version of Rimworld and its DLCs? This upload has been IMMENSELY helpful and relieved many a headache. My current project has broken texture references and I am having difficulty figuring out how to resolve them from the .def files alone.

Many thanks.