Modding Discussion Community Weapon(s)

Discussion in 'Starbound Modding' started by MetaFace, Feb 9, 2017.

  1. MetaFace

    MetaFace Guest

    Thought since many of you modders (who are far better than me) know what you are doing that I'd ask, do you want to build a weapon of mass destruction?

    If you do, I already have one idea for a sword, which I'd build myself, but being realistic it'd take me forever to learn how to make this thing work. A sword that is a bit OP (thinking of self-rebalancing the game anyways), for a secondary I was thinking of a point and click pillar of light kind of thing (or orbital laser), that can destroy terrain. If anyone know a way to create a script that allows additional alt-abilities that'd help.

    Again I'm dumb, no one owes me anything, and live long and don't forget to breathe.
    Thanks to anyone who does want to help, you're a saint.
     
    Megumin likes this.
  2. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    There's already this, which you can look at for an idea how to accomplish this. ^
    Do you mean like a script that automates the process of creating new alt-abilities...?

    Or are you asking how to add alt-abilities...?
     
  3. MetaFace

    MetaFace Guest

    Sorry didn't even check to make sure everything was clear, make a script that allows more than two abilities on a single weapon. (I know ZZ Mechs has something like this, but for a mech)

    I also don't just want to steal/borrow other people's mods, but want to see how people will work together, whatever is produced here (even if its kinda wonky) will be put in a mod of its own. Also again, don't want to base this off of someone else's code. However I will take a look if this gets nowhere, which is expected (not that people can't, but that people won't).

    Yeah, I've seen the Ion Cannon, but I feel like adapting a placed item to a weapon isn't something that I'd do, not to mention something I can do right now, I don't have the lua experience.
     
    Megumin likes this.
  4. Cyel

    Cyel Scruffy Nerf-Herder

  5. MetaFace

    MetaFace Guest

    Once again @Cyel you solved one part of a problem. Just have to make it viable with a melee weapon. I'm going to have to learn a little more...
     
    Megumin likes this.
  6. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    If you want to check it out, I have a sword I made that has multiple abilities depending on the condition of use.

    It's in my mod files, (although un-implemented) but I'll post a .zip of the weapon in a sec.



    Edit:
    Here's the .zip: https://www.dropbox.com/s/lo04opqgdzbohob/ExampleSword.zip?dl=0

    The script is directly attached to the sword's alt-ability, but that isn't too hard of a thing to patch into weaponabilities.config...
    Ignore the other class functions in the script, those are placeholders for other weapons that I plan to run off the same script.



    (I think @AlbertoRota helped me with some scripting for multi-ability weapons a while ago, I'll have to attach his files if I find them...)
     
    Last edited: Feb 9, 2017
    Cyel and MetaFace like this.
  7. MetaFace

    MetaFace Guest

    Alright then, this seems to be going somewhere after all.

    Edit:
    Dropbox won't let me download, can you attach directly through thread using the upload function?
     
    Last edited by a moderator: Feb 9, 2017
    Megumin and Inf_Wolf14 like this.
  8. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    Oh yeah, sorry, missed that edit. (No notification for post edits. :p) I'll attach it in a second.
     
  9. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    Here's the file in the form of a shameless double-post for the sake of a notification. :)
     

    Attached Files:

  10. MetaFace

    MetaFace Guest

    I'll take a look over this and see what I can do with it.
     
    Megumin likes this.
  11. MetaFace

    MetaFace Guest

    Ok, so I've looked over the Architect Sword (which is looks great, but had to replace particles in order to use it), the adaptable rifle, and the ion cannon. This meaning I need to read up on exactly what everything means and merge these all together, and until I get that, nothing is gonna be going anywhere. Time to hit the books.
     
    Inf_Wolf14 and Megumin like this.
  12. MetaFace

    MetaFace Guest

    As an update... I've gotten nowhere, but now that my weekend is over (which means I have to go to work) I can do me stuff, such as studying lua to the point which I get bored and stop for a few days. If anyone has anything that'll accelerate this a little, that'd be great, other than that, I'll be back once/if I make some progress in the mashing of scripts.
     
  13. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    I'll take a crack at it myself since I'm trying to optimize my own weapon scripts at the moment.
    (Also because I got a roadblock in my own progress. :3)
     
  14. MetaFace

    MetaFace Guest

    Great thanks, second set of eyes will help, since I end up staring at the scripts till I either understand them or get tired (which in all cases these both happen, like with my armor that prevents energy regeneration).
     
  15. Cyel

    Cyel Scruffy Nerf-Herder

    I'd say the "easiest" way to learn would be to look at things that pick on your interest, look at how others did similar things and try to understand them. That'll teach you the basic of how things work, and you'll be able to go onto more elaborate stuff by yourself with that knowledge. Going head first into complicated stuff won't really work (althought I'd say most Lua stuff's not that complicated, but I say that as someone who already understands it?), nor jumping into academic-like tutorials as those seem to bore you out
     
  16. MetaFace

    MetaFace Guest

    Not complicated, but with so many dependencies it can be a little hard to trace back where a function/class comes from. I understand for the most part, I just need to study these scripts to find how the work down to the exact detail to prevent screw ups, so I don't end up here asking for more help when I could've prevented it.
     
    Cyel likes this.
  17. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    Ha, I'm literally in the same position.

    I need to reference a variable from an ability script in the weapon script, but because I'm using custom weapon scripts everything's getting crazy, and it's getting hard to track the scope. :rofl:
     
    MetaFace likes this.
  18. MetaFace

    MetaFace Guest

    Well, best of luck. I'm thinking of something, so if I want more than one secondary alt (As in primary, alt, second alt), more like any number defined. So if the melee.lua is looking for 'altAbility' which references another lua script, what if that referenced script was really just had a bunch of other abilities inside (the more cluttered version where all the abilities are inside the same script) or it references other scripts (where it just says hey this value is three so this is the ability, and hey you pressed shift+right click, so now you are using the fourth alt.) Think it'll work? any version, cause I think I can make that happen only if the game'll allow it.

    EDIT:
    Nope wait, that's not how it works, I'd have to reference said lua in the json (which is the altability) and do pretty much that same as before, except stupid.
     
    Last edited by a moderator: Feb 13, 2017
  19. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    Hold on, I have something that may interest you... (I'll attach in edit when I get it)



    Edit:
    Aaaad... found it.

    Scripts all thanks to @AlbertoRota. Check the example for the syntax to set up the abilities. This one has options for forward, backward, crouched, and basic alt abilities.
    (I have modified scripts to detect aerial movement plus some other conditions, but its ultimately based on the same thing.)
     

    Attached Files:

    IHart likes this.
  20. IHart

    IHart Scruffy Nerf-Herder

    this is incredible
     

Share This Page