Modding Help Adaptable Ammo Ability

Discussion in 'Starbound Modding' started by dimitrius231, Jan 22, 2017.

  1. dimitrius231

    dimitrius231 Void-Bound Voyager

    Okay, this time the problems are in weapon modification.
    I'm trying to develop a new "adaptable crossbow" design and change it's adaptable ammo ability to suit the design.
    The problems persist in the field of this part of the .weaponability code. The code comes from the original adaptableammo.weaponability file.

    Code:
    Code:
    "ability" : {
        "type" : "adaptableammo", <==== Problem 2 I changed this, but apparently it becomes nonexistant and the crossbow sprites load up as a single .png file, not frames of it.
        "name" : "Adaptable Ammo",
        "scripts" : ["/items/active/weapons/other/adaptablecrossbow/adaptableammo.lua"],   <-----Problem 1: Why does this reffer to the lua in the same folder THROUGH a path?
        "class" : "AdaptableAmmo", <- Problem 3: Where does this come in?
     
  2. IHart

    IHart Scruffy Nerf-Herder

    Problem 1: In some instances just the filename can be used instead of the full path, in some it cannot. I am unsure on the distinction there.
     
  3. dimitrius231

    dimitrius231 Void-Bound Voyager

    I know right? This is definitely confusing.
     
  4. IHart

    IHart Scruffy Nerf-Herder

    I could fix problem 2 for you but i would have to see how you have everything set up.
     
  5. bk3k

    bk3k Oxygen Tank

    Actually in most cases you can just neglect the path in which case it will use the current folder(where the file is present). You only NEED absolute paths where the file is in another folder(which makes sense if you're using it for multiple objects etc). I don't think relative pathing is valid though.

    The only times (off the top of my head) where I know full absolute pathing is required is on the LUA side such as root.assetJson and require
    require
    doesn't necessarily need a full path in every LUA project (because you can set up the pathing elsewhere) but it does in Starbound.

    Possibly though I'm forgetting something where the path would be required, but nothing else is coming to mind.
     
    dimitrius231 and IHart like this.
  6. dimitrius231

    dimitrius231 Void-Bound Voyager

    @IHart , What i'm doing is simply making a copy of the adaptable ammo ability and changing out it's ammunition projectiles, because I obviously Can't make mods to the actual game assets. However, problem 2 Gives me a really annoying response in return-

    Even if I KNOW I double-checked the ability database after I added the copy to a .patch file, somehow the game registers something about it being missing- which results in the game giving me "Perfectly Generic" items. I checked the reasons, and it points towards the abilityType parameter, I'll send the set-up via conversation later.

    @bk3k I realize that and I've been pondering if that weapon ability is used elsewhere, but It's right there in the folder... Nothing else, other than the ability database file refers to it. (weaponabilities.config) And even THEN the config file still has a reason for using it's full path, whereas the crossbow does not. However, that matter has been taken care of, I'm sure, because I dug into it and nothing really stops me from just slapping the filename in there without a path. The real trouble now is "Why the hell is the ability type (quote) Missing (unquote)?"

    @both: It's apparent that something is missing in context to the activeitem file, otherwise the game would just crash without warning, but instead it gives me a perfectly generic item in return. With that written, I should check if I'm actually doing things correctly with the patch file again.
     
  7. null-a2

    null-a2 Guest

    Hmm, well awhile ago I made a weapon with a adaptable ammo ability using graphic assets from different mods, but later scrapped it because I couldn't find the proper balance (basically OP). But I can provide the mod for you to build off of. It's a fully functional, original, stand-alone mod featuring an assault rifle with fire, electric, ice, poison, and explosive ammo types (You'll have to make a recipe for it though). Hope you can work with it - good luck!

    Be sure though to give credit to Minomato if you plan on using the assets and making this mod public. As far as the coding goes, thats my handiwork
     

    Attached Files:

    Last edited by a moderator: Jan 24, 2017
  8. Sonsalt

    Sonsalt Scruffy Nerf-Herder

  9. null-a2

    null-a2 Guest

    Hmm, actually it's just based off of the adaptable crossbow, but with a little additions I don't see why it couldn't be implemented with my mod.

    EDIT: I just took a look a the mod you mentioned, and with the adaptable rifle having interchangeable ammunition, I believe it would have to be revamped completely. Maybe have one rifle with multiple ammo types? I suppose I could try working with his ammo mod later this week and see if I can't come up with anything.
     
    Last edited by a moderator: Jan 25, 2017
  10. Sonsalt

    Sonsalt Scruffy Nerf-Herder

    The idea would indeed be that several weapons share the same ammo. The challenging part will be how to get the ammo, what is required to craft it and how to pack it into magazines, maybe have it crafted as magazines right away.

    With this in mind your weapons would have to then be stronger to compensate for the limitations in ammo etc... However that could be a cool thing :D
     

Share This Page