Modding Help 2H Weapon Parry

Discussion in 'Starbound Modding' started by talonboy, Dec 22, 2014.

  1. talonboy

    talonboy Void-Bound Voyager

    Alright so I have no idea if they have any intention of changing parrying from the way it is in unstable, but as i can see it now its pretty terrible for launching counter-attacks. So there are two things I would like to change via mods, but I'm really unsure where to start looking or what to edit to do this sort of thing, or whether or not it would be as simple as editing a single file that affects all 2H weapons.

    1. When you parry with a 2h weapon, (as in an attack connects with your block) the block state should be canceled instantly, allowing you to follow up with a counter-attack.
    I think if it is going to keep you stuck in a blocking position and unable to cancel it, its not really a timed parry and its kind of a really terrible block, actually, since you can't cancel it and the second you come out of it, you're probably going to get smacked again.

    (am i the only one who recalls one of the devs saying that enemies will be stunned by a successful timed block?

    2. When you parry with a 2h weapon and an attack connects with it, you can block/parry again if you want, and it doesn't affect the block-meter at all.

    Where would I be able to make changes like this? Would it be easy/difficult? lemme know

    furthermore, if I could make it so that parries reflect projectiles that would be really cool too (thinking like star wars, not directly back but in any random direction) but im way more concerned with being able to keep my health up with a 2h sword without only relying on killing things before i die
     
  2. talonboy

    talonboy Void-Bound Voyager

    really to sum up my question, is there an easy way to modify all 2h weapons at once, like a file that they all relate to or something that i could change how right click works?
     
  3. The | Suit

    The | Suit Agent S. Forum Moderator

  4. talonboy

    talonboy Void-Bound Voyager

    I don't see anything about parry in the folder you mentioned, it looks like it just calculates the damage here or something.

    Yeah, after using a search through file contents the only time I find parry is in 2 projectiles and basically all of the 2h sword files. The projectiles are only referencing the sound
    I have absolutely no idea where to start looking to change how parrying works, or blocking in general. Any ideas?
    I was really hoping/thinking it would be something more simple, like changing the way this "type: parry" thing works in the sword files or something like that but if not it would seem that I'd have to create a separate weapon or something with a separate effect for right clicking to replace the current block. That is possible, right? I don't have much experience with modding in Starbound so I apologize but I still would like to try.
     
    Last edited: Feb 18, 2015
  5. talonboy

    talonboy Void-Bound Voyager

    bumping
     
  6. GROVER CURES HOUSES

    GROVER CURES HOUSES Void-Bound Voyager

    Ughh, I looked at this ages ago and never actually tested anything, just saw the API. From memory + shitty notes:

    A sword is technically speaking a gun, so it should have the fire(mode) callback. If mode == 'Alt', you're parrying. endFire() will stop the swing, then you can call fire('Primary') to hit with the standard attack. You can get creative, spawn a different projectile or use mcontroller to lunge at the target or what have you. I don't think you can do much without Lua, however.

    e: I have no idea how you're supposed to know which functions/fields are exposed without a disassembler.
     
  7. talonboy

    talonboy Void-Bound Voyager

    i dont really have as much time as i would like to have towards this, but from messing around with starter weapons the windup for the parry is how long the duration of the block is, the "cooldown" afterward is a period where you can't swing after and the "parryBlockCooldown" is that bar that appears above your head that prevents you from parrying again afterwards

    i still have no idea where to start or how i would go about making the block detected and the reaction appropriate. for example:
    1.is there a way to make attacks blocked by the sword detected, so that, if there is no attack blocked for the duration of the parry (.2, .3) seconds, only then will the cooldown will activate? (the "parryBlockCooldown") and if there is an attack, the block will instantly be canceled while negating the damage but not automatically following up with a counter-attack.
    not sure if i made that clear earlier, but i think leaving the option to continue blocking against multiple attacks or multiple enemies as long as your parries are not too anticipated and timed correctly would make it more skillful. so that, someone with good timing could use it against a rapid fire gun, which could make them more powerful, but also a counter to it would be to use a shotgun, or dual wield, by swinging both weapons at the same time which could be more difficult/impossible to block. perhaps by further imposing some sort of restrictions (initializing the cooldown if the user right clicks during the windup to prevent spamming)


    2.given that swords are considered guns and the swings/swooshes are projectiles, is there anyway to differentiate between the two, so that, parry/blocking a sword will not automatically deflect and damage an attacker, where as a projectile from a gun such as a bullet or laser would be deflected, (not necessarily directly back at the enemy, which could be possible but just that the trajectory changes and no damage is taken)


    again i dont have much experience with this so i apologize
     
    Last edited: May 4, 2015
  8. talonboy

    talonboy Void-Bound Voyager

    bumping
     

Share This Page