[Weapon]Ballgun Design as Gumball Dispenser

3 replies [Last post]
Ethanol6
User offline. Last seen 3 years 2 weeks ago. Offline
Joined: 2021-11-28
Posts: 9

I thought it would be amusing if the Ballgun was one of those big upright gumball dispensers with explosive gumballs. (I had no idea that this bug https://issues.hedgewars.org/show_bug.cgi?id=746 existed when I made this.)

I'm still trying to figure out how to get the image into 128x128 pixels for the game. How does the sinegun keep all that detail without becoming a blurry blob? I tried it out in game with an image 400x400 and it looked great, it's about as big as the sinegun too.

You can drop this file https://github.com/Ethanol6/HedgewarsImages/raw/main/Assets/Weapons/amBallgun.png into the Data/Graphics/Hedgehog folder if you want to try it out.

Shadow_The_Worm
Shadow_The_Worm's picture
User offline. Last seen 4 days 21 hours ago. Offline
Joined: 2018-02-10
Posts: 50

Protip for the future: You can load your addons/modifications into the game by using a HWP archive in the Hedgewars Save folder (for Windows, this is My Documents/Hedgewars/Data). A HWP can be created by creating a ZIP archive with the same directory structure that you want your modification to affect. For weapon reskins, this is done by putting the Data/Graphics/Hedgehog/am(weaponname).png structure into the archive and changing the archive's extension from Name.zip to Name.hwp). Everything else is handled the same way, only the directory structure is different for each modification type. Once you load the game with this .hwp in its Hedgewars Save Data directory, you'll notice that it'll achieve the same effect without actually replacing the original image (so you can easilly revert back to the default weapon design by uninstalling the said .hwp from your My Documents/Hedgewars/Data.

Ethanol6
User offline. Last seen 3 years 2 weeks ago. Offline
Joined: 2021-11-28
Posts: 9

Shadow_The_Worm allegedly wrote:

Protip for the future: You can load your addons/modifications into the game by using a HWP archive in the Hedgewars Save folder (for Windows, this is My Documents/Hedgewars/Data). A HWP can be created by creating a ZIP archive with the same directory structure that you want your modification to affect. For weapon reskins, this is done by putting the Data/Graphics/Hedgehog/am(weaponname).png structure into the archive and changing the archive's extension from Name.zip to Name.hwp). Everything else is handled the same way, only the directory structure is different for each modification type. Once you load the game with this .hwp in its Hedgewars Save Data directory, you'll notice that it'll achieve the same effect without actually replacing the original image (so you can easilly revert back to the default weapon design by uninstalling the said .hwp from your My Documents/Hedgewars/Data.

That's awesome, thank you!

vint
vint's picture
User offline. Last seen 3 weeks 5 days ago. Offline
Joined: 2018-07-28
Posts: 31

Shadow_The_Worm allegedly wrote:

Protip for the future: You can load your addons/modifications into the game by using a HWP archive in the Hedgewars Save folder (for Windows, this is My Documents/Hedgewars/Data). A HWP can be created by creating a ZIP archive with the same directory structure that you want your modification to affect. For weapon reskins, this is done by putting the Data/Graphics/Hedgehog/am(weaponname).png structure into the archive and changing the archive's extension from Name.zip to Name.hwp).

If you do a lot of modifications and want to avoid routinely rezipping your stuff, I suggest some utility build tool that will handle doing *.hwp (ZIP) archive at Data directory on each change. Example of such structure can be seen in the source code of my Typewritter library. I used Gulp+Node.js for building, as it's what I knew the best to integrate, but you can produce something basically from basket of Lua/LuaRocks or other runtime.





Hello, I am author of Typewriter Hedgewars Lua library.
Will be happy to contribute in some HW campaign or mission!

Wink Smiley

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]