Please login or register.

Login with email, password and session length
 

News:

Happy Holidays!


Author Topic: Issue 55: Sleep state duration increase.  (Read 29895 times)

Offline Jimaras8

  • Hero Member
  • Posts: 828
Re: Issue 53: Adding more contacts to ranged animations
« Reply #630 on: October 15, 2018, 07:52:56 AM »
Thanks to you and dm i figured out the process however the problem with the specific skope remains. Its nova_now_gren by sickalice btw. I havr noticed from my exprience that some skopes keyframes are "locked" in a way and you cant alter them in a way that appears in game. The process that both you and dm directed me works its just that specific one is locked.

I also tried to tinker with the melee kfs and take one of the secondary animations in  order to turn it into a new animation and it didnt appear in game. I know i have encountered this before, i just have no idea how to solve. If anyone wants to download the skope and have a look, it would be really helpful.
« Last Edit: October 15, 2018, 07:54:59 AM by Jimaras8 »

Offline detourne_me

  • Hero Member
  • Posts: 6111
  • Manipulator of mental motion sickness
    • Force of Paradox!
Re: Issue 53: Adding more contacts to ranged animations
« Reply #631 on: October 15, 2018, 10:45:11 AM »
Are you sure that you saved your altered keyframes successfully? maybe you put the altered keyframes in the wrong folder.
I just skoped the keys for that mesh and had no problems adjusting the number of contacts for ranged animations.

what do you mean by secondary animations?

Offline Jimaras8

  • Hero Member
  • Posts: 828
Re: Issue 53: Adding more contacts to ranged animations
« Reply #632 on: October 15, 2018, 06:34:33 PM »
I mean melee_3_b, melee_3_c etc. I have noticed that when i make new animations for nova_now_gren like renaming melee_4_a to flying_melee or melee_5 they don't appear in-game. The leave_hand problem is part of this larger problem. I had this problem with a couple of other meshes in the past like spider-man_AA off the top of my head.

Offline spydermann93

  • Hero Member
  • Posts: 4019
Re: Issue 53: Adding more contacts to ranged animations
« Reply #633 on: October 15, 2018, 10:43:12 PM »
I mean melee_3_b, melee_3_c etc. I have noticed that when i make new animations for nova_now_gren like renaming melee_4_a to flying_melee or melee_5 they don't appear in-game. The leave_hand problem is part of this larger problem. I had this problem with a couple of other meshes in the past like spider-man_AA off the top of my head.

If you aren't seeing all of the keyframe changes you've been making, then that is most likely a "User Account Control" problem.

1) Go to your "C:\Users\username\AppData\Local\VirtualStore" and see if you see a "Freedom Force" folder anywhere in there. If you do, move all of your stuff out of that folder to somewhere safe, like a folder on your desktop. Delete whatever remains.

2) In the search next to your Windows Start button, type "Change User Account Control settings". Once that opens up, slide the slider all the way down to "never notify." Click "Ok".

3) Now you can copy your saved files over to your FF installation. You should now see the changes take effect.

Offline Jimaras8

  • Hero Member
  • Posts: 828
Re: Issue 53: Adding more contacts to ranged animations
« Reply #634 on: October 16, 2018, 07:13:44 PM »
I think that wont he necessary spyder. Its a really weird situation but in think i figured it out. Apparently any change i make in the kfs doesnt appear when inview the skope in game unless i create a character out of it. So when i was viewing novasnskope in-game the changes didnt appear. However i have already a built in nova character in my dat file with a full hero file. The changes appeared fine there.

Offline spydermann93

  • Hero Member
  • Posts: 4019
Re: Issue 53: Adding more contacts to ranged animations
« Reply #635 on: October 16, 2018, 08:14:43 PM »
Oh yeah, that would be another cause: having a built-in character.

Whenever you add a character to the dat folder (at least with m25's tools), it will copy the folder your character's nif is from. If you have a character folder inside of your mod's built-in mesh library, it will use that as the primary keys.

Just something else to keep an eye out for.

Offline Jimaras8

  • Hero Member
  • Posts: 828
Re: Issue 54: Spike from Earth Control attribute doesnt work!
« Reply #636 on: November 21, 2018, 10:58:59 AM »
Howdy guys, i'm back again with your latest in-game bug  :thumbup:. I have noticed that the spike power from the Earth Control attribute doesn't work in-game. Earthwall works find and dandy but when i select a spike to come from beneath a target and impale him only a shadown appears and no spike. If i recall correctly the power worked in the DCUG mod. Can Benton confirm that?

Any ideas?

Offline BentonGrey

  • Titans
  • Hero Member
  • Posts: 15060
    • The Greylands
Re: Issue 54: Spike from Earth Control attribute doesnt work!
« Reply #637 on: November 23, 2018, 05:05:48 AM »
Howdy guys, i'm back again with your latest in-game bug  :thumbup:. I have noticed that the spike power from the Earth Control attribute doesn't work in-game. Earthwall works find and dandy but when i select a spike to come from beneath a target and impale him only a shadown appears and no spike. If i recall correctly the power worked in the DCUG mod. Can Benton confirm that?

Any ideas?

Okay, so there is a shadow that appears instead of the spike? 

The power did work correctly in the DCUG, last I checked.  I haven't looked at that, in particular, recently.  The fact that there is a shadow says to me that either A) the mesh in question is missing, or B) the mesh isn't displaying properly.  I'm not sure, though.
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out my DC voicepacks at my yahoo group.
http://games.groups.yahoo.com/group/bentongrey/
http://games.groups.yahoo.com/group/bentongrey2

Offline Jimaras8

  • Hero Member
  • Posts: 828
Re: Issue 54: Spike from Earth Control attribute doesnt work!
« Reply #638 on: November 23, 2018, 01:32:51 PM »
Hi Benton, good to see you noticed the thread. I wasn't able to look in the e-mails you sent me from last week due to my military duties and i had to be in my base for a few days. If you need anything pm me  :thumbup:

As for the bug i'm certain geomancer was able to use the spike in the DCUG so it definitely works there. In the MA the spike doesn't appear and the target doesn't receive any damage at all.

Offline BentonGrey

  • Titans
  • Hero Member
  • Posts: 15060
    • The Greylands
Re: Issue 54: Spike from Earth Control attribute doesnt work!
« Reply #639 on: November 25, 2018, 03:20:30 AM »
Well Jim, I'm glad I came across this, but I can't say I'm pleased to hear about more bugs in MA!  :P  Haha!  So, I've tested this, and the spike definitely isn't working in MA for me either.  I'm not getting anything, shadow or otherwise.  I've checked the mesh files, and they were indeed missing, though since it was calling on built-in files, that shouldn't matter. 

Nonetheless, I added the necessary objects.  Now, I'm getting the spikes to trigger, but not always.  It looks like the energy will get spent, but the character won't always actually trigger the ability.  I found that using it twice on the same target got it to go.  Would you do me a favor and test this on your end?  Just go to Data/Art/Library/Area_specific/underground/decor, and copy the rock_stalagmite folder to your MA directory under the same path.  Then try it out with someone like Terrax or Avalanche in the mod. 

Also, PM incoming!
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out my DC voicepacks at my yahoo group.
http://games.groups.yahoo.com/group/bentongrey/
http://games.groups.yahoo.com/group/bentongrey2

Offline BentonGrey

  • Titans
  • Hero Member
  • Posts: 15060
    • The Greylands
Re: Issue 54: Spike from Earth Control attribute doesnt work!
« Reply #640 on: December 13, 2018, 05:40:40 AM »
Okay....so this is really weird.  You have spikes working in your old copy of the DCUG, right?

Well, guess what.  They don't work in the current build, and nothing has changed on that front!
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out my DC voicepacks at my yahoo group.
http://games.groups.yahoo.com/group/bentongrey/
http://games.groups.yahoo.com/group/bentongrey2

Offline Jimaras8

  • Hero Member
  • Posts: 828
Re: Issue 55: Sleep state duration increase.
« Reply #641 on: December 24, 2018, 03:48:33 PM »
Howdy guys. I hope you are all having a very merry christmas and overall a blast.

I know i have been awarded p lately due to milatary duties but im having a few days kff and i have a burning question to ask you.

Is it possible to increase the duration of the sleep state? I have noticed that characters stay down for about 5 seconds tops and i was thinking if it was possible to increase that.

Offline spydermann93

  • Hero Member
  • Posts: 4019
Re: Issue 55: Sleep state duration increase.
« Reply #642 on: December 24, 2018, 06:17:28 PM »
Should be doable.

Sleep is affected by the power type you're swapping with, so something like Power Null will make the enemy sleep for a short time while something like Hypnosis will make them sleep longer.

In the "ffx2.py," you can find all of the code for the sleep attack swap. Look through there and you should be able to find a way to change the duration of the attack.

Offline Jimaras8

  • Hero Member
  • Posts: 828
Re: Issue 55: Sleep state duration increase.
« Reply #643 on: December 24, 2018, 06:20:20 PM »
Thanks a lot spyder for the quick reply  :thumbup:. So i take it you suggest hypnosis as the primary state for longer duration? I thought states were affected by the powers magnitude, the higher the damage the longer the effect.
« Last Edit: December 24, 2018, 06:23:41 PM by Jimaras8 »

Offline spydermann93

  • Hero Member
  • Posts: 4019
Re: Issue 55: Sleep state duration increase.
« Reply #644 on: December 24, 2018, 06:42:18 PM »
No problem, man

Magnitude is the chance of the original effect happening. So a High Hypnosis attack just means that Hypnosis has a High chance of succeeding. Once the original effect succeeds, that's when the attack swap happens.

The ffx code looks at which type of attack is being swapped and replaces it with the swap attack. In this case, sleep. All swaps have different intensity values associated with each original effect type. Hypnosis is usually given the highest intensity because it is very expensive in-game while Weaken is very cheap, so it gets a very low intensity.

Those values can be found in ffx.py if I'm not mistaken.

Offline Jimaras8

  • Hero Member
  • Posts: 828
Re: Issue 55: Sleep state duration increase.
« Reply #645 on: December 25, 2018, 01:46:48 PM »
Spyder, i found this entry in the ffx2.py. Safe to say i have no idea what i have to change in order not to mess the game up  :thumbup:. I'm sorry to bother you again but i know you have spent a lot of time with the code, so do you have any ideas?

####################### Sleep state swap #######################
def limeyluretosleep(event):
    focus=ffx.getLure()
    if focus=='':
        return
    Trigger_Explosion(focus,'ffx_hexarea')
    ffx.RegTimer('llsleepCheck',1,ffx.stateintensity[int(event.user)],focus,event.string)
    ffx.RegTimer('destroyTemp',1.1,0,focus)

def llsleepCheck(event):
    char=event.object
    hero=event.string
    for obj in Mission_GetDynamicObjects():
        if obj==hero:
            Object_SetSecondaryState(obj,SCSTATE_HEXED,0,REMOVE_STATE)
        if (obj!=char) & (obj!=hero):
            if Object_GetClass(obj)&FFX_CHARACTER:
                if ffx.distanceSq(obj,char)<40000:
                    if Object_GetSecondaryStates(obj)&SCSTATE_HEXED:
                        Object_SetSecondaryState(obj,SCSTATE_HEXED,0,REMOVE_STATE)
                        fallAsleep(obj, hero, duration=10)

def stuntosleep(event):
    sleepP(event,PCSTATE_STUNNED,ffx.COST_STUN)
def hypnosistosleep(event):
    sleepP(event,PCSTATE_HYPNOTISED,ffx.COST_HYPNO)
def ragetosleep(event):
    sleepP(event,PCSTATE_ENRAGED,ffx.COST_RAGE)
def exiletosleep(event):
    sleepP(event,PCSTATE_EXILE,ffx.COST_EXILE)
def blanktosleep(event):
    sleepP(event,PCSTATE_BLANK,ffx.COST_BLANK)
def panictosleep(event):
    sleepP(event,PCSTATE_PANICKED,ffx.COST_PANIC)
def stasistosleep(event):
    sleepP(event,PCSTATE_STATIC,ffx.COST_STASIS)

def hextosleep(event):
    sleepS(event,SCSTATE_HEXED,ffx.COST_HEX)
def blindtosleep(event):
    sleepS(event,SCSTATE_BLIND,ffx.COST_BLIND)
def powernulltosleep(event):
    sleepS(event,SCSTATE_POWER_NULLIFICATION,ffx.COST_NULL)
def weakentosleep(event):
    sleepS(event,SCSTATE_WEAKENED,ffx.COST_WEAKEN)
def speeddecreasetosleep(event):
    sleepS(event,SCSTATE_SPEED_DECREASED,ffx.COST_DECREASE)

def sleepP(event,state,intensity):
    char=event.object
    source=event.string
    if Object_GetPrimaryState(char)==state:
        Object_SetPrimaryState(char,state,0,REMOVE_STATE)
        fallAsleep(char, source, (intensity * 3) + 3)
    if state==PCSTATE_STATIC:
        ffx.FFX_ObjectSetAttr(char, 'stasisSleep', 1)

def sleepS(event,state,intensity):
    char=event.object
    source=event.string
    if Object_GetSecondaryStates(char)&state:
        Object_SetSecondaryState(char,state,0,REMOVE_STATE)
        fallAsleep(char, source, (intensity * 3) + 3)

def fallAsleep(char, source, duration):
    ffx.FFX_UpdateStates(char)
    if (ffx.getGender(char) == ffx.FFX_GENDER_ROBOT):
        return
    if Object_GetSecondaryStates(char)&SCSTATE_ZOMBIE:
        return
    if ffx.FFX_ObjectGetAttr(char, 'ffx_sleep') != 1:
        handle = Object_PlayEffect(char, 'effect_ffx_lifedrain', '', FX_LOOP|FX_TRACK_OBJECT_FULL, 0, 'centre')
        ffx.FFX_ObjectSetAttr(char, 'sleeping_handle', handle)
    if ffx.FFX_ObjectGetAttr(char, 'stasisSleep') == 1:
        ffx.FFX_ObjectSetAttr(char, 'sleep_duration', duration)
        ffx.RegTimer('makeasleepFlyer', 0.2, 0, char)
        ffx.FFX_ObjectSetAttr(char, 'sleep_flier', 1)
        return
    flying=mlogreader.MLOG_IsFlying(char)
    flailing=mlogreader.MLOG_IsFlailing(char)
    if (flying==1) | (flailing==1):
        Trigger_Force(char,0,0,1,Object_GetAttr(char,'mass')*100,TF_ABSOLUTE)
        ffx.FFX_ObjectSetAttr(char, 'sleep_duration', duration)
        ffx.RegTimer('makeasleepFlyer', 0.2, 0, char)
        ffx.FFX_ObjectSetAttr(char, 'sleep_flier', 1)
    else:
        makeasleep(char,duration)

def makeasleepFlyer(event):
    char = event.object
    duration = ffx.FFX_ObjectGetAttr(char, 'sleep_duration')-0.2
    ffx.FFX_ObjectSetAttr(char, 'sleep_duration', duration)
    falling=mlogreader.MLOG_IsFlailing(char)
    if falling:
        ffx.RegTimer('makeasleepFlyer', 0.2, 0, char)
    else:
        makeasleep(char,duration)

def makeasleep(char,duration):
    Trigger_Move(char,'lock')
    if ffx.FFX_ObjectGetAttr(char, 'sleep_flier') == 1:
        AI_Animate(char,'land_forward')
        ffx.FFX_ObjectSetAttr(char, 'sleep_flier', 0)
    else:
        AI_Animate(char,'fall')
    ff.RESULTBUBBLE_SCALE=0
    ffx.RegTimer('bubblesOn',0.1)
    ffx.RegTimer('removeFX',0.5,1,char)
    ffx.setPowerNullState(char, duration)
    ffx.FFX_ObjectSetAttr(char, 'ffx_sleep', 1)
    ffx.RegTimer('makewakeup', duration, 0, char)

def makewakeup(event):
    char = event.object
    makewakeup2(char)

def makewakeup2(char):
    if ffx.FFX_ObjectGetAttr(char, 'ffx_sleep') == 1: #make sure we don't wake them up twice
        ffx.setPowerNullState(char, 0)
        handle = ffx.FFX_ObjectGetAttr(char, 'sleeping_handle')
        Object_StopEffect(char, handle)
        Trigger_Move(char, 'unlock')
        AI_Animate(char,'get_up_forward')
        ffx.FFX_ObjectSetAttr(char, 'ffx_sleep', 0)