Spidertron Weapon Loadout

by Kryzeth

Simple mod that allows user to customize Spidertron's weapon slots. Optionally adds a fifth and sixth weapon slot, and dynamically modifies spidertron recipe to require the new weapons.

Content
7 months ago
1.1 - 2.0
2.60K
Combat

i [Implemented as New Mod] Multiple Loadouts

5 months ago

Would it be possible to allow players to make multiple Spidertron setups, with different loadouts? ie. One that just has 6 railguns, another with 1 Tank Cannon, and a third with 2 machine guns, 2 rocket launchers?

Possibly a comma and semicolon separated string or something?
ie. "vehicle-machine-gun,vehicle-machine-gun,rocket-launcher,rocket-launcher;tank-cannon;railgun,railgun,railgun,railgun,railgun,railgun"
(Note that I don't know if 'vehicle-machine-gun' is actually the name of the tank machine gun; I'm guessing, since the wiki doesn't say. Same for the 'tank-cannon')

5 months ago
(updated 5 months ago)

Hmm, that is technically easily possible, but the amount of settings for the weapon customization might start to get a little out of hand with more than 2 Spidertrons... every additional 'tron would add another 6 settings to the list, as it is now.

Doing it by raw string is.. possible, but there's not exactly any way to limit the allowed values, so if a person misspells, or just inputs something random, it will undoubtedly cause an error (or just fail silently). It's not quite as user friendly.

5 months ago

Please. Torn between default loadout and flamer only, it doesn't have to be so :3

5 months ago
(updated 5 months ago)

Hmm, this sort of idea is about when I would split things off into a submod to accommodate the new features without messing with the simplicity of the base mod. That would certainly be one way to filter out only the most dedicated of users, who would be more likely to figure out how to make it work without reporting it as a bug lol.

I'll look into this when I can, I might not be able to get around to this until Sunday

EDIT: Likely implementation will be (up to) 9 separate string-value settings (one per additional spidertron), using simple codenames in place of the actual internal names (the other settings already go through a string conversion process anyways, shouldn't be too difficult), separated by comma or semicolon (I can make it work with both), and any fields left empty or invalid will just not be implemented.

Last thing might be an in-game message warning the user if they have an invalid string, so they can go back and fix it (while ignoring the empty fields), thus allowing the user to enter as many, or as few spidertrons as they prefer. Also, the number 9 was chosen as 10 is the number of icons per row in the crafting menu, so when adding in the modified spidertron from this mod, you end up with a full clean line of customized spidertrons (assuming no other mods affect the ordering)

5 months ago

Well thought out and excellent news.

5 months ago

What made you comment out the artillery gun?

5 months ago
(updated 5 months ago)

Peeking at my code, I see? Lol, the comment I left probably doesn't explain much, under prototypes/spidertron.lua:

The artillery weapon allows unit targetting, which breaks chain loading functionality

I can't remember what the exact issue was, but when the artillery was selected as part of the loadout, it wouldn't swap weapons properly. Either because the minimum range prevented it from swapping to the next weapon, or it wasn't able to swap while the artillery was on cooldown, something along those lines, that made it useless to mix in with the other weapon types (or another one of itself)

I can check on the specifics when I start working on the other thing, since I basically left all of the detection and replacement code intact lol

4 months ago

Released as new extension mod, which functions pretty much as explained, except I was able to take the error to the startup screen itself, so if a disallowed value or too many values are detected, then it will error on start and force you to reset the mod settings and try again. Could be annoying if you misspell one weapon, but I guess just don't mess up lol

As for the artillery thing, it targets units, and there's no way to turn that off, so if you let the spidertron auto-fire, then it will waste all of its ammo missing moving targets. I didn't test much more than that before giving up on spidertron artillery, but I could technically include the option in the new mod (since most people won't download that one, and won't try to use it on autofire)

4 months ago

Fantasmagorical :D

New response