Help Creating Combat Mod

Discussion in 'Mods' started by tiko333, Mar 17, 2020.

  1. tiko333

    tiko333 Space Hobo

    I'm trying to make a mod that adds on to the combat in sdv. I know how to code but I've never made a mod, so I'm sort of learning as I go. I learned what I could from the wiki and have been poking around the code with dotpeek.

    To start I want to make a status bar for stamina that depletes as you swing the sword and doesn't let you swing when it's empty. It passively fills up quickly.

    So far I have a number appear on screen representing stamina that fills up every second on a GameLoop.OneSecondUpdateTicked event and drops every time the player presses a button and has a melee weapon in their hand.

    The problem is that this already makes the game stutter. How should I be updating the status bar? Also how can I tell the player is swinging the sword?

    Any advice or areas of the source code you could point me to that would help would be great. Thanks!

    Share This Page