#46
Quote:So now a sniper scope can cost 0 points for the bolt guns and 4 points for the battle rifles, without making 2 copies of each scope?
 

Cost modifiers are specifically for classes right now.
Reply
#47
It's an additional balancing tool, per class. So you can allow more items, but still make it difficult to have a kit that is good at both cqb and long range.

 

CQB classes would get cheaper lasers, etc... while Marksmen would have more expensive lasers.

Reply
#48
So, I'm working on a theater parser in PHP (very rough and not done), but I figured I'd ask if anyone knows of a tool or script that can ingest theaters and verify syntax and/or dump the settings. I'm using it to spit out the stats for all weapons/addons/ammo/gear at http://jballou.com/insurgency/stats.php but what I'd really like to do is load a theater file and verify that it'll work (no syntax errors, no missing entities, etc). Seems like it's pretty close to the SourceMod config format, maybe we can lift the parser from there?

Reply
#49
Quote:jballou, on 31 Jul 2014 - 8:54 PM, said:

So, I'm working on a theater parser in PHP (very rough and not done), but I figured I'd ask if anyone knows of a tool or script that can ingest theaters and verify syntax and/or dump the settings. I'm using it to spit out the stats for all weapons/addons/ammo/gear at http://jballou.com/insurgency/stats.php but what I'd really like to do is load a theater file and verify that it'll work (no syntax errors, no missing entities, etc). Seems like it's pretty close to the SourceMod config format, maybe we can lift the parser from there?
I had an idea to do this sort of thing, but using Javascript instead of PHP, and turning the thing into a full-blown editor.


The general file format is about as dirt simple as it gets. It should be easy to use regular expressions to validate the input and get it into a tree-like format similar to XML element trees I've used in Python. Once we get a generic parser, then we can write the validator on top. If I wasn't in the middle of several other projects, I'd be of more help to you, but this should get you started. If you're stuck, then I'll see if I can make some time to help you.
Reply
#50
Yeah, that link I posted is a semi-parser. It opens the files, loads them into arrays, then merges the items based upon #base and "include" directives. It works but it's not great, and it doesn't validate the theater file for syntax. That's the next thing I want to do, but I'd need to define the rules and how strict it needs to be... if only the devs could add a function to test theaters in game, or released a bit of code that parses the theaters.... Smile

Reply
#51
Quote:Yeah, that link I posted is a semi-parser. It opens the files, loads them into arrays, then merges the items based upon #base and "include" directives. It works but it's not great, and it doesn't validate the theater file for syntax. That's the next thing I want to do, but I'd need to define the rules and how strict it needs to be... if only the devs could add a function to test theaters in game, or released a bit of code that parses the theaters.... Smile
 

The format is the standard KeyValues format that all Source games use. Also mp_theater_override.
Reply
#52
Right, but I mean, I am looking for a document that explains things like what the attributes are, what valid ranges for them are, what the attributes do, etc. It'd help us make custom theaters, and that's the missing sauce in any sort of validator - I can say it's valid KV structure no problem, but I can also assign an ammo type to a vest and it validates structurally but isn't actually correct.

Reply
#53
jballou, I applaud your efforts to get stats out to the players. I can't help with the technical stuff, but I thought I'd point you in the direction of the player hitgroups in base_player.theater:

 

"HITGROUP_HEAD"     "3" // death

"HITGROUP_CHEST"    "3.00"

"HITGROUP_STOMACH"    "2.50"

"HITGROUP_LEFTARM"    "1.60"

"HITGROUP_RIGHTARM"    "1.65"

"HITGROUP_LEFTLEG"    "0.70"

"HITGROUP_RIGHTLEG"    "0.75"

 

I'm 99% certain that the hitgroups in the bullet damage multiply rather than override the base player hitgroups. So i.e. even though the AKM FMJ says "1.0" for everything, the end result is the numbers above. Meanwhile when you combine the base player hitgroups with the hitgroups for the AK HP bullets, the result would be as follows:

 

HITGROUP_HEAD: 2.7

HITGROUP_CHEST: 2.25

HITGROUP_STOMACH: 2

HITGROUP_LEFTARM: 3.2

HITGROUP_RIGHTARM: 3.3

HITGROUP_LEFTLEG: 2.1

HITGROUP_RIGHTLEG: 2.25

 

I learned this while working on my mod and completely overwriting the original damage numbers. Whenever I put in numbers expecting a certain result (for example 0.34 hitgroup on a 100 damage bullet) the results would be wildly different, killing a player in 1-2 hits rather than dealing the expected 34 damage.

 

To compensate, I started taking the player hitgroups into account and putting in smaller numbers so they would multiply out to the results I wanted. This more or less worked as expected, but often, the numbers seemed to somehow round up in an erratic way to i.e. make a 49 dmg hit into a 50 damage hit and produce different results. It got messy and annoying to deal with, so ultimately I just made my own base player with 1.0 hitgroups for everything. With that done, suddenly the numbers I put into my bullet damage came out exactly as I put them in, so i.e. a 100 damage bullet with a 0.34 hitgroup dealt exactly 34 damage and killed in 3 hits every time.

 

As a result, I resolved when I published stats for my mod, I would just do the math for the reader, and list the end result hit point stats instead of the combination of base numbers and hit-groups. If you can set up your script to do this as well, it would simplify the amount of information the viewer needs to read and calculate in their head.

Reply
#54
If you can tell me what the math should be, and what the resulting fields would be, I can put it in. I just updated the stats, cvar list, and theater parser with some additional fields, and I am working on replacing the damage box with a graph that shows damage over distance, once I figure out how the curve is calculated. I am s bit over my head, especially since I'm a math dummy, so if someone wants to help me improve this I will be glad to share the code and build it together to release to the community.

Reply
#55
I just got around to updating this for the new update.

CHANGES FROM THE LAST MAJOR GAME UPDATE
<p style="margin-left:40px;">M203 and GP-25 launchers and grenades (HE and smoke) added.
<p style="margin-left:40px;">7.62x51mm tweaks. Apparently HP ammo now does something.
<p style="margin-left:40px;">The FAL now uses 7.62x51mm ammo instead of 7.62x39mm ammo.
<p style="margin-left:40px;">Weapon barrel lengths can now be defined.
<p style="margin-left:40px;">Various troop template tweaks.
<p style="margin-left:40px;">File Deleted: default_searchdestroy.theater
<p style="margin-left:40px;">New "Core" section added to default.theater. Contains "custom precache stuff", which is really advanced stuff.
<p style="margin-left:40px;">Bipods added to FAL and M14
<p style="margin-left:40px;">1x Aimpoint added.
Full diff: http://pastebin.com/BbaMC75L
Reply
#56
For optics, how is FOV handled? Assuming default FOV 90, when I zoom in with a MK4 I am having a hard time getting the zoom just right. What's the formula for the "everything" zoom when aiming, and the actual scope zoom?

I also noticed if I put more than 16 explosives in, the game rejects it. Anyone know what the limits are for other entities?

Reply
#57
I never figured out the math for FOV and just had to do it by trial and error. I held a ruler up to the screen to compare the size of distant objects to make sure they increased in size the proper amount through the optics using the settings I used. If it was wrong, I would just exit the game, punch in some new numbers, and reload it over and over till it came out right.

 

One of the variables seems to be that different optics appear different distances from the camera based on the weapon model and where the optic mounts. Thus a single FOV will not work for the same optic on every weapon, you have to tailor your settings to the specific mount distance on each weapon.

 

I have run into the same problem with excess entities in damage types (ammo types). I had to gradually delete damage types till the game would stop crashing on load, and then set weapons using the deleted types to use existing ammo types. After the Hunt update, the number of damage types I was able to use went down, presumably because more were added to the default theater. I could try to count up what I have and let you know.

Reply
#58
Yeah, maybe it might not be a bad idea to make a theater with a hundred of each entity type and load it to see what the parser says. Or, the devs could enlighten us, which would make me very happy Smile

Reply
#59
Just a heads up for this next update, the number of bullets/pellets in a shot is now determined by the ammo type and not the weapon. This is so slugs only have a single pellet and don't just shoot a tight shotgun spread.
Reply
#60
I've updated this guide for the Nightfall Update.  Many changes are present, and if you've made a comprehensive theater mod, you'll probably need to make many changes for it to work properly.  It may even be a good idea to restart from scratch.


CHANGES FROM 11 August 2014 [The September update didn't have any significant changes]

If you haven't read through this guide before, I suggest skipping this section.

<p style="margin-left:40px;">M4A1 and AK-74 added.

<p style="margin-left:40px;">Nightvision added.

<p style="margin-left:40px;">Theater Conditions. This will have its own section describing functionality.

<p style="margin-left:40px;">Extra Grenades. The carry count has been increased on all of them, and there's a few tricky changes to the chest rig and chest carriers.

<p style="margin-left:40px;">Flaregun Added.

<p style="margin-left:40px;">Buckshot Changes:

<p style="margin-left:80px;">The number of pellets is now in the ammo specification instead of weapon specification [bulletcount].

<p style="margin-left:80px;">Damage calculations seems to have changed as well: Damage should now be the damage-per-pellet multiplied by number of pellets [bulletcount]

<p style="margin-left:40px;">Safehouses give you points, as defined in base_player.theater

<p style="margin-left:40px;">Leaning tweaks in base_player.theater

<p style="margin-left:40px;">Bipod limits are now defined in base_weapon.theater

<p style="margin-left:40px;">Silencers can have specific particle effects attached.

<p style="margin-left:40px;">Lasers and Flashlights have separate, non-generic models now.

<p style="margin-left:40px;">Grenade Launchers have significant changes in their implementation.

<p style="margin-left:40px;">Changes to Coop bots.

<p style="margin-left:40px;">Changes to class templates to support changes.

<p style="margin-left:40px;">General balance tweaks to almost all weapons and items.

Full diff: http://pastebin.com/ZkgLNbVc

Reply




Users browsing this thread: 1 Guest(s)