66f7772fa7e8c

Post Reply

Your name:
Subject:
Message Icon:

Verification:
This box must be left blank:

Look at you, hacker: a pathetic creature of meat and ____!  (Fill in the missing word):

Shortcuts: Alt+s to submit/post; Alt+p to preview


Topic Summary

Posted by: ZylonBane
« on: Yesterday at 14:44:24 »

I remind you that it's impossible to determine exactly what changes Modify 1 and 2 made, because those changes are made by code.
Posted by: sarge945
« on: Yesterday at 06:02:17 »

Can you use multiple lines?

Something like

Code: [Select]
  Damage: 10.1 (+152%)
    Base: 8
    Fire Mode Bonus: +0%
    Modification Lvl 2: +25%, +25%
    Skill Bonus: +75%
    Sharpshooter: +15%
Posted by: ZylonBane
« on: Yesterday at 04:54:35 »

Okay, so say there's a theoretical "verbose" mode that displays exactly what goes into each bonus. The most troublesome would be the damage readout. Damage is calculated (on the delivery side), as:

base damage (sum of all damage stims on weapon projectile or corpse)
   x damage multiplier for current weapon mode (can be increased by modification)
   x 1.0 + ((player weapon skill - required weapon skill) * 0.15
   x 1.15 (if Sharpshooter installed)

So this would have to display:
- base damage (completely unmodded damage)
- amount multiplier has been increased by modding
- label the increase as from modding
- multiplier if weapon skill is beyond minimum level
- label the multiplier as from weapon skill
- multiplier if Sharpshooter installed
- label the multiplier as from Sharpshooter
- actual damage value
- total percent increase
- all necessary punctuation to tie this together in a comprehensible way

Maybe something like this?
  Damage: 10.1 (+152%) (4 +25% modded, +75% skill, +15% Sharpshooter)

(Yes the percentages are actually being multiplied, not literally added. But they're "additional" multipliers so it's, uhh... colloquial math.)
Posted by: sarge945
« on: 26. September 2024, 23:51:24 »

The viral proliferator can break at 25% condition. All others break in the 10% - 20% range. It's such a minor distinction it hardly seems worth exposing. Players should basically assume that any weapon in the red is about to break.

Since this isn't documented anywhere, and since the entire point of this mod is to make weapon stats available and accessible, I would highly recommend adding this.

That's already in there, as the "Reliability" stat. A gun showing 99% reliability means it loses 1% condition per shot. Also, in vanilla all weapons degrade at the same rate regardless of fire mode. Mode-dependent degradation actually requires script fuckery; it's not natively supported by the engine.

I read Reliability as "chance of breaking when at low condition" rather than "condition reduction per shot". At the bare minimum this should be renamed.

As for "all weapons degrading at the same rate", it's up to you whether you think that it's worthwhile making this as compatible with other mods as possible. You already stated in this thread you want to make it compatible with RSD, which does change condition per shot (at least for the laser pistol), so the stat should be there.

Maintenance tools improve a gun's condition by a flat +10 * Maintenance skill. It's not a per-gun stat.

True, but it's still useful information to have anyway. We already have certain mods (like RSD) where condition improvement is based on the difference between the maintenance requirements and your current skill level, which will make it differ per gun.
Posted by: ZylonBane
« on: 26. September 2024, 17:53:07 »

(SIGH)

I didn't mean that all weapons degrade at the same rate as each other. If that were the case why would I display a degradation rate stat at all? I meant that changing fire mode does not change the degradation rate of that weapon.
Posted by: JDoran
« on: 26. September 2024, 17:33:05 »

The viral proliferator can break at 25% condition. All others break in the 10% - 20% range. It's such a minor distinction it hardly seems worth exposing. Players should basically assume that any weapon in the red is about to break.

Speaking as someone who is very unobservant, I didn't know that - I think I always assumed that the weapons broke at 1%, certainly not anywhere in the teens. I've never used the viral proliferator, though, but I think I would have assumed that it too broke when it reached the 1% point. Or is there an in-game recorded or written message that points out the vulnerable design of the viral proliferator that means it can fail at 25%?


Also, in vanilla all weapons degrade at the same rate regardless of fire mode.

I didn't know that, either. It does seem more logical that more 'violent' ('violent' as in say weapons involving an explosion to shoot bullets or pellets) weapons would degrade quicker than a weapon that shoots electrical EMP energy.  Well, I think so anyway.
Posted by: ZylonBane
« on: 26. September 2024, 17:04:13 »

Another note: It's impossible for scripts to tell whether a certain stat change was brought about by Modify 1 or Modify 2 or even Modify at all. All it can do is compare the concrete stats with the archetype stats and see "Yup, these are different."
Posted by: ZylonBane
« on: 26. September 2024, 15:55:27 »

That works too. For this I'm explicitly mimicking the equivalent panel in Deus Ex.



Deus Ex's UI has the advantage of more horizontal space, and a more advanced layout engine that can do columns, mix fonts, etc., so it can get away with being much more information-dense.

I briefly considered making my panel wider, but had to reject that idea because in UI resolutions 1024x768 or higher the MFD panels are placed at the top of the screen instead of the bottom, so a wider MFD would have conflicted with the inventory. Also it just would have looked weird.
Posted by: RoSoDude
« on: 26. September 2024, 15:38:34 »

My armor stat display window uses angle brackets to display changes to stats, so it's clear what the base > current value is.

https://i.imgur.com/Kf7xEou.png

Maybe I should make that a "->" though...
Posted by: ZylonBane
« on: 26. September 2024, 15:31:43 »

Are the numbers in brackets applied before or after the number next to them, it seems ambiguous?
Forcing players to grab a calculator to determine the actual current stat value would be sociopathic design. Of course the main number displayed is the current active value. The percent is the deviation from baseline.

For some reason, I seem to remember some weapons being able to break at 2 condition, rather than 1 condition.
The viral proliferator can break at 25% condition. All others break in the 10% - 20% range. It's such a minor distinction it hardly seems worth exposing. Players should basically assume that any weapon in the red is about to break.

Also, what about "Degrade Rate Per Shot", since IIRC different firemodes degrade at different rates
That's already in there, as the "Reliability" stat. A gun showing 99% reliability means it loses 1% condition per shot. Also, in vanilla all weapons degrade at the same rate regardless of fire mode. Mode-dependent degradation actually requires script fuckery; it's not natively supported by the engine.

It might also be useful to have "Repair Amount Per Tool", which is the current calculated amount of condition the weapon will gain, per maintenance tool.
Maintenance tools improve a gun's condition by a flat +10 * Maintenance skill. It's not a per-gun stat.

It would be nice to know the exact breakdown for our damage, how much of it is from the weapon's base damage, how much from weapon skills, how much from Strength (if relevant), how much from O/S Upgrades, how much from modifications.
I agree it would be nice to see all that, but the text window in SS2's MFD panels is only about 25 characters wide. Including all that information could very easily lead to a cluttered, hard-to-read display.

Even some basic information for newer players, like a line saying "Gains damage from Strength and Standard Weapons Skill" somewhere.
That information is already present in the weapon description text, which this mod provides a shortcut to via the [?] button, and explicitly stated in the combat stats MFD.
Posted by: Nameless Voice
« on: 26. September 2024, 06:14:20 »

The modification level could be displayed in both places, both at the top of the description, and in the stats.

I'd say the fact that the percentages are in brackets should indicate that it means "damage: 10 (25% above base)".
It does look like there would be enough room for "damage: 10 (8 + 25%)" though - but maybe not for any large numbers?

For the requirements, maybe instead of the silly colours, it could add a line to the bottom saying something like "Strength requirement not met."
Posted by: sarge945
« on: 26. September 2024, 03:27:19 »

Here's how it's looking currently:


No wonder your shotgun doesn't work, some idiot filled it full of jam!

Actually seriously though, I feel like the "Modifications: 2" text should be moved from the top of the window to being the first item in the list. Especially since so many other stats (damage, reload, etc) are modified directly by the modification level. It's easy to miss. I know that it's supposed to be consistent with the vanilla weapon window, which has the modification level inside the display box, but here we are already showing all the other weapon stats in the main text display, so it really should be there alongside the others.

Are the numbers in brackets applied before or after the number next to them, it seems ambiguous? For example, does the shotgun do 10 damage (with a base damage increased by +25% to a total of 10), or does it do 12.5 damage (10 damage +25%).

For some reason, I seem to remember some weapons being able to break at 2 condition, rather than 1 condition. If this is the case, it should be documented somewhere, maybe a "Break Threshold" stat. Also, what about "Degrade Rate Per Shot", since IIRC different firemodes degrade at different rates (especially important for laser pistol overcharge, which is very damaging to the weapon). It might also be useful to have "Repair Amount Per Tool", which is the current calculated amount of condition the weapon will gain, per maintenance tool.

It would be nice to know the exact breakdown for our damage, how much of it is from the weapon's base damage, how much from weapon skills, how much from Strength (if relevant), how much from O/S Upgrades, how much from modifications.

Even some basic information for newer players, like a line saying "Gains damage from Strength and Standard Weapons Skill" somewhere.

Sorry this is a bit of a ramble, I have just appended stuff as I have thought of it.
Posted by: ZylonBane
« on: 25. September 2024, 13:23:44 »

Would it be possible to make the ones you don't qualify for a different colour?
It would not, since the font SS2 uses for all its small anti-aliased text is the "AA" type that can't have its color changed.

But even if it could, the overlay API doesn't support any sort of rich text encoding, so instead of rendering the entire scrolling text region with a single draw call, some much more complex scheme would have to be devised.

And even if all that was done, multiple body text colors would be inconsistent with SS2's design language. I'm trying to make this as visually consistent as possible with the vanilla UI so it doesn't feel out of place.
Posted by: tiphares4
« on: 25. September 2024, 13:09:31 »

Teal or dark pink or critical-node colored, or some hue of red.. it doesn't have to look bad i think when adjusted properly to harmonize with the other colors (green).  : )


edit: ok, bad idea :/
Posted by: Nameless Voice
« on: 25. September 2024, 10:05:16 »

Would it be possible to make the ones you don't qualify for a different colour?

Though that would probably look awful even if it was possible.
Posted by: ZylonBane
« on: 25. September 2024, 08:43:13 »

Download updated. Now pretty much functionally complete. Displays damage for current weapon/ammo. Calculates reload time properly, taking the animation time into account. Displays kickback and reliability (degradation rate). Bonus displayed for guns should now take into account all applicable stats, implants, OS upgrades, and psi powers.

In this version the stat requirements section displays an asterisk next to all stats that you've met the minimum requirement for. I'm not sure if I like this. It's informative, but I think it looks a bit odd.

Here's how it's looking currently:
Posted by: ZylonBane
« on: 25. September 2024, 05:08:47 »

Just discovered something interesting. While it's not possible to use PostMessage() in overlay handlers because that function doesn't exist in the IShockOverlayHandler class, it IS possible to use Networking.SendToProxy() to accomplish basically the same thing.

So instead of:
PostMessage(obj, "message", data);

You can do:
Networking.SendToProxy(Networking.Owner(obj), obj, "message", data);

Wrapped thusly...
Code: [Select]
function PostMessage(obj, msg, data=null) {
if (obj) {
Networking.SendToProxy(Networking.Owner(obj), obj, msg, data);
}
}
The only caveats seems to be a limit of a single data item, and message.from() always reading as 0.
Posted by: RoSoDude
« on: 23. September 2024, 13:59:04 »

Jolt Back is nearly irrelevant as a stat, to the point that no one ever noticed that it kicks you forward. I mean, I did actually notice this when I was looking over recoil stats, but I figured "eh, who cares."

Jolt heading and pitch should ideally be combined into one stat via the Euclidean norm, i.e. the square root of the sum of squares:
Code: [Select]
recoil = sqrt(heading*heading + pitch*pitch)
This measure tells the player the total amount that their view will be jerked after each shot. It's a better measure than the average since it properly accounts for the fact that 5 units of jolt pitch + 5 units of jolt heading is less total recoil than 10 units of jolt pitch (triangle inequality).
Posted by: ZylonBane
« on: 23. September 2024, 05:09:02 »

In on-topic news, weapon kickback is such a byzantine mess.

All guns have a "Kickback" property that, like Base Gun Description, has a unique set of attributes for each gun setting.

Further, these attributes are divided into "Kickback" and "Jolt". Kickback controls the animation of the weapon model when firing. Jolt controls how the player view is jerked around. There's "Jolt Pitch" for up/down rotation, "Jolt Heading" for left/right rotation, and "Jolt Back" for player knockback. Jolt Pitch and Heading seem to generally implement the concept of muzzle rise (though it can also randomly lower the muzzle as well), while Jolt Back seems to represent recoil.

But wait! For some reason the Player Gun Description property contains a Flags field that allows selectively enabling/disabling the aforementioned Jolt Pitch and Jolt Heading. For Jolt Pitch there are separate up and down rotation flags, and for Jolt Heading there are separate left and right rotation flags. There is no flag for Jolt Back. Some weapons have both Jolt Pitch and Heading enabled, while others, like the pistol, only have Pitch enabled.

And then there's agility and the Neuro-Reflex Dampening psi skill for reducing kickback. Agility reduces all kickback stats by multiplying them by (8 - Agility) / 7. Psi dampening zeros all kickback stats.

Well... not ALL stats. The Jolt Back stat is unaffected by both agility and dampening. So the dampening description "Eliminates all weapon kickback." is a damn lie. Though to be fair this stat is set at a negligibly low level in the vanilla gamesys.

But Jolt Back can be reduced by weapon modification! But only on the shotgun. None of the other vanilla weapons support reducing their kickback.

All of which leads to the question, how the heck does one boil all this down into a meaningful single number? Just add all the Jolt stats together? Average them? Average Jolt Pitch and Heading and then add Jolt Back? Display whichever is the highest? Omit Jolt Back entirely? Present Jolt Pitch/Heading and Jolt Back as separate stats?
Posted by: ZylonBane
« on: 23. September 2024, 03:49:22 »

No, I don't think we have a master list of weapons where modified properties were pre-set on the concretes. IIRC most of the "special" weapons were fixed by ADaOB.

These modified weapons were clearly not a bug. The concretes in the maps were clearly modified to have alternate stats, which was an intentional process and very unlikely to have happened by accident.
Oh you sweet summer child. Over the course of creating SCP we've found SO MANY objects with inherited properties redundantly set on the concretes, either from changing technology over the course of development, changing standards for how to do things, authors just not understanding how things work, and probably plain old fucking around. And that's not even getting into all the objects with duplicated scripts, inapplicable properties, broken schemas, and nonsensical links. There's so much mess in vanilla SS2 it's a wonder it works as well as it does.

Intentionally putting in weapons with normally undiscoverable special attributes would have been extraordinarily unlike Looking Glass and Irrational, given how much effort they put into designing their games to empower the player to make informed decisions.
Posted by: sarge945
« on: 23. September 2024, 00:27:24 »

Thats a nice idea for a mod. I remember that some weapons in original SS2 were having some unique properties like reduced recoil, more accuracy, never jamming etc. then it were patched out by some release of community patch. With such info being displayed it makes sense to make different versions of the same gun present again now that player can observe and compare the difference between the two guns not only by trial and error. After all what if these unique stats were not a bug but a feature? I recall some buffed shotguns, pistols and rifles being present only in some well hidden or protected places so it makes sense to have some high quality rewards for exploration.

Even now, with the modification level clearly visible, the vast majority of newer players, at least from what I have seen, always miss the first modified pistol (available in medsci2) because without opening the overlay, it just looks like a crappy condition 1 pistol (which, incidentally, is why I keep pestering the SCP devs to add the arrows from RSD to denote upgraded weapons in the inventory).

If they miss something as obvious as the modification level, how can you expect people to discover that a weapon has altered stats?

But the problem goes further than simply not having the altered stats displayed somewhere. The actual implementation itself was bad. Several weapons were unbreakable, but would still degrade as usual down to a condition of 1. Because there's already a degree of chance associated with weapons breaking, many people would (rightfully) think that maybe they just got really lucky and their weapon didn't break  when it got to low condition.

These modified weapons were clearly not a bug. The concretes in the maps were clearly modified to have alternate stats, which was an intentional process and very unlikely to have happened by accident. They were presumably removed because they were confusing, janky, and inconsistent, rather than being a bug, and while the altered stats menu certainly helps to deobfuscate things a little, it doesn't really solve the fundamental problem.

On that note, @ZylonBane or @voodoo47, do either of you have a list of the unique vanilla weapons on-hand? I can't find them anywhere in the wiki and I'm curious about them, and I don't want to have to go searching through every single map in the editor.
Posted by: ZylonBane
« on: 22. September 2024, 21:33:25 »

SS2-RSD actually swaps out the native HRM plug overlay for a custom replacement overlay when the weapon settings overlay is opened.
With this mod the native settings overlay is never opened. WeaponScript is replaced with a custom script that opens the custom overlay, including custom Repair and Modify plugs, because the native ones interfere with rendering of script overlays.

I just took another look at the RSD code for launching the custom modify overlay, and it appears to rely on setting private variables to get it to activate, unfortunately. If it was instead something like posting a message, or calling a function in one of its classes (which Squirrel sometimes allows between scripts, oddly), that would have worked.
Posted by: Toaste
« on: 22. September 2024, 19:30:49 »

Thats a nice idea for a mod. I remember that some weapons in original SS2 were having some unique properties like reduced recoil, more accuracy, never jamming etc. then it were patched out by some release of community patch. With such info being displayed it makes sense to make different versions of the same gun present again now that player can observe and compare the difference between the two guns not only by trial and error. After all what if these unique stats were not a bug but a feature? I recall some buffed shotguns, pistols and rifles being present only in some well hidden or protected places so it makes sense to have some high quality rewards for exploration.
Posted by: RoSoDude
« on: 22. September 2024, 16:48:55 »

On the damage line, I'll be indicating damage sources that do radius damage instead of contact damage, but I can't decide what the best word for it would be. "Blast"? "Area"? "AoE"? "Radius"? Something else?

Also, @RoSoDude, I'd like to try making this compatible with RSD, but to do that it will have to launch RSD's modification panel when the Modify button is clicked. Is there any way for another script to do that?

SS2-RSD actually swaps out the native HRM plug overlay for a custom replacement overlay when the weapon settings overlay is opened. If you tested the mods together and my modification menu didn't open, then it's probably something I need to update on my end. I probably need to make my check for HRM plug replacement earlier or something.
Posted by: voodoo47
« on: 22. September 2024, 15:27:23 »

blast maybe not as not everything also explodes, AoE sounds too gamey, radius a bit editoresque, so area, perhaps.
Posted by: ZylonBane
« on: 22. September 2024, 07:52:24 »

On the damage line, I'll be indicating damage sources that do radius damage instead of contact damage, but I can't decide what the best word for it would be. "Blast"? "Area"? "AoE"? "Radius"? Something else?

Also, @RoSoDude, I'd like to try making this compatible with RSD, but to do that it will have to launch RSD's modification panel when the Modify button is clicked. Is there any way for another script to do that?
Posted by: ZylonBane
« on: 16. September 2024, 05:53:41 »

Download updated. Now displays weapon condition icon, and all text now translatable via external string file.
Posted by: ZylonBane
« on: 15. September 2024, 17:07:51 »

The text displayed on the mode switch button is pulled from the same string file the weapon HUD uses, so it will get translated. There is no vanilla string that just says "UNLOAD" though. In the vanilla Settings panel the text on that button is part of the bitmap. "SETTINGS" should be localized though, since it loads the original background and pastes just the label part over the custom background that this uses. If you look at iface/wsettbkg.png in this mod you'll see that the label region is blank.

I'll eventually break out all the non-vanilla text into a standalone string file so this can be easily localized.
Posted by: voodoo47
« on: 15. September 2024, 16:53:51 »

had the CZ translation loaded when trying this, the text part is not compatible obviously, but oddly enough, the button on the left is translated while the one on the right is not.

need to find the texture name somehow.
Posted by: Dark-Star88
« on: 15. September 2024, 16:17:29 »

DAMN!  :stroke:

ZB still figuring out how to make the Dark engine dance like a monkey!

Don't feel bad that you couldn't do all you wanted, it's amazing you got this far! I'll give it a look-see soon.
Posted by: ZylonBane
« on: 15. September 2024, 10:27:39 »

This mod is an attempt to turn SS2's weapon settings MFD into something more like the weapon panel in Deus Ex, displaying detailed weapon stats and which stats have been affected by modification. The primary motivation for this was to allow players to directly see the effects of the SCP Tinker OS upgrade (which improves the effect of all weapon modifications), but it should be useful for non-SCP players as well.

There were some interesting challenges with this:

The script API, somewhat surprisingly, doesn't have functions for unloading weapons or changing their fire modes, so all the engine code that does this had to be re-implemented in Squirrel.

The overlay API provides no functionality for buttons or scrolling text boxes. You have to roll all that yourself.

The overlay API provides no functionality for replacing existing MFD panels or otherwise integrating with the MFD system. Creating the illusion of having done so can only be accomplished by acts of rank skulduggery.

The overlay API provides no functionality for rotating bitmaps. Since I wanted to display the weapon icon at the top of the panel, but all the weapon icons are oriented vertically, I ended up using the sub-bitmap rendering function to redraw the bitmaps into a rotated orientation, one pixel at a time. This in turn required drawing the weapon icons into a "transparent" overlay, which has the advantage of not needing to be re-rendered every frame, so this rotation process could be done only once when the panel is first opened. An earlier version of this mod just included pre-rotated icon bitmaps, but that would have made this incompatible with mods that include their own weapon icons, and we can't have that now can we.

Turns out that in Dark, projectile velocities are non-linear. For example, input of velocities from 1 - 10 results in actual velocites per velocity unit of:
- 1: DU/Sec: 0.40
- 2: DU/Sec: 0.70
- 3: DU/Sec: 0.80
- 4: DU/Sec: 0.85
- 5: DU/Sec: 0.88
- 6: DU/Sec: 0.90
- 7: DU/Sec: 0.92
- 8: DU/Sec: 0.93
- 9: DU/Sec: 0.94
- 10: DU/Sec: 0.942
(DU = DromEd Units)

They eventually converge on a 1:1 relationship once velocities get around the 50s, but still, this makes the projectile velocities reported somewhat approximate. On top of that, there's never been any well-defined relationship established between DromEd units and real-world distances, so this entire stat is a bit wobbly.

And sadly, there appears to be no way for Squirrel to detect mousewheel events, so I couldn't replicate NewDark's cool mousewheel scrolling of text boxes. You gotta use the scroll buttons like some kind of savage.

Anyway, the mod in its current state reports the following info about each weapon. Any modified stats are indicated by the percentage change from the base stat.
- Modification level + description
- Condition
- Fire mode (semi-auto, full auto, burst)
- Fire rate
- Ammo per shot
- Clip size/energy capacity
- Projectile velocity
- Reload time
- Reliability
- Stat requirements to equip, maintain, modify, and repair
- Ammo type(s) used

What's not yet reported is damage per shot and kickback. These both require consolidating a large amount of information into a single number, and I haven't figured out yet what the best way is to go about this. Damage in particular is going to be a huge pain in the ass due to all the different ways there are to implement damage sources in Dark.

And I reaaalllly doubt this will play well with RSD. It would be nice if it did, but RSD commits a lot of upgrade and UI shenanigans of its own.

Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
66f7772fa8ab0