katanamaru Posted May 6, 2013 Posted May 6, 2013 How difficult would it be to implement new features in a way similar to the .sab files?Things like '.gun' for guns, '.sty' for saber styles, and '.for' for force abilities? The reason I'm asking is that people are going to start making things like those 3 I listed and then go about bugging coders to implement them into JA. If these type of file extensions could be made that would cut down on the request that people (like me) that are going to need help from coders. .sty filesAn option to set the new style to behave like a JA default. This would include all the damage values, transition animations, block values, etc.SaberStyleValues blue, yellow, red, desann, tavion, dual, staff A way to set the number of swings in a style. Pretty much the same as the .sab value. An option to determine how transitions were handled.SetTransition spin, or arcThis Could also be used to set individual transitions.SetTransition Both_t4_br_to_tr spinAway to set damage values for the transitions like in the red stance.TransitionDamage 0-999999999 Setting input commands for special moves and what animations to play as the special moves. Setting individual movement animations for the weapon.SetWalkForward Both_walkforward_katanamaruSetWalkBackSetRunForwardSetRunBackSetCrouchSetJump Rolls or flips for kung-fu-y styles Setting custom force animations.SetForceChoke Both_forcechokeVaderSetForceLightning Both_focerlightning_Apprentice .gun files Set things like rate of fire, projectile speed, splash damage.Is the weapon able to be dual-wielded?DualWieldAble 1 0Or is it a larger two-handed weapon that should be harder to pull?TwoHanded 1 0 Setting custom animations would be handy for things like pistols, rilfes, and bazookas!If a cover system is installed then a way to make cover included here too.SetFireSetIdleSetRunForwardSetCoverStandSetCoverCrouch .for files Setting alignment.ForceAlignment light, dark, neutralIncluding other 'alignments' could be useful for magic: earth, fire, wind, water, HEART! lightning, cold, etc Once again setting custom animations would be really good here.SetForceAnim Both_forcepush_fart Range, cone of effect, beam, continuous, blast, etc would be good. ChalklYne, Delta_135 and Master Ridley like this
ChalklYne Posted May 6, 2013 Posted May 6, 2013 i think i know what yer talking about theoretically...granted im still going thru the tutorials on how to even read code.. but...theoretically...it would need to be something like when the code defines saberstyle_1...and u replace it to something like saberstyle_x...then u define saberstyle_x to use whatever u name as xxxxx.sty is right? so it knows to change the saberstyle to whatever u name.sty? am i close here? but then every saberstyle u add wouldnt actually be nothing like a .sab file.. itll be a small chunk of code i think?
eezstreet Posted May 6, 2013 Posted May 6, 2013 JKG did .wpn files and .stance files, but they used different formatting and a faster parser. I can show you some samples: { "name": "@JKG_ITEMS_WEAPON_FLECHETTE", "type": "WP_FLECHETTE", "variation": 0, "classname": "weapon_flechette", "description": "@MENUS_THE_PRIMARY_WEAPON_OF", "visual": { "viewmodel": "models/weapons2/golan_arms/golan_arms.md3", "worldmodel": "models/weapons2/golan_arms/golan_arms_w.glm", "hudicon": "gfx/hud/w_icon_flechette", "hudnaicon": "gfx/hud/w_icon_flechette_na", "selectsound": "sound/weapons/flechette/select.wav", "indicators": { "ammo": [ "models/weapons2/flechette_pistol/numbers3", "models/weapons2/flechette_pistol/numbers2", "models/weapons2/flechette_pistol/numbers1" ], "firemode": "models/weapons2/flechette_pistol/firemode" }, "primary": { "type": "blaster", "muzzlefx": "slugthrowers/muzzleflash", "firesound": [ "sound/weapons/flechette/launch.wav", "sound/weapons/flechette/oldie_shot1.wav", "sound/weapons/flechette/shot2.wav", "sound/weapons/flechette/shot3.wav" ], "projectilemodel": "models/weapons2/golan_arms/projectileMain.md3", "projectilefx": "flechette/shot", "miss": { "impactfx": "flechette/wall_impact" }, "hit": { "impactfx": "flechette/flesh_impact" } }, "secondary": { "type": "blaster", "muzzlefx": "slugthrowers/muzzleflash", "firesound": [ "sound/weapons/flechette/launch.wav", "sound/weapons/flechette/oldie_shot1.wav", "sound/weapons/flechette/shot2.wav", "sound/weapons/flechette/shot3.wav" ], "projectilemodel": "models/weapons2/golan_arms/projectile.md3", "projectilefx": "flechette/alt_shot", "miss": { "impactfx": "flechette/wall_impact" }, "hit": { "impactfx": "flechette/flesh_impact" } } }, "stats": { "slot": 1, "reloadtime": 2000, "ammo": "AMMO_METAL_BOLTS", "reloadmodifier": 0.6, "speed": 0.95 }, "primaryattack": { "damage": 10, "ballistic": true, "projectiles": 10, "ammocost": 10, "firedelay": 400, "recoil": 5.0, "spread": 3.5, "projectileclass":"flech_proj", "meansofdeath": "MOD_FLECHETTE" }, "playeranims": { "idle": { "torso": "BOTH_IDLE1", "legs": "BOTH_IDLE1" }, "reload": { "torso": "TORSO_DROPWEAP1" }, "ready": { "torso": "TORSO_WEAPONREADY3", "legs": "BOTH_STAND1" }, "firing": { "torso": "BOTH_ATTACK3" } }, "weaponanims": { "ready": "READY", "reload": "RELOAD", "firing": "FIRING" } } I don't have a sample of a .stance file to show you but they were a lot longer as they went into depth with each move etc. Asgarath83, Master Ridley and katanamaru like this
ChalklYne Posted May 6, 2013 Posted May 6, 2013 ahhhh... im so glad i can kinda read this now... me likey...i might just totally stray off from modelling to finish comprehending this c++me likey lots thats like... serious customizing for everything. which is killer
eezstreet Posted May 6, 2013 Posted May 6, 2013 The coders didn't want to detail the specs of each gun and saber stance balance issue, so instead of doing that, we made the modellers/playtesters work on that. Better balancing, better communications, better everything all around. Protip: make as much as you can into human-readable files as you can without reducing load times to a crawl. Much less work for you. katanamaru and ChalklYne like this
ChalklYne Posted May 6, 2013 Posted May 6, 2013 did they have to add and define all the "damage": "ballistic": true,"projectiles":"ammocost": "firedelay":"recoil": etc... or is that how it is defined in the code all self explanitory like that?
eezstreet Posted May 6, 2013 Posted May 6, 2013 They're purely optional fields, with a default option. iirc, the fields that NEED to be defined are as follows:typevariationclassnamevisual -> primaryprimaryattackstatsThere's more than that even. You can define splash damage, which has some really nifty damage area stuff (such as radius damage dealt over an increasingly large area, or damage done in waves etc), support for our damage type system (Cold/Fire/Lightning/Force Damage, with additional Ignition/On Fire, Freeze, Stun, Carbonite, Chill, and Poison sub-types, among others I think), and there's also stuff for bouncing missiles. Asgarath83, ChalklYne, Master Ridley and 1 other like this
katanamaru Posted May 6, 2013 Author Posted May 6, 2013 Yeah I like the fields to be optional. That way if a person doesn't know exactly what to chance in the .sty file they can let it balance out with a default style. The easier it is to read and manipulate will allow for more people to use it. That's the real beauty of the .sab files to me. Most everything in there is easy to understand and written clearly. Some definitions need a little expanding, but that's in the acceptable realm. The code you posted for the gun is nice and I would gladly take it if that was the only way people wanted to make it. But if it could be "cleaned" up it would let lots of other people use it seamlessly. Think of all the gun models on jk3files that could be given their own space! If this idea is taken up I'll help with coming up with more fields for the styles. Those were some of the ones I could come up with off the top of my head.Ah heck, I'll just go back and add them to the original post.
eezstreet Posted May 6, 2013 Posted May 6, 2013 The problem with such a system is that it's particularly nasty to implement. In addition to the format handling itself (which admittedly is the easiest part), you have to actually implement the use of these fields. It's a bit tedious but the time spent towards these fields can outweigh the downsides.
katanamaru Posted May 7, 2013 Author Posted May 7, 2013 Yeah I figured it would be a major undertaking. I was wondering if coders would think it was worth that time and effort to get a system up and working in order to not have every weapon modeller, force effect, and animator breathing down their neck to get our stuff in game. Think of all the good mods that have come from being able to make .npc and .sab file manipulations. I think it is a very worthy undertaking, but it is ultimately up to the people who will have to do the coding work. Another pro! If this was done it would help with compatibility! I wouldn't have to worry if CoderA put one of my styles in game and CoderB put another in and as a result of two different methods they became uncompatible. I imagine this would also help with performance. If the game ran multiple new styles from the same structure that would be more efficient than running different code branches, right?
eezstreet Posted May 7, 2013 Posted May 7, 2013 It'd break base compatibility and require new files, so there's a slim chance of it working its way into OpenJK.If coders are having issues like that, they probably have way worse issues than just simple compatibility issues.
katanamaru Posted May 7, 2013 Author Posted May 7, 2013 That stinks.Is there away to make OpenJk only read these files if they were present? That way if none were there then the game would boot up like normal. But if new files were introduced then the game would load them. Kind of like how .pk3's are read in a certain order. Asgarath83 likes this
eezstreet Posted May 8, 2013 Posted May 8, 2013 You'd still break base client compatibility if the server is using modified .wpn files or whatever.
eezstreet Posted May 8, 2013 Posted May 8, 2013 I never said it was impossible, just that it wasn't going to make its way into OpenJK.
katanamaru Posted May 9, 2013 Author Posted May 9, 2013 You are correct. I was thinking along the lines that OpenJK will become the main force of coding for JA. So if things are not compatible with it, it will be unlikely that other mods will be able to compete. All that hard work you and the other coders are putting in is great! If someone came up with a way to do this that was seperate and uncompatible with OpenJK I think people would stick with OpenJK.
eezstreet Posted May 9, 2013 Posted May 9, 2013 Oh, absolutely possible. Just fork OpenJK, and pull from it on GitHub, and you can continue to keep your code up to date. I think most people are going to rely on mods of OpenJK, as OpenJK has some extra trap_ calls and things which modders can take advantage of (eg manipulating the segments of an .efx file)
Asgarath83 Posted June 1, 2015 Posted June 1, 2015 JKG did .wpn files and .stance files, but they used different formatting and a faster parser. I can show you some samples: { "name": "@JKG_ITEMS_WEAPON_FLECHETTE", "type": "WP_FLECHETTE", "variation": 0, "classname": "weapon_flechette", "description": "@MENUS_THE_PRIMARY_WEAPON_OF", "visual": { "viewmodel": "models/weapons2/golan_arms/golan_arms.md3", "worldmodel": "models/weapons2/golan_arms/golan_arms_w.glm", "hudicon": "gfx/hud/w_icon_flechette", "hudnaicon": "gfx/hud/w_icon_flechette_na", "selectsound": "sound/weapons/flechette/select.wav", "indicators": { "ammo": [ "models/weapons2/flechette_pistol/numbers3", "models/weapons2/flechette_pistol/numbers2", "models/weapons2/flechette_pistol/numbers1" ], "firemode": "models/weapons2/flechette_pistol/firemode" }, "primary": { "type": "blaster", "muzzlefx": "slugthrowers/muzzleflash", "firesound": [ "sound/weapons/flechette/launch.wav", "sound/weapons/flechette/oldie_shot1.wav", "sound/weapons/flechette/shot2.wav", "sound/weapons/flechette/shot3.wav" ], "projectilemodel": "models/weapons2/golan_arms/projectileMain.md3", "projectilefx": "flechette/shot", "miss": { "impactfx": "flechette/wall_impact" }, "hit": { "impactfx": "flechette/flesh_impact" } }, "secondary": { "type": "blaster", "muzzlefx": "slugthrowers/muzzleflash", "firesound": [ "sound/weapons/flechette/launch.wav", "sound/weapons/flechette/oldie_shot1.wav", "sound/weapons/flechette/shot2.wav", "sound/weapons/flechette/shot3.wav" ], "projectilemodel": "models/weapons2/golan_arms/projectile.md3", "projectilefx": "flechette/alt_shot", "miss": { "impactfx": "flechette/wall_impact" }, "hit": { "impactfx": "flechette/flesh_impact" } } }, "stats": { "slot": 1, "reloadtime": 2000, "ammo": "AMMO_METAL_BOLTS", "reloadmodifier": 0.6, "speed": 0.95 }, "primaryattack": { "damage": 10, "ballistic": true, "projectiles": 10, "ammocost": 10, "firedelay": 400, "recoil": 5.0, "spread": 3.5, "projectileclass":"flech_proj", "meansofdeath": "MOD_FLECHETTE" }, "playeranims": { "idle": { "torso": "BOTH_IDLE1", "legs": "BOTH_IDLE1" }, "reload": { "torso": "TORSO_DROPWEAP1" }, "ready": { "torso": "TORSO_WEAPONREADY3", "legs": "BOTH_STAND1" }, "firing": { "torso": "BOTH_ATTACK3" } }, "weaponanims": { "ready": "READY", "reload": "RELOAD", "firing": "FIRING" } } I don't have a sample of a .stance file to show you but they were a lot longer as they went into depth with each move etc. Adding new weapons or force power in that easy modality should be really cool. o.o but this require a code works extern respect to OpenJk for compatibility reasons. ._.
eezstreet Posted June 2, 2015 Posted June 2, 2015 It's no small task. This is a massive, massive rewrite we're talking about here.
Asgarath83 Posted June 2, 2015 Posted June 2, 2015 It's no small task. This is a massive, massive rewrite we're talking about here.Yes, i understood. : \
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now