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

Topics - Danetta

#1
Help / String.Translate Arguments
January 20, 2017, 05:30:40 AM
Hello.

I tried to use more arguments in Translate function.
My C# code:
stringBuilder.AppendLine("ContainsBeer".Translate(new object[]
                        {
                            this.wortCount,
                            25,
                            this.ComponentDef_Inside.label
                        }));



XML:
<ContainsBeer>Contains {0} / {1} {2}.</ContainsBeer>

Originally, there were only 2 arguments (0 and 1). Apparently, it is not enough to make it work. I looked into Translator code, but it seems like it should work independent of amount of arguments. Yet I am still getting errors about "index should be >=0 and less then amount of arguments" in console-log output.

Could do that without translate at all with const string, but interested what I am doing wrong.
#2
Help / Custom definition
January 18, 2017, 08:17:09 PM
Hello.

I have created a new class for my object and now I need to create a new definition inside one of XML files.

I did this:
  public class NewThing: ThingDef
    {
        public string newdef;
    }


Then I added <newdef> to XML, but how to make it loaded from XML into C# code?
#3
Help / Fermenting Barrel Enhance
January 17, 2017, 07:17:10 PM
Hello.

UPD:
I tried to create my first dll to enhance fermenting barrel with new features. At first I just tried to explore the code a bit, created some new barrels with new ingredients and results, but then I tried to make it so you will be able to select what you want to produce. Like in growing zone, but with drinks instead.

yield return PlantToGrowSettableUtility.SetPlantToGrowCommand(this);
This is what I used in "public override IEnumerable<Gizmo> GetGizmos()" but it's kinda bad. It has too much overhead from plants and many things need to be tracked/redone. So it's probably better to create something similar, but without touching any plants, because the only thing we need is to give the player a selection menu and then track the variable (which contains selected product) in our barrel class so various "fill barrel" and "get product from barrel" jobs will know with which resource to fill the barrel and which product to get as result.

Anything about how to make this work? Not trying to say "make this for me", but some advices will be appreciated.
#4
Mods / [MOD REQUEST] allow deadman's apparel
January 17, 2017, 07:00:42 AM
Hello.
I think current storage settings "allow non-deadman's apparel" is not very usable.
To use it correctly you need to have at least 2 storages set with different priorities so one will allow non-deadman's apparel and another will not. It's still would not be enough to prevent deadman's apparel from being hauled to your default storages. What I ask for is "allow deadman's apparel" as setting in stockpiles instead of opposite one.

I think it should be kinda easy to do for those who have experience.
#5
Stories / Snowman feels no pain
January 12, 2017, 04:44:01 PM
We are snowmen. We can't feel pain, we can't die. You never truly think about your landing, it's hard to when you barely awake from cryptosleep. It comes later when you know that it's better not to wake up at all... or not? Whitney, Walls and Lu were not thinking about it. They already knew. They are snowmen, they can't feel pain, they can't die.

Piercing cold made itself felt very quickly, so it became clear that the emergency landing happened almost in the heart of the south pole. Survivors of former medic, man-at-home and vet moved towards survival. This story cannot be complete without mention of Alvine. Alvine is still here, under heavy mass of snow. He is a snowman too, that's for sure.

When snowman thinks about hunger — the food comes. Sometimes it's the best dinner in the world in your rich apartments. Sometimes it's an angry polar bear. We saved Alvine this time, but he lost his left eye. He is a very brave dog. When snowman thinks about cold — the heat comes. Sometimes it's the same as the food. We got really warm clothes from the skin of a polar bear, but there is a new snowman now above Alvine's grave. This one is made of snow and not of flesh.

We don't know how much time has passed since our arrival, but someone said it was about 3-5 days. Emergency pod appeared from nowhere and we knew we should do something about it. It was Walls' mother, heavy wounded and angry. We tried to save her, but something terrible happened. We didn't know for sure, because were not all near each other at the moment, but someone said Walls' mother tried to run into a cold desert absolutely nude, she clearly wanted to die. Yet Walls tried to save her from madness, but she lost her legs as a result. It was a huge blow, but Walls gave her food and tried to keep her room warm as much as possible.

If you have ever created a snowman — you know how it feels when some young boy comes and destroys it. You are never angry with them, it's a part of what makes them young boys, but sometimes you are a snowman and you don't want to be destroyed. We tried to get some food, but it seems like there was only one snowhare in the whole desert. However, that hunt saved us because we saw that young boy coming long before he arrived. He was armed and we knew it's a bad sign. We ambushed and killed him. It was our mistake. Two more young boys come shortly after him, but snowmen are strong, they can't feel pain, they can't die.

It's still warm inside, but there is a cold void in our hearts. It's a part of what makes you a snowman, you have to be cold. You can't die, but you can always melt. Whitney was the first one to melt. We prisoned her after her madness, but lost heavy pile of food due to that, if you can call these young boys "food".

When "someone" is melting, you have to be very careful. There is a set of basic rules. First, check if you are made of the same dough as "someone". Second, check if you are near "someone". If so, you are in danger. Walls was not in danger already, this time he suffered from the consequences of it. You may ask why Lu is not a figure in our story yet. She is. Snowman with rifle is always better than one without, and a single one who is not prisoned yet. We don't count those who can't walk. Snowmen can walk.

Soon Lu found one more snowhare. Not a big deal, though a very tasty one. Whitney and Walls are no longer snowmen. They are still alive, but have already melted, they don't need fresh snow. Snowmen never ask god for help, they are snowgods themselves. Lone wanderer comes with some items to trade, but only fresh snow can still hunger. We have enough money, but there is no one to buy something from. Well, sometimes flake and smokeleaf are good too.

She is alone now. She still has plenty of snow, enough for 15 days, from her friends — former snowmen, and plenty of drugs, enough for 7 days. She is not going to melt. Two more young boys. The rifle is her best friend. She doesn't want to harm anyone, she wants them to became snowmen too and to build even more great snowmen together, but it's a different story. She killed them, but not as clear and sharp as before. No, she is not melting, she is just different from this snow. Something red poured from her body and there are no other snowmen to be together. Wait.. there is one. Last one near Alvine's grave. She can do it. Only quarter kilometer away from her room. Hard to breathe when your lung is shot through. Last dose of drugs, last snowman, a lot of fresh food for polar bears, and the longest quarter kilometer in anyone's life.

The story is over here. You may ask if she made it. Yes, she did, I saw it with my own eyes, closer and closer and then she was touching me in her last seconds. She has not melted, no, she is not like all the others.

We are snowmen. We can't feel pain. Yet we still can die.