Product Chat / [SOLVED] Weapon Editing, gunspec.txt, and Newbie Questions About Various Properties

Author
Message
Caracc
6
Years of Service
User Offline
Joined: 16th Apr 2018
Location: Nova Scotia
Posted: 17th Apr 2018 00:10
So I'm somewhat new to GameGuru. I picked it up (and a few mega bundles) in a Steam sale a few years back but just started fiddling about this month. Big props to Lee and the team because this program is pretty fantastic. I've been watching a bunch of Lee's broadcast uploads on YouTube and got a little bit inspired by the weapon creation one. I've plotted out a few weapons on paper but now I'm trying to bring them to life. If anyone would be kind enough I'd love to find out the answers to some questions I have.

1. Is there a gunspec.txt and/or <weaponname>.fpe parameter for making a weapon full-auto?
2. Has anyone had any luck with the DDS plugin for GIMP?
3. Is there a command for a quickfire of alt-fire?

Elaboration:
So the first question. I have a plan for a full-auto shotgun. Now I could just clone the modern/Uzi and set iterate to 12 (or whatever) but then I'm stuck with the Uzi model. I've been fiddling with a storebought combat shotgun that is semi-auto (no pump) and have learned a lot of flags/parameters from some RTF files floating online. Unfortunately I cannot find where/how a weapon is defined as full-auto. Is there a tag as simple as "isfullauto" that I've overlooked or is this something hardcoded into the program?

Second question is more about textures. In Lee's broadcast he talked about using Visual Studio community edition to convert DDS to PNG. That's a good idea of course but community edition comes with a lot of usage caveats. If I want to someday make money off of my completed projects I probably can't use it. Even if I can though it'd be really convenient to just edit DDS files directly in GIMP. I saw GIMP has a DDS plugin but reviews are noting it doesn't work with 64-bit versions. Does anyone have any experience with this plugin?

Finally, is there a simple command to quick-fire alternate weapon modes? I'm aiming for something arcade-y with alt-fire mapped to Right Click. I know there are commands to change fire type and then you can use primary fire, but can I just fire the alt-mode in one button press? If it's not built in I imagine it's a ton of work and probably not worth it though.

Anyway, thanks to Lee and everyone around. Hope to post here more often.

The author of this post has marked a post as an answer.

Go to answer
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 17th Apr 2018 05:42
Here is a guide to the GIMP question and the links to the .dds plugin that works with GIMP.
https://steamcommunity.com/sharedfiles/filedetails/?id=408830830

The Uzi gunspec is the most complete listing of effects. It is located in the Gamecore/guns/modern/uzi folder call gunspec.txt

I will see if I can get our weapons expert to chime in on this.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Errant AI
Forum Support
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location: [REDACTED]
Posted: 17th Apr 2018 05:57 Edited at: 17th Apr 2018 06:19
This post has been marked by the post author as the answer.
Quote: "1. Is there a gunspec.txt and/or <weaponname>.fpe parameter for making a weapon full-auto?"

In the animation list, just be sure to include : automatic fire = x,y

I don't have the shotgun that you bought so, I'll use the stock one as a reference..

In gunspec, it has:
start fire = 181,182
end fire = 183,204

We will then ADD a line that is:
automatic fire = 181,204

That will enable full-auto firing. If there were animations included in the model for an auto-loop we would use those instead. Content-wise, the automatic fire should begin with endfire motion and finish with startfire motion because in-game it is book-ended by start and end fire animations. So playback is: start fire > automatic fire (loops while trigger is held) > end fire

In that example, the transition might not look so good/smooth. So, instead the simplified "fire" instructions can be used. In such scenario, we delete the "start fire" and "end fire" to substitute with only "fire" (in addition to "automatic fire" ) like this:

fire = 181,204
automatic fire = 181,204

You can also experiment with trimming a frames at the beginning and/or end of auto fire to adjust the visuals.

That will loop better but it will be marginally less well synced ( engine-side hitscan and gunshot effects initialize either at the beginning of "fire" or the end of "start fire" ). It should be fine for your usage and is a good alternative method if autofire animations are not included with the model.

Next, you will want to adjust the Rate of Fire.
Find/edit or add the line "firerate = x" X is a delay between shots with 0 being the fast end. For a shotgun, a good setting would probably be somewhere between "firerate = 4.5" and "firerate = 6.5" . That should get you in the ballpark and you can tune from there.

Lastly, you will want to fix the gunshot audio timing.
Find/edit the "fireloop = x" line. If you are using an old version of GG (NOT RECOMMENDED), set it to something like 3-4000 and tune it until it matches. However if you are using the latest DX11 public preview, set it to "fireloop = -1" and it will sync automatically.

Quote: "2. Has anyone had any luck with the DDS plugin for GIMP? "

Someone reading might. Just not me. I use Photshop and the Nvidia filters for normal maps and the Dx plugin for .dds. In a generic sense, I can say that you wouldn't want to be editing .dds directly, regardless. It's a lossy format and will degrade over time. .DDS should only be regarded as an export format. Use whatever layered native format for working files and only save copies as .DDS for game use. (edit: x-posted with Myke. His link should be helpful)

Quote: "3. Is there a command for a quickfire of alt-fire?"

Nope. It's toggle only.

Good luck!

P.S.

When making gunspec changes, always remember that the map must be reloaded for changes to kick in. Personally, I just restart GG each time.
Gigabyte P67A-UD4-B3, Intel Core i7 2600K (passmark 8555), 16GB Corsair DDR3, EVGA GTX 970 SC (passmark 8637), Win10 Pro 64-bit, Primary monitor @ 1920x1080, secondary monitor @ 1280x1024
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 17th Apr 2018 06:20
I've not had any issues at all with the design plug in for gimp, you download the version you want, unzip the exe into your gimp plug ins folder and it works. It's quote old now, so what you're reading about it not working might just be old reports.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Caracc
6
Years of Service
User Offline
Joined: 16th Apr 2018
Location: Nova Scotia
Posted: 17th Apr 2018 17:36
Quote: "In the animation list, just be sure to include : automatic fire = x,y"

Quote: "In that example, the transition might not look so good/smooth. So, instead the simplified "fire" instructions can be used. In such scenario, we delete the "start fire" and "end fire" to substitute with only "fire" (in addition to "automatic fire" ) like this:

fire = 181,204
automatic fire = 181,204"

I'll make sure to follow that. 3D animation is pretty low on my skill totem-pole so I'll be very careful with the keyframe choices and create a backup gunspec.txt. Just a quick follow-up question so I understand this right: Are some properties of weapons (in this case autofire) tied to the animation commands parameters? I suppose it makes sense to keep animations and weapon properties in sync though.

Quote: "Lastly, you will want to fix the gunshot audio timing.
Find/edit the "fireloop = x" line. If you are using an old version of GG (NOT RECOMMENDED), set it to something like 3-4000 and tune it until it matches. However if you are using the latest DX11 public preview, set it to "fireloop = -1" and it will sync automatically."


Now last time I opened a gunspec.txt file it was the 15th. With that new update out today I assume I'll be up to date (via Steam distribution) if not though I'll go get the improved version. Thank you for the heads up on the audio syncing.

Quote: "P.S.

When making gunspec changes, always remember that the map must be reloaded for changes to kick in. Personally, I just restart GG each time."


Way ahead of you there. Never edit a program's files while said program is open. That's coding 101
Errant AI
Forum Support
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location: [REDACTED]
Posted: 17th Apr 2018 21:10 Edited at: 17th Apr 2018 21:15
Quote: " Just a quick follow-up question so I understand this right: Are some properties of weapons (in this case autofire) tied to the animation commands parameters? I suppose it makes sense to keep animations and weapon properties in sync though."

Relatively few properties are tied to animation range entries like that. In general, there is a default setting for everything and it's only required to have the line in gunspec if doing something contrary to the default. A gunspec has a minimum length of maybe 40-60 lines but more complex and polished weapons can use up the 500 line read-limit. The read-limit has expanded a few times over the years to accommodate additional settings and features but there are several cases where assumptions are made based on info provided in order to keep the lines to a minimum. Such is the case with full-auto mode.

This may or may not be helpful for your learning efforts... It's one of my gunspecs with additional comments beyond what can be found with the stock weapons:

Formatting is a bit jankey from copypasta but w/e. In some cases, the comments are related to the content of the animation but usually they are in regard to the setting itself. edit: You may notice that many of the settings are to increase realism/simulation. So, by reversing these settings you can get a more arcade-y feel with your edits.

The latest update should be good to go. There have been several bug fixes related to weapons but there are still some outstanding issues with certain things not working quite right. Overall, GG has a fairly robust weapon animation and tuning system built in. Over time, this should only improve as more functionality is added to support a wider variety of weapon types and gameplay mechanics.
Gigabyte P67A-UD4-B3, Intel Core i7 2600K (passmark 8555), 16GB Corsair DDR3, EVGA GTX 970 SC (passmark 8637), Win10 Pro 64-bit, Primary monitor @ 1920x1080, secondary monitor @ 1280x1024

Login to post a reply

Server time is: 2024-11-24 06:53:57
Your offset time is: 2024-11-24 06:53:57