Jump to content

Recommended Posts

Posted
  On 2/26/2012 at 8:29 PM, Krentz said:

Sounds cool but my main suggestion would be to not limit life expectancy to real-life hours. You could set an age at character creation (somewhere between 20-30 years?) and then keep track of in-game days passed to track the age. As the player ages, certain activities could become more dangerous - fall damage could get higher, traps would do more damage, exposure to the elements would get bad faster, etc.

 

I think it would help with immersion because it would prevent cheap play like waiting a week outside a merchant shop for their inventory to reload.

 

Otherwise this idea sounds awesome!

 

I have set it to go up every 5 in-game years. You weaken with age -- however, you can only use magic when your old enough, and your spells become stronger, too.

Posted
  On 2/27/2012 at 9:02 PM, FiLTHYESKiMO said:
  On 2/26/2012 at 8:29 PM, Krentz said:

Sounds cool but my main suggestion would be to not limit life expectancy to real-life hours. You could set an age at character creation (somewhere between 20-30 years?) and then keep track of in-game days passed to track the age. As the player ages, certain activities could become more dangerous - fall damage could get higher, traps would do more damage, exposure to the elements would get bad faster, etc.

 

I think it would help with immersion because it would prevent cheap play like waiting a week outside a merchant shop for their inventory to reload.

 

Otherwise this idea sounds awesome!

 

I have set it to go up every 5 in-game years. You weaken with age -- however, you can only use magic when your old enough, and your spells become stronger, too.

 

You could always make it so that Restoration magic slows down the aging process, Destruction speeds it up, Conjuration/Illusion lessens the mal-effects (As in, the higher the skill, the more/less aging)

Posted
  On 2/26/2012 at 8:28 PM, GomuGomu64 said:

Well, for the Permamently Wounded part, you could always add a perk which is added whenever the player reaches below a certain percentile, and takes damage.

 

How to do that....Eh.

 

int PlayerHealth = Game.GetPlayer().GetActorValuePercentage("Health") as int

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
 bool abBashAttack, bool abHitBlocked)

	 	if (PlayerHealth >= 0.25)
endif
	if (PlayerHealth <= 0.25)
		debug.MessageBox("You have been fatally wounded!")
		Game.GetPlayer().AddPerk IDOfPerkWithDisability (NameofPerkWithDisability)
	endif
EndEvent

Event OnSleepStart()
if Game.GetPlayer().Perk IDOfPerkWithDisability (NameofPerkWithDisability)
	Game.GetPlayer().RemovePerk IDOfPerkWithDisability
endif
EndEvent

 

When you get round to it, tell me if that script works. The wiki wasn't clear at all on how to do something like this >_>

 

It seems as though this code clears the perk after you sleep. I could use that code however to add scars to the body. Then, let's say, after 10 times you become crippled or something. :)

 

 

 

  On 2/27/2012 at 9:04 PM, GomuGomu64 said:
  On 2/27/2012 at 9:02 PM, FiLTHYESKiMO said:
  On 2/26/2012 at 8:29 PM, Krentz said:

Sounds cool but my main suggestion would be to not limit life expectancy to real-life hours. You could set an age at character creation (somewhere between 20-30 years?) and then keep track of in-game days passed to track the age. As the player ages, certain activities could become more dangerous - fall damage could get higher, traps would do more damage, exposure to the elements would get bad faster, etc.

 

I think it would help with immersion because it would prevent cheap play like waiting a week outside a merchant shop for their inventory to reload.

 

Otherwise this idea sounds awesome!

 

I have set it to go up every 5 in-game years. You weaken with age -- however, you can only use magic when your old enough, and your spells become stronger, too.

 

You could always make it so that Restoration magic slows down the aging process, Destruction speeds it up, Conjuration/Illusion lessens the mal-effects (As in, the higher the skill, the more/less aging)

 

Love it!

Posted
Hm..so if you die of old age is that just a game over. Or would you be able to play as one of your kids. Would be pretty interesting, and impressive if that was utilized. Although, might not work with the time line and all.
Posted
  On 2/27/2012 at 9:17 PM, Sanbru said:

Hm..so if you die of old age is that just a game over. Or would you be able to play as one of your kids. Would be pretty interesting, and impressive if that was utilized. Although, might not work with the time line and all.

 

That's what I want to achieve. But I will of course start with the smaller stuff. :)

Posted

Well, I'm working on a dungeon mod by myself for now. I'm more than willing to lend a hand with this :3

 

I revised the code to how you wanted it, and make it so that if you get hit by a Power Attack, you get that disability perk when hit under 25% health.

 

int PlayerHealth = Game.GetPlayer().GetActorValuePercentage("Health") as int

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
 bool abBashAttack, bool abHitBlocked)

if bool abPowerAttack == true
               if (PlayerHealth >= 0.25)
       endif
              elseif (PlayerHealth <= 0.25)
                       debug.MessageBox("You have been fatally wounded!")
                       Game.GetPlayer().AddPerk IDOfPerkWithDisability (NameofPerkWithDisability)
               endif
endif
EndEvent

Posted
  On 2/27/2012 at 9:56 PM, GomuGomu64 said:

Well, I'm working on a dungeon mod by myself for now. I'm more than willing to lend a hand with this :3

 

I revised the code to how you wanted it, and make it so that if you get hit by a Power Attack, you get that disability perk when hit under 25% health.

 

int PlayerHealth = Game.GetPlayer().GetActorValuePercentage("Health") as int

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \
 bool abBashAttack, bool abHitBlocked)

if bool abPowerAttack == true
               if (PlayerHealth >= 0.25)
       endif
              elseif (PlayerHealth <= 0.25)
                       debug.MessageBox("You have been fatally wounded!")
                       Game.GetPlayer().AddPerk IDOfPerkWithDisability (NameofPerkWithDisability)
               endif
endif
EndEvent

[/quote

 

Going to test this soon. Need to find someone who is good at doing texture mods so that I can work this script in with wounds/scar part.

Posted

Scriptname HumanAging   Conditional
{Player aging system.}

int TheYear = GameYear.GetValue()

ActorBase PlayerBase = Game.GetPlayer().GetBaseObject() as ActorBase
Race PlayerRace = PlayerBase.GetRace()

If (PlayerRace = "Redguard" or "Imperial" or "Nord")
               If (TheYear <= 220)
               Game.GetPlayer().AddPerk AgePerk1 (AgePerk1)
       endif
               elseif (TheYear  >= 221) && (TheYear <= 231)
               Game.GetPlayer().RemovePerk AgePerk1
               Game.GetPlayer().AddPerk AgePerk2 (AgePerk2)
                endif
              elseif (TheYear == 241)
                       Game.GetPlayer().kill
               endif
endif
            

 

Just trying to figure out how Papyrus works. I am very familiar with the fundamentals of coding, so it shouldn't take to long. But I think I am on the right path.

Posted (edited)

Scriptname HumanAging extends Quest
{Player aging system.}

int TheYear = GameYear.GetValue()

PlayerBase = Game.GetPlayer().GetBaseObject() as ActorBase
PlayerRace = Game.GetPlayer().GetRace()

Event OnInit()
RegisterForUpdateGameTime(24)
EndEvent

Event OnRegisterForUpdateGameTime()
If (PlayerRace = "Redguard" or "Imperial" or "Nord")
               If (TheYear <= 220)
               Game.GetPlayer().AddPerk AgePerk1 (AgePerk1)
       endif
               elseif (TheYear  >= 221) && (TheYear <= 231)
               Game.GetPlayer().RemovePerk AgePerk1
               Game.GetPlayer().AddPerk AgePerk2 (AgePerk2)
                endif
              elseif (TheYear == 241)
                       Game.GetPlayer().kill
		UnregisterForUpdateGameTime()
               endif
endif
EndEvent
            

 

Looked over your script, did some tweaking. This SHOULD work, giving no guarantee :P

 

For this to work, create a new quest, open it up, add a new stage, click "StartUp Stage" and "Initiate on Startup" (Something like that, not at the CK right now), attach your script under the Scripts tab,

and it should work fine.

Edited by GomuGomu64
Posted (edited)
  On 2/29/2012 at 11:05 PM, GomuGomu64 said:

Scriptname HumanAging extends Quest
{Player aging system.}

int TheYear = GameYear.GetValue()

PlayerBase = Game.GetPlayer().GetBaseObject() as ActorBase
PlayerRace = Game.GetPlayer().GetRace()

Event OnInit()
RegisterForUpdateGameTime(24)
EndEvent

Event OnRegisterForUpdateGameTime()
If (PlayerRace = "Redguard" or "Imperial" or "Nord")
               If (TheYear <= 220)
               Game.GetPlayer().AddPerk AgePerk1 (AgePerk1)
       endif
               elseif (TheYear  >= 221) && (TheYear <= 231)
               Game.GetPlayer().RemovePerk AgePerk1
               Game.GetPlayer().AddPerk AgePerk2 (AgePerk2)
                endif
              elseif (TheYear == 241)
                       Game.GetPlayer().kill
		UnregisterForUpdateGameTime()
               endif
endif
EndEvent
            

 

Looked over your script, did some tweaking. This SHOULD work, giving no guarantee :P

 

For this to work, create a new quest, open it up, add a new stage, click "StartUp Stage" and "Initiate on Startup" (Something like that, not at the CK right now), attach your script under the Scripts tab,

and it should work fine.

 

Then there is also this:

 

Scriptname HumanAging   extends Forms
{Gives age perks for human players}

GlobalVariable property GameYearVar auto
int property Stage auto
Perk property AgePerk1 auto
Perk property AgePerk2 auto
Perk property AgePerk3 auto
Function AgePerks()

ActorBase PlayerBase = Game.GetPlayer().GetBaseObject() as ActorBase
Race PlayerRace = PlayerBase.GetRace()
float GameYear = GameYearVar.Value

If (PlayerRace == "Redguard" || "Imperial" || "Nord")      
  If (GameYear <= 220) && (Stage == 0)       
Stage += 1
Game.GetPlayer().AddPerk(AgePerk1)
                       elseif (GameYear  >= 221) && (GameYear <= 231) && (Stage  == 1)
                  Game.GetPlayer().AddPerk(AgePerk2)Stage += 1
                    
  elseif (GameYear >= 241) && (Stage == 2)
               Game.GetPlayer().AddPerk(AgePerk3)
       endif
endif
endif
endif
endFunction

 

I could go over both codes to see which is more optimised. But, if anyone is any good at creating perks, feel free to help! :D

 

I also want to talk to the guy who does the Total Realism Overhaul mod and see if he wants to merge these scripts. With each age perk the chances of dying increase, and the players diet can be taken into consideration too.

Edited by FiLTHYESKiMO
  • Recently Browsing   0 members

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