Setting up dropdown menu for walls

Started by Elrol_Arrowsend, December 11, 2017, 03:30:57 PM

Previous topic - Next topic

Elrol_Arrowsend

In the vanilla game, when you go to make a wall, it will list all the wall types you can build, wood, stone, metal, I am wanting to do that with my mod to save some space. Where should I go to find the defs for that, or how would I manage to do this?

dburgdorf

That happens automatically when an item is defined to be made with "stuff" rather than (or in addition to) having a set costList attribute.
- Rainbeau Flambe (aka Darryl Burgdorf) -
Old. Short. Grumpy. Bearded. "Yeah, I'm a dorf."



Buy me a Dr Pepper?

Elrol_Arrowsend

#2
So how would I go about adding the "stuff" using tags like:

<stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
      <li>Stony</li>
    </stuffCategories>


if thats the case, how would I define what each category would look like or be called?

-Edit-
What I am adding, is different styled walls, the first of which will be a few different colored walls, like a red wall, but the walls would all be made with the same material.

jamaicancastle

You could look into the mod ArchitectSense, that will allow you to designate a right-click menu for arbitrary buildings.

As for using stuff: you'll need two tags, one a list of stuffCategories (which you have) and a costStuffCount, which determines how much of that "stuff" you need to build the item. Most of the attributes of the "stuffed" versions of the items (name, color, appearance) are automatically determined by the material they use. You might be able to make what you want with that, but it would be a lot of extra work in my opinion.

Elrol_Arrowsend

Alright, thanks, I will see what I can do

Fluffy (l2032)

Yeah you're in a bit of a pickle there. The vanilla stuff system only allows for one of the materials to be stuffed, so you could create walls out of different types of stone, but then they'd all have the same style and color, so you'd need to make defs for all the styles/colours you want to use. You could add a 'dye' ingredient as a stuff, but then you'd need to create defs for each building material. In both cases you'd be creating clutter in the architect menu.

My ArchitectSense mod can help reduce that clutter, as it allows you to make subcategories. So you could make defs with the standard wood/stone/metal stuff types for each style and colour combination, and then create a category for each style. The user will see a button for each style, clicking that opens a 'dropdown' with buttons for the colours, and clicking that gives the stuff selection dropdown. Setting it up is fairly easy, there's a few examples included in the mod's source.

https://github.com/FluffierThanThou/RW_ArchitectSense