Changed

Changed

184k Downloads

Is this hard-coded?

cecnull1 opened this issue · 14 comments

commented
TFQQ2024930-22419.mp4
TFQQ2024930-22523.mp4
commented

looks like that the attribute of the entity gravity is being change by the transfur and that it's to be normal i guess

commented

Attribute base values are rewritten each tick to match the variant's base attributes.

commented

If the base attribute is modified this can generate problems such as gravity showed by the video

commented

Attribute base values are rewritten each tick to match the variant's base attributes.

Why not use a modifier?

commented

The problem in the video can be fixed by using a modifier, not altering the base value.

Yeah true

commented

The problem in the video can be fixed by using a modifier, not altering the base value.

commented

Altering the base value is ideal for root level modification (like in the case of transfurring players into different entities).
Any desired attribute adjustment should be done with modifiers and not setting the base value.

commented

In terms of performance optimization,
As I mentioned in #1068, there is a certain computational burden to overwrite each tick, especially as the current mod size 和 the number of mods in the game increases, there will be more 和 more things to be computed in a tick, so I think it makes sense to reduce unnecessary computations (like this one). If you must do this, you should reduce the frequency of overwrites (e.g. one second in real time). This can have a noticeable performance impact on some devices, so it's worth thinking again.

commented

In terms of performance optimization, As I mentioned in #1068, there is a certain computational burden to overwrite each tick, especially as the current mod size 和 the number of mods in the game increases, there will be more 和 more things to be computed in a tick, so I think it makes sense to reduce unnecessary computations (like this one). If you must do this, you should reduce the frequency of overwrites (e.g. one second in real time). This can have a noticeable performance impact on some devices, so it's worth thinking again.

Then if this is the case you can use a config file to adjust the refresh once every few seconds!

commented

(My starting point is performance loss, because it is a bit violent.)
I don't quite understand why it's written like this. It's enough to change the base value once when transfur, which is a bit of a big deal.
I've also noticed that this doesn't just happen to players, but also to the beasts. This can lead to some unnecessary calculations in some worlds or multiplayer games with a lot of goo beasts. I don't think it really makes much sense.
So can you explain the reason? Thank you!

commented

Nor is it suitable. This kind of operation can be said to be redundant. I think for a mod that is going to get bigger and bigger in the future, use all these operations where they are really needed, rather than looping here...

This mechanism itself is a design mistake and can result in wasted performance (even if the impact is really small).

也不合适。这种可以说属于多余的运算。我认为对于一个未来体量会越来越大的mod,把这些运算都用到真正需要的地方,而不是在这里循环执行...
这种机制本身就是设计失误,会造成性能浪费(哪怕影响真的很小)。

commented

而且也有可能导致兼容性问题(特别是如果其他模组也是修改基值的方式)

commented

It could be that it was changed because it was not caused by something else after the TF, such as this modification but if that is the case it is still better to save the value after the TF and then do a comparison of the current value every second. That might be better than overwriting every second.

commented

Nor is it suitable. This kind of operation can be said to be redundant. I think for a mod that is going to get bigger and bigger in the future, use all these operations where they are really needed, rather than looping here...

This mechanism itself is a design mistake and can result in wasted performance (even if the impact is really small).

也不合适。这种可以说属于多余的运算。我认为对于一个未来体量会越来越大的mod,把这些运算都用到真正需要的地方,而不是在这里循环执行... 这种机制本身就是设计失误,会造成性能浪费(哪怕影响真的很小)。

How do you think it should be set?