Are these the lines in Base.charScript that determine the idle movement frequency?
Spoiler:
Show
REACTION Idle_Combat, 4 USAGE WAITING VARS FIXEDSTRING:_Animation FLOAT:_Wait ACTIONS GetRandomBetween(_Wait,9,10) Sleep(_Wait) IF "!c1" CharacterHasStatus(__Me, SNEAKING) THEN GetWeightedRandom(_Animation,"idle1",INT:10,"idle2",INT:10,"idle3",INT:10) CharacterPlayAnimation(_Animation) ENDIF INTERRUPT Reset()
REACTION Idle_Peace, 4 USAGE PEACE VARS FIXEDSTRING:_Animation FLOAT:_SleepTime ACTIONS IF "!c1" CharacterHasStatus(__Me, SNEAKING) THEN GetWeightedRandom(_Animation,"still",INT:50,"idle1",INT:30,"idle2",INT:30,"idle3",INT:30) IF "c1" IsEqual(_Animation,%PrevIdleAnim) THEN Goto("Start") ENDIF Set(%PrevIdleAnim,_Animation) CharacterPlayAnimation(_Animation) GetRandom(_SleepTime,0,2,3.5,6.8,9.3,11) Sleep(_SleepTime) ENDIF INTERRUPT Reset()
If I want to double how often the move to 5 secs and halve how long they wait I would change GetRandomBetween(_Wait,9,10) to say 4,5 and GetRandom(_SleepTime,0,2,3.5,6.8,9.3,11) to say 0,1,2,3,4,5 ?
Yes, to change the frequency of idle animations you need these two reactions ('Idle_Combat' for combat idles, the other reaction for idles out of combat).
The two values in 'GetRandomBetween' determine the min. and the max. sleep time (= doing nothing), so 'GetRandomBetween(_Wait,4,5)' makes them sleep between 4 and 5 seconds, so double the frequency of combat idle animations, yes. The 'GetRandom' call in 'Idle_Peace' chooses one of the values, so 'GetRandom(_SleepTime,0,1,2,3,4,5)' means: one second, two seconds, three, four or five seconds of sleep time. You can also write: 'GetRandomBetween(_SleepTime,0,5)' to get sleep times between 0 and 5 seconds, but that would be too much. I'd leave peace idles as is.
But you must also regard this event for combat idles (stops idle animations on damage for 10 seconds) and set the value in 'StartTimer' from '10' to '5':
Spoiler:
Show
EVENT InterruptOnDamage ON OnDamage(_,_,_,_) ACTIONS SetPriority("SleepOnWaiting",11) StartTimer("IdleAgain",10,0)
Fixed an engine related bug that occured in combat (mostly in the 'No Combat Idle' version) where character movement didn't stop when ending turn if characters didn't have a waiting behaviour. Now they will stay at their locations. Thanks to jonas367 and 1N07 for reporting this issue.
Just install the mod with the new files. They will replace the old ones.
This is amazing. You should be getting a royalty from the studio, I was considering returning the game to GoG before I found it.
I have one weird bug to report. I am using the no movement version with quietdayonthemarket (with appropriate file.) During combat, if I move a character and then pan the camera after they finish moving, when I go back to the character they have jumped forward in the direction they were facing pretty significantly. I never experienced this before using these mods. Any suggestions?
Sounds pretty weird. Player characters on turn can't be influenced by character scripts, but you say this happens while you're controlling this character on turn, right? Could you try to remove the mod folders and see if that still happens? I've never heard of that and, from your description, this can't be caused by scripting.
I'll install the mod and see if that occurs in my game, too.
EDIT: Tested it. I don't have this issue. You should verify the game files in Steam and see if that solves the problem.
Thanks for the response. Maybe this is just a bug in the game. I verified installation through Good Old Games Galaxy. So far it has only happened in two scenarios: the fight with the ghoul at the lighthouse and the fight in the matching caves outside Cyseal. Again, fantastic mod.
Had the same problem after installing this mod. Never had a problem in the over 60 hours I've played the game before the mod, so I'm sure it's the cause. Due to this bug, the mod is unusable for me.
Okay, now I could reproduce the problem. That's actually a bug in the engine code, not in my script, but I can prevent that.
The issue is: I removed the waiting behaviour of characters, so they don't have an action during this time. Actually this would mean they just stand there and play the default still animation. But if you let them walk to a location, move the camera away from the character, the run animation doesn't end when the character arrives and therefore 'moves on' (in the direction he's facing). I'll script a sleep behaviour instead of removing the reaction, this should fix the issue.
Thank you. Maybe this detail got out of sight towards so many things they had to think of. But randomizing idling too much was not the best idea. I'm sure D:OS 2 will be aware of this.
If you choose the Standard Version 3 it means enemies make their 'more active' animations every 9 or 10 seconds, so you have enough time after every animation to attack the enemy. During that time the enemie's body has just a very slight movement (that is the 'still' animation), so enemies are not totally freezed but the hit box does not notably move. Version 3 also contains a function that resets the animation timeout for enemies on damage.
If you choose NoCombatIdle there won't be any 'more active' animations, just the 'still' animation (slight body movement).
Targeting and attacking works quite well with both versions. Just try it out and see if you like one of them. You can install and uninstall the mod easily (just follow the description).
Yes, should work with the new Patch. I haven't noticed any issues.
The Mod is compatible with GetRidOfQuestmarkers. If you want to use it with QuietDayOnTheMarket you should install the QuietDay-Patch to have the changes for the drunkenGoblins, too. But even without Patch it works fine. It would only affect the frequency of drunkGoblins displaying text in combat.
Baardvark planned to integrate this Mod into Scales after a test. I guess he was quite busy the last time. I wanted to wait for his agreement before I use his 'Base'-script for a Patch. But, well, I'm sure he won't complain. So, Patch will be available in one hour.
In this case I did not have to have any foresight. The goblins have their own combat-idling-section in their script with a higher priority than the 'base'-script reaction, so I had to 'split' this. In consequence, all drunken globlins fans can have their goblins as they love them.
25 comments
USAGE WAITING
VARS
FIXEDSTRING:_Animation
FLOAT:_Wait
ACTIONS
GetRandomBetween(_Wait,9,10)
Sleep(_Wait)
IF "!c1"
CharacterHasStatus(__Me, SNEAKING)
THEN
GetWeightedRandom(_Animation,"idle1",INT:10,"idle2",INT:10,"idle3",INT:10)
CharacterPlayAnimation(_Animation)
ENDIF
INTERRUPT
Reset()
REACTION Idle_Peace, 4
USAGE PEACE
VARS
FIXEDSTRING:_Animation
FLOAT:_SleepTime
ACTIONS
IF "!c1"
CharacterHasStatus(__Me, SNEAKING)
THEN
GetWeightedRandom(_Animation,"still",INT:50,"idle1",INT:30,"idle2",INT:30,"idle3",INT:30)
IF "c1"
IsEqual(_Animation,%PrevIdleAnim)
THEN
Goto("Start")
ENDIF
Set(%PrevIdleAnim,_Animation)
CharacterPlayAnimation(_Animation)
GetRandom(_SleepTime,0,2,3.5,6.8,9.3,11)
Sleep(_SleepTime)
ENDIF
INTERRUPT
Reset()
The two values in 'GetRandomBetween' determine the min. and the max. sleep time (= doing nothing), so 'GetRandomBetween(_Wait,4,5)' makes them sleep between 4 and 5 seconds, so double the frequency of combat idle animations, yes.
The 'GetRandom' call in 'Idle_Peace' chooses one of the values, so 'GetRandom(_SleepTime,0,1,2,3,4,5)' means: one second, two seconds, three, four or five seconds of sleep time. You can also write: 'GetRandomBetween(_SleepTime,0,5)' to get sleep times between 0 and 5 seconds, but that would be too much. I'd leave peace idles as is.
But you must also regard this event for combat idles (stops idle animations on damage for 10 seconds) and set the value in 'StartTimer' from '10' to '5':
EVENT InterruptOnDamage
ON
OnDamage(_,_,_,_)
ACTIONS
SetPriority("SleepOnWaiting",11)
StartTimer("IdleAgain",10,0)
Fixed an engine related bug that occured in combat (mostly in the 'No Combat Idle' version) where character movement didn't stop when ending turn if characters didn't have a waiting behaviour. Now they will stay at their locations. Thanks to jonas367 and 1N07 for reporting this issue.
Just install the mod with the new files. They will replace the old ones.
I have one weird bug to report. I am using the no movement version with quietdayonthemarket (with appropriate file.) During combat, if I move a character and then pan the camera after they finish moving, when I go back to the character they have jumped forward in the direction they were facing pretty significantly. I never experienced this before using these mods. Any suggestions?
I'll install the mod and see if that occurs in my game, too.
EDIT: Tested it. I don't have this issue. You should verify the game files in Steam and see if that solves the problem.
Have a good time with the game
Never had a problem in the over 60 hours I've played the game before the mod, so I'm sure it's the cause.
Due to this bug, the mod is unusable for me.
The issue is:
I removed the waiting behaviour of characters, so they don't have an action during this time. Actually this would mean they just stand there and play the default still animation. But if you let them walk to a location, move the camera away from the character, the run animation doesn't end when the character arrives and therefore 'moves on' (in the direction he's facing).
I'll script a sleep behaviour instead of removing the reaction, this should fix the issue.
If you choose NoCombatIdle there won't be any 'more active' animations, just the 'still' animation (slight body movement).
Targeting and attacking works quite well with both versions. Just try it out and see if you like one of them. You can install and uninstall the mod easily (just follow the description).
(and your other mods)
The Mod is compatible with GetRidOfQuestmarkers. If you want to use it with QuietDayOnTheMarket you should install the QuietDay-Patch to have the changes for the drunkenGoblins, too. But even without Patch it works fine. It would only affect the frequency of drunkGoblins displaying text in combat.
Update for Scales 1.9.32 is available now.
And again for having the foresight to divide it in two!
(in my humble opinion, drunken goblins are meant to act ..drunken.. so am glad i can choose)
In this case I did not have to have any foresight. The goblins have their own combat-idling-section in their script with a higher priority than the 'base'-script reaction, so I had to 'split' this. In consequence, all drunken globlins fans can have their goblins as they love them.