Git Product home page Git Product logo

ncgd-tes3mp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ncgd-tes3mp's Issues

"The Lady" birthsign is ignored when calculating health

Currently, NCGD does not take into account the 25-point Endurance boost from The Lady.

From the UESP article on Endurance:

Only your base endurance and the Fortify Endurance from abilities (In the original game, only The Lady Sign) are used to calculate your additional health on level up. For example, if you have 50 base Endurance and +20 from a Fortify Endurance effect other than from The Lady Sign, your total Endurance will be 70; however, you will get only an additional 5 health when you level up. Note that increases to endurance do not retroactively increase hit points, so it is advisable to maximize endurance as soon as possible.

Looking at "Abilities" under "Spellmaking" in the Construction Set, I cannot find anything else that gives an Endurance boost. I do see that some vampirism abilities grant a Strength or Willpower boost, and per the logic of NCGD, it might make sense to take that into account for health.

However, per the FAQ for v0.7.0:

Spell effects and diseases are not saved to or loaded from the server. This means all of them will disappear when you log out and rejoin.

...so since vampirism isn't going to be saved to server, there's no real need to support it for now.

Originally, I was going to ask if it might make sense to account for fortify and drain attribute effects when calculating health, even if these effects came from temporary sources (e.g. spells or potions).

For example, here's how I did it in TES3MP-MBSP:

local willpowerAttributeId = tes3mp.GetAttributeId('Willpower')

local currentWillpower = tes3mp.GetAttributeBase(pid, willpowerAttributeId) +
    tes3mp.GetAttributeModifier(pid, willpowerAttributeId) -
    tes3mp.GetAttributeDamage(pid, willpowerAttributeId)

Considering all of the possible scenarios that might cause the player to gain such effects, plus the limitation quoted above, it seems like the cleanest way to honor fortify and drain is to check the player's attributes every second and recalculate health if there is a change.

That seems doable, but I'm not sure if the "timer on repeat" aspect would cause performance issues. It feels like a bad idea, but I think we'd have to test it to know for sure.

In either case, TES3MP does track birthsigns, and checking if player.data.character.birthsign is lady's favor feels like low-hanging fruit. Given that Morrowind honors the birthsign when calculating health, NCGD ignoring it feels like a bug.

Possible bug with processDecay function

In this function, timepassed is set

local worldHour = WorldInstance.data.time.hour
local timePassed = worldHour

and not changed until

while oldDay < daysPassed do
    timePassed = timePassed + 24
    oldDay = oldDay + 1
end

it is then added to each skill's decay

skillsTable[skill].decay = skillsTable[skill].decay + timePassed

Basically, worldhour is getting added on to every skill's decay every time this function is called (which is every time onplayerskill is called). Tried setting the time to 23:00 and punched a guard, and every punch gave +23 to decay on all skills.

Crashing when non-NCGD players are used

When I leave the server, it crashes with the following error.

[2019-06-23 19:32:15] [INFO]: [Script]: [ ncgdTES3MP ]: Called "OnPlayerDisconnect" for pid "0"
[2019-06-23 19:32:15] [ERR]: .\server\scripts\custom/ncgd-tes3mp/main.lua:606: attempt to index local 'pt' (a nil value)
[2019-06-23 19:32:15] [ERR]: [Script]: Server crash from script error!
[2019-06-23 19:32:15] [INFO]: [Script]: Called "OnServerExit"
[2019-06-23 19:32:15] [ERR]: [Script]: Error state: false
[2019-06-23 19:32:15] [ERR]: .\server\scripts\custom/ncgd-tes3mp/main.lua:606: attempt to index local 'pt' (a nil value)
[2019-06-23 19:32:15] [ERR]: [Script]: Server crash from script error!

Levelling a skill above 100

Hello,

In the original NCGD, there was a system to allow leveling a skill (and attribute) above 100 by reducing the base level back to 75 and granting a +25 Fortify X effect.

I see this is not the case here. Is is voluntary ? I might try to delve into tes3mp scripting and implement that feature myself but I wanted to have your opinion on it first.

Skill increases cause stats to reset (health, magicka, fatigue)

During a skill increase, it seems that the player's health, magicka, and fatigue get reset back to whatever they were during their "last recorded" state. I haven't yet looked into what scenarios cause your stats to be recorded, but I've been able to replicate this via cell transitions:

  1. Go to an exterior cell (e.g. Balmora)
  2. Reduce your health, magicka, and fatigue through normal means.
  3. While your stats are reduced, enter an interior cell with a trainer (e.g. Balmora Mage's Guild).
  4. Restore your stats without leaving that cell. (I've tested resting and casting restore spells.)
  5. Obtain training from an NPC.
  6. Note how your stats are reduced back down to the values they had when you entered the cell.

Tentatively, I've also been able to replicate this by damaging myself, exiting the game, reloading, healing, and training. My stats get reduced down to whatever they were when I reloaded.

This bug seems to happen even when the skill increase does not trigger an attribute increase.

Running the /ncgd health command in chat also works instead of training.

In practice, I've noticed this bug causing three gameplay issues. First, I tend to restore fatigue before bartering. If bartering causes mercantile to increase, my fatigue will be reset back to whatever it was when I entered the store, requiring me to exit out of the conversation to restore it. Secondly, this bug can cause unfair character death if the player heals after entering a cell. Thirdly, it can also be abused as a sort of auto-heal to train armor skills.

From testing TES3MP without NCGD, I think the default behavior is to treat the time spent training as waiting. In practice, fatigue will be restored, but health and magicka will stay the same.

I suspect that this is related to the player:LoadStatsDynamic() call on main.lua#L761.

Incorrect script reference on line #549

Sorry if title is confusing but, I've just set up a server with fresh files all downloaded and installed just this morning, and after spending most of the day figuring out why my server was crashing, I finally narrowed it down to NCGD-TES3MP, specifically line #549
Here is the error I was receiving:
[2020-10-24 22:31:30] [ERR]: .\server\scripts\custom/ncgd-tes3mp/main.lua:549: bad argument #1 to 'lower' (string expected, got nil)
[2020-10-24 22:31:30] [ERR]: [Script]: Server crash from script error!

Here is line #549 in the main.lua

temp2 = temp * ncgdTES3MP.config.growthRates[string.lower(ncgdTES3MP.config.growthRate)]

the script referenced should be

temp2 = temp * ncgdTES3MP.defaultConfig.growthRates[string.lower(ncgdTES3MP.defaultConfig.growthRate)]

After changing this call I have managed to get my server running for me to play on, with no crash so far.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.