Jump to content

Non-lethal force mod: scripting help please


lollol

Recommended Posts

I have a mod idea that would allow for pacifist/noble/:angel:/x117 characters to be able to defend themselves (do people playing a "pacifist" playthrough just run from everyone?) without killing anyone. This would be my first mod and I intend to create this as a learning experience where I can experiment with scripting. Right now I'm thinking of using scripted weapons to inflict fatigue damage instead of health damage to cause knockdown (negative fatigue) instead of death, and use a timer to awaken the enemy after a few minutes(restore fatigue back to a positive value). Not possible to control the effect like this using the custom Spell Effect Damage Fatigue. Later I could add:

 

-Spells based on the same effect (Like Stupefy in Harry Potter)

 

-Exclusivity of no-death effect to only affect humans, or only humans not in an "Evil" faction

 

-Support for partners? (although I'm not aware of how difficult/realistic this is)

 

Quick, untested scripts to convey the idea.

 

[spoiler=Weapon Script that causes fatigue damage, no health damage and identifies enemies for the quest script]

scn WeaponScript

;;;

;;;

;;; Does this concept work or

;;; are changes/different ideas

;;; neccesary?

;;;

;;;

;;;

short KO

short NotKO

begin scripteffectstart

 

 

;;;

;;; Not sure if needed

;;;

 

if getav fatigue < 0 && KO != 1

 

Set KO to 1

set NotKO to 1

modav2 fatigue -200

 

elseif getav fatigue <= 0 && KO == 1 && NotKO != 1

 

modav2 fatigue 1000

set NotKO to 1

set KO to 0

 

else

 

modav2 fatigue -30

 

endif ;;;

;;;

;;; Not sure if needed

;;;

 

 

 

if aaaHitQuest.T1 == 0

 

Set aaaHitQuest.T1 to Getself

 

Elseif aaaHitQuest.T2 == 0

 

Set aaaHitQuest.T2 to Getself

 

Elseif aaaHitQuest.T3 == 0

 

Set aaaHitQuest.T3 to Getself

 

Elseif aaaHitQuest.T4 == 0

 

Set aaaHitQuest.T4 to Getself

 

Elseif aaaHitQuest.T5 == 0

 

Set aaaHitQuest.T5 to Getself

 

Elseif aaaHitQuest.T6 == 0

 

Set aaaHitQuest.T6 to Getself

 

Endif

 

End

 

 

 

[spoiler=Quest Script that knocks NPCs unconscious, keeps them unconscious for a desired time, restores them afterwards, and can track multiple NPCs]

scn QuestScript

;;; Does this concept work or

;;; are changes/different ideas

;;; neccesary?

float fquestdelay

 

;;; Allows for up to 6 enemies at once, weapon script

;;;

;;; Weapon damages Fatigue instead of health

;;;

;;; Enemies are knocked unconcious for 3 minutes instead of death

 

ref T1

ref T2

ref T3

ref T4

ref T5

ref T6

 

;;; True when references have negative fatigue value

short T1KO

short T2KO

short T3KO

short T4KO

short T5KO

short T6KO

 

;;; Knocked Out Timer. 3 Minutes, then restore 1,000,000 Fatigue to awaken target, then clear reference for reuse

float T1KOtime

float T2KOtime

float T3KOtime

float T4KOtime

float T5KOtime

float T6KOtime

 

begin gamemode

 

set fquestdelay to .01

 

If T1KOtime > 180

 

T1.modav2 fatigue 1000000

set T1KO to 0

set T1KOtime to 0

;;; Knocked Out Timer. 3 Minutes, then awaken the target

Set T1 to 0

;;; Reset Reference for reuse

 

endif

 

If T2KOtime > 180

 

T2.modav2 fatigue 1000000

set T2KO to 0

set T2KOtime to 0

Set T2 to 0

 

endif

 

If T3KOtime > 180

 

T3.modav2 fatigue 1000000

set T3KO to 0

set T3KOtime to 0

Set T3 to 0

 

endif

 

If T4KOtime > 180

 

T4.modav2 fatigue 1000000

set T4KO to 0

set T4KOtime to 0

Set T4 to 0

 

endif

 

If T5KOtime > 180

 

T5.modav2 fatigue 1000000

set T5KO to 0

set T5KOtime to 0

Set T5 to 0

 

endif

 

If T6KOtime > 180

 

T6.modav2 fatigue 1000000

set T6KO to 0

set T6KOtime to 0

Set T6 to 0

 

endif

 

If T1KO

 

set T1KOtime to GetSecondsPassed

;;; Start Knocked Out Timer once target's Fatigue is negative

 

endif

 

If T2KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

If T3KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

If T4KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

If T5KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

If T6KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

end

 

 

Link to comment

lollol I'd be intersted in helping where I can for this, I like the idea.

 

Prehaps change up some of the roadside bandits to use clubs/fits or other blunt objects to attempt to knock out someone to rob them (they just want your money not your life, and less likely for them to be executed if caught then), could also have guards set to use this when arresting someone who is only wanted for something minor (either have the fine ammount be under a certain level to trigger this, or find a way to re-do the whole wanted ticker, I know a few other mods have semi changed it before).

 

Also you could even have the occasional roaming slaver patrol, too, with the PC getting captured and having to go thru being a slave, but with the ability to escape eventually as the opportunity arises.

 

Prehaps have a config menu ingame (or a .ini) where you can pick and choose who you as the player want to not kill someone as well.

 

Easiest way would be have a scripted effect, if health and/or fatigue drops below X/Y ammounts, the NPC's fatigue is set to a high negative number, which basically drops that NPC (or the player) until the fatigue regenerates.

I've actually experimented with constant effect fatigue loss enchantments before, my PC dropped (when fatigue reached zero) and remained down until it regenerated, so this method would actually (if tweaked right, based on average NPC stats) be a rather effective method in making this work.

Link to comment

The BIG question is can the AI be set to ignore actors with a negative fatigue value.

 

That, or, reset any actor hit in this manner to a prisoner faction (or an unconscious faction) which is neutral to all.

 

Have it not apply to most beasts, with an option for some beasts to turn you into a sex toy, option for bandits to steal gear from you (possibly leaving you naked or with only a shirt OR pants), etc.

 

My thoughts:

 

Bandits (all types): have a % based chance that they either leave you there to wake up later, or capture you.

If they capture you, either they are slavers or sell you to slavers, or choose to keep you for 'entertainment' (rape) and other generic slave tasks.

The slave tasks get assigned like quests, you have to do menial tasks (IE: clean a room in a cave).

 

The main problem is there is no real physical appearance stat ingame, so prehaps when setting all of this up, set up a framework that is used in the scripting for this where you pick certain stats (could even use fallout style perks, too, prehaps) that are used in calculations for this, so if you're female and have high beauty and get KOd at level 1 by bandits, you're likely going to be spending a while getting gangraped and generally being a slave, where an ugly characther may get raped, and robbed, but past that is likely to just be left there, or sold as a slave immediatly.

 

Slave dealers: I'd say have them possibly 'train' you as various types of slaves, depending on stats, etc, and you get shuffled off to some location (IE: house in a town/village/wherever) where you MAY have an easier chance to escape (and script it so if you kill everyone in the house before escaping, no bounty or any penalty) and can report them to the town guard (may not work in Bravil ;) ).

 

 

 

Well, it's a loose idea, but could work.

Link to comment

I like this too. I haven't thought of fatigue' date=' what I was looking was when your about to die you just go unconscious, for a min and wake up, but with negative effects. Kinda like no more dieying mod.

[/quote']

 

 

I made a prototype which was like this. Let's see if I can find it.

 

Oh please oh please, i hope you find it. I've been looking for this kind of mod for a very long time now, with no luck

Link to comment

I like this too. I haven't thought of fatigue' date=' what I was looking was when your about to die you just go unconscious, for a min and wake up, but with negative effects. Kinda like no more dieying mod.

[/quote']

 

 

I made a prototype which was like this. Let's see if I can find it.

 

Oh please oh please, i hope you find it. I've been looking for this kind of mod for a very long time now, with no luck

 

I use a trainer for unlimited health so only stamina is affected. TGM and most mods/other trainers have them tied together.

Link to comment

This is what I have, basic concept.

Quick, untested scripts to convey the idea.

Willing to try to make it for Oblivion first (more familiar), then maybe skyrim.

[spoiler=Weapon Script that causes fatigue damage, no health damage and identifies enemies for the quest script]

scn WeaponScript

;;;

;;;

;;; Does this concept work or

;;; are changes/different ideas

;;; neccesary?

;;;

;;;

;;;

short KO

short NotKO

begin scripteffectstart

 

 

;;;

;;; Not sure if needed

;;;

 

if getav fatigue < 0 && KO != 1

 

Set KO to 1

set NotKO to 1

modav2 fatigue -200

 

elseif getav fatigue <= 0 && KO == 1 && NotKO != 1

 

modav2 fatigue 1000

set NotKO to 1

set KO to 0

 

else

 

modav2 fatigue -30

 

endif ;;;

;;;

;;; Not sure if needed

;;;

 

 

 

if aaaHitQuest.T1 == 0

 

Set aaaHitQuest.T1 to Getself

 

Elseif aaaHitQuest.T2 == 0

 

Set aaaHitQuest.T2 to Getself

 

Elseif aaaHitQuest.T3 == 0

 

Set aaaHitQuest.T3 to Getself

 

Elseif aaaHitQuest.T4 == 0

 

Set aaaHitQuest.T4 to Getself

 

Elseif aaaHitQuest.T5 == 0

 

Set aaaHitQuest.T5 to Getself

 

Elseif aaaHitQuest.T6 == 0

 

Set aaaHitQuest.T6 to Getself

 

Endif

 

End

 

 

 

[spoiler=Quest Script that knocks NPCs unconscious, keeps them unconscious for a desired time, restores them afterwards, and can track multiple NPCs]

scn QuestScript

;;; Does this concept work or

;;; are changes/different ideas

;;; neccesary?

float fquestdelay

 

;;; Allows for up to 6 enemies at once, weapon script

;;;

;;; Weapon damages Fatigue instead of health

;;;

;;; Enemies are knocked unconcious for 3 minutes instead of death

 

ref T1

ref T2

ref T3

ref T4

ref T5

ref T6

 

;;; True when references have negative fatigue value

short T1KO

short T2KO

short T3KO

short T4KO

short T5KO

short T6KO

 

;;; Knocked Out Timer. 3 Minutes, then restore 1,000,000 Fatigue to awaken target, then clear reference for reuse

float T1KOtime

float T2KOtime

float T3KOtime

float T4KOtime

float T5KOtime

float T6KOtime

 

begin gamemode

 

set fquestdelay to .01

 

If T1KOtime > 180

 

T1.modav2 fatigue 1000000

set T1KO to 0

set T1KOtime to 0

;;; Knocked Out Timer. 3 Minutes, then awaken the target

Set T1 to 0

;;; Reset Reference for reuse

 

endif

 

If T2KOtime > 180

 

T2.modav2 fatigue 1000000

set T2KO to 0

set T2KOtime to 0

Set T2 to 0

 

endif

 

If T3KOtime > 180

 

T3.modav2 fatigue 1000000

set T3KO to 0

set T3KOtime to 0

Set T3 to 0

 

endif

 

If T4KOtime > 180

 

T4.modav2 fatigue 1000000

set T4KO to 0

set T4KOtime to 0

Set T4 to 0

 

endif

 

If T5KOtime > 180

 

T5.modav2 fatigue 1000000

set T5KO to 0

set T5KOtime to 0

Set T5 to 0

 

endif

 

If T6KOtime > 180

 

T6.modav2 fatigue 1000000

set T6KO to 0

set T6KOtime to 0

Set T6 to 0

 

endif

 

If T1KO

 

set T1KOtime to GetSecondsPassed

;;; Start Knocked Out Timer once target's Fatigue is negative

 

endif

 

If T2KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

If T3KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

If T4KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

If T5KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

If T6KO

 

set T1KOtime to GetSecondsPassed

 

endif

 

end

 

 

 

Well' date=' I am not a pacifist by any stretch of the imagination but you might take a look at this mod as it contains a spell that you may want to include in your mod: http://oblivion.nexusmods.com/mods/9983

[/quote']

Perhaps not specifically for a pacifist, more like to account for characters who are unwilling to kill but are willing to defend themselves. A spell like this does match the concept, maybe I should remake it with a different approach to avoid having to ask for lolpermissions.

 

 

lollol I'd be intersted in helping where I can for this' date=' I like the idea.

 

Prehaps change up some of the roadside bandits to use clubs/fits or other blunt objects to attempt to knock out someone to rob them (they just want your money not your life, and less likely for them to be executed if caught then), could also have guards set to use this when arresting someone who is only wanted for something minor (either have the fine ammount be under a certain level to trigger this, or find a way to re-do the whole wanted ticker, I know a few other mods have semi changed it before).

 

Also you could even have the occasional roaming slaver patrol, too, with the PC getting captured and having to go thru being a slave, but with the ability to escape eventually as the opportunity arises.

 

Prehaps have a config menu ingame (or a .ini) where you can pick and choose who you as the player want to not kill someone as well.

 

Easiest way would be have a scripted effect, if health and/or fatigue drops below X/Y ammounts, the NPC's fatigue is set to a high negative number, which basically drops that NPC (or the player) until the fatigue regenerates.

I've actually experimented with constant effect fatigue loss enchantments before, my PC dropped (when fatigue reached zero) and remained down until it regenerated, so this method would actually (if tweaked right, based on average NPC stats) be a rather effective method in making this work.

 

[/quote']

 

 

The BIG question is can the AI be set to ignore actors with a negative fatigue value.

 

That' date=' or, reset any actor hit in this manner to a prisoner faction (or an unconscious faction) which is neutral to all.

 

Have it not apply to most beasts, with an option for some beasts to turn you into a sex toy, option for bandits to steal gear from you (possibly leaving you naked or with only a shirt OR pants), etc.

 

My thoughts:

 

Bandits (all types): have a % based chance that they either leave you there to wake up later, or capture you.

If they capture you, either they are slavers or sell you to slavers, or choose to keep you for 'entertainment' (rape) and other generic slave tasks.

The slave tasks get assigned like quests, you have to do menial tasks (IE: clean a room in a cave).

 

The main problem is there is no real physical appearance stat ingame, so prehaps when setting all of this up, set up a framework that is used in the scripting for this where you pick certain stats (could even use fallout style perks, too, prehaps) that are used in calculations for this, so if you're female and have high beauty and get KOd at level 1 by bandits, you're likely going to be spending a while getting gangraped and generally being a slave, where an ugly characther may get raped, and robbed, but past that is likely to just be left there, or sold as a slave immediatly.

 

Slave dealers: I'd say have them possibly 'train' you as various types of slaves, depending on stats, etc, and you get shuffled off to some location (IE: house in a town/village/wherever) where you MAY have an easier chance to escape (and script it so if you kill everyone in the house before escaping, no bounty or any penalty) and can report them to the town guard (may not work in Bravil ;) ).

 

 

 

Well, it's a loose idea, but could work.

 

[/quote']

I thought about a mod like this but it's possibly too advanced, I don't have much experience with scripting and no idea how to set this up. Though with help, maybe.

 

The BIG question is can the AI be set to ignore actors with a negative fatigue value.

What about using quest script' date=' when certain a certain actor/the player has negative fatigue, use addfaction Imprisoned, then make an activator cast an AOE magic effect script at the actor

[spoiler=AOE magic effect script spell with 1 second duration']

begin scripteffectstart

if Getfactionrank Imprisoned = -1

addfaction (Group with relation adding 1000 disposition to Imprisoned)

end

begin scripteffectfinish

StopCombat

end

 

 

lollol I'd be intersted in helping where I can for this' date=' I like the idea.[/quote']

Thanks!

Link to comment

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