so if I wanted to achieve this (...) in a mod, would xml be sufficient or...

Started by forestfey, January 18, 2017, 12:11:54 PM

Previous topic - Next topic

forestfey

Howdy colonists, just came here and introduced myself; I made the "new" GermanShepherd that's on steam's workshop (http://steamcommunity.com/sharedfiles/filedetails/?id=844084979 ...new compared to the one from Skullywags DogProject).

Majorly interested in content-mods, because I can get artsy there, I'm just getting started and have almost no (personal! But access to^^) experience in software development and documentation-procedures whatsoever... so I might quickly run into some difficulties when I want to try out specififc things.

But I already have an idea for one quite specific thing, which I have no clue how to set it up, if a simple xml-script would suffice or if I had to get into assemblies, C# and stuff.

I know it should be possible, because there's at least 2 other mods that show some of the functionality/methods I have in mind... ("ED shield generators" and "Path Avoid").
So, the idea is: An object that has some sort of "aura" or field around it to keep away all wild/untamed animals, except for crazed ones.

How do I approach this? Any suggestions highly appreciated.
"Despite all our accomplishments, we owe our existence to a six-inch layer of top-soil and the fact that it rains."
_
Klirrend klare Nacht
funkelt durch den Schleier.
Entfaltung nach innen

Jingling clear night
Sparkles through the veil.
Unfolding inwards

O Negative

Yeah, xml wouldn't be sufficient for something like this. C# would be required, but I'm not entirely sure as to how you would need to go about it. I'm a C# newbie still.

skullywag

Xml definining a new building, which either has a custom thingClass (c#) which handles the job of repelling animals or a thingComp (c#) which does the same, the thingComp just makes it so you could reuse this code easier on other buildings if needs be.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

forestfey

Quote from: skullywag on January 19, 2017, 04:29:34 AM
...which handles the job of repelling animals or a thingComp (c#) which does the same, the thingComp just makes it so you could reuse this code easier on other buildings if needs be.
OHGOD! *headshaking, grunting* I knew it. The thingComp (which I guess stands for component or something?) would be the better solution, because I wanted to add this property to an already existing building...uh, -class, that already has some other uses like a  -ah-screw-it- meal-source. Yes, a campfire. I'm more into lowtech-solutions that still work during solar flares ;)

EDIT: I guess that means I need to get visual studio and go on some sort of mental-cognitive expedition over the next days... woooord. But I know at least where to look and what for, which is good. X marks the spot! *starts making a list of needed supplies*
"Despite all our accomplishments, we owe our existence to a six-inch layer of top-soil and the fact that it rains."
_
Klirrend klare Nacht
funkelt durch den Schleier.
Entfaltung nach innen

Jingling clear night
Sparkles through the veil.
Unfolding inwards