Drain Vore code (Done... probably)

Screw up game balance and fix bugs by creating more bugs. Now you too can join the discussion. This is where the magic happens. Sometimes actual magic.

Regarding the weight system and draining...

Poll ended at Wed Apr 13, 2016 8:05 pm

Draining should drain nutrients and nutrients alone, leave weight unaffected.
0
No votes
Draining should drain both nutrients and weight at the same time.
0
No votes
Draining should drain nutrients first, then weight.
3
60%
Draining nutrients and draining weight should be their own, seperate modes.
2
40%
Other (Please post what you think).
0
No votes
 
Total votes : 5

Re: Drain Vore code

Postby Scree » Fri Apr 08, 2016 7:31 pm

Would be good for an option 'cause some people might not want that sorta thing and just want the hunger thing. Shouldn't stealing someone's entire nutrient supply have this effect anyway?
User avatar
Scree
 
Posts: 1002
Joined: Thu Aug 06, 2015 3:57 pm

Re: Drain Vore code

Postby Daisy » Fri Apr 08, 2016 7:42 pm

So you're suggesting a separate mode that eats away at fat instead of nutrients instead of putting it all into one mode? Hmm... that could work, but the pred could easily just turn off drain mode once they eat away at all the nutrients... then again, they might have more than one person in there, and it would make a nice, lovely (and long) alternative to lipozine without leaving the person starving... I'll add a small poll to see.

On another note, I've been thinking about the womb having one more mode called 'nurture', where it feeds the prey inside until they become pleasantly full, then it stops until they dip down below the threshold again, or where it tries to match the mother's nutrient levels with a small allowance (thinking about if the 'mother' has 30 nutrients above the nurtured prey, the body starts to pour the 'mother's nutrients into them), so she (or he) can eat for two (or six... or the WHOLE STATION!). What do you guys think?

Edit 1: Well, I managed to include it into the drain code. It'll cycle to draining weight once nutrition hits the threshold. If people prefer it a bit differently, it isn't too hard to adjust.

Code: Select all
      //STOMACH DRAIN
      if(iscarbon(M) && owner.stat != DEAD && digest_mode == "Drain" && M.stat != DEAD))
         if(air_master.current_cycle%3==1)
            if(!(M.status_flags & GODMODE))
               if(M.nutrition > 90)
                  owner.nutrition += 10            // I took it from the womb code because I'm SOOOO clever... Edit the values and the code to your heart's content. -Daisy
                  M.nutrition -= 10
               else if (M.nutrition <= 90)
                  if (M.weakened == 0)                  // If they were weakened before and they're that hungry, both of you are probably not going to notice a difference.
                     owner << "<span class='notice'>You feel [M]'s struggles dying down as their body is drained almost completely to the point of exaustion.</span>"   //Pred's message.
                     M << "<span class='notice'>Your body feels too weak to offer any significant resistance inside of [owner]'s stomach.</span>"   //Prey's message.
                     M.Weaken(10)
                  else
                     M.Weaken(10)                  // Knocked down, but still able to talk and emote clearly.Keeps resetting to 10 until free.
                  if (M.weight > 70.05)                  // Turn fat into nutrition!
                     M.weight -= 0.05
                     owner.nutrition += 1            // I have no idea how much 1 unit of weight is worth in terms of nutrition
                  else if (M.weight < 70)
                     M.weight = 70                  // Prevent it from accidentally going lower


The only problems I have now though is finding out a condition to prompt both pred and prey once the prey's weight hit's 70... right now though it works fine, though the pred might be getting too much nutrition from too little weight. It might need to be adjusted to 0.5, but otherwise the code seems pretty done.

Edit 2: Alright, I fiddled around with the code some more. While the previous code it was possible to dip below 70 and all the person had to do was expel the person at the right time, this one just makes sure that they have enough... All I did was just add .05 to the weight check... I changed the code above to reflect it.
More importantly though, I realized editing belly.dm was unnecessary, so I'm going to update the code on the front page and remove the code for belly.dm. As a fun extra, I got the nurture code to work, in case anyone was interested in nurturing people in their womb.

Code: Select all
// @Override
/datum/belly/womb/toggle_digestion()
   digest_mode = input("Womb Mode") in list("Hold", "Heal", "Nurture", "Transform (Male)", "Transform (Female)", "Transform (Keep Gender)", "Transform (Change Species)", "Digest", "Transform (Change Species) (EGG)", "Transform (Keep Gender) (EGG)", "Transform (Male) (EGG)", "Transform (Female) (EGG)")
   switch (digest_mode)
      if("Heal")
         owner << "<span class='notice'>You will now heal people you've unbirthed.</span>"
      if("Nurture")
         owner << "<span class='notice'>You will now share nutrients with people you've unbirthed.</span>"
      if("Digest")
         owner << "<span class='notice'>You will now digest people you've unbirthed.</span>"
      if("Hold")
         owner << "<span class='notice'>You will now harmlessly hold people you've unbirthed.</span>"
      if("Transform (Male)")
         owner << "<span class='notice'>You will now transform people you've unbirthed into your son.</span>"
      if("Transform (Female)")
         owner << "<span class='notice'>You will now transform people you've unbirthed into your daughter.</span>"
      if("Transform (Keep Gender)")
         owner << "<span class='notice'>You will now transform people you've unbirthed, but they will keep their gender.</span>"
      if("Transform (Change Species)")
         owner << "<span class='notice'>You will now transform people you've unbirthed to look similar to your species.</span>"
      if("Transform (Change Species) (EGG)")
         owner << "<span class='notice'>You will now transform people you've unbirthed to look similar to your species, and surround them with an egg.</span>"
      if("Transform (Keep Gender) (EGG)")
         owner << "<span class='notice'>You will now transform people you've unbirthed to look similar to you and surround them with an egg, but they will keep their gender.</span>"
      if("Transform (Male) (EGG)")
         owner << "<span class='notice'>You will now transform people you've unbirthed into your son, and will surround them with an egg.</span>"
      if("Transform (Female) (EGG)")
         owner << "<span class='notice'>You will now transform people you've unbirthed into your daughter.</span>"
// @Override
/datum/belly/womb/process_Life()
   for(var/mob/living/M in internal_contents)
      //WOMB HEAL
      if(iscarbon(M) && owner.stat != DEAD && digest_mode == DM_HEAL && M.stat != DEAD)
         if(air_master.current_cycle%3==1)
            if(!(M.status_flags & GODMODE))
               if(owner.nutrition > 90)
                  M.adjustBruteLoss(-5)
                  M.adjustFireLoss(-5)
                  owner.nutrition -= 2
                  if(M.nutrition <= 400)
                     M.nutrition += 1
                     
      //WOMB NURTURE
      if(iscarbon(M) && owner.stat != DEAD && digest_mode == "Nurture" && M.stat != DEAD)
         if(air_master.current_cycle%3==1)
            if(!(M.status_flags & GODMODE))
               if(owner.nutrition > (M.nutrition + 10))   // If the holder has 10 more nutrients than the holdee, then it begins transfering nutrients.
                  M.nutrition += 4
                  owner.nutrition -= 4


Another edit: With the voting done, it looks like people mostly prefer draining nutrition, then weight, but a few others wanted a separate mode for both. With that done, I guess if anyone else would like to add recommendations to the code, then be my guest, otherwise I think it's ready to be put into the game. Here below is a file inside of a zip you can place inside of the \code\modules\vore\belly folder. Just remember to copy the old file into a different folder in case something does go wrong. In order to use the fancy smancy draining mode make sure you toggle your stomach to drain, sort of like if you were going to change it to digest. A prompt similar to the womb should pop up and you can select from there. If you find any issues or suggestions, post them here. At least until it gets added to the actual game.

Edit one more time: I decided to move the file to the front page.
Daisy
 
Posts: 22
Joined: Sat Apr 02, 2016 11:05 pm

Previous

Return to Coding

Who is online

Users browsing this forum: No registered users and 4 guests