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

Messages - DrMrEd

#16
Quote from: DJRockXD on October 12, 2017, 06:48:33 AM
I couldn't find the "defName" file or the "Bullet_Pistol" document using that "find in file" thing. Plus I could only find that function in Notepad++, not in Atom...
I found a "Bullet_Pistol" reference manually in the "Weapons_Guns" XML document, but not a stand alone version of it...
And I am probably an idiot for not being able to make the "Find in Files" function work even in Notepad++, as it couldn't find anything on my computer when I tested it out multiple times... Help please ):
Kudos to the tutorial maker and suggesting folks learn to search the Defs -- you'll be doing a ton of this when you start down your own path. But for this one, no need to search blindly for strings in files. All the weapons stuff is in Defs\ThingDefs_Misc\Weapons_Guns.xml. There Bullet_Pistol def is at line 65. There is no standalone version - although each ThingDef could probably be spread out in its own file, but that would be a nightmare in other ways.
#17
Help / AssignOwner UI box?
October 12, 2017, 08:43:45 AM
Greetings modders. Newb modder here, but worked through a few basic mods and learned a lot, but now I'm stuck.

In my current project, I would like to use the AssignOwner button in the UI for my new object. I've been all through the Bed and Grave source code and Defs, but can't see where this is configured. I feel like I've missed something obvious regarding the UI buttons. Can anyone point me in the right direction?

My custom ThingClass implements IAssignableBuilding, but that doesn't take care of this bit of magic. I actually have all the code to claim/unclaim written and working through a cool bit of C# using Extensions to add new methods to the Pawn_Ownership class. I can test this by manually calling up the Dialog_AssignBuildingOwner from the ctor() in my ThingClass, which is interesting, but useless in-game.