Git Product home page Git Product logo

mmextension's People

Contributors

grayface avatar kalimag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mmextension's Issues

Setting a hireling name in MM6 does not stick.

I wanted to restore my hirelings after doing the temple quest in MM6 and came up with a simple script to do that. However, setting the name of the hireling does not stick.

Steps to reproduce (MM6 with MMExt 2.2):

  1. Hire a hireling, any will do.
  2. Change the name with Party.HiredNPC[1].Name = "Test".
  3. The new name is being displayed correctly.
  4. Save the game.
  5. Load that save.
  6. The name of the hireling has reverted to the original one.

The save file itself does also only contain the original name of the hireling.

Did I miss something on how I need to set the name of a hireling?

Importing .obj into indoor map ignores UV coordinates

The import process does not save UV coordinates for newly imported facets on indoor maps. All BitmapU/BitmapV values are set to 0.

To reproduce

  1. Open indoor internal map
  2. Export
  3. New
  4. Import Objects or Import Rooms for the previously exported file

For example, MM8's d06 before and after.

This affects at least MM7 and MM8. I have not tested MM6.

UVs are correctly saved when importing the .obj into outdoor maps, or when re-importing the .obj into the original map which already has UV data for the faces.

This problem does not occur on very old versions of the editor, as far as I can tell it happens since commit 068d512. Forcing a.HasData to true seems to "solve" the problem, but I suspect that this is more of a workaround and not the correct fix?

Indoor UV coordinates are truncated instead of rounded

UV coordinates are calculated and displayed as floating point values in the editor, but internally truncated to integers. With floating point imprecision and the Y/Z axis rotation during import it's fairly common to end up with coordinates like 127.999994 truncated to 127, causing misaligned textures.

image

Outdoor maps don't have this problem, the UVs are rounded to the closest integer here:

local v = t[prop] or Editor["Import"..prop][id] or 0
if Map.IsOutdoor() then
-- local x, y, z = XYZ(Editor.Models[id:div(64) + 1])
local oc = Editor.OutdoorUVCorrection
local x, y, z = oc, oc, oc
local ux, uy, uz, vx, vy, vz = Editor.GetUVDirections(a)
v = (v - (prop == "BitmapU" and ux*x + uy*y + uz*z or vx*x + vy*y + vz*z)):round()
end
d[prop] = v

Sample .obj that demonstrates the issue (using MM8 textures)

Editor sometimes saves incorrect door UVs

For doors with a MoveLength which is not a multiple of the texture size (I think), the texture will appear offset when viewed in-game.

The UVs are correct in the editor, but are incorrect when loading the compiled map outside the editor. Loading the compiled map in the editor (via Internal Map) will once again calculate the UVs correctly.

The Door.FacetStartU/Door.FacetStartV are different when read in the editor and outside the editor, but I was unable to find out where this discrepancy comes from.

Reproduction steps:

  1. Open MM8's d45.dlv in the editor
  2. Compile map without making any changes
  3. Insert into a LOD and restart game
  4. Load map without the editor (evt.MoveToMap{Name="d45.blv"})
  5. Textures on the doors will be offset

Before:

image
image

After:

image

MMExtension compatibility

Hello.
I'm updating MMMerge to current version of MMExtension, and I got into these troubles, worth to mention:

  1. mem arrays do not accept boolean values anymore. For example 'mem.u4[ptr] = true' will give error now (unlike in previous MMExt version, where bool was correctly casted to 1 or 0). I can avoid assigning booleans, but it is troubling with evt functions, for example: 'evt.Set{const.VarNum.Poison1, true}', feels like correct code, but will give error as well, because 'true' is not converted to number underneath.
  2. lua51.dll in the ExeMods folder sometimes crahses the game after call to RtlUnwind inside it. I could not reproduce the error in clean installation of MM8 + MMPatch + MMExtension, and it does not happen too often in the Merge, but still I did not have play session, where it would not happen at least once. After i recompiled this dll using vs2019 with it's bundled msvc_x86, error has gone (I've taken source from OpenResty repository and added lj_get_char_bits exported symbol accordingly).

MMextension/Merge issues: 2022 Jun-Sep

  1. User-casted Dispel Magic spell affects monsters with object index -1 (I didn't delve deeper to decide how much of a bug this is). MM8 can endure this, MMExtension will cause fault. Fix: https://gitlab.com/cthscr/mmmerge/-/commit/0db5b6eb032a040ea9b8cbce426520df17a0f48a
  2. MM8 code allows to damage player outside of current party. This is typically a result of a bug but, again, MM8 can endure this. I've put following (commit message is wrong): https://gitlab.com/cthscr/mmmerge/-/commit/f8426292826150cb3676047302ec43137eeec32f
  3. Last loaded award (with index bigger than 104) is not shown in Awards list. https://gitlab.com/cthscr/mmmerge/-/commit/36af6dca74febb726e4b612b35cbc2b558c99802
  4. Fire spikes casts aren't written in player structure, amount of spikes is recalculated by iterating over objects each time spell is count. Field "FireSpikeCasts" (0x1D26) doesn't seem to be addressed directly or indirectly and probably should be removed. Fire spikes amount is counted wrong though (allows one more spike): https://gitlab.com/cthscr/mmmerge/-/commit/8ac3f8a625c98ea026753a1082ebc937a5578b66
  5. Looks like finishing MMExtension quest in sub-quest will not clear QBit set in base quest. I hadn't found mentions about it in help if it's intended behavior.

Bonus.
A. Usage of Town Portal scroll reduces player's SP. Fix: https://gitlab.com/cthscr/mmmerge/-/commit/ca31939af269f27ee8ae0a43a52d1934477f34fb (0x51D818 is used to store caster id as byte, following 3 bytes are align to 4.)
B. [Previously non-checked] Party Shield spell buff fix: https://gitlab.com/cthscr/mmmerge/-/commit/4b4e97d888bce59b2acc42e35bd8f122c70df608

MM7 Indoor maps reset every time you leave them

MMExtension as of commit 3cda120 (2023-01-01) applied to MM7 with MM7Patch 2.5.7 resets indoor maps every time you leave dungeon. Happened to other users as well.
Issue is not present at commit 74e8d73 (2022-04-20).
My reproducing: enter previously cleared Castle Harmondale, leave it, load autosave (or reenter).

Newest MMEditor: faulty doors processing

Upon openning indoor maps with newest editor, doors take wrong position and move into wrong direction on pressing "Door State" button. Compiling map causes this error to present in the game (means, just openning and compiling map without changes will break it anyway).
Error present in clean installation of MM8 + mmextension and mmeditor.
Abandoned temple looks like this: https://imgbb.com/VSD8vbv

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.