Pluginator Breakage

Post Reply
Adresin
Member
Posts: 38
Joined: Tue May 21, 2024 8:46 am

Pluginator Breakage

Post by Adresin »

I have bugged this in game, but wanted to provide some additional info. Here's a brief bit from my log just now.

[[PLUGINATOR ON. Type pluginator disable to disable.]]
<<<PLUGINATOR!>>>{'roundtime': 0, 'traveltime': 0, 'exp_bucket': 93, 'morale': 1.48, 'nutrition': 65, 'balance': 0, 'energy_current': 324, 'energy_max': 500, 'sanity': 100, 'exp_total': 92015, 'next_level_at': 96250, 'next_level_until': 4234, 'encumbrance': 1, 'disguised': 0, 'armor_level': 3, 'risk': 0, 'wound_back': 17, 'wound_chest': 1, 'wound_abdomen': 6, 'wound_right_arm': 23, 'wound_left_arm': 33, 'wound_right_hand': 23, 'wound_left_hand': 14, 'wound_head': 26}<<</PLUGINATOR!>>>
Energy: 500 Nutrition: well-fed (97%) Morale: +0.00 Sanity: Sane
No obvious wounds or maladies.
Level: 24
Experience: 191,594 / Next: 195,000
Until Next: 3,406
Your experience bucket is 0% full.
[[PLUGINATOR OFF.]]

So, there's two issues with this initial string.

First, as you can see from the text after, the values are way, way off. From earlier testing, it appears to be displaying values from the last time the pluginator was on, rather than the current values. In order for scripts to properly initialize variables, this first string when you turn the feature on should be pulling current values for each item, not what they were hours, days or even weeks ago.

Second, not all body parts display for wounds. I know any strings after this will only display what's changed, but I would think this first string should display all of them, even those that have no injury. Again, this would help with script variable initialization.

There may be other missing values I haven't caught, I'm not sure. But if the initial string would display all possible items and their current value, the scripts could create all of the needed variables, then update them with any strings that come after.

I hope this helps so this can be fixed. I miss my plugin, particularly where I could have it display the most severe wound if any. Thanks!
jerc
Member
Posts: 16
Joined: Thu Nov 14, 2024 7:45 pm

Re: Pluginator Breakage

Post by jerc »

Necro-ing this thread somewhat, but I didn't find anything else about it. Have wounds been removed from the pluginator output altogether? I don't see them at all.
User avatar
Noctere
GM
Posts: 1352
Joined: Wed Dec 28, 2011 12:48 am

Re: Pluginator Breakage

Post by Noctere »

Pluginator is still in development and the wounds feature is not yet available.
It's not easy being evil...
Gorth
Member
Posts: 65
Joined: Tue May 14, 2024 1:20 pm

Re: Pluginator Breakage

Post by Gorth »

Adresin wrote: Wed Jun 26, 2024 2:50 pm First, as you can see from the text after, the values are way, way off. From earlier testing, it appears to be displaying values from the last time the pluginator was on, rather than the current values. In order for scripts to properly initialize variables, this first string when you turn the feature on should be pulling current values for each item, not what they were hours, days or even weeks ago.
I remember seeing this a while back and meaning to say, but most scripting languages have a way to get from a hash table with a default value, i.e.:

Code: Select all

hash = {
    'wound-head': 20,
    'wound-neck': 992
}

wound-chest = hash.get('wound-chest', 0)  //Returns 0 if 'wound-chest' does not exist, and the value of it, if it does.
You can do metatable stuff with Lua that I do not particularly know, because I hate Lua, but you can also just do something like this:

Code: Select all

local function getValue(tbl, key, default)
    return tbl[key] or default
end

wound-chest = get_value(hash, 'wound-chest', 0)
This should work, but I didn't test it. It's conceptual, anyway.
Adresin
Member
Posts: 38
Joined: Tue May 21, 2024 8:46 am

Re: Pluginator Breakage

Post by Adresin »

Since we've been told the pluginator is being, reworked I guess, because it worked on cogg... Do any mush people have a good solution for keeping track of wounds?
Yes, I know you can use h, but my issue is two fold.

1. As a screen reader user, listening through all of the slight wounds to see if there are any moderate ones. With Cogg's pluginator, I'd made a command to show me the most severe by number but that's not available now.
2. Now that it's cold, there's the additional wordiness of head, chilly, neck, chilly, etc etc.

Worst case I can parse and gag the h command display for better and more brief output, but that feels clunky and I can't help but think there must be a better way with what we've got access to now. Anyone have something they're willing to share?

I should mention I don't know lua well at all. Mostly I've looked at existing code and modified it for what I need through trial and a lot of error.
User avatar
Noctere
GM
Posts: 1352
Joined: Wed Dec 28, 2011 12:48 am

Re: Pluginator Breakage

Post by Noctere »

I might be able to help you a bit with that. Currently the status prompt will display the number of your greatest wound. You could make a small script to both gag and parse that number. So when it triggers it could play a sound to alert you. Be sure to enable the prompt in your options.
It's not easy being evil...
User avatar
Noctere
GM
Posts: 1352
Joined: Wed Dec 28, 2011 12:48 am

Re: Pluginator Breakage

Post by Noctere »

If you need a little lua help, let me know.
It's not easy being evil...
Post Reply

Return to “Bug Reports”