INFO Bug Reports NOV2015a

greatguys1

Epic Adventurer
MSC Developer
Warriors of the North
MSC Archivist
Joined
Apr 20, 2013
Messages
341
Reaction score
63
Age
26
Location
Yes
$get(MONSTER_ID,skin) always returns 0, even when a monster isn't using 0.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
$get(MONSTER_ID,skin) always returns 0, even when a monster isn't using 0.
Skin is a client side->pev property, it'd take quite some effort to allow the server to pull the info. However, it always defaults to 0, and can't be set to anything you didn't set it to in the script, so you should always know what it is.

Kanta said:
<censored thingie>
Related to a potential exploit - the results of which have been fixed, though still need to rework this to figure the core problem.
 

greatguys1

Epic Adventurer
MSC Developer
Warriors of the North
MSC Archivist
Joined
Apr 20, 2013
Messages
341
Reaction score
63
Age
26
Location
Yes
Related to a potential exploit - the results of which have been fixed, though still need to rework this to figure the core problem.
I've spent some time on this (mostly trying to figure out how to log vars so I can see what's happening) and narrowed it down to msstring::skip() not working correctly. It happens to work for two of the options, somehow, but fails for the rest, because it returns a malformed string.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
That's... Not good. The script isn't using any string processing, so that must be an issue coming up on the code side of the command. Blarg, probably messing with other things.
 

greatguys1

Epic Adventurer
MSC Developer
Warriors of the North
MSC Archivist
Joined
Apr 20, 2013
Messages
341
Reaction score
63
Age
26
Location
Yes
Skin is a client side->pev property, it'd take quite some effort to allow the server to pull the info. However, it always defaults to 0, and can't be set to anything you didn't set it to in the script, so you should always know what it is.

After scanning the scriptcmds in the code, I found that you can use
Code:
setvard RENDER_PROPS $get(ent_me,renderprops)
to get:
Code:
pTarget->pev->scale;
pTarget->pev->rendermode;
pTarget->pev->renderamt;
pTarget->pev->body;
pTarget->pev->skin;
All in a nice token. So that's kinda neat.

And it even had you as the author ;P
 
Last edited:

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
My bad, forgot I rigged that up, and I guess it is available server side... Still, shouldn't need it for that. It's not as if the entity can determine its skin independent of your script. ;)

It's handier when you're trying to get the properties of a scripted brush that may already have some of those properties set, or when you need to grab the submodel index, and can't be asked to do the math (I'm not even sure what the formula is, off hand). Also, I suppose, if you need to take into account additional parameters that the mapper may have set, though they should all set some variable as well.

I think the only time I've ever used renderprops was for the flying-monster client-side corpse spawner, as it needed to be sure the client generated corpse would match the renderprops of the server-side creature when it died - not a lotta critters using that feature, so I'm not sure if it's 100% reliable.
 

greatguys1

Epic Adventurer
MSC Developer
Warriors of the North
MSC Archivist
Joined
Apr 20, 2013
Messages
341
Reaction score
63
Age
26
Location
Yes
It seems that when using a $func() in events like game_damaged_other, and game_damaged (Probably others but I haven't tested), those events interpret that return as the damage multiplier, as if you used "returndata". A script to show that off real easy:
Code:
#scope server

{
    const EXPLOSION_DISTANCE 120
    const EXPLOSION_DAMAGE 100
    const EXPLOSION_DAMAGE_FALLOFF 0.2
    const EXPLOSION_FORCE 300
    const EXPLOSION_TYPE blunt_effect
}

{ game_spawn

    name Meshkhar, the Stupid
    hp 8000
    race vermin
    roam 0
    width 32
    height 96

    setmodel monsters/sorc.mdl
}

{ game_heardtext

    setvard RETURN_VALUE PARAM1
    xdodamage $get(ent_me,origin) EXPLOSION_DISTANCE EXPLOSION_DAMAGE EXPLOSION_DAMAGE_FALLOFF ent_me ent_me none EXPLOSION_TYPE //<target|(src_origin)> <range|aoe|(dest_origin)|direct> <damage> <cth|fall_off> <attacker> <inflciter> <skill|none> <dmg_type> [flag_string]
}

{ game_damaged_other //PARAM1=target_hit PARAM2=dmg PARAM3=dmg_type //items return <attack_callback>_damaged_other

    local L_GET_TEXT $func(func_return_said_text)

    local L_STR "I will do "
    stradd L_STR L_GET_TEXT
    stradd L_STR " times more damage than 100."

    saytext L_STR
}

{ func_return_said_text

    return RETURN_VALUE
}
Just say a number and he'll try to get it via a func. As a result, he'll multiply his damage output.
 
Last edited:

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Hrmm... Not sure how to fix without adding a new property to the base script system. game_damaged_other and few other hard events use the same returndata property. Workaround would be to use the classic callevent method and set a setvard. $func() is neat, but remember it doesn't actually let you do anything you couldn't do before it was put in place - just makes it easier to conceptualized and organize.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
PS. Bug reports for Kroush should go here as well.
 

greatguys1

Epic Adventurer
MSC Developer
Warriors of the North
MSC Archivist
Joined
Apr 20, 2013
Messages
341
Reaction score
63
Age
26
Location
Yes
Hrmm... Not sure how to fix without adding a new property to the base script system. game_damaged_other and few other hard events use the same returndata property. Workaround would be to use the classic callevent method and set a setvard. $func() is neat, but remember it doesn't actually let you do anything you couldn't do before it was put in place - just makes it easier to conceptualized and organize.
I understand. I'll probably still use $func(), but just set the returndata back to 1 afterwords. Would this mean though that "return" and "returndata" do the same thing?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Yes, it's an alias for the same command. Potentially dicey that way though - if a global balancer or any such is adjusting the damage, the proper returndata may not be 1. Also could end up with a string in the returndata, and I'm not sure what game_damaged_other would do with that - might overflow into any number, and suddenly the critter could end up hitting for x3238493.3643 damage or some such.
 

Kanta

Old Skool Apostle
Alpha Tester
Joined
Jan 24, 2013
Messages
638
Reaction score
89
Location
ms_swamp
Don't know what was happening here, but something kept cancelling my rejuvenate at the Thanatos boss arena despite taking no damage.
 

greatguys1

Epic Adventurer
MSC Developer
Warriors of the North
MSC Archivist
Joined
Apr 20, 2013
Messages
341
Reaction score
63
Age
26
Location
Yes
If you listen, it happens whenever one of those ice things are shot. Looking in the script, it seems that to determine who to shoot it at, it attempts to deal 0 damage in a large area, then whoever it "hit" it will shoot the projectile at. The rejuvenation spell will cancel even on 0 damage.
Snip of monsters/skeleton_ice_enraged:
Code:
{ cast_bolts

    if $get(ent_me,isalive)

    //callevent BOLT_FREQUENCY cast_bolts

    setvard BOLT_CHECKING 0

    if !ICE_BLASTING
    if !PLAYING_DEAD

    //dbg Checking for Boltables

    playanim critcal ANIM_BLAST

    setvard ICE_BLASTING 1
    dodamage $relpos(0,0,0) 2048 0 100% 0 reflective //<----- This is where it does 0 damage
//<target> <range> <dmg> <cth> [type] - swing at target in range (can be obstructed)
    setvard ICE_BLASTING 0
}



{ game_dodamage //1: Attack Hit (1/0)  2: Entity Attack hit  3:  Start Position  4:  End Position

    if ( !ICE_BLASTING )
    {
        if ( !FREEZE_ATTACK )
        {
            if ( ANIM_ATTACK equals ANIM_SMASH )
            {
                if( $rand(1,4) == 1 ) applyeffectstack PARAM2 effects/effect_frost 5 $get(ent_me,id) $rand(3,5)
            }
        }
    }


    if ( ICE_BLASTING ) //<----- This is where it shoots the projectile at whoever was "hit" by 0 damage
    {
        if PARAM1

        if $get(PARAM2,relationship,ent_me) equals enemy

        //dbg Casting Bolt

        playsound game.sound.voice 10 SOUND_BOLT

        setmovedest PARAM2 9999

        tossprojectile PARAM2 500 BOLT_DAMAGE 1 proj_ice_bolt (0,5,50)
    }
}
 

MS:C community

Old Skool Apostle
Alpha Tester
Joined
Jul 7, 2011
Messages
504
Reaction score
109
The (bizarre) reason is: Those pissed off ice skeletons (monsters/skeleton_ice_enraged) somehow pull you out of rejuvenate when they fire a frost bolt. They don't even have to hit you, hell, they don't even have to aim at you.

Edit: greatguys1 beat me to the punch with a great explanation to boot!

Edit 2: Pre-NOV2015a, their slower, weaker counterparts (the ice skeletons with the swords) had the same bug.
 
Last edited:

Kanta

Old Skool Apostle
Alpha Tester
Joined
Jan 24, 2013
Messages
638
Reaction score
89
Location
ms_swamp
Hmm, obnoxious. It's worth noting I also had full cold immunity. I've had other situations where being attacked by something with full immunity vs. it also interrupts rejuvenate.
 

Kanta

Old Skool Apostle
Alpha Tester
Joined
Jan 24, 2013
Messages
638
Reaction score
89
Location
ms_swamp
Sword blocking on some weapons seems a bit broken. For example, I tested it with the unholy blade and while holding right click it will say (when i take 60 damage while wearing no armor) Sword Paired! (60 hp) and Unholy blade absorbed 30 damage so I take 30 damage. I tested also with the shadowfire blade, sword parried (60 hp) and i take 30. No damage is taken if you do a regular parry ontop of sword parrying as normal. But with the sword parry shouldnt I be taking 0 damage then, or is the amount portrayed in parenthesis just wrong?
 

Kanta

Old Skool Apostle
Alpha Tester
Joined
Jan 24, 2013
Messages
638
Reaction score
89
Location
ms_swamp
Wraiths are vulnerable to acid damage.
 
Last edited:

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
If you listen, it happens whenever one of those ice things are shot. Looking in the script, it seems that to determine who to shoot it at, it attempts to deal 0 damage in a large area, then whoever it "hit" it will shoot the projectile at. The rejuvenation spell will cancel even on 0 damage.
Yeeeah, it's very old script - among the first I did I think, before we got the code to compile, thus it predates xdodamage, damage type control, and $get_tsphere. I was thinking we re-did it at some point, but either I'm confusing it with the Lightning Forged Skeleton, or the fix turned out to be buggy and had to be undone.

Ideally, it'd use $get_tsphere to pick up its targets and then toss projectiles at them. Be even better to move the projectile toss to a client side effect with a ce return, but things would get complicated when you try to decide which client to track it on, especially should the target not be a player. Projectiles aren't as nasty with overhead as monster scripts anyways.

There's probably a few other scripts using similarly outdated methodology - and more using the "target" damage type for scans. Those types of scans have the advantage that they are automatically blocked by walls and the like (not required in this case, since the projectile would just get blocked), but I think the rejuvenation script is smart enough to ignore "target" damage types.

Sword blocking on some weapons seems a bit broken. For example, I tested it with the unholy blade and while holding right click it will say (when i take 60 damage while wearing no armor) Sword Paired! (60 hp) and Unholy blade absorbed 30 damage so I take 30 damage. I tested also with the shadowfire blade, sword parried (60 hp) and i take 30. No damage is taken if you do a regular parry ontop of sword parrying as normal. But with the sword parry shouldnt I be taking 0 damage then, or is the amount portrayed in parenthesis just wrong?

2h Sword parry is screwy... It can passively deflect 100% damage, as do shields, and like shields, reduce damage when actively parrying. This defaults to a 50% reduction, the message is just returning the initial damage value instead of the final. Will fix.

Wraiths are vulnerable to acid damage.
Also will fix. Gettin to be too many damage types - might need something to make sure we don't miss them like that.

They also take reduced damage from Lightning, though this is intentional, and, of course, normal damage from Dark. I'm boosting the damage they take from Holy slightly while I'm in there, just to make sure that Holy remains the optimal choice.


PS. Jeeze, I have a mess of badges on my sleeve now... I guess RKS fixed the bit where folks weren't getting their titles proper. Accidentally removed Greatguys1 from the forums trying to do that for the new Warriors of the North guys myself. ><
 

Kanta

Old Skool Apostle
Alpha Tester
Joined
Jan 24, 2013
Messages
638
Reaction score
89
Location
ms_swamp
The greater minions that maldora summoned at lodagond-4 today seemed to have the visual and sound effect of holy DOT I gave them with my fshard indefinately. Like they took the normal length of damage but then the glow and sound effect kept playing for the remainder of their life.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
One time bugs are tricky to deal with. Game has so many memory errors and other oddities that weird stuff just happens from time to time, such as effects failing to remove.

If you can reliably reproduce the effect, then I can look into it, but I canna think of what would cause that normally.
 

Kanta

Old Skool Apostle
Alpha Tester
Joined
Jan 24, 2013
Messages
638
Reaction score
89
Location
ms_swamp
The abyssal worm is really buggy and obnoxious. Aside from the weird hit chance fluctuation he also loves to pop up and hit you before he's played his re-surfacing animations, his claw strikes can attack you from more than halfway across the platform, and would it hurt to have this guy boss flagged?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Been fiddling with him a lot lately, though we seem to have a few bugs to go... Good eye on the boss thing though - hard to believe in all this diving through his script I've always missed that.

At least he isn't teleporting across the map anymore... It's really tricky to make oddly shaped, oversized, multi-staged mobs like this behave.
 

Kanta

Old Skool Apostle
Alpha Tester
Joined
Jan 24, 2013
Messages
638
Reaction score
89
Location
ms_swamp
Flying cloud enemies dont take damage from the fshard holy wave or the following dot. They also dont take the extra damage from the holy lance throw.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Holy Wave might have trouble catching Shadow Forms, since they aren't on the ground. I'll check the lance's DOT - may need to port it to the applyeffect if it's using an old callback.
 
Top