Aller au contenu

Photo

Resting


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
JerrodAmolyan

JerrodAmolyan
  • Members
  • 89 messages
Clicking the "No rest" box, then is there a way to use a script to have a "safe" rest spot to rest in the wilds... making portable bedroll placeables for example, that would force you to rest ignoring the no rest box ? 

#2
The Amethyst Dragon

The Amethyst Dragon
  • Members
  • 1 882 messages
You could make a trigger that adds a variable to the PC on entering, then removes it on exiting. The bedroll's script could check for that variable, and if it's there, do a ForceRest() on the PC. That function works just like the regular resting, but is instant (no animations, no waiting for the progress bar).

#3
Squatting Monk

Squatting Monk
  • Members
  • 446 messages
Never tried it when the No Rest flag is on, but try ForceRest().

For an alternate tack, try henesua's Magus Rest System.

EDIT: ninja'd! :ph34r:

Modifié par Squatting Monk, 15 août 2013 - 09:24 .


#4
JerrodAmolyan

JerrodAmolyan
  • Members
  • 89 messages
Hmmmmm. I really want it to have a timer and an animation, maybe something similar to Ravenloft's sleeping animation. It's possible to make this system do something like:

If you click on the option on bedroll conversation "rest" it FIRST does the animation ON the bedroll (can't be interrupted, I don't want exploiters.) and after that, it has something like DelayCommand(10.0, ForceRest(oPC)); ? Or well, whatever the correct form would be. :D and after that it'd do something like ClearAllActions or something that Stops the animation / makes it do a wake up one?

#5
The Amethyst Dragon

The Amethyst Dragon
  • Members
  • 1 882 messages
I do something like this in my PW...the PCs "sleep" instead of "rest".

PC uses bedroll item
> tag based script checks if proper time has passed (0 hours for level 0-3, 4 hours for levels 4-8, 8 game hours after that)
> > script checks if PC has "sustenance" (food in inventory, ring of sustenance, etc.)
> > > script checks for nearby enemies
> > > > if all checks pass:
> > > > > set cutscene mode TRUE for PC
> > > > > create bedroll placeable
> > > > > delay: make PC play sleeping animation for set duration (one of Vaei's custom ones)
> > > > > delay: apply sleep VFX to PC ("ZZZZZZZs" and snoring). :P
> > > > > delay: FadeToBlack()
> > > > > delay: "do various and sundry sleep stuff"
> > > > > delay: FadeFromBlack()
> > > > > delay: set cutscene mode FALSE for PC

Modifié par The Amethyst Dragon, 19 août 2013 - 08:18 .


#6
JerrodAmolyan

JerrodAmolyan
  • Members
  • 89 messages
Yeah, that sounds like something I could use. Hm. Or well, something similar.I'd probably make it possible to sleep without food, but it'd apply penalties until you eat.

#7
bdtgazo

bdtgazo
  • Members
  • 53 messages
I haven't put the option in my mod yet, but given it some thought, and its very doable. Here's how I would go about it - but I wouldn't use the norest box.

1) I have a rest spawn script in place. I use waypoints for my restspawns, but you don't need to know that. Just know that when the PC rests, the onrest script includes a % chance for rest spawns.

2) Lets say you want to use a bedroll. All you need to do is use an onactivate script to control whatever you want the bedroll to do, i.e, spawn a tent and campfire or some such near the PC. If it were me, I would put charges on the bedroll so the PCs have something to spend gold on.

3) Include in the onactivate script a set variable function. This can be as complex as you want.

4) Make sure the onrest scripts checks for the variables. Be sure to add to the onrest script that the variable is reset when the rest is over, and the items placed from the onactivate are removed.
- I would add the remove placeable routine after a variable check function, so its not always run on every rest, just when the bedroll has been used.

5) If you don't want the players to be able to rest AT ALL, unless they have the bedroll, you just call for the onrest script to interrupt the rest if the variable has not been changed from the onactivate script, using an area check function (so you can control which areas cannot be rested in)... or set the rest spawn rate to 100% with an area check function.

6) To pretty it up, you can send some fancy messages to the PC, something ominous, maybe toss in some wolf howls or lightning or something. Whatever.

How many areas do want this to occur in?  If its many, may want to create a special area transition script to set a variable on the PCs, so the onrest script doesn't have to do an area checks, just a single variable check, and all of the areas would be ID'd by the one variable.

Modifié par bdtgazo, 20 août 2013 - 10:38 .