Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature] Making Spatial Tears more "fun"
#1
Do you fucking hate Spatial Tears? Well get ready to stop. Or get ready to learn to hate them in a whole new way.

Now, instead of being unable to pass through Spatial Tears, you can! But it's not so simple. It teleports you to a random non-space/non-dense tile on the other side of the tear and you take a slight amount of random damage(brute,burn,tox). Currently only Humans and Silicons can pass through the Tear, I was thinking about allowing Silicons to pass through completely unimpeded, but couldn't commit either way so they take damage, it can be removed if that's preferred.

The other exciting part is that now when the Spatial Tear first appears, it spawns a small amount of random critters. Most of them, dangerous. Now security should have something to do to protect the station besides beating up greyshirts and chasing changelings. 

The final thing is that I added a "new" random event, Multiple Spatial Tears. Now that they are passable and a bit more interesting than just blocking people off, I felt like spawning several of them could be fun. This could be removed

Video demonstration:   https://streamable.com/yp0kj

Onto the more technical side to describe what was done.

- All the changes were made to /datums/randomevents/spatial_tear.dm. I made a new datum which contains an individual tear. The random event "Spatial Tear" now creates one of those datums and adds it to a list of individual tears. Similarly the Multiple Spatial Tears just does the same that loops a random amount of times between 3 and 7. (If I got for loop indexing right)

- Each individual tear contains a list of turfs adjacent turfs from the North/South or East/West depending on whether it's a Vertical or Horizontal tear as it creates each tear object(the single tile forcefield object). Then it removes any turf that is space or dense so it usually becomes a relatively short list. When a human or sillicon mob enters the object it simply picks a random turf from that list on the other side of the Spatial Tear. I was pretty pleased with myself about that actually, making the list small, and just selecting a random element when a mob passes through. Which was much more efficient than my first attempt at it. 

- There were some "problems" I came across that could be corrected if anyone wants. The main one was spawning critters. My original plan was to have them spawn at random intervals throughout the duration of the Spatial Tear, but I wasn't really sure how to get that working and settled just for spawning them at the start. 

- The other problem was getting the list of critters to spawn from. I wanted to use the "critters" list in /datum/adventure_submode/critter and just pick from it, but for the life of me I could not get it to work. I literally spent 3 hours on it constantly getting runtime errors whenever I tried to spawn them that way. 

- Assigning damage to silicons, currently cyborgs will take damage, I stole that from somewhere else, but AI shells and whatnot will not. I figured that was fine since there are very few of them anyway.

- The last one is that Multiple and Single spatial tear events are now both available in the random event rotation at the same rate since they are in that object path. I didn't want to mess with that code so I just left it as is. Maybe make the single tear a minor even, I'm not sure.

https://github.com/goonstation/goonstation-2016/pull/60


Messages In This Thread
[Feature] Making Spatial Tears more "fun" - by kyle2143 - 05-21-2018, 02:54 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)