Ludeon Forums

Ludeon Forums

  • September 27, 2021, 10:16:54 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

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.

Messages - LWM

Pages: [1] 2 3 ... 73
1
Help / Listing_Standard no longer has ScrollView; fix
« on: July 12, 2021, 03:31:54 PM »
For 1.3, Listing_Standard no longer has a scroll view, so this workaround is a general way to fix any mod that use Listing_Standard's BeginScrollView &c.

2
Help / Re: Stockpile in production bills
« on: July 12, 2021, 03:28:02 PM »
Someone made a mod that does allow that, by the way.  I can't remember the name, tho ><  I know it's on Steam...

(It's a request that comes up ALL the time for Deep Storage users!)

3
Help / Re: Changing textures in mod based on event
« on: April 30, 2021, 01:06:05 AM »
If you can think of a vanilla (heck, or modded) item that does that, then you have a good chance of doing it by XML :)

4
Help / Re: Is it possible to patch a GameCondition?
« on: April 27, 2021, 06:46:19 PM »
Yep; public static variable :)  Which you figured out - you got this!

5
Help / Re: Changing textures in mod based on event
« on: April 27, 2021, 05:29:17 PM »
There has to be some C# code that resets the graphic internally; it's not as simple as adding another line of XML code (unless someone has already done the C# work somewhere?)

6
Help / Re: Is it possible to patch a GameCondition?
« on: April 27, 2021, 05:27:35 PM »
Also patch Init() to set your variable to 0?

7
Help / Re: Nested Scroll windows?
« on: April 26, 2021, 02:21:45 AM »
Answer: it works when it's not a ThingFiter UI (with scroll bars) inside a Listing_Standard.

I got around the problem by using something like this:
Code: [Select]
Widgets.ScrollView(...);//use height to make Rects
var l = new Listing_Standard();
l.Begin(innerRect);
...
height=l.CurHeight; //height is an object field
l.End();
var filterRect = new Rect(...);
ThingFilterUI.DoThingFilterConfigWidnow(...);
Widgets.EndScrollView();
It works for now, anyway :)  But listing standards seem hard to use if you want to do anything slightly complicated.  :P

8
How is your C#?

Another option might be to create an HeDiff that gets applied if the wearer has the right kind of clothing on?

9
Help / Re: Remove trait by patch
« on: April 25, 2021, 10:46:41 PM »
Oh, good, you figured out what was going on :)

10
Help / Nested Scroll windows?
« on: April 25, 2021, 10:43:27 PM »
Hey, everyone!  UI question here:

I have a Listing_Standard with a ScrollView, and inside that scroll view I get a Rect and inside that Rect I do the ThingFilter UI.  The problem is that the ThingFilter's scroll bars do not appear!  Only the ScrollView scroll bars appear...

Does anyone know if this problem will go away if I rewrite everything without the Listing_Standard?

11
Help / Re: How to get thing affected by facility from the facility?
« on: April 25, 2021, 12:08:07 AM »
I'm afraid you are referencing technical details that I'm not familiar with.  "Pointers" is a very avoided word in most C# literature, so I'm not sure what you mean?


12
Help / Re: Remove trait by patch
« on: April 25, 2021, 12:05:53 AM »
Hmm.  What's the XML you are using to remove it, what's the trait, and what's the full stack trace from the "Failed to find" error you got?

If you don't see any other references to its defName in any XML files, then something unusual is happening to the def.

13
Help / Re: Remove trait by patch
« on: April 23, 2021, 11:07:07 PM »
...search through all the XML for everything that explicitly references this trait?

That's the most likely source of this error.

14
Help / Re: How to get thing affected by facility from the facility?
« on: April 23, 2021, 11:04:40 PM »
There are various ways to make this a faster calculation (if you need speed - and I don't think you do if it's something that only happens from time to time)

One is to cache the .GetField() result during setup in some static variable, and call only .GetValue() when you need it.

A much fancier approach is to write a dynamic method to call it directly (we do this in Project RimFactory to call NoStorageBlockersIn(), which can get called a lot) - it's harder to manage, but is also faster, so if anyone else needs that, it's an option.

In your case, you probably don't need anything more fancy :)  Except null checks - because weird things do happen when mods are involved  ::) (I ran into a Thing with a null ...thingClass? once; I didn't think it was possible and yet...)

15
Help / Re: How to Create a Settings Page for Mod
« on: April 23, 2021, 10:54:56 PM »
Actually, that sort of thing would probably be easy with the XML settings engine Nobo built for Project RimFactory.  In general, there needs to be some link between Settings - which are C#-based, and def patches, which are XML.

If no one else comes up with a useful suggestion, we can see about factoring out the engine to a support mod (which we have talked about doing anyway), and then you could use it?

Pages: [1] 2 3 ... 73