Author Topic:  Sanity in TMF DD scripts  (Read 1673 times)

0 Members and 1 Guest are viewing this topic.

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 372
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Sanity in TMF DD scripts
« on: January 29, 2016, 02:43:23 AM »
You may have heard about it. You may have seen it for yourself. Now you can have it. I invite anyone interested to come to my map and view the sanity scripts. Or be patient as I post a script a day. It's a minimum 13 script system, so it will take a bit, obviously. My computer is a smart phone, so I don't want to do it all at once.
« Last Edit: February 01, 2016, 06:38:23 AM by Rev Elevenclaw »
Focus determines reality...

Marked as best answer by Rev Elevenclaw on May 02, 2018, 04:17:02 PM

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 372
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #1 on: January 29, 2016, 06:33:26 AM »
All scripts are labeled with; sanity\

Sanity HUD bar (one line)
sanity\sanity
HUDBar [sanity] [player] [History:sanity] [100] [1020,684,250,24] [150,150,64,35] [label|numbers]

sanity\insanity

If
   HasHistory [sanity] [player] [>] [ 0]
   Intersect [sphere] [prel:0,1,0] [5] [mobs]
Then
   History [sanity] [player] [-1]
   Wait [1000]
Endif
Loop [1000]
   
sanity\nightterror
This script is set to an upper world zone that starts at the top, and reaches depth 130. You will need to set a cancel script for exit zone command.

If
   HasHistory [sanity] [player] [>] [ 0]
   IsNightTime [true]
Then
   History [sanity] [player] [-1]
   Wait [10000]
Endif
   Loop [1000]

sanity\comfort

If
   HasHistory [sanity] [<] [100]
   IsBlockLit [prel:0,0,0] [sun|block] [true]
Then
   History [sanity] [player]
   Wait [5000]
Endif
Loop [1000]

sanity\miner
This script is set to a under world zone that starts at 131 and reaches the bottom. You will need to set a cancel script for exit zone command.

If
   HasHistory [sanity] [player] [>] [ 0]
Then
   History [sanity] [player] [-1]
   Wait[5000]
Endif
   Loop [1000]

sanity\sangaintorch

If
   HasHistory [sanity] [player] [<] [100]
   IsEquipped [Torch] [true]
Then
   History [sanity] [player]
Endif
Loop [3000]

sanity\sangainplayers

If
   HasHistory [sanity] [player] [<] [100]
   Intersect [sphere] [prel:0,1,0] [10] [player]
Then
   History [sanity] [player] [+5]
Endif
Loop [1000]

This next one is for if you have a need to instantly fill the insanity bar. As in a potion script or npc options.

sanity\fill

History [sanity] [player] [100]

As for effects, well I have four that run as the sanity bar drops, running IsRandom scripts. They are currently at 75, 50, 25, 0, but plan on going to 80, 60,40, etc.. They automatically activate and deactivate. Check back...
« Last Edit: February 25, 2016, 10:36:21 PM by Rev Elevenclaw »
Focus determines reality...

crazytater94

  • Supreme Member
  • *****
  • Posts: 2645
  • Mastering TM since 2011
  • Awards Awarded to exemplary forum members 5 years on site Members who have unlocked the robotic avatar 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: Sanity in TMF DD scripts
« Reply #2 on: January 29, 2016, 01:30:10 PM »
I've had a sanity bar since the first week of HUD bars. I don't know if my version is what you would want, but what I did is check if the block under you is lit, and if so, you gain sanity, and if not, you lose sanity. I also have your screen tint black depending on your sanity level.

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: Sanity in TMF DD scripts
« Reply #3 on: January 29, 2016, 01:37:19 PM »
I would make sanity for my survival engine, It would be really easy too, I just can't think of anything semi realistic to make it do.

If only I could make the player hallucinate things.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

crazytater94

  • Supreme Member
  • *****
  • Posts: 2645
  • Mastering TM since 2011
  • Awards Awarded to exemplary forum members 5 years on site Members who have unlocked the robotic avatar 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: Sanity in TMF DD scripts
« Reply #4 on: January 29, 2016, 04:27:29 PM »
What about a flowing gradient of black, gray, and light gray screen tints using transitions and have mobs spawning and immediately despawning right in front of them using spawnMob and MobState. You could also probably have a set decal script to flash each block by the player turning to blood and then switch them back to normal.

Lunar

  • Elite Member
  • *****
  • Posts: 954
  • The God of the Galaxy
  • Awards 3 years on site 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
Re: Sanity in TMF DD scripts
« Reply #5 on: January 29, 2016, 05:55:42 PM »
This all sounds soooo cool :3

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 372
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #6 on: January 29, 2016, 08:23:02 PM »
Yes all very good. Keep in mind this is for DD, so it's limited by DD parameters.
Focus determines reality...

Dark Hydrak

  • Elite Member
  • *****
  • Posts: 508
    • View Profile
    • Awards
Re: Sanity in TMF DD scripts
« Reply #7 on: January 29, 2016, 08:39:50 PM »
Sanity, the feeling that we all lack XD

I`ve never made a Sanity script but, I would make it when it gets too low, it would run a CCTV script at a pixel art to make the feeling as though you are hallucinating.

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 372
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #8 on: January 29, 2016, 10:16:30 PM »
I've had a sanity bar since the first week of HUD bars. I don't know if my version is what you would want, but what I did is check if the block under you is lit, and if so, you gain sanity, and if not, you lose sanity. I also have your screen tint black depending on your sanity level.

I tried that. IsBlock 'lit' didn't seem to support [prel:x,x,x] in any way I tried.

...have mobs spawning and immediately despawning right in front of them using spawnMob and MobState. You could also probably have a set decal script to flash each block by the player turning to blood and then switch them back to normal.

DD doesn't support mob spawn unfortunately. Great idea tho! And I dig the second idea, but have no clue how I could pull that off. Maybe zone related.

...CCTV script at a pixel art to make the feeling as though you are hallucinating.

I have a cctv script that gives the player a close up of Diablos face that runs for [300].
Focus determines reality...

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 372
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #9 on: January 30, 2016, 10:03:38 AM »
...
« Last Edit: January 31, 2016, 09:04:27 AM by Rev Elevenclaw »
Focus determines reality...

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: Sanity in TMF DD scripts
« Reply #10 on: January 30, 2016, 01:46:18 PM »
I tried that. IsBlock 'lit' didn't seem to support [prel:x,x,x] in any way I tried.

DD doesn't support mob spawn unfortunately. Great idea tho! And I dig the second idea, but have no clue how I could pull that off. Maybe zone related.

I have a cctv script that gives the player a close up of Diablos face that runs for [300].

It does, I have a set up that adjusts the brightness of the world depending on the light level at your head.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 372
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #11 on: January 30, 2016, 06:09:43 PM »
It does, I have a set up that adjusts the brightness of the world depending on the light level at your head.
Ok, but there can be no block where your head is. So I'm not sure how to set it up. Mind posting your script?
Focus determines reality...

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: Sanity in TMF DD scripts
« Reply #12 on: January 30, 2016, 06:17:03 PM »
Ok, but there can be no block where your head is. So I'm not sure how to set it up. Mind posting your script?

I just did something like

"
If
  IsBlockLit [vrel:0,0,0] [Sun|Block] [True]
Then
  DarkenScreen
Else
  LightenScreen
EndIf
Loop
"

There doesn't need to be a block for a coordinate to be lit.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 372
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #13 on: January 30, 2016, 08:13:42 PM »
Cool I will try that. TY
Focus determines reality...

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 372
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #14 on: January 31, 2016, 11:58:02 PM »
I just did something like

"
If
  IsBlockLit [vrel:0,0,0] [Sun|Block] [True]
Then
  DarkenScreen
Else
  LightenScreen
EndIf
Loop
"

There doesn't need to be a block for a coordinate to be lit.
I fiddled around with what you gave me here, and I got it to work! So TY, it will be the script I post next.
Focus determines reality...