Jump to content

Confidence enchantments


lilgamefreek

Recommended Posts

So I've been playing around with the flamer and specifically I want it to lower an npc's confidence level (because they are, you know, on fire). Essentially, I want the guy to start fleeing.

 

Well anyways, I've setup a base effect which is pretty much a copy-paste of reduceagility that should modify confidence instead. I then added this effect to enchflamereffect which controls the burning effect ingame.

 

The problem I have now is that burning npc's don't flee, or at least not as much as I'd like them too.

 

I've been playtesting in Fairfax ruins since there is large a diverse group of raiders there. The thing is most of these raiders, which should be set to foolhardy confidence, don't flee. One does, however, the single missile launcher raider. When lit on fire the guy runs like a pansy. But no other rather so much as flinches even though I have the modifier set at 20 right now. Can anyone help?

 

I've been steadily escalating it. At 100, the raider's with knives start to run away. Still can't get assault riflers to run even though I'm at 1000 right now.

Link to comment
Share on other sites

You might want to try to add a script effect on top of what you've done, the script would do:

 

ScriptEffectStart
StopCombat
End

 

If the dude is STILL aggressive, change scripteffectstart to scripteffectupdate

 

Also, you might want to add a "is not the player" conditional on that one, might cause unwanted effects

Link to comment
Share on other sites

I don't know. Wouldn't that cause any enemy you encounter to just stop fighting? I'm trying to get the actor to actively flee as if they are freaking out about being on fire. I might just leave it as is, or else the flamer might be too overpowered.

 

Really, the problem simply seems to be that the raiders are operating group health rather than individual when calculating their combat odds, so some stragglers who are not part of the main group will flee and the very last guy after cutting down his friends will flee, but never a random combination of the ones in the middle.

Link to comment
Share on other sites

Okay, I've written a script that manually sets the actor to confidence 0 so that works like a charm.

 

Now the problem is getting to script to run on a random basis and on the actor's endurance. I currently have it set so that the effect checks to see if the effecte is a robot or a member of the player faction before running the script. It then makes a final check of getrandompercent < 5 to see if it should run the script or not.

 

The problem is I want this to be based on the actor's endurance, but I can't figure out a way to do this solely in conditions window. Do I seriously need to write an entirely new function for this?

 

Sorry for all the questions. I JUST started using GECK and am pretty much running solely on my limited computer science education to power through this.

 

Honestly, all I want for Christmas is a divide function. :P

 

I have a halfway decent subsitute that checks to see if the endurance is under six and if it is, the percentage check is set to three, while if it isn't six, then the percentage check is set to 1.

Link to comment
Share on other sites

Unfortunately, as you've obviously discovered, we're pretty limited when it comes to defining conditions. Conditions that would be very simple to create via script, such as those comparing two conditions using operators other than AND/OR, simply cannot be created as regular conditions. Sometimes, you can get around this by checking the condition elsewhere, and changing something as a result of this check, then check what you have changed with a condition function like GetQuestVariable.

 

I've used this approach in one of my mods, and I've documented it on the GECK Wiki here - Using Complex Conditions

 

You could possibly apply this method here by using the GetItemCount in the condition for the other effect item of your actor effect.

 

Cipscis

Link to comment
Share on other sites

Thanks for all of your help. I finally got something that seems very nice together. Works as I want it to, though It hasn't gone through the most intensive playtesting. :whistling:

 

Wondering whether you could evaluate it and check whether or not there are any glaring flaws.

 

scn FireConfidenceScript


Int StartingConfidence
Int HealthChance
Int ConfidenceChance 
Short RunningAway

Begin ScriptEffectStart
set StartingConfidence to getAv Confidence
set ConfidenceChance to 80 - 10*getAv Endurance
set HealthChance to GetRandomPercent
IF GetRandomPercent < ConfidenceChance
	setAv Confidence 0
; try to restart combat so he picks up his new confidence
	scaonactor
	stopcombat
	set RunningAway to 1
Endif

End

Begin ScriptEffectUpdate
IF HealthChance > GetHealthPercentage*100 + getAv Endurance * 8 && RunningAway != 1
	setAv Confidence 0
	scaonactor
	stopcombat
	Set RunningAway to 1
Endif
End

Begin ScriptEffectFinish
If RunningAway == 1
	setAv Confidence StartingConfidence
	scaonactor
	stopcombat
Endif

Link to comment
Share on other sites

StopCombatAlarmOnActor stops other actors from attacking that actor on which the function is called, so you probably don't want to use it - StopCombat should be enough for them to drop out of combat then, if applicable, instantly re-engage.

 

I'm not sure why you've declared some of your variables as "int" and one as "short". Are you aware that these are both the same type of variable? I've tested it and they both have the same range and specificity.

 

Cipscis

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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