Adding a custom item to a specific trader

Started by Vithrick, August 20, 2024, 08:36:31 AM

Previous topic - Next topic

Vithrick

I am trying to get into modding, but am still facing some challenges. While for most features I want to put into my mod I can look at similar things in the game files, sometimes I just can't find such things.

One of the things I want to add is making a seed item in my mod buyable at exotic goods traders. I can find the part in the .xml file that adds the exotic goods trader, but can't find any code that adds DLC items to said trader(s). Looking through all .xml files in all of Defs in biotech, I can't even find the word Orbital_Exotic once, even though it should (in my theory) be used for making polux seeds buyable at orbital exotic goods traders.

How could I add a script in a .xml file that adds an item defined as 'Cryosapseed' to the trader defined as 'Orbital_Exotic'?

Thanks to anyone in advance for your time.

Vithrick

I have kind of changed my mind over what I want to do with the mod. I now want to add the custom seed to a custom trader. I do still have another problem though: I have a custom drug that I want to only be sold by my custom trader, but some traders will sell any drug with <tradeability> set to `Buyable`, which would of course include my custom drug.

How do I prevent other traders from buying my custom drug, or how do I make a specific trader sell items set to `Sellable`?

Thanks in advance.