Modding Help kill techs? i wanna know what they are and how they work

Discussion in 'Starbound Modding' started by spookysalmon, Oct 2, 2018.

  1. spookysalmon

    spookysalmon Void-Bound Voyager

    im trying to learn how to do lua script but given i have adhd and very little motivation its difficult for me i just think i can get further from learning from kill techs people make and to see if i cant use a few
  2. The Avelon

    The Avelon Phantasmal Quasar

    To explain without actually citing examples of code:

    You want a targeted "death spell", right? For this you would spawn a projectile at the cursor location OR spawn a projectile in front of the player and have it travel to the target location, depending on how you want it to work.

    The projectile would give a status effect on hit to remove health the same way poison effects or burning effects do, but it would take larger chunks of health at a time or just 100% of health per tick.

    To make it balanced you're probably wanting to disable it during missions or only conditionally apply the effect to non-boss characters.

    For examples of code that does this kind of thing, check out my Vanilla Dash ++ mod's teleport script to see how to find player location/cursor location and optionally measure the distance between. It also has a variable cost depending upon that distance - you could rejigger that to be based on the tier of your target or its health for instance.

    For an example of spawning projectiles that are in a fixed location, check out Frackin' Universe's "Rocket Boots" tech. For projectiles that move, check out their "Sonic Attack" tech.

    For the death after X time (doom effect) check out Frackin's radiation status effect. It kills you after a while if you don't have protection. Another way to make bosses immune would be to use the protection method like this and patch the boss config files to add a parameter that this script will be looking for.

    If you need more specific help than this overview just let us know.
  3. spookysalmon

    spookysalmon Void-Bound Voyager

    i very much appreciate your help would it be too much trouble if i need it,i ask you for help im still very new to scripting
  4. The Avelon

    The Avelon Phantasmal Quasar

    Yeah, no problem. Here's what I'd do:

    - Get the mods named above to see working examples of the scripts
    - take an existing tech from the vanilla assets and rename the files to something like spooksal_killtech
    - open up in a text editor (I recommend Notepad++) and change the name to spooksal_killtech as well.

    - boot up the game and in admin mode try /enabletech spooksal_killtech
    /spawnitem techconsole

    Make sure your tech is showing up in-game, and then you have your base file that you are ready to modify.

    - crack open the blinkaddition LUA file from Vanilla Dash ++ and take note of the commands being used to determine position of the player and/or cursor. At this point you need to decide if it's going to be a BOLT type that flies at your enemy or if it's going to be a TARGET type that spawns the effect wherever your cursor is.

    If it's going to be a BOLT type then I suggest having a look at Sonic Attack from Frackin' Universe. If it's going to be a TARGET type I recommend checking out Zero Burst (I called it rocket boots in my previous post). The position of the projectile it's spawning in Zero Burst is relative to the player (mcontroller.position) and you want it instead to be relative to your cursor position.

    - build your code using the animations and art already present in the tech you selected. Make sure it spawns whichever projectile style you picked and that it travels/persists for the appropriate amount of time via playtesting.

    - Next have a look at Zero Burst if you haven't already to see how to apply a burning effect to things hit by your projectile. Test this in-game to make sure burning is being applied to enemies appropriately.

    - last step. Create your new death status effect by reversing the healing status effect and giving it 1 tick. Have the duration be at least 0.2 but you may find 0.4 more reliable.

    Switch from burning to death status and give it a test.

    Optionally, you may want to add restrictions like I mentioned above. Preventing usage in missions for example can be found in the wizard Translocate script from RPG Growth.
  5. spookysalmon

    spookysalmon Void-Bound Voyager

    i tried making it a mod and it kept crashing my game is there anything else i can do to get it to work or rather how should i implement it

    (edit) ; nvm i figured it out
    Last edited: Oct 2, 2018
    The Avelon likes this.
  6. The Avelon

    The Avelon Phantasmal Quasar

    Excellent. If you run into other crashes further on down the line, check out your Starbound/storage/starbound.log file and it should tell you what the cause of the crash is.

    If you can't tell what it is, just post the error it gives you in a [ code ] code tag [ /code ] and someone will be along in usually pretty short order who can tell you what's going on.

    And let us know if you need a hand with some of the lua syntax. It isn't the most intuitive and easy to read language ever.
  7. spookysalmon

    spookysalmon Void-Bound Voyager

    hey man installed the vanilla dash ++ mod and then uninstalled it and i tried to replace my player file with a back up file and now my game wont start
  8. The Avelon

    The Avelon Phantasmal Quasar

    Can you post a copy of your starbound.log file from the storage folder? I recommend zipping it first instead of posting the text directly into the forum.

    If you made the backup right before installing VD++ and then uninstalled VD++ then restored from backup, make sure that you deleted all characters that you created in between making the backup and restoring. The game doesn't like when I merge any folders in storage from backup.

    EDIT: To be clear, I mean delete the player folder before restoring your old one from backup. You may also want to delete the worlds you created during testing depending on what else you were doing but VD++ doesn't affect worlds at all so if it was just that one mod this isn't necessary.
  9. spookysalmon

    spookysalmon Void-Bound Voyager

    yea ima see if i cant turn the sonic sphere into my killtech but im not 100% positive its gonna work so if you have any suggestions let me know :D.

    can you help me figure out how to not be affected by gravity weapons i dont wanna move around when someone uses a grav wep

    also do rewrite the lua,tech or both because i dont know where to start (i was focused on school just now got around to this)

    also i thought i fixed it but the tech isnt showing up in game

    sorry if this is a burden
    Last edited: Oct 4, 2018
  10. The Avelon

    The Avelon Phantasmal Quasar

    Techs won't show up on their own in your list, you need to either /maketechavailable techname OR /enabletech techname

    bk3k's Tech Helper mod provides an easy way to add your tech to the game but then that creates a dependency on his mod. If you don't want to do that you can use a similar method to his or you can make a custom quest for example. But until you get it working I wouldn't worry about that - just use /enabletech for now.

    I don't think you can make yourself immune to gravity weapons short of modifying the code for the effect to exclude players. Then everyone would need to be using your mod for it to work, including the server.

    Remember to not use any assets from the Sonic Sphere tech other than the code itself, to figure out how to make your projectile. FU has a no altering/redistributing policy so no art assets.

    And no worries, I like helping people mod.
  11. spookysalmon

    spookysalmon Void-Bound Voyager

    i have both the tech and lua files in the folder i renamed them both and(also i meant aqua sphere) do i got in the .tech file and change the name parameter to spooksal_killtech?
  12. The Avelon

    The Avelon Phantasmal Quasar

    Yep, that's what the game knows it as. It uses the name parameter as the ID that you will add with /enabletech; the filename is used to relate files together like patches.
  13. spookysalmon

    spookysalmon Void-Bound Voyager

    hey should i put it in as a mod how should i i tried and it didnt work the bk3k is dependent i think it disabled other peoples speech in ilovebacons any way to reverse it
  14. The Avelon

    The Avelon Phantasmal Quasar

    You should create a folder in Starbound/mods called something like "SSalmonsKilltech" - any name will do but try to pick something nobody else would. Including your handle in some way is a good practice for modding in general.

    Inside of your Starbound/mods/(nameofyourmod) folder create a folder called tech.

    Inside of tech create another folder. This folder is where all of your techs will go so name it something to do with your name. Spookysalmon will work.

    That folder is where your tech file should go.

    I recommend that you create a copy of your Starbound folder and put it elsewhere on your computer, removing all of your mods from it except for the one you are making. This ensures you won't mess up your existing characters/worlds and any errors or crashes you get will be guaranteed to be your mod alone, which makes it easier to figure out what's wrong.

    For now focus on getting your tech to actually show up in game - I'll help you get it set up to unlock without admin commands later on.

    Keep in mind, if you don't change any other parameters in the .tech file that you made, it will be showing up in-game as Aqua Sphere. Maybe go ahead and change the the description while you are at it so you can tell them apart easily.
  15. spookysalmon

    spookysalmon Void-Bound Voyager

    ok i got it to show up in-game but i get this every time i use ang my game crashes and my main player file gets taken off the character selection screen

    also making it from a vanilla tech will make it multiplayer compatible i play on ilb alot

    im guessing it means i need to put the animation file in there 20181005142455_1.jpg
    Last edited: Oct 5, 2018
  16. The Avelon

    The Avelon Phantasmal Quasar

    You do need the animation files and art files from your source yes. Once you get it working the way you want I suggest replacing the art.

    This won't work in multiplayer unless asset mismatch is enabled which it won't be on a vanilla server. Even so it won't work on other players unless they have the mod installed or on any NPCs if the server doesn't have it installed. You can still make it for SP though or petition a server to add it to their mod pack once finished.

Share This Page