[0.4.0.3]SS13 Mods

#1
A collection of various mods I have made (and will probably continue to make.) I put 'em up in case anyone wants to muck around with 'em. I've decided that I'm mainly going to try to put in interesting things from SS13 (or atleast SS13-esque), simply for the sake of making this a single mod of similarly-themed features instead of just a random jumble of stuff.

Carp:
Spoiler
Decided to take a closer look at the character-physics by creating one of my own, seeing as no one has really posted any 'custom mobs' as per se, and I was extremely interested in how it works. And dayum, I'm impressed. It's quite in-depth (albeit pretty hard to work with, particularly when it comes to the connection angles of joints..) as I discovered, so much so that it took me an hour or so to make this;
Image
Its a crummily-made carp. From SS13. I *tried* seperating the tail into a seperate physics body but for whatever reason I simply could not discover how to stop it from either being stuck outwards and resisting against it's angle bounds (making it fidgety) or being half-enveloped by the main body and pointing in the complete wrong way, which it seemed to so desperately want to do. So it's just a two-part character, a body and a mouth.

As you can see from the picture, it's slightly smaller than the crawler and vaguely resembles SS13-esque carps. It's also easily faster than the crawler (fast enough to catch scooter-divers) and has a 'gnashing' attack where it stuns divers and chews on 'em a litte over a period of 3 seconds, which less so does instant damage than causes alot of bleeding. It does only 10 structual damage to that of the crawler's 50, and lacks the numerous limbs of the crawler and so is useless out of water. In addition, it has very good sight and hearing - if you know it's there, chances are that it knows where you are too.

TL;DR: A more specialised crawler; Faster, Smaller, Smarter and a death sentence if you encounter two or more at once (due to the stun)
Knife
Spoiler
A simple knife. Originally I had it pretty lethal and forceful, but I've since toned it down so now it can be swung in the time it takes your character to lift it and does a little bit of damage. (7 damage, 1 bleeding damage.)
Image
So not especially deadly, someone could easily run away into a locked room before you could kill them (though the bleeding might get them) but it might be useful against fish in the place of welders haha.
Taser
Spoiler
Image
A taser. Has to be loaded by one-use 'taser shots' which, when fired, stuns the first person it comes into contact with. Has a relatively short range and works on fish. Also, pretty sparkles~
Download: https://www.dropbox.com/s/8lf3sl5hhy7wi ... a.rar?dl=0

Just place everything inside the rar file onto your barotrauma folder (overriding any conflicts,) then run through the launcher and choose the 'Esoudiere' content package.

NOTE: This is very outdated. It probably still works, but keep that in mind even so.
Last edited by Esoudiere on Thu Dec 15, 2016 8:14 pm, edited 9 times in total.

Re: Carp

#3
Creating new characters is admittedly pretty complicated at the moment but it's nice to see someone (at least partially) figuring it out!

If you'd like to post the sprite and the configuration file here, I can take a look and see if I can fix the tail. It's most likely a problem either with the rotation limits or the animation parameters.

Also, there's already a WIP character editor in the game which can be accessed by spawning a character and entering "editcharacter" in the debug console. You can't really do much with it yet, but it shows the shapes of the physics bodies, the joints and their rotation limits which may be useful.

Re: Carp

#5
Here's the code from the xml file;
Spoiler

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<Character name ="carp" humanoid="false" health="225" doesbleed="true">

  <sound file="Content/Characters/Crawler/attack1.ogg" state="Attack" range="500"/>
  <sound file="Content/Characters/Crawler/attack2.ogg" state="Attack" range="500"/>

  <sound file="Content/Characters/Crawler/idle1.ogg" state="None" range="500"/>
  <sound file="Content/Characters/Crawler/idle2.ogg" state="None" range="500"/>

  <ragdoll headposition="100" headangle="0" 
           waveamplitude="35.0" wavelength="2000" 
           swimspeed="3.0" walkspeed="1.5"
           stepsize ="25.0,25.0"
           legtorque="0"
           footrotation ="0"
           flip="true">

    <!-- Head -->
    <limb id = "0" width="64" height="140"  mass = "6" type="Head" flip="true" steerforce="1.0" armorsector="0.0,180.0" armor="10.0">
      <sprite texture="Content/Characters/Carp/carp.png" sourcerect="5,45,72,194" depth="0.02" origin="0.5,0.5"/>
    </limb>

    <!-- Mouth -->
    <limb id = "1" width="34" height="25"  mass = "4" flip="true" pullpos="-4,19" armorsector="0.0,180.0" armor="5.0">
      <sprite texture="Content/Characters/Carp/carp.png" sourcerect="85,55,122,113" depth="0.021" origin="0.5,0.55"/>
	  <attack type="PinchCW" range="300" duration="1.5" damage="25" stun="2" bleedingdamage="74" structuredamage="25" damagetype="slash"/>
    </limb>


    
    <joint limb1="0" limb1anchor="60,46" limb2="1" limb2anchor="-6,20" lowerlimit="-22" upperlimit="5"/>
  
  </ragdoll>

  <ai attackhumans="100" attackrooms="10" attackweaker="50" attackstronger="-100" 
      sight="3.0" hearing="3.0"
      attackcooldown="4.0"/>
</Character>
And here's the sprite; (I attached the tail to the main body sprite, so it probably needs disconnecting)
Image
As you can probably tell from closer inspection, it's actually just a highly photoshopped mantis (the glory of smudge tool never ceases to amaze me; Can even make shell look flesh-like!)

If you are willing to help, there's also the slight problem of when the fish flips, the mouth occassionally does a little spinny thing outside of it's angle bounds and disconnects from the body (as in the sprites stop touching) for a few seconds before figuring out where it needs to go. (Like what welding tools/plasma cutters use to do, with that little twirl)

Really looking forward to the finished character-editor and (hopefully) overall mod support, by the way.

Re: Carp

#6

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<Character name ="carp" humanoid="false" health="225" doesbleed="true">

  <sound file="Content/Characters/Crawler/attack1.ogg" state="Attack" range="500"/>
  <sound file="Content/Characters/Crawler/attack2.ogg" state="Attack" range="500"/>

  <sound file="Content/Characters/Crawler/idle1.ogg" state="None" range="500"/>
  <sound file="Content/Characters/Crawler/idle2.ogg" state="None" range="500"/>

  <ragdoll headposition="100" headangle="0" 
           waveamplitude="35.0" wavelength="2000" 
           swimspeed="3.0" walkspeed="1.5"
           stepsize ="25.0,25.0"
           legtorque="0"
           footrotation ="0">

    <!-- Head -->
    <limb id = "0" width="64" height="140"  mass = "6" type="Head" flip="true" steerforce="1.0" armorsector="0.0,180.0" armor="10.0">
      <sprite texture="Content/Characters/Carp/carp.png" sourcerect="5,45,75,150" depth="0.02" origin="0.5,0.5"/>
    </limb>

    <!-- Mouth -->
    <limb id = "1" width="34" height="58"  mass = "4" flip="true" pullpos="-4,19" armorsector="0.0,180.0" armor="5.0">
      <sprite texture="Content/Characters/Carp/carp.png" sourcerect="85,55,38,58" depth="0.021" origin="0.5,0.55"/>
	  <attack type="PinchCW" range="300" duration="1.5" damage="25" stun="2" bleedingdamage="74" structuredamage="25" damagetype="slash"/>
    </limb>

    <!-- tail -->
    <limb id = "2" width="50" height="50" flip="true" type="Tail">
      <sprite texture="Content/Characters/Carp/carp.png" sourcerect="12,187,58,60" depth="0.035" origin="0.5,0.5"/>
    </limb>

    
    <joint limb1="0" limb1anchor="10,8" limb2="1" limb2anchor="-10,-19" lowerlimit="-22" upperlimit="5"/>
    <!-- body to tail -->
    <joint limb1="0" limb1anchor="0,-70" limb2="2" limb2anchor="0,25" lowerlimit="-20" upperlimit="20"/>
  
  </ragdoll>

  <ai attackhumans="100" attackrooms="10" attackweaker="50" attackstronger="-100" 
      sight="3.0" hearing="3.0"
      attackcooldown="4.0"/>
</Character>
This should work. Since you didn't post the code for the tail I don't know what the problem was, but the mouth issue was caused by incorrect positioning of the physics collider of the mouth:
Image
The red rectangle is the sprite of the mouth, and the smaller white rectangle inside it is the collider. You seem to have moved the joints (the red dots) to make the sprite appear in the correct position even though the collider isn't there, which caused some weird behavior when the character was flipped around.

Re: Carp

#7
Regalis wrote:-snip-

This should work. Since you didn't post the code for the tail I don't know what the problem was, but the mouth issue was caused by incorrect positioning of the physics collider of the mouth:

-snip-

The red rectangle is the sprite of the mouth, and the smaller white rectangle inside it is the collider. You seem to have moved the joints (the red dots) to make the sprite appear in the correct position even though the collider isn't there, which caused some weird behavior when the character was flipped around.
Ah, thanks alot. Seems I misunderstood alot of things whilst making it, you've now cleared them up ^.^
cron