Contemporary and Scifi Firearms

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
BuzzJ
Posts: 160
Joined: Sat Jan 12, 2013 4:06 pm

Contemporary and Scifi Firearms

Post by BuzzJ »

Hi,

I'm currently working on some stuff, but I'm not going to post that into this thread until I'm ready to release several implemented assets at once.

In the meantime I wanted to talk about how LOG2 handled firearms, and why I think for Contemporary, Scifi, and historical scenarios the way that vanilla implemented firearms is totally spot on and perfect. Specifically the revolver. The Revolver is a godsend and a huge helping hand from AH.

See, modern firearms (or any rapid fire missile weapon) cause problems with any DM-like games because of your ability to continuously strafe while firing.

AH solves this with delays, and using special attack to reload.

Now, for single shot weapons with an internal magazine (or clip, lol) that are loaded by feeding individual shells into the weapon, this is perfect and ready to go as is. Such as for break actions, lever actions, pump actions, revolvers and the like. This is perfect.

For single shot, single load weapons, like single barrel break actions the way flintlocks are implemented is perfect. Just a delay and have amunition in the offhand. Of course I would prefer to do the charging by special attack load too, but that is just me because it would make more sense to just have many flintlock weapons in inventory and swap them out of my hands in the head of combat.

In fact, an 1800s era campaign would be totaly doable right now in LOG2 with only cosmetic changes, without having to touch the skill mechanics or anything. Just add assets.

Now this would be fine if that was all you wanted to do, but for (1) detachable box magazines (or clips, lol) and (2) select fire automatics the existing design needs tweaking to get it just right.

The repeater musket comes close, but is not good enough on two fronts:

First, it loads from amunition in the offhand. If this is fine by you, then that works perfectly. If you are an OCD lunatic perfectionist like me, it needs tweaking.

Second, it doesn't take into account that ammunition is loaded into detachable box magazines that are then loaded into the weapon. And it is those magazines that need to be releaded with bullets, not the weapon.

So, what follows is my comprehensive framwork for how all modern weapons should be implemented:

1) Muskets - Fire with regular attack, reload single shot with secondary attack, when empty regular attack is a melee attack (buttstock or bayonette)

2) Single and Double barrelled shotguns and the like - same as 1, except when reloading is finished spent shells should be generated on the floor (or not, depending on whether you implement an ammunition reloading mechanic) (used in 4 and on below)

3) Revolvers, lever guns and pump actions - same as 2

4) Detachable box magazine semiauto only weapons (semiato pistols and rifles) - fire with regular attack, reload a magazine with a full magazine with special attack, when empty regular attack is a melee attack. The empty magazine drops on the floor when the special attack is complete. To reload the empty magazine hold it in one hand and bullents in the other and use the empty magazine's special attack to transform it into a full magazine.

5) Detachable box magazine select fire weapons - same as 4, except that when NOT empty, special attack fires multiple shots in a burst like the repeater.

6) Flamethrowers, energy weapons that charge from a backpack and the like - the same as how either the flintlock or repeater currently work.

For bonus points, every time a semiauto weapon fires, one spent shell is generated at the party's feet, and more than 1 when burst or auto fire is used.

Thank you for reading. Here is an image. UVmapping and texturing sucks and I hate it, doing that now.

edit: I will trade an arm and a leg for 3Dcoat, PM me
SpoilerShow
Image
Last edited by BuzzJ on Tue Mar 24, 2015 3:50 am, edited 1 time in total.
User avatar
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Re: Contemporary and Scifi Firearms

Post by David Ward »

Cool beans. Am looking forward to seeing more here!
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Contemporary and Scifi Firearms

Post by Azel »

Oh I would love to make a real Grimrock FPS based on this. Fun!
User avatar
odinsballs
Posts: 288
Joined: Thu Dec 20, 2012 4:25 pm
Location: south of heaven

Re: Contemporary and Scifi Firearms

Post by odinsballs »

well if u folks build and script the guns, a fitting wallset for such a theme is already well under construction 8-)
in a few weeks my wallset will be done and should fit a chaos engine style log2 mod very well ;)
User avatar
BuzzJ
Posts: 160
Joined: Sat Jan 12, 2013 4:06 pm

Re: Contemporary and Scifi Firearms

Post by BuzzJ »

I'm just finishing up UVmap right now, textures will be servicable placeholder because I hate making textures more than I hate UVmapping. But scripting shouldn't be too great of an obstacle, since AH already did most of that for us.

I decided to work on items instead of wallsets for now because the scale of each individual project is smaller. Cool that other people are doing scifi stuff. Should have an ingame screenshot maybe later tonight.
User avatar
odinsballs
Posts: 288
Joined: Thu Dec 20, 2012 4:25 pm
Location: south of heaven

Re: Contemporary and Scifi Firearms

Post by odinsballs »

BuzzJ wrote:I'm just finishing up UVmap right now, textures will be servicable placeholder because I hate making textures more than I hate UVmapping. But scripting shouldn't be too great of an obstacle, since AH already did most of that for us.

I decided to work on items instead of wallsets for now because the scale of each individual project is smaller. Cool that other people are doing scifi stuff. Should have an ingame screenshot maybe later tonight.
well here''s some o the goods im working on,would be nice to know what folks think of it, aiming for steampunk/chaos engine kind a thingy there 8-)
Image

Image

Image

Image
User avatar
Eleven Warrior
Posts: 744
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Contemporary and Scifi Firearms

Post by Eleven Warrior »

Hi. If I remember correctly Odin and Leki had a gun system working, not sure if the gun had a magazine loaded into the weapon though. I am interested in what you are doing and please continue the work it sounds very interesting man. I like the idea of reloading a weapon with a magazine or bullets etc.. rather than the bullets being in the of hand. :) Yes Odins set now and future set will suit your gun ideas.
User avatar
BuzzJ
Posts: 160
Joined: Sat Jan 12, 2013 4:06 pm

Re: Contemporary and Scifi Firearms

Post by BuzzJ »

Im currently running into an issue getting textures to apply to my models in dungeon editor. The meshes show up alright and everything else works, but not the textures and this is a bit perplexing. I am using the most recent version of GMT. Could you check my models and materials scripts to see if I have missed something? Is the procedure different somehow from LoG1?

If its for sure isn't scripts is there a checklist of things that can go wrong? Everything properly applied in GMT before saving as model, soooo, I find myself stumped enough to ask for assistance.

items
SpoilerShow

Code: Select all

defineObject{
	name = "scifi_superposed",
	baseObject = "base_item",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/items/scifi_superposed.fbx",
		},
		{
			class = "Item",
			uiName = "Superposed Shotgun",
			description = "An elagant style of double barrel shotgun.",
			gfxAtlas = "mod_assets/textures/gui/scifi_items_1.tga",
			gfxIndex = 1,
			gfxIndexPowerAttack = 2,
			impactSound = "impact_blunt",
			secondaryAction = "reload",
			weight = 1.5,
			traits = { "firearm" },
		},
		{
			class = "FirearmAttack",
			attackPower = 22,
			cooldown = 1.5,
			attackSound = "gun_shot_large",
			ammo = "shotshell",
			clipSize = 2,
			jamChance = 12,
			requirements = { "firearms", 1 },
		},
		{
			class = "ReloadFirearm",
			uiName = "Reload",
			name = "reload",
			requirements = { "firearms", 1 },
			gameEffect = "Reloads both chambers of the shotgun."
		},
	},
}
materials
SpoilerShow

Code: Select all

defineMaterial{
	name = "scifi_superposed",
	diffuseMap = "mod_assets/textures/items/scifi_superposed_dif.tga",
	specularMap = "mod_assets/textures/items/scifi_superposed_spec.tga",
	doubleSided = false,
	lighting = true,
	alphaTest = false,
	blendMode = "Opaque",
	textureAddressMode = "Wrap",
	glossiness = 60,
	depthBias = 0,
}
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Contemporary and Scifi Firearms

Post by minmay »

Does your mesh have a material named "scifi_superposed" assigned to all its faces? Is your material definition actually executed (i.e. did you remember to import the file in init.lua)?
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
BuzzJ
Posts: 160
Joined: Sat Jan 12, 2013 4:06 pm

Re: Contemporary and Scifi Firearms

Post by BuzzJ »

minmay wrote:(i.e. did you remember to import the file in init.lua)?
can you define this phrase? I thought init just needs to load the scripts? my init looks like this
SpoilerShow

Code: Select all

-- This file has been generated by Dungeon Editor 2.2.4

-- import standard assets
import "assets/scripts/standard_assets.lua"

-- import custom assets
import "mod_assets/scripts/items.lua"
import "mod_assets/scripts/monsters.lua"
import "mod_assets/scripts/objects.lua"
import "mod_assets/scripts/tiles.lua"
import "mod_assets/scripts/recipes.lua"
import "mod_assets/scripts/spells.lua"
import "mod_assets/scripts/materials.lua"
import "mod_assets/scripts/sounds.lua"
Post Reply