Possibly terrible vore mob/code

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.

Possibly terrible vore mob/code

Postby ArgobargSoup » Sun Oct 16, 2016 6:57 am

So I ended up writin' a catgirl mob fer my personal V.O.R.E. Station test server. (This was before I found out that catgirls had actually been included in the main server.) It's not the best code, but I managed ta get something working, and there are some things it does that the main server stuff doesn't, so I thought I'd at least put it here.

Here's the actual code itself. I am not responsible fer gouged-out eyes due ta readin' terrible code. :P

endo.dm
[+]
Code: Select all
/*
--------------
NOTES FOR DEVS
--------------

If your predator has a limited capacity, it should have sprites for every interval of its size, rounded to the nearest whole number.
Example: If I have a snake predator who has a capacity of 3, I need sprites for snake-1, snake-2, and snake-3.

Capacity should always be a whole number.

Also max_size and min_size should never exceed capacity or the icon will break.

Don't use ranged mobs for vore mobs.


Argobarg's Edit:  Trying to make an "endo" hostile mob.  Duplicating the hostile/vore type for a hostile/endo.  Mostly so I can write my own icon update function for my catgirls.

An "endo" hostile mob type doesn't digest; instead, it should enter a docile state once it's full.  If it's then emptied, there should be a period of time before it starts looking for occupants again, allowing you to say, feed it a crewmember, take it to a containment thingie somewhere, then extract the crewmember and lock the mob in.

More of an inconvenience than a threat.

*/


/mob/living/simple_animal/hostile/endo
   name = "catgirl"
   desc = "It's a catgirl!"
   icon_dead = "catgirl-dead"
   icon_living = "catgirl"
   icon_state = "catgirl"
   icon = 'icons/mob/endo.dmi'
   var/baseicon = "catgirl" //For modified icon update function.  Should allow alternate things, like my sleeping catgirls.
   var/capacity = 1 // Zero is infinite. Do not set higher than you have icons to update.
   var/max_size = 1 // Max: 2
   var/min_size = 0.25 // Min: 0.25
   var/picky = 0 // Can eat undigestable prey // Not that this matters, since endo, but, well.
   var/fullness = 0
   swallowTime = 3 // Hungry little bastards.

   // By default, this is what most vore mobs are capable of.
   response_help = "pets"
   response_disarm = "gently pushes aside"
   response_harm = "hits"
   speed = 4
   harm_intent_damage = 0
   melee_damage_lower = 0
   melee_damage_upper = 0  //Note to self, figure out a way for mobs to only deal damage to targets they DON'T wanna eat.
   attacktext = "baps"
   attack_sound = 'sound/weapons/throwtap.ogg'
   min_oxy = 0
   max_oxy = 0
   min_tox = 0
   max_tox = 0
   min_co2 = 0
   max_co2 = 0
   min_n2 = 0
   max_n2 = 0
   minbodytemp = 0
   //maxbodytemp = 370
   heat_damage_per_tick = 15
   cold_damage_per_tick = 10
   unsuitable_atoms_damage = 10
   var/sizeInterval = 1  //Might be able ta use this fer something.

/mob/living/simple_animal/hostile/endo/update_icons()
   if(stat == DEAD)
      return

   if(capacity)
      fullness = 0
      for(var/I in vore_organs)
         var/datum/belly/B = vore_organs[I]
         for(var/mob/living/M in B.internal_contents)
            fullness += M.size_multiplier
            //world << "[baseicon]-[fullness]"  //Found that it calls for a zero before the point.  So like, "catgirl-0.5"
      fullness = round(fullness, sizeInterval) //Oh hey.  Now will show a belly when stuffed with enough micros.
      if(fullness)
         if (fullness > capacity) // Player controlled.
            icon_state = "[baseicon]-[capacity]"
         else
            icon_state = "[baseicon]-[fullness]"
      else
         icon_state = baseicon
   ..()

/mob/living/simple_animal/hostile/endo/New()

   if(!vore_organs.len)
      var/datum/belly/B = new /datum/belly(src)
      B.immutable = 1
      B.name = "Stomach"
      B.inside_flavor = "It appears to be rather warm and wet. Makes sense, considering it's inside \the [name]."
      B.digest_mode = "Hold" // Endo mobs!
      vore_organs[B.name] = B
      vore_selected = "Stomach"
      B.vore_verb = "swallow"
      B.emote_lists[DM_HOLD] = list(
         "The insides knead at you gently for a moment.",
         "Your captor takes a deep breath and sighs, shifting you somewhat.",
         "During a moment of quiet, breathing becomes the most audible thing.",
         "The warm slickness surrounds and kneads on you.")

      B.emote_lists[DM_DIGEST] = list()
   ..()

/mob/living/simple_animal/hostile/endo/AttackingTarget()
   if(isliving(target_mob.loc)) //They're inside a mob, maybe us, ignore!
      return

   if(!isliving(target_mob)) //Can't eat 'em if they ain't alive. Prevents eating borgs/bots.
      ..()
      return

   if(picky && !target_mob.digestable) //Don't eat people with nogurgle prefs
      ..()
      return

   // Is our target edible and standing up?
   if(target_mob.canmove && target_mob.size_multiplier >= min_size && target_mob.size_multiplier <= max_size && !(target_mob in prey_exclusions))
      if(prob(50))
         target_mob.Weaken(5)
         target_mob.visible_message("<span class='danger'>\the [src] pounces on \the [target_mob]!</span>!")
         animal_nom(target_mob)
         LoseTarget()
         return
      else
         ..()

   if(!target_mob.canmove && target_mob.size_multiplier >= min_size && target_mob.size_multiplier <= max_size && !(target_mob in prey_exclusions))
      if(!capacity || (target_mob.size_multiplier + fullness) <= capacity)
         stance = HOSTILE_STANCE_EATING
         stop_automated_movement = 1
         animal_nom(target_mob)
         LoseTarget()
         return
   ..()

/mob/living/simple_animal/hostile/endo/death()
   for(var/I in vore_organs)
      var/datum/belly/B = vore_organs[I]
      B.release_all_contents() // When your stomach is empty
   ..() // then you have my permission to die.

/*
// ------- Big Preds ------- //

/mob/living/simple_animal/hostile/endo/large
   name = "giant snake"
   desc = "Snakes. Why did it have to be snakes?"
   icon = 'icons/mob/vore64x64.dmi'
   icon_dead = "snake-dead"
   icon_living = "snake"
   icon_state = "snake"
   old_x = -16
   old_y = -16
   pixel_x = -16
   pixel_y = -16
   maxHealth = 200
   health = 200
   
*/

Summary: Basically a copy of "vore.dm"; I wanted my own base ta work from. Among minor changes like settin' it ta not digest by default, the biggest change was ta the "update_icons()" proc; instead of looking fer "initial(icon_state)", it looks fer a "baseicon" value instead. This allowed me ta do some neat tricks with the actual catgirl mob.

arcatgirl.dm Contains UB.
[+]
Code: Select all
/mob/living/simple_animal/hostile/endo/arcatgirl
   name = "catgirl"
   desc = "It's a catgirl, looking for someone to fill her womb."
   icon = 'icons/mob/endo.dmi'
   icon_state = "catgirl"
   icon_living = "catgirl"
   icon_dead = "catgirl-dead"
   icon_gib = "catgirl"
   baseicon = "catgirl"
   var/awakeIcon = "catgirl"
   var/asleepIcon = "catgirlasleep"
   speak_chance = 0
   turns_per_move = 3
   response_help = "pets"
   response_disarm = "gently pushes aside"
   response_harm = "pokes"
   speed = 8
   maxHealth = 100
   health = 100
   destroy_surroundings = 0

   harm_intent_damage = 0
   melee_damage_lower = 0
   melee_damage_upper = 0
   attacktext = "bapped"
   attack_sound = 'sound/weapons/throwtap.ogg'

   capacity = 1
   max_size = 1.5
   picky = 0

   //My catgirls can breathe in space!  For testing purposes.
   min_oxy = 0
   max_oxy = 0
   min_tox = 0
   max_tox = 0
   min_co2 = 0
   max_co2 = 0
   min_n2 = 0
   max_n2 = 0
   minbodytemp = 0

   break_stuff_probability = 0

   faction = "arcatgirl"
   
   var/wombfill = 0
   var/emptystepper = 0
   var/catnapstepper = 0
   var/catnap = 0

/mob/living/simple_animal/hostile/endo/arcatgirl/New()
   
   if(!vore_organs.len)
      var/datum/belly/B = new /datum/belly(src)
      B.immutable = 1
      B.name = "Womb"
      B.inside_flavor = "Tight, yet very comfortable and warm."
      B.digest_mode = "Hold" // Catgirl wombs shouldn't juice people.
      vore_organs[B.name] = B
      vore_selected = "Womb"
      B.vore_verb = "shove"
      B.vore_sound = "sound/vore/insertion3.ogg"
      B.escapable = 1  //Note to self, make it so you can only escape once she falls asleep.
      B.escapetime = 100 //Alternately, make it so escape is easier when she's asleep.
      B.emote_lists[DM_HOLD] = list(
         "The walls squeeze you gently for a moment.",
         "You can hear your captor purring.",
         "You feel the catgirl's paws rubbing over your form.",
         "It's so warm...",
         "It's so comfortable...")

      B.emote_lists[DM_DIGEST] = list(
         "Something's happening that shouldn't be happening!")  //Note to self, write struggle lines later.
   CatgirlRandomizer()
   ..()
   
/mob/living/simple_animal/hostile/endo/arcatgirl/Life()  //Warning, terrible code ahead.

   ..()

   wombfill = 0
   for(var/I in vore_organs)
      var/datum/belly/B = vore_organs[I]
      if(B.name == "Womb")
         for(var/mob/living/M in B.internal_contents)
            wombfill += M.size_multiplier
   if(wombfill >= capacity)
      hostile = 0
      emptystepper = 0
      
      if(catnapstepper <= 40)
         catnapstepper++
         stop_automated_movement = 0
      else
         if(!catnap)
            catnap = 1
            custom_emote(1,"falls asleep, cradling her pregnant belly.")
         stop_automated_movement = 1
      stop_automated_movement_when_pulled = 1
   else
      if(emptystepper <= 20)
         emptystepper++
         catnapstepper = 0
      else
         if(catnap || catnapstepper)
            catnapstepper = 0
            catnap = 0
            custom_emote(1,"wakes up!")
         if(!hostile)
            hostile = 1
            stop_automated_movement = 0
            custom_emote(1,"grows restless...")
         stop_automated_movement_when_pulled = 0

   for(var/I in vore_organs)  //This is just a personal preference bit.
      var/datum/belly/B = vore_organs[I]
      if(B.name == "Womb")
         if(B.digest_mode == "Digest")
            B.digest_mode = "Hold"  // CATGIRL WOMBS SHOULDN'T JUICE PEOPLE.  :P
            custom_emote(1,"shivers, having stopped something horrible from happening.")
            
   if(!ckey)  //If not a player, this next bit should make a catgirl's womb heal people if the catgirl's asleep and they need healing.
      var/healPlz = 0
      nutrition = 400  //Magical catgirl is always capable of healing!
      for(var/I in vore_organs)
         var/datum/belly/B = vore_organs[I]
         if(B.name == "Womb")
            for(var/mob/living/M in B.internal_contents)
               if(M.health < M.maxHealth)  //If the heal mode took care of wounds, I'd try to add a check for wounds.
                  healPlz = 1
            if(healPlz == 1 && catnap == 1)
               B.digest_mode = "Heal"
            else
               B.digest_mode = "Hold"
   UpdateBaseIcon()
   update_icons()
   UpdateDesc()
   
/mob/living/simple_animal/hostile/endo/arcatgirl/Process_Spacemove(var/check_drift = 0)
   return 1   //My catgirls are SPACE catgirls!  For testing purposes.

/mob/living/simple_animal/hostile/endo/arcatgirl/FindTarget()
   . = ..()
   if(.)
      if(istype(., /mob/living/carbon/human))
         var/action = pick( list( "perks up her ears at [.]!", "stares alertly at [.].", "looks like she wants [.] inside her!", "decides [.] belongs inside her!") )
         if(action)
            custom_emote(1,action)

/mob/living/simple_animal/hostile/endo/arcatgirl/ListTargets(var/dist = 7)
   var/list/L = hearers(src, dist)

   for (var/atom/A in L)  //Catgirls only care about people they can shove in their womb!
      if(!istype(A, /mob/living/carbon/human))  //And they only shove people in their womb!
         L -= A  //I hope this works!

   return L

/mob/living/simple_animal/hostile/endo/arcatgirl/proc/UpdateDesc()
   if(wombfill >= capacity)
      if(!catnap)
         desc = "It's a catgirl, purring and blushing as she rubs her paws over a large, pregnant belly."
      else
         desc = "It's a catgirl, fast asleep and cradling her large, pregnant belly."
   else
      if(catnap)
         desc = "It's a catgirl, and she's fast asleep."
      else
         if(emptystepper <= 20 && !hostile)
            desc = "It's a catgirl."
         else
            desc = "It's a catgirl, and she looks restless..."
            
/mob/living/simple_animal/hostile/endo/arcatgirl/proc/UpdateBaseIcon()  //Silly story behind this.  //Which I've forgotten.
   if(catnap)
      baseicon = asleepIcon
   else
      baseicon = awakeIcon

/mob/living/simple_animal/hostile/endo/arcatgirl/animal_nom(var/mob/living/T in oview(1))

   Move(T.loc) //Makes the catgirl actually move over the person they're trying to shove into their womb.
   ..()

/mob/living/simple_animal/hostile/endo/arcatgirl/proc/CatgirlRandomizer()  //Will have to figure out way to make it so new catgirl types don't have to overwrite this...
   var/picker = rand(0,3)
   switch(picker)
      if(0)
         icon_state = "catgirl"
         icon_living = "catgirl"
         icon_dead = "catgirl-dead"
         baseicon = "catgirl"
         awakeIcon = "catgirl"
         asleepIcon = "catgirlasleep"
      if(1)
         icon_state = "catgirlbrown"
         icon_living = "catgirlbrown"
         icon_dead = "catgirlbrown-dead"
         baseicon = "catgirlbrown"
         awakeIcon = "catgirlbrown"
         asleepIcon = "catgirlbrownasleep"
      if(2)
         icon_state = "catgirlred"
         icon_living = "catgirlred"
         icon_dead = "catgirlred-dead"
         baseicon = "catgirlred"
         awakeIcon = "catgirlred"
         asleepIcon = "catgirlredasleep"
      if(3)
         icon_state = "catgirlblack"
         icon_living = "catgirlblack"
         icon_dead = "catgirlblack-dead"
         baseicon = "catgirlblack"
         awakeIcon = "catgirlblack"
         asleepIcon = "catgirlblackasleep"
      else
         icon_state = "catgirl"
         icon_living = "catgirl"
         icon_dead = "catgirl-dead"
         baseicon = "catgirl"
         awakeIcon = "catgirl"
         asleepIcon = "catgirlasleep"
   return

Summary: Underneath all those redundant checks, this nets you a catgirl with a unique behavior.

-Look for people and only people.
-If person found, go and attempt to UB them.
--If successful, and full to capacity, enter passive wandering state.
--If player exits during this time, remain passive for a bit before looking for more people to stuff in.
---If passive long enough (and not controlled by someone), enter sleeping state with sleeping sprites. (Sets "baseicon" to the value in "asleepIcon", update_icons() does the rest)
---If player exits during this time, remain asleep for a while, then wake up and look for new womb filler. (Sets "baseicon" to the value in "awakeIcon", update_icons() does the rest)

There's also other minor things, like making the womb go into healing mode if the player(s) inside are hurt and the catgirl is asleep, a description that updates depending on the catgirl's current state, and a catgirl randomizer proc that picks between several catgirl sprite sets with different hair/eye color and style.

It needs a lotta work; probably should have a faction check in my "only people" target proc, and a stance update in the "passive/sleeping/hostile" section. Haven't done that myself due ta runnin' out of oomph...

arcatgirlvariants.dm
[+]
Code: Select all
/mob/living/simple_animal/hostile/endo/arcatgirl/bikini
   icon_state = "catgirlbikini"
   icon_living = "catgirlbikini"
   icon_dead = "catgirlbikini-dead"
   baseicon = "catgirlbikini"
   awakeIcon = "catgirlbikini"
   asleepIcon = "catgirlbikiniasleep"
   
/mob/living/simple_animal/hostile/endo/arcatgirl/bikini/CatgirlRandomizer()
   var/picker = rand(0,3)
   switch(picker)
      if(0)
         icon_state = "catgirlbikini"
         icon_living = "catgirlbikini"
         icon_dead = "catgirlbikini-dead"
         baseicon = "catgirlbikini"
         awakeIcon = "catgirlbikini"
         asleepIcon = "catgirlbikiniasleep"
      if(1)
         icon_state = "catgirlbrownbikini"
         icon_living = "catgirlbrownbikini"
         icon_dead = "catgirlbrownbikini-dead"
         baseicon = "catgirlbrownbikini"
         awakeIcon = "catgirlbrownbikini"
         asleepIcon = "catgirlbrownbikiniasleep"
      if(2)
         icon_state = "catgirlredbikini"
         icon_living = "catgirlredbikini"
         icon_dead = "catgirlredbikini-dead"
         baseicon = "catgirlredbikini"
         awakeIcon = "catgirlredbikini"
         asleepIcon = "catgirlredbikiniasleep"
      if(3)
         icon_state = "catgirlblackbikini"
         icon_living = "catgirlblackbikini"
         icon_dead = "catgirlblackbikini-dead"
         baseicon = "catgirlblackbikini"
         awakeIcon = "catgirlblackbikini"
         asleepIcon = "catgirlblackbikiniasleep"
      else
         icon_state = "catgirlbikini"
         icon_living = "catgirlbikini"
         icon_dead = "catgirlbikini-dead"
         baseicon = "catgirlbikini"
         awakeIcon = "catgirlbikini"
         asleepIcon = "catgirlbikiniasleep"
   return

/mob/living/simple_animal/hostile/endo/arcatgirl/nude
   name = "naked catgirl"
   icon_state = "catgirlnude"
   icon_living = "catgirlnude"
   icon_dead = "catgirlnude-dead"
   baseicon = "catgirlnude"
   awakeIcon = "catgirlnude"
   asleepIcon = "catgirlnudeasleep"
   
/mob/living/simple_animal/hostile/endo/arcatgirl/nude/CatgirlRandomizer()
   var/picker = rand(0,3)
   switch(picker)
      if(0)
         icon_state = "catgirlnude"
         icon_living = "catgirlnude"
         icon_dead = "catgirlnude-dead"
         baseicon = "catgirlnude"
         awakeIcon = "catgirlnude"
         asleepIcon = "catgirlnudeasleep"
      if(1)
         icon_state = "catgirlbrownnude"
         icon_living = "catgirlbrownnude"
         icon_dead = "catgirlbrownnude-dead"
         baseicon = "catgirlbrownnude"
         awakeIcon = "catgirlbrownnude"
         asleepIcon = "catgirlbrownnudeasleep"
      if(2)
         icon_state = "catgirlrednude"
         icon_living = "catgirlrednude"
         icon_dead = "catgirlrednude-dead"
         baseicon = "catgirlrednude"
         awakeIcon = "catgirlrednude"
         asleepIcon = "catgirlrednudeasleep"
      if(3)
         icon_state = "catgirlblacknude"
         icon_living = "catgirlblacknude"
         icon_dead = "catgirlblacknude-dead"
         baseicon = "catgirlblacknude"
         awakeIcon = "catgirlblacknude"
         asleepIcon = "catgirlblacknudeasleep"
      else
         icon_state = "catgirlnude"
         icon_living = "catgirlnude"
         icon_dead = "catgirlnude-dead"
         baseicon = "catgirlnude"
         awakeIcon = "catgirlnude"
         asleepIcon = "catgirlnudeasleep"
   return
   
/mob/living/simple_animal/hostile/endo/arcatgirl/nude/New()
   var/namepick = rand(0,3)
   switch(namepick)
      if(0)
         name = "naked catgirl"
      if(1)
         name = "nude catgirl"
      if(2)
         name = "nudist catgirl"
      if(3)
         name = "catgirl au naturel"
      else
         name = "naked catgirl"
   ..()

/mob/living/simple_animal/hostile/endo/arcatgirl/nude/UpdateDesc()
   if(wombfill >= capacity)
      if(!catnap)
         desc = "It's a naked catgirl, purring and blushing as she rubs her paws over a large, pregnant belly."
      else
         desc = "It's a naked catgirl, fast asleep and cradling her large, pregnant belly."
   else
      if(catnap)
         desc = "It's a naked catgirl, and she's fast asleep."
      else
         if(emptystepper <= 20 && !hostile)
            desc = "It's a naked catgirl."
         else
            desc = "It's a naked catgirl, and she looks restless..."

Summary: I made too many catgirl sprites. :P Although I did stick the bikini and nudist variants into the beach spawn list on my test server fer giggles.

I've attached a .zip with the code and the catgirl sprites if ya want ta test it on yer own test server; aside from bein' written fer V.O.R.E. Station, the code's kinda self-contained, no overwritin' involved, so it's easy ta drop in and take out. Also has updated catgirl sprites. :P
Attachments
catgirlsandcode.zip
(24.86 KiB) Downloaded 664 times
User avatar
ArgobargSoup
 
Posts: 42
Joined: Thu May 05, 2016 10:19 am

Re: Possibly terrible vore mob/code

Postby Scree » Sun Oct 16, 2016 5:18 pm

Okay, how are people exiting? By OOC escape?

'cause this stuff would be great for petmobs if a non-OOC means of removing prey could be included. Maybe a low% chance of making them release on struggle or something with a low chance of struggling making their belly start churning for a while instead
User avatar
Scree
 
Posts: 1002
Joined: Thu Aug 06, 2015 3:57 pm

Re: Possibly terrible vore mob/code

Postby ArgobargSoup » Sun Oct 16, 2016 7:09 pm

Scree wrote:Okay, how are people exiting? By OOC escape?

'cause this stuff would be great for petmobs if a non-OOC means of removing prey could be included. Maybe a low% chance of making them release on struggle or something with a low chance of struggling making their belly start churning for a while instead

There actually is an "escapable" var fer bellies, that lets ya start crawlin' out when ya hit "resist". Ya just can't set it in the player vore panel. Check in catgirl/new(); in the womb setup bit, there's "B.escapable = 1" and "B.escapetime = 100". Made it 10 seconds fer escape while I was testing.

You can struggle out of the catgirl at any time; I was thinkin' on makin' it only escapable while the catgirl was asleep, but was too lazy at the time.
User avatar
ArgobargSoup
 
Posts: 42
Joined: Thu May 05, 2016 10:19 am

Re: Possibly terrible vore mob/code

Postby Scree » Mon Oct 17, 2016 12:53 am

Wait what when was that put in? I was literally looking for that to be implemented as a feature on the github.
Admittedly the chance element would be more fun. xD
User avatar
Scree
 
Posts: 1002
Joined: Thu Aug 06, 2015 3:57 pm

Re: Possibly terrible vore mob/code

Postby ArgobargSoup » Mon Oct 17, 2016 1:10 am

Scree wrote:Wait what when was that put in? I was literally looking for that to be implemented as a feature on the github.
Admittedly the chance element would be more fun. xD

I has no idea when it was added, but it was sometime after custom bellies were added. It's only changeable by admin var editing at the moment, though.
User avatar
ArgobargSoup
 
Posts: 42
Joined: Thu May 05, 2016 10:19 am

Re: Possibly terrible vore mob/code

Postby Aces » Tue Oct 18, 2016 1:21 pm

Adapting the current vore code to support endo would be super easy.
User avatar
Aces
 
Posts: 1700
Joined: Thu Aug 06, 2015 4:13 pm

Re: Possibly terrible vore mob/code

Postby ArgobargSoup » Tue Oct 18, 2016 9:48 pm

Aces wrote:Adapting the current vore code to support endo would be super easy.

Well yah, you'd just need ta set an existin' vore mob ta not digest. And turn their damage ta zero or at least pretty low so they don't remove yer limbs first. :P I just made an "endo" copy of the vore mob base so I could write that modified update_icons() proc so I could do the whole fallin' asleep/sprite changing thing.

Although a tweak ta the attack proc might also be necessary; turns out settin' damage ta zero makes it so ya don't get any attack messages at all. As it is, the catgirls from my code here just run up and stand next ta ya fer a bit before pouncin' ya, instead of bappin' ya inta submission. :P

On a server-related note, the endo.dmi file in the .zip has updated versions of the catgirl sprites that could be used fer the catgirls on the server...
User avatar
ArgobargSoup
 
Posts: 42
Joined: Thu May 05, 2016 10:19 am


Return to Coding

Who is online

Users browsing this forum: No registered users and 3 guests