Jump to content

Modified Lovers EscapeRapevPlayer


kevanlol

Recommended Posts

What I am trying to do is this:

 

Implement a stamina drain cost when you attempt to escape, to make the system "more immersive" than spamming right mouse until you are free.

 

Here is the block within the script that controls it:

if keyblock == 1

__set rvpcount to rvpcount + 1

__if GetRandomPercent < (rvpcount / 10)

____Player.PlaySound3D xLERVPWPNBlockShieldHeavy

____Player.AddItemNS xLoversPkrAbort 1

____set step to 0

__else

____Player.PlaySound3D xLERVPWPNBlockHand

__endif

endif

 

(Underscore simply represents level of indention, 2x=1tab)

 

Basically, so far what I did was this:

[X] = New

if keyblock == 1

__if Player.getAV fatigue > 20

____Player.modAV fatigue -20

____set rvpcount to rvpcount + 3

____if GetRandomPercent < (rvpcount / 10)

______Player.PlaySound3D xLERVPWPNBlockShieldHeavy

______Player.AddItemNS xLoversPkrAbort 1

______set step to 0

____else

______Player.PlaySound3D xLERVPWPNBlockHand

____endif

__endif

endif

 

Thus, it performs a fatigue check, and if you are not over the minimum (in this case, 20) it will skip the entire block when you try to right click. If you do have enough, it attempts to escape, and drains some fatigue.

 

I also increased the RVPcount from the base. This is because it is basically designed to "build up" such that you have a higher chance of escape the more times you attempt. There will be less attempts with a fatigue restriction, so the amount each one adds to your next try is increased.

 

So, that actually WORKED ingame, however, anyone who is familiar with oblivion scripting sees the problem:

 

player.modAV fatigue -20

 

That simply reduces your maximum fatigue by 20, and you don't regen it. Kind of turns it into a one-way elevator. I apparently read that this problem could be fixed using modactorvalue2 from obse:

 

player.modAV2 fatigue -20

 

This apparently reduces the amount of fatigue you have without affecting the maximum.

 

So, when I plugged that in its place, nothing happened in game.

 

Any code monkeys want to tell me my stupid mistake please?

 

Link to comment

Additionally: Can anyone show me how to fix the entire lovers system with realistic fatigue?

 

Basically, every time the "event" finishes, you are drained entirely of fatigue into the negative, so you are laying there on the ground. With realistic fatigue, the regeneration is much slower, so you end up laying on the ground for a long time, and you can potentially be killed.

 

I don't know, like... if I could lower the amount into negative I go in the script somewhere, it would result in the same amount of intended downtime to compensate for slower regeneration.

 

Link to comment

My english isn't very good, so please ignore my mistakes.

 

You may not read the scripts of xlovers carefully. The basic sex action script will fortify both character's fatigue by 5000 with a extramely high fatigue regenerate speed when sex or rape begin, because every sex animation are all eventually "poses", and none of that will perform when one's fatigue is no more than zero. When rape finishes, the "ability" will be removed and both character's current fatigue are set to zero so they will collapse to the ground. Because the sex/rape script itself will modify your character's fatigue again and again, it's impossible to direct mod your character's fatigue during this.

 

You may store your character's fatigue to a varibile using a "set player.getav fatigue to XXX" script before the first original script which modified this actor value. After that you just need to check that and reduce that by 20 each time, but it will not regenerate and you can't see its value in game.

Link to comment

Additionally: Can anyone show me how to fix the entire lovers system with realistic fatigue?

 

Basically' date=' every time the "event" finishes, you are drained entirely of fatigue into the negative, so you are laying there on the ground. With realistic fatigue, the regeneration is much slower, so you end up laying on the ground for a long time, and you can potentially be killed.

 

I don't know, like... if I could lower the amount into negative I go in the script somewhere, it would result in the same amount of intended downtime to compensate for slower regeneration.

 

[/quote']

 

This is exactly why most people who implement these kinds of systems add their own stats that they can track and manipulate without messing with any other game systems.

The easiest way to deal with the problem you're describing is to add a short value to the script. Say that your short value is called attempts: every time you initiate an event, it should be set to zero. When you make an attempt, use modav to reduce fatigue by 20, and add one to "attempts". At the end of the event, use modav to add attempts * 20 to the player's fatigue, restoring it to the previous level.

You could always use a short to store the player's maximum beforehand and then use modav to add the difference back to the player afterward, but make sure not to use setav, because I think that still breaks the game, due to an old engine problem.

Link to comment
  • 3 weeks later...
  • 2 weeks later...
  • 9 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use