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 - Reikenbach

#1
Unfinished / [A15] Wall Devices, Graphical Classes, Gizmos
September 14, 2016, 12:42:25 AM


Current work in progress with wall-mounted lights, switches and windows. All derive from Wall without an independent redefinition, so they should be compatible with any other mods and have their property values scale accordingly if the default Walls are changed. All three also come with bricks/planks/smooth texture variants.

The WallSwitch uses a custom Graphic_Flickable graphic class, which is a simplified subclass of my custom Graphic_States class. These new graphical classes will allow modders to define multiple sets of regular graphics (Graphic_Multi, Graphic_Appearances, Graphic_Single, etc.) for use by a single ThingDef without having to compile a new DLL. For example, the WallSwitch uses Graphic_Flickable to have two different sets of Graphic_Appearances for its On and Off states. Graphic_States currently requires the addition of a CompProperties_States ThingComp to the ThingDef so that custom states can be defined, while Graphic_Flickable only requires a CompProperties_Flickable.

I've also created a CompProperties_Commands class that will enable the creation of simple Command gizmos to modify the properties of Thing and its Comps. I'll be using this to add color switching to the wall lights (either via preset color definitions or direct RGB adjustments) but the gizmos could be used for other things, like adding different levels of power generation/fuel consumption to a generator or adjusting the appearance of a Thing using Graphic_States.

Feedback and suggestions are appreciated, especially regarding the graphics. I tried to stay somewhat close to the vanilla Rimworld art style but was not terribly successful. The WallSwitch I'm fairly happy with, though i'll probably end up changing the blue glow of the On state.
#2
Help / Texture Loads Perfectly Despite Error Message
September 09, 2016, 07:58:02 AM
So I've got a little ThingDef that inherits from Wall. Supposed to be an inset wall lamp. Doesn't change anything from the parent class save for the name, description, texture paths, and the addition of a costList and a few comps. I specifically wanted to inherit from Wall rather than re-implement the values so that WallLamp would keep the same stats and functions as a regular wall in the event another mod changed them. It still uses the Graphic_Appearances class and I've got the texture atlases for each material type as well as their uiIcons. It seems like it's all set up right when I compare it with other mods. Base texPath is Things/Building/Linked/WallLamp, blueprint is Things/Building/Linked/WallLamp/WallLamp_Blueprint_Atlas, uiIcon is Things/Building/Linked/WallLamp/WallLampSmooth_MenuIcon. The engine seemed to get pissy when I separated the textures by one level (base in Linked/WallLamp, blueprint and icon in Linked) even though the vanilla Wall structures it that way, but whatever, no big deal.

Everything works fine; game doesn't crash, I can build the tile textures, view the UI textures and they both look right. No debug messages when I start the game menu up, other than one letting me know how long it took to load the mod textures. When I start a new game, though, I'm immediately alerted by the debugger that the engine could not load my textures "in any active mod or in base resources," for every single texture - tile, blueprint or icon - despite the fact that that I can clearly the textures in use. The message pops up again if I build a new WallLamp for the first time, either using a different texture variant or for the first time since loading in. Stranger, the debugger says it was trying to load the textures from a path I never gave it, namely Things/Building/Linked/Wall/(Texture Name). There doesn't seem to be any issue with the vanilla wall, which also builds just fine using its regular textures, yet similarly gives me messages about failing to load those same textures (for WallLamp, not Wall). It's not a problem with the textures themselves, as I tried substituting renamed textures from a functional mod and ran into the same problem. I also tried including a copied redefinition of Wall in my mod before the WallLamp definition, rather than just inheriting without it, but again, same issue.

I've been trying to fix this for a few hours now. The most frustrating part is that a.) the mod seems to work as intended other than the debugger alerts, b.) my implementation appears to be more or less identical to that of another mod which I know works, and c.) I was experiencing this problem last night and could have sworn I fixed it before I went to bed.

Any help would be appreciated.