Author Topic: Bugfixes and Queries  (Read 13664 times)

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Bugfixes and Queries
« on: 2015-02-20 00:52:25 »
Rather than keep creating threads for every single fix/question, I may as well use this one.


Wallmarket Scroll Fix

I have no idea how I forgot that Dziugo had fixed this issue when I asked him (back in 2012).  For others wanting to fix the broken scrolling here is what he said:

Ok, instead of PM-ing you, I'll post it here for reference. There is no bug in the code! Square made a mistake when creating the script. To fix it, open flevel.lgp with flevel editor (Makou Reactor is great!), go to file mrkt2, group "camera" (Id=3), Script1 and change:
Code: [Select]
Scroll to location (X=0, Y=-240, speed=470)Into:
Code: [Select]
Scroll to location (X=0, Y=-240, speed=480)The panning is from 240 to -240 which gives you 480 "pixels", but the length of the animation is set to 470. So it skips sometimes to end it at -240 when the timer hits 470. Changing it to 480 fixes it.

Here is the log from debugger (logging Y value):
Code: [Select]
00643F7A  LOG:  0F0 (240.)
00643F7A  LOG:  0EF (239.)
00643F7A  LOG:  0EE (238.)
00643F7A  LOG:  0ED (237.)
00643F7A  LOG:  0EC (236.)
00643F7A  LOG:  0EB (235.)
00643F7A  LOG:  0EA (234.)
00643F7A  LOG:  0E9 (233.)
00643F7A  LOG:  0E8 (232.)
00643F7A  LOG:  0E7 (231.)
00643F7A  LOG:  0E6 (230.)
00643F7A  LOG:  0E5 (229.)
00643F7A  LOG:  0E4 (228.)
00643F7A  LOG:  0E3 (227.)
00643F7A  LOG:  0E2 (226.)
00643F7A  LOG:  0E1 (225.)
00643F7A  LOG:  0E0 (224.)
00643F7A  LOG:  0DF (223.)
00643F7A  LOG:  0DE (222.)
00643F7A  LOG:  0DD (221.)
00643F7A  LOG:  0DC (220.)
00643F7A  LOG:  0DB (219.)
00643F7A  LOG:  0DA (218.)
00643F7A  LOG:  0D9 (217.)
00643F7A  LOG:  0D8 (216.)
00643F7A  LOG:  0D7 (215.)
00643F7A  LOG:  0D6 (214.)
00643F7A  LOG:  0D5 (213.)
00643F7A  LOG:  0D4 (212.)
00643F7A  LOG:  0D3 (211.)
00643F7A  LOG:  0D2 (210.)
00643F7A  LOG:  0D1 (209.)
00643F7A  LOG:  0D0 (208.)
00643F7A  LOG:  0CF (207.)
00643F7A  LOG:  0CE (206.)
00643F7A  LOG:  0CD (205.)
00643F7A  LOG:  0CC (204.)
00643F7A  LOG:  0CB (203.)
00643F7A  LOG:  0CA (202.)
00643F7A  LOG:  0C9 (201.)
00643F7A  LOG:  0C8 (200.)
00643F7A  LOG:  0C7 (199.)
00643F7A  LOG:  0C6 (198.)
00643F7A  LOG:  0C5 (197.)
00643F7A  LOG:  0C4 (196.)
00643F7A  LOG:  0C3 (195.)
00643F7A  LOG:  0C2 (194.)
---
00643F7A  LOG:  0C0 (192.)
00643F7A  LOG:  0BF (191.)
00643F7A  LOG:  0BE (190.)
00643F7A  LOG:  0BD (189.)
00643F7A  LOG:  0BC (188.)
00643F7A  LOG:  0BB (187.)
00643F7A  LOG:  0BA (186.)
00643F7A  LOG:  0B9 (185.)
00643F7A  LOG:  0B8 (184.)
00643F7A  LOG:  0B7 (183.)
00643F7A  LOG:  0B6 (182.)
00643F7A  LOG:  0B5 (181.)
00643F7A  LOG:  0B4 (180.)
00643F7A  LOG:  0B3 (179.)
00643F7A  LOG:  0B2 (178.)
00643F7A  LOG:  0B1 (177.)
00643F7A  LOG:  0B0 (176.)
00643F7A  LOG:  0AF (175.)
00643F7A  LOG:  0AE (174.)
00643F7A  LOG:  0AD (173.)
00643F7A  LOG:  0AC (172.)
00643F7A  LOG:  0AB (171.)
00643F7A  LOG:  0AA (170.)
00643F7A  LOG:  0A9 (169.)
00643F7A  LOG:  0A8 (168.)
00643F7A  LOG:  0A7 (167.)
00643F7A  LOG:  0A6 (166.)
00643F7A  LOG:  0A5 (165.)
00643F7A  LOG:  0A4 (164.)
00643F7A  LOG:  0A3 (163.)
00643F7A  LOG:  0A2 (162.)
00643F7A  LOG:  0A1 (161.)
00643F7A  LOG:  0A0 (160.)
00643F7A  LOG:  9F (159.)
00643F7A  LOG:  9E (158.)
00643F7A  LOG:  9D (157.)
00643F7A  LOG:  9C (156.)
00643F7A  LOG:  9B (155.)
00643F7A  LOG:  9A (154.)
00643F7A  LOG:  99 (153.)
00643F7A  LOG:  98 (152.)
00643F7A  LOG:  97 (151.)
00643F7A  LOG:  96 (150.)
00643F7A  LOG:  95 (149.)
00643F7A  LOG:  94 (148.)
00643F7A  LOG:  93 (147.)
00643F7A  LOG:  92 (146.)
---
00643F7A  LOG:  90 (144.)
00643F7A  LOG:  8F (143.)
00643F7A  LOG:  8E (142.)
00643F7A  LOG:  8D (141.)
00643F7A  LOG:  8C (140.)
00643F7A  LOG:  8B (139.)
00643F7A  LOG:  8A (138.)
00643F7A  LOG:  89 (137.)
00643F7A  LOG:  88 (136.)
00643F7A  LOG:  87 (135.)
00643F7A  LOG:  86 (134.)
00643F7A  LOG:  85 (133.)
00643F7A  LOG:  84 (132.)
00643F7A  LOG:  83 (131.)
00643F7A  LOG:  82 (130.)
00643F7A  LOG:  81 (129.)
00643F7A  LOG:  80 (128.)
00643F7A  LOG:  7F (127.)
00643F7A  LOG:  7E (126.)
00643F7A  LOG:  7D (125.)
00643F7A  LOG:  7C (124.)
00643F7A  LOG:  7B (123.)
00643F7A  LOG:  7A (122.)
00643F7A  LOG:  79 (121.)
00643F7A  LOG:  78 (120.)
00643F7A  LOG:  77 (119.)
00643F7A  LOG:  76 (118.)
00643F7A  LOG:  75 (117.)
00643F7A  LOG:  74 (116.)
00643F7A  LOG:  73 (115.)
00643F7A  LOG:  72 (114.)
00643F7A  LOG:  71 (113.)
00643F7A  LOG:  70 (112.)
00643F7A  LOG:  6F (111.)
00643F7A  LOG:  6E (110.)
00643F7A  LOG:  6D (109.)
00643F7A  LOG:  6C (108.)
00643F7A  LOG:  6B (107.)
00643F7A  LOG:  6A (106.)
00643F7A  LOG:  69 (105.)
00643F7A  LOG:  68 (104.)
00643F7A  LOG:  67 (103.)
00643F7A  LOG:  66 (102.)
00643F7A  LOG:  65 (101.)
00643F7A  LOG:  64 (100.)
00643F7A  LOG:  63 (99.)
00643F7A  LOG:  62 (98.)
---
00643F7A  LOG:  60 (96.)
00643F7A  LOG:  5F (95.)
00643F7A  LOG:  5E (94.)
00643F7A  LOG:  5D (93.)
00643F7A  LOG:  5C (92.)
00643F7A  LOG:  5B (91.)
00643F7A  LOG:  5A (90.)
00643F7A  LOG:  59 (89.)
00643F7A  LOG:  58 (88.)
00643F7A  LOG:  57 (87.)
00643F7A  LOG:  56 (86.)
00643F7A  LOG:  55 (85.)
00643F7A  LOG:  54 (84.)
00643F7A  LOG:  53 (83.)
00643F7A  LOG:  52 (82.)
00643F7A  LOG:  51 (81.)
00643F7A  LOG:  50 (80.)
00643F7A  LOG:  4F (79.)
00643F7A  LOG:  4E (78.)
00643F7A  LOG:  4D (77.)
00643F7A  LOG:  4C (76.)
00643F7A  LOG:  4B (75.)
00643F7A  LOG:  4A (74.)
00643F7A  LOG:  49 (73.)
00643F7A  LOG:  48 (72.)
00643F7A  LOG:  47 (71.)
00643F7A  LOG:  46 (70.)
00643F7A  LOG:  45 (69.)
00643F7A  LOG:  44 (68.)
00643F7A  LOG:  43 (67.)
00643F7A  LOG:  42 (66.)
00643F7A  LOG:  41 (65.)
00643F7A  LOG:  40 (64.)
00643F7A  LOG:  3F (63.)
00643F7A  LOG:  3E (62.)
00643F7A  LOG:  3D (61.)
00643F7A  LOG:  3C (60.)
00643F7A  LOG:  3B (59.)
00643F7A  LOG:  3A (58.)
00643F7A  LOG:  39 (57.)
00643F7A  LOG:  38 (56.)
00643F7A  LOG:  37 (55.)
00643F7A  LOG:  36 (54.)
00643F7A  LOG:  35 (53.)
00643F7A  LOG:  34 (52.)
00643F7A  LOG:  33 (51.)
00643F7A  LOG:  32 (50.)
---
00643F7A  LOG:  30 (48.)
00643F7A  LOG:  2F (47.)
00643F7A  LOG:  2E (46.)
00643F7A  LOG:  2D (45.)
00643F7A  LOG:  2C (44.)
00643F7A  LOG:  2B (43.)
00643F7A  LOG:  2A (42.)
00643F7A  LOG:  29 (41.)
00643F7A  LOG:  28 (40.)
00643F7A  LOG:  27 (39.)
00643F7A  LOG:  26 (38.)
00643F7A  LOG:  25 (37.)
00643F7A  LOG:  24 (36.)
00643F7A  LOG:  23 (35.)
00643F7A  LOG:  22 (34.)
00643F7A  LOG:  21 (33.)
00643F7A  LOG:  20 (32.)
00643F7A  LOG:  1F (31.)
00643F7A  LOG:  1E (30.)
00643F7A  LOG:  1D (29.)
00643F7A  LOG:  1C (28.)
00643F7A  LOG:  1B (27.)
00643F7A  LOG:  1A (26.)
00643F7A  LOG:  19 (25.)
00643F7A  LOG:  18 (24.)
00643F7A  LOG:  17 (23.)
00643F7A  LOG:  16 (22.)
00643F7A  LOG:  15 (21.)
00643F7A  LOG:  14 (20.)
00643F7A  LOG:  13 (19.)
00643F7A  LOG:  12 (18.)
00643F7A  LOG:  11 (17.)
00643F7A  LOG:  10 (16.)
00643F7A  LOG:  0F (15.)
00643F7A  LOG:  0E (14.)
00643F7A  LOG:  0D (13.)
00643F7A  LOG:  0C (12.)
00643F7A  LOG:  0B (11.)
00643F7A  LOG:  0A (10.)
00643F7A  LOG:  9
00643F7A  LOG:  8
00643F7A  LOG:  7
00643F7A  LOG:  6
00643F7A  LOG:  5
00643F7A  LOG:  4
00643F7A  LOG:  3
00643F7A  LOG:  2
---
00643F7A  LOG:  0
00643F7A  LOG:  FFFFFFFF (4294967295.)
00643F7A  LOG:  FFFFFFFE (4294967294.)
00643F7A  LOG:  FFFFFFFD (4294967293.)
00643F7A  LOG:  FFFFFFFC (4294967292.)
00643F7A  LOG:  FFFFFFFB (4294967291.)
00643F7A  LOG:  FFFFFFFA (4294967290.)
00643F7A  LOG:  FFFFFFF9 (4294967289.)
00643F7A  LOG:  FFFFFFF8 (4294967288.)
00643F7A  LOG:  FFFFFFF7 (4294967287.)
00643F7A  LOG:  FFFFFFF6 (4294967286.)
00643F7A  LOG:  FFFFFFF5 (4294967285.)
00643F7A  LOG:  FFFFFFF4 (4294967284.)
00643F7A  LOG:  FFFFFFF3 (4294967283.)
00643F7A  LOG:  FFFFFFF2 (4294967282.)
00643F7A  LOG:  FFFFFFF1 (4294967281.)
00643F7A  LOG:  FFFFFFF0 (4294967280.)
00643F7A  LOG:  FFFFFFEF (4294967279.)
00643F7A  LOG:  FFFFFFEE (4294967278.)
00643F7A  LOG:  FFFFFFED (4294967277.)
00643F7A  LOG:  FFFFFFEC (4294967276.)
00643F7A  LOG:  FFFFFFEB (4294967275.)
00643F7A  LOG:  FFFFFFEA (4294967274.)
00643F7A  LOG:  FFFFFFE9 (4294967273.)
00643F7A  LOG:  FFFFFFE8 (4294967272.)
00643F7A  LOG:  FFFFFFE7 (4294967271.)
00643F7A  LOG:  FFFFFFE6 (4294967270.)
00643F7A  LOG:  FFFFFFE5 (4294967269.)
00643F7A  LOG:  FFFFFFE4 (4294967268.)
00643F7A  LOG:  FFFFFFE3 (4294967267.)
00643F7A  LOG:  FFFFFFE2 (4294967266.)
00643F7A  LOG:  FFFFFFE1 (4294967265.)
00643F7A  LOG:  FFFFFFE0 (4294967264.)
00643F7A  LOG:  FFFFFFDF (4294967263.)
00643F7A  LOG:  FFFFFFDE (4294967262.)
00643F7A  LOG:  FFFFFFDD (4294967261.)
00643F7A  LOG:  FFFFFFDC (4294967260.)
00643F7A  LOG:  FFFFFFDB (4294967259.)
00643F7A  LOG:  FFFFFFDA (4294967258.)
00643F7A  LOG:  FFFFFFD9 (4294967257.)
00643F7A  LOG:  FFFFFFD8 (4294967256.)
00643F7A  LOG:  FFFFFFD7 (4294967255.)
00643F7A  LOG:  FFFFFFD6 (4294967254.)
00643F7A  LOG:  FFFFFFD5 (4294967253.)
00643F7A  LOG:  FFFFFFD4 (4294967252.)
00643F7A  LOG:  FFFFFFD3 (4294967251.)
00643F7A  LOG:  FFFFFFD2 (4294967250.)
---
00643F7A  LOG:  FFFFFFD0 (4294967248.)
00643F7A  LOG:  FFFFFFCF (4294967247.)
00643F7A  LOG:  FFFFFFCE (4294967246.)
00643F7A  LOG:  FFFFFFCD (4294967245.)
00643F7A  LOG:  FFFFFFCC (4294967244.)
00643F7A  LOG:  FFFFFFCB (4294967243.)
00643F7A  LOG:  FFFFFFCA (4294967242.)
00643F7A  LOG:  FFFFFFC9 (4294967241.)
00643F7A  LOG:  FFFFFFC8 (4294967240.)
00643F7A  LOG:  FFFFFFC7 (4294967239.)
00643F7A  LOG:  FFFFFFC6 (4294967238.)
00643F7A  LOG:  FFFFFFC5 (4294967237.)
00643F7A  LOG:  FFFFFFC4 (4294967236.)
00643F7A  LOG:  FFFFFFC3 (4294967235.)
00643F7A  LOG:  FFFFFFC2 (4294967234.)
00643F7A  LOG:  FFFFFFC1 (4294967233.)
00643F7A  LOG:  FFFFFFC0 (4294967232.)
00643F7A  LOG:  FFFFFFBF (4294967231.)
00643F7A  LOG:  FFFFFFBE (4294967230.)
00643F7A  LOG:  FFFFFFBD (4294967229.)
00643F7A  LOG:  FFFFFFBC (4294967228.)
00643F7A  LOG:  FFFFFFBB (4294967227.)
00643F7A  LOG:  FFFFFFBA (4294967226.)
00643F7A  LOG:  FFFFFFB9 (4294967225.)
00643F7A  LOG:  FFFFFFB8 (4294967224.)
00643F7A  LOG:  FFFFFFB7 (4294967223.)
00643F7A  LOG:  FFFFFFB6 (4294967222.)
00643F7A  LOG:  FFFFFFB5 (4294967221.)
00643F7A  LOG:  FFFFFFB4 (4294967220.)
00643F7A  LOG:  FFFFFFB3 (4294967219.)
00643F7A  LOG:  FFFFFFB2 (4294967218.)
00643F7A  LOG:  FFFFFFB1 (4294967217.)
00643F7A  LOG:  FFFFFFB0 (4294967216.)
00643F7A  LOG:  FFFFFFAF (4294967215.)
00643F7A  LOG:  FFFFFFAE (4294967214.)
00643F7A  LOG:  FFFFFFAD (4294967213.)
00643F7A  LOG:  FFFFFFAC (4294967212.)
00643F7A  LOG:  FFFFFFAB (4294967211.)
00643F7A  LOG:  FFFFFFAA (4294967210.)
00643F7A  LOG:  FFFFFFA9 (4294967209.)
00643F7A  LOG:  FFFFFFA8 (4294967208.)
00643F7A  LOG:  FFFFFFA7 (4294967207.)
00643F7A  LOG:  FFFFFFA6 (4294967206.)
00643F7A  LOG:  FFFFFFA5 (4294967205.)
00643F7A  LOG:  FFFFFFA4 (4294967204.)
00643F7A  LOG:  FFFFFFA3 (4294967203.)
00643F7A  LOG:  FFFFFFA2 (4294967202.)
---
00643F7A  LOG:  FFFFFFA0 (4294967200.)
00643F7A  LOG:  FFFFFF9F (4294967199.)
00643F7A  LOG:  FFFFFF9E (4294967198.)
00643F7A  LOG:  FFFFFF9D (4294967197.)
00643F7A  LOG:  FFFFFF9C (4294967196.)
00643F7A  LOG:  FFFFFF9B (4294967195.)
00643F7A  LOG:  FFFFFF9A (4294967194.)
00643F7A  LOG:  FFFFFF99 (4294967193.)
00643F7A  LOG:  FFFFFF98 (4294967192.)
00643F7A  LOG:  FFFFFF97 (4294967191.)
00643F7A  LOG:  FFFFFF96 (4294967190.)
00643F7A  LOG:  FFFFFF95 (4294967189.)
00643F7A  LOG:  FFFFFF94 (4294967188.)
00643F7A  LOG:  FFFFFF93 (4294967187.)
00643F7A  LOG:  FFFFFF92 (4294967186.)
00643F7A  LOG:  FFFFFF91 (4294967185.)
00643F7A  LOG:  FFFFFF90 (4294967184.)
00643F7A  LOG:  FFFFFF8F (4294967183.)
00643F7A  LOG:  FFFFFF8E (4294967182.)
00643F7A  LOG:  FFFFFF8D (4294967181.)
00643F7A  LOG:  FFFFFF8C (4294967180.)
00643F7A  LOG:  FFFFFF8B (4294967179.)
00643F7A  LOG:  FFFFFF8A (4294967178.)
00643F7A  LOG:  FFFFFF89 (4294967177.)
00643F7A  LOG:  FFFFFF88 (4294967176.)
00643F7A  LOG:  FFFFFF87 (4294967175.)
00643F7A  LOG:  FFFFFF86 (4294967174.)
00643F7A  LOG:  FFFFFF85 (4294967173.)
00643F7A  LOG:  FFFFFF84 (4294967172.)
00643F7A  LOG:  FFFFFF83 (4294967171.)
00643F7A  LOG:  FFFFFF82 (4294967170.)
00643F7A  LOG:  FFFFFF81 (4294967169.)
00643F7A  LOG:  FFFFFF80 (4294967168.)
00643F7A  LOG:  FFFFFF7F (4294967167.)
00643F7A  LOG:  FFFFFF7E (4294967166.)
00643F7A  LOG:  FFFFFF7D (4294967165.)
00643F7A  LOG:  FFFFFF7C (4294967164.)
00643F7A  LOG:  FFFFFF7B (4294967163.)
00643F7A  LOG:  FFFFFF7A (4294967162.)
00643F7A  LOG:  FFFFFF79 (4294967161.)
00643F7A  LOG:  FFFFFF78 (4294967160.)
00643F7A  LOG:  FFFFFF77 (4294967159.)
00643F7A  LOG:  FFFFFF76 (4294967158.)
00643F7A  LOG:  FFFFFF75 (4294967157.)
00643F7A  LOG:  FFFFFF74 (4294967156.)
00643F7A  LOG:  FFFFFF73 (4294967155.)
00643F7A  LOG:  FFFFFF72 (4294967154.)
---
00643F7A  LOG:  FFFFFF70 (4294967152.)
00643F7A  LOG:  FFFFFF6F (4294967151.)
00643F7A  LOG:  FFFFFF6E (4294967150.)
00643F7A  LOG:  FFFFFF6D (4294967149.)
00643F7A  LOG:  FFFFFF6C (4294967148.)
00643F7A  LOG:  FFFFFF6B (4294967147.)
00643F7A  LOG:  FFFFFF6A (4294967146.)
00643F7A  LOG:  FFFFFF69 (4294967145.)
00643F7A  LOG:  FFFFFF68 (4294967144.)
00643F7A  LOG:  FFFFFF67 (4294967143.)
00643F7A  LOG:  FFFFFF66 (4294967142.)
00643F7A  LOG:  FFFFFF65 (4294967141.)
00643F7A  LOG:  FFFFFF64 (4294967140.)
00643F7A  LOG:  FFFFFF63 (4294967139.)
00643F7A  LOG:  FFFFFF62 (4294967138.)
00643F7A  LOG:  FFFFFF61 (4294967137.)
00643F7A  LOG:  FFFFFF60 (4294967136.)
00643F7A  LOG:  FFFFFF5F (4294967135.)
00643F7A  LOG:  FFFFFF5E (4294967134.)
00643F7A  LOG:  FFFFFF5D (4294967133.)
00643F7A  LOG:  FFFFFF5C (4294967132.)
00643F7A  LOG:  FFFFFF5B (4294967131.)
00643F7A  LOG:  FFFFFF5A (4294967130.)
00643F7A  LOG:  FFFFFF59 (4294967129.)
00643F7A  LOG:  FFFFFF58 (4294967128.)
00643F7A  LOG:  FFFFFF57 (4294967127.)
00643F7A  LOG:  FFFFFF56 (4294967126.)
00643F7A  LOG:  FFFFFF55 (4294967125.)
00643F7A  LOG:  FFFFFF54 (4294967124.)
00643F7A  LOG:  FFFFFF53 (4294967123.)
00643F7A  LOG:  FFFFFF52 (4294967122.)
00643F7A  LOG:  FFFFFF51 (4294967121.)
00643F7A  LOG:  FFFFFF50 (4294967120.)
00643F7A  LOG:  FFFFFF4F (4294967119.)
00643F7A  LOG:  FFFFFF4E (4294967118.)
00643F7A  LOG:  FFFFFF4D (4294967117.)
00643F7A  LOG:  FFFFFF4C (4294967116.)
00643F7A  LOG:  FFFFFF4B (4294967115.)
00643F7A  LOG:  FFFFFF4A (4294967114.)
00643F7A  LOG:  FFFFFF49 (4294967113.)
00643F7A  LOG:  FFFFFF48 (4294967112.)
00643F7A  LOG:  FFFFFF47 (4294967111.)
00643F7A  LOG:  FFFFFF46 (4294967110.)
00643F7A  LOG:  FFFFFF45 (4294967109.)
00643F7A  LOG:  FFFFFF44 (4294967108.)
00643F7A  LOG:  FFFFFF43 (4294967107.)
00643F7A  LOG:  FFFFFF42 (4294967106.)
---
00643F7A  LOG:  FFFFFF40 (4294967104.)
00643F7A  LOG:  FFFFFF3F (4294967103.)
00643F7A  LOG:  FFFFFF3E (4294967102.)
00643F7A  LOG:  FFFFFF3D (4294967101.)
00643F7A  LOG:  FFFFFF3C (4294967100.)
00643F7A  LOG:  FFFFFF3B (4294967099.)
00643F7A  LOG:  FFFFFF3A (4294967098.)
00643F7A  LOG:  FFFFFF39 (4294967097.)
00643F7A  LOG:  FFFFFF38 (4294967096.)
00643F7A  LOG:  FFFFFF37 (4294967095.)
00643F7A  LOG:  FFFFFF36 (4294967094.)
00643F7A  LOG:  FFFFFF35 (4294967093.)
00643F7A  LOG:  FFFFFF34 (4294967092.)
00643F7A  LOG:  FFFFFF33 (4294967091.)
00643F7A  LOG:  FFFFFF32 (4294967090.)
00643F7A  LOG:  FFFFFF31 (4294967089.)
00643F7A  LOG:  FFFFFF30 (4294967088.)
00643F7A  LOG:  FFFFFF2F (4294967087.)
00643F7A  LOG:  FFFFFF2E (4294967086.)
00643F7A  LOG:  FFFFFF2D (4294967085.)
00643F7A  LOG:  FFFFFF2C (4294967084.)
00643F7A  LOG:  FFFFFF2B (4294967083.)
00643F7A  LOG:  FFFFFF2A (4294967082.)
00643F7A  LOG:  FFFFFF29 (4294967081.)
00643F7A  LOG:  FFFFFF28 (4294967080.)
00643F7A  LOG:  FFFFFF27 (4294967079.)
00643F7A  LOG:  FFFFFF26 (4294967078.)
00643F7A  LOG:  FFFFFF25 (4294967077.)
00643F7A  LOG:  FFFFFF24 (4294967076.)
00643F7A  LOG:  FFFFFF23 (4294967075.)
00643F7A  LOG:  FFFFFF22 (4294967074.)
00643F7A  LOG:  FFFFFF21 (4294967073.)
00643F7A  LOG:  FFFFFF20 (4294967072.)
00643F7A  LOG:  FFFFFF1F (4294967071.)
00643F7A  LOG:  FFFFFF1E (4294967070.)
00643F7A  LOG:  FFFFFF1D (4294967069.)
00643F7A  LOG:  FFFFFF1C (4294967068.)
00643F7A  LOG:  FFFFFF1B (4294967067.)
00643F7A  LOG:  FFFFFF1A (4294967066.)
00643F7A  LOG:  FFFFFF19 (4294967065.)
00643F7A  LOG:  FFFFFF18 (4294967064.)
00643F7A  LOG:  FFFFFF17 (4294967063.)
00643F7A  LOG:  FFFFFF16 (4294967062.)
00643F7A  LOG:  FFFFFF15 (4294967061.)
00643F7A  LOG:  FFFFFF14 (4294967060.)
00643F7A  LOG:  FFFFFF13 (4294967059.)
00643F7A  LOG:  FFFFFF12 (4294967058.)
---
00643F7A  LOG:  FFFFFF10 (4294967056.)
I've marked missing values with ---, that's where you see the skip. I've looked at the PSX version at YouTube and it's there too.

You can fix it without modifying flevel.lgp by hooking the opcode and correcting the steps value on the fly. Sorry, it was that simple. FPS bug is elsewhere.

As a side note, memory offsets in the 2012 release are the same as the 1998 one (1.02 ff7.exe), so anything that doesn't rely on the opengl thing should work if the patcher is not picky (again, the one working in the memory - to patch the file you'd either have to adaptively patch or make the static AF3DN linking to old exe described in the other thread).

You also need to change the "wait frames" from 2 to 1.
« Last Edit: 2015-03-17 00:03:16 by DLPB »

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Wallmarket / Other scroll skipping issue - FIXED
« Reply #1 on: 2015-02-20 18:06:43 »
Need confirmation on whether this works.  It is likely something to do with script here.

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #2 on: 2015-03-05 22:34:24 »
Materia Caves

There is a bug with the four Materia Caves because they've used location lines to determine if user can pick up the item.  This can sometimes fail and mean the item is missed.

There is an easier way to do this than the convoluted way it has been done originally - use a hidden NPC model.  I spotted this approach to the problem in the Train Graveyard. The items inside the barrels are actually a hidden NPC model in the same place as the graphic.  Nifty.

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
W-Item Bug
« Reply #3 on: 2015-03-16 22:56:51 »
NFITC1 said somewhere that this bug was harder to fix than you'd expect. I have just noticed that there is more than one bug here too. 

1. W-Item can be used to repopulate the inventory
2. If you cancel the menu after using one item, it is lost forever.

It is very easy to stop W-Item bug 1 by 006DB67F = 80 C1 00 (or extending the jump above it).

It will, at least, stop the duplications.  I am going to have a quick look to see if 2 can be fixed properly.       

Yup, I can't be bothered with that mess.  Looks like the second bug will remain for the moment, but no more repopulating at least ;)

I think what needs to happen is the jump at 6DB650 being extended to 6DB682, and whatever part closes the menu after using the first item needs to invoke the part that is skipped by the new jump (which adds the item back).
« Last Edit: 2015-03-16 23:22:19 by DLPB »

Kaldarasha

  • No life
  • *
  • Posts: 2138
  • Karma: 129
  • Prince of Model Editing
    • View Profile
Re: Bugfixes and Queries
« Reply #4 on: 2015-03-17 06:06:34 »
NFITC1 said somewhere that this bug was harder to fix than you'd expect. I have just noticed that there is more than one bug here too. 

1. W-Item can be used to repopulate the inventory
2. If you cancel the menu after using one item, it is lost forever.

It is very easy to stop W-Item bug 1 by 006DB67F = 80 C1 00 (or extending the jump above it).

It will, at least, stop the duplications.  I am going to have a quick look to see if 2 can be fixed properly.       

Yup, I can't be bothered with that mess.  Looks like the second bug will remain for the moment, but no more repopulating at least ;)

I think what needs to happen is the jump at 6DB650 being extended to 6DB682, and whatever part closes the menu after using the first item needs to invoke the part that is skipped by the new jump (which adds the item back).

You know that you will make many people mad with that? Good to see that it is fixed now. It is really hard to resist and not to abuse this bug. ::)

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #5 on: 2015-03-30 22:41:52 »
Does anyone really understand how this works?  I've read Terence guide on stat increases, but as per my convo with NFITC1, it seems WM does not give accurate curve depiction (which is essential for Weapon... I need to know exactly how much a stat will increase at each level).

Take the following:

http://i.imgur.com/r8nZzFJ.png

How do the red areas interact?  What is their relationship?  Both are for MP in Weapon.

At the moment, WM shows that Cloud will gain a maximum of 100 MP over 99 levels... but on his first level increase, despite WM showing a 1 MP increase, it actually adds 10.


Unless there is some "minimum" thing that the game checks.
« Last Edit: 2015-03-31 03:20:24 by DLPB »

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #6 on: 2015-03-30 22:51:55 »
There IS a minimum check... of 10.

See 5CB7C5, for example.  How ferning irritating.

I understand how the stats work now.  It sucks, like everything else.
« Last Edit: 2015-03-31 03:20:59 by DLPB »

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #7 on: 2015-04-02 02:22:48 »
Need help.  I'm getting there... somehow.

FF7 is programmed needlessly complicated.... it really is.  I am currently trying to reprogram the way battle speed is used.  See... *sigh* the developers of FF7 decided to make this a mess and I need proper values to work with so I can gauge how strong an enemy should be at a given time.  Sadly, even enemy speed is different to how character speed is determined, and both use another timer as well as relationship between them to decide how fast a character is.  And even that's CRAP.

What I need is this:

Cloud Dexterity = 100 = twice as fast as 50.  No ifs, no buts. Cloud at 100 dex should make his bar move twice as fast as it did at 50.

Enemy dex = 100 = twice as fast as 50.  Same as above.  And totally equivalent of Cloud's speed.

This means that if both characters have dex of 100, their bars will fill up at the same time, and if both are 50... they will fill up at same time.

Also, each character's bar should be totally dependent on their overall dex and in NO WAY related to the overall dex of the party.

Just look at this NONSENSE >>

http://www.gamefaqs.com/ps/197341-final-fantasy-vii/faqs/22395

Quote
---  --------------
2.5  The Turn Timer
---  --------------
Finally, the Turn Timer.  This is the most complicated of the four timers,
since it is based around the relative Dex stats of the combatants.

First, we must find the normal value: the base Dex to be used for this
battle.  This is calculated by taking the average *BASE* Dexterity of all
three combatants in your Battle Party, making sure to round up any fractions.
Finally, we add 50 to this average.  We call this the Normal Speed.

For example, if you enter battle with Cloud at 31 Agi and Barret at 24 Agi,
then the Normal Speed would be:

                Normal Speed = RU((31 + 24) / 2) + 50
                             = RU(55 / 2) + 50
                             = RU(27.5) + 50
                             = 28 + 50
                             = 78


Keep in mind that only *BASE* Dexterity counts for Normal Speed.  The use of
Speed Sources, Materia and Dex-altering abilities or equipment do *NOT* count
towards this value.


Now, the amount your Turn Timer increases by revolves around the V-Timer.  As
such, the Turn Timer will also pause when the V-Timer pauses, and change
speed when the V-Timer does so.

Furthermore, the amount of increase you get is different from party members
to monsters.  Your party members get the following increase:

  Turn Timer Increase = [(Total Dex + 50) * V-Timer Increase / Normal Speed]


While monsters get this per tick instead:

        Turn Timer Increase = [Dex * V-Timer Increase / Normal Speed]


If you've noticed that enemies seem to have rather high Dex values, this is
why.  Also, while Sources, Materia and Equipment are not used for Normal
Speed, they *are* used to calculate your Total Dex - so the use of Sources
will make you much much faster than normal.

Finally, the Turn Timer itself (but not the V- or C-Timers) will be halted
under the following statuses: Paralysed, Petrify and Sleep.



You'll find that unless you use a lot of Sources or Dex-increasing items,
your Turn Timer Increase will tend to be very close to your V-Timer Increase;
after all, we're dividing your character's 'Dex + 50' by the party's average
'Dex + 50'.  This also means that no matter what your level, you will seem
to get your turns just as quickly as you used to.

However, as you achieve higher Dex ratings, it will begin to appear to you
that the monsters are moving *SLOWER* than they used to.  A L6 Cloud only has
a Dex of 6, while a L99 Cloud has an average Dex of 59.  Going by what we
know about the Turn Timer now, this means that the L99 Cloud is almost twice
as fast as the L6 Cloud.  However, to you, it'll likely look like the exact
same speed as before.  Instead, the *monsters* will be moving twice as slow
to you.

One final thing we'll look at in detail is the use of Sources or Dex-
modifying equipment here.  As stated, our L99 Cloud has an average Dex of 59.
Using Sources, we can increase his total Dex up to a nice total of 255.
Cloud with 255 Dex is 2.8x faster than when he was at 59 Dex.  However,
unlike the natural growth, we will *see* his Turn Timer increasing that much
faster, since the Normal Speed hasn't changed.  Understanding this is one of
the keys to understanding how the four different timers interact.

This is one of the reasons the original difficulty SUCKS.  The people in charge of modifying all the stats had an impossible job of gauging what difference each stat made to the overall battle.  Already I've had to reprogram the needlessly complicated damage equations for the same reason.

So, how the heck am I going to achieve this...  Is it doable?
« Last Edit: 2015-04-02 04:37:29 by DLPB »

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #8 on: 2015-04-02 08:19:05 »
I managed it....  Terence's guide is a bit more confusing than it needs to be also. 

Assuming I haven't wrecked something, I now have a situation where dexterity is all that matters to the normal turn time.

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #9 on: 2015-04-03 05:06:44 »
It's taken god knows how long, but I've done it.  Here are the differences:

1. The constant timer really will be constant (4096/68).  A second will be a second when you are in a status.  So Stop will last a fixed length of time, so will sleep, so will death sentence and so on.  They will all use the constant timer.  Originally, the constant timer could be altered with Haste, stop and Slow... no more. Active time battle is forced. The battle also has a set speed that cannot be altered.

2. The global timer and main timer will also be a constant time value (8192 / 136) and the ability to change speed in config disabled.

3. V-timer is abolished for the Turn Timer calcs and made constant  (8192 / 136) .

4.  The Turn Timer is now all-powerful and relies 100% on Dexterity stat.

I have created a set of simple calculations to determine how long the next turn will take:

Code: [Select]
Seconds until turn = 1092 / ( (dexterity + 44) * 4)
This means that at a Dex of 1

Code: [Select]
Seconds until Turn = 1092 /( (1+44) * 4) = 6 Seconds until turn.
The Haste and Slow functions have been incorporated into my new function also.

The full equation for Slow is:
Code: [Select]
Time for Turn = 1092 / ( Dex + 44 * 4 * (48 / 32) )

The full equation for Haste is:
Code: [Select]
Time for Turn = 1092 / ( Dex + 44 * 4 * (24 / 32) )

I had to totally rewrite a function to make all this work, and I am guessing it will need some more additions in time.  For example, function checks for death and resets timer to 0.

I have simplified the above equations by balancing it out.  In other words, 1092 comes from 65535 / 60.  Trust me... it works.

Enemies also now use these formulas... so the dex stat for enemy is fair and consistent with characters.  Battles now have a fixed, real-time flow to them.

« Last Edit: 2015-04-03 19:19:15 by DLPB »

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #10 on: 2015-04-04 03:09:37 »
Just for documentation, the time that certain effects wear off are held in a table (one byte each) starting 7B74F0 and accessed from 433B63.
These are as follows:

Code: [Select]
Stop: 7B74F0
Paralysis: 7B74F1
Death Sentence: 7B74F2
Slow Numb: 7B74F3
Barrier: 7B74F4
M-Barrier: 7B74F5
Poison: 7B74F6*
Sleep: 7B74F7
Regen: 7B74F8
Shield: 7B74FA
Peerless: 7B74FB

*Poison's value is how long it takes to deduct HP

The maximum time is 255 seconds, but the timer display on screen is programmed to work with 60 as a maximum (for Death-Sentence and Slow Numb).
« Last Edit: 2015-04-04 03:19:10 by DLPB »

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #11 on: 2015-05-06 00:57:40 »
I am going to attempt to make the field appear centred.  Already I can see this is going to take more than one value being changed.

cff1e4 =  10 00

This will centre the screen, but other values I have found are needed to centre it during scroll and transitions.  Unfortunately, there are obviously more of these that need changing so that the NPC etc move correctly in relation to the field. But I think it's possible.  I am not sure about FMV yet, that probably also requires a new value offset.

Searching for 80 02 00 00 c0 01 00 00  should come up with a few of the needed areas.
« Last Edit: 2015-05-06 01:00:46 by DLPB »

obesebear

  • Administrator
  • No life
  • *
  • Posts: 3204
  • Karma: 109
    • View Profile
Re: Bugfixes and Queries
« Reply #12 on: 2015-05-06 02:43:08 »
It must have been a long time since I played if I don't remember fields being off centered.

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #13 on: 2015-05-06 02:46:10 »
It must have been a long time since I played if I don't remember fields being off centered.

There is a large black area at the bottom of all fields equal to 32 pixels (480 - 448). This is from the PSX game where it is 16 (240 - 224).
« Last Edit: 2015-05-06 02:47:57 by DLPB »

obesebear

  • Administrator
  • No life
  • *
  • Posts: 3204
  • Karma: 109
    • View Profile
Re: Bugfixes and Queries
« Reply #14 on: 2015-05-06 02:52:25 »
Oh, I thought you meant left to right.  Totally forgot about the Big Black border.  Yeah getting rid of that would be awesome.  Seems like something Aali could knock out easier with his driver though.

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #15 on: 2015-05-06 03:03:20 »
Oh, I thought you meant left to right.  Totally forgot about the Big Black border.  Yeah getting rid of that would be awesome.  Seems like something Aali could knock out easier with his driver though.

He'd need to edit the same values I am though.... his driver would just patch the same code, I'm thinking. But I'll ask him.

obesebear

  • Administrator
  • No life
  • *
  • Posts: 3204
  • Karma: 109
    • View Profile
Re: Bugfixes and Queries
« Reply #16 on: 2015-05-06 03:08:17 »
Maybe so.  Either way, Reunion is quickly becoming the second must-have for playing these days.

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #17 on: 2015-07-24 14:10:09 »
OK, so I redid the code for autosizing the attack message box while at same time maintaining the help bar (they are linked by same code normally).  If anyone (looking at NFITC1) wants to look over this, then do so.  I'm sure someone more in the know about assembly will see easier ways to do things.  I managed to do this with no byte to spare. 

Starting 6D21A2

8B C5 66 2D 58 01 8B 10 80 F9 19 75 0F 66 C7 00 0D 00 83 C2 18 66 89 15 1C D2 91 00 BB 80 02 00 00 29 D3 D1 EB 80 F9 19 74 05 66 89 18 31 DB 66 89 58 E4 66 C7 40 F0 0B 00 66 C7 40 10 00 00

This is for the original game.
« Last Edit: 2015-07-24 14:12:03 by DLPB »

NFITC1

  • No life
  • *
  • Posts: 2763
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Bugfixes and Queries
« Reply #18 on: 2015-07-24 17:32:47 »
You've got to have made more changes. None of this makes sense with just these changes.

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #19 on: 2015-07-25 01:21:08 »
You've got to have made more changes. None of this makes sense with just these changes.

It works perfectly fine in game.  And it does what the original game does too.  Have I missed something?
« Last Edit: 2015-07-25 17:41:36 by DLPB »

NFITC1

  • No life
  • *
  • Posts: 2763
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Bugfixes and Queries
« Reply #20 on: 2015-07-28 17:56:10 »
It works perfectly fine in game.  And it does what the original game does too.  Have I missed something?

Original Game code block:
Code: [Select]
.text:006D21A2                 imul    ecx, 98h
.text:006D21A8                 mov     edx, dword_DC3630
.text:006D21AE                 movsx   eax, word ptr [edx+ecx+4]
.text:006D21B3                 cdq
.text:006D21B4                 sub     eax, edx
.text:006D21B6                 mov     ecx, eax
.text:006D21B8                 sar     ecx, 1
.text:006D21BA                 movsx   eax, [ebp+var_158]
.text:006D21C1                 cdq
.text:006D21C2                 sub     eax, edx
.text:006D21C4                 sar     eax, 1
.text:006D21C6                 sub     ecx, eax
.text:006D21C8                 mov     [ebp+var_158], cx
.text:006D21CF                 mov     [ebp+var_168], 0Ch
.text:006D21D8                 mov     [ebp+var_148], 0


    v5 = *(_WORD *)(dword_DC3630 + 152 * a2 + 4);
    v4 = (((_DWORD)v5 - HIDWORD(v5)) >> 1) - v117 / 2;
    v118 = (((_DWORD)v5 - HIDWORD(v5)) >> 1) - v117 / 2;

Your block:
Code: [Select]
.text:006D21A2                 mov     eax, ebp
.text:006D21A4                 sub     ax, 158h
.text:006D21A8                 mov     edx, [eax]
.text:006D21AA                 cmp     cl, 19h
.text:006D21AD                 jnz     short loc_6D21BE
.text:006D21AF                 mov     word ptr [eax], 0Dh
.text:006D21B4                 add     edx, 18h
.text:006D21B7                 mov     word_91D21C, dx
.text:006D21BE
.text:006D21BE loc_6D21BE:                             ; CODE XREF: sub_6D1CC0+4EDj
.text:006D21BE                 mov     ebx, 280h
.text:006D21C3                 sub     ebx, edx
.text:006D21C5                 shr     ebx, 1
.text:006D21C7                 cmp     cl, 19h
.text:006D21CA                 jz      short loc_6D21D1
.text:006D21CC                 mov     [eax], bx
.text:006D21CF                 xor     ebx, ebx
.text:006D21D1
.text:006D21D1 loc_6D21D1:                             ; CODE XREF: sub_6D1CC0+50Aj
.text:006D21D1                 mov     [eax-1Ch], bx
.text:006D21D5                 mov     word ptr [eax-10h], 0Bh
.text:006D21DB                 mov     word ptr [eax+10h], 0


    v7 = a2;
    HIWORD(v5) = HIWORD(ebp0);
    LOWORD(v5) = ebp0 - 344;
    v6 = *(_DWORD *)v5;
    if ( (_BYTE)a2 == 25 )
    {
      *(_WORD *)v5 = 13;
      v6 += 24;
      word_91D21C = v6;
    }
    v8 = (unsigned int)(640 - v6) >> 1;
    if ( (_BYTE)v7 != 25 )
    {
      *(_WORD *)v5 = v8;
      LOWORD(v8) = 0;
    }
    *(_WORD *)(v5 - 28) = v8;
    *(_WORD *)(v5 - 16) = 11;
    *(_WORD *)(v5 + 16) = 0;

These aren't equivalent at all.

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #21 on: 2015-07-28 18:36:44 »
A lot of the original code is redundant (for example, part of that is just pulling the value 280h from a memory location, something I could remove and just add manually).  Have a look at it in game and see if there is an oversight (even if there is, it can't be catastrophic since everything is working as I want it to)?  My code does what it's supposed to do - it sorts the help box and autosizes / positions the attack caption and box.  Comparing the two codes won't really give you an idea of what has been changed visually.
« Last Edit: 2015-07-28 19:30:19 by DLPB »

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #22 on: 2015-12-06 08:28:17 »
Covarr informs me that FF7 port (using PC version) on the PS4 has fixed the broken frame limiter.  I've looked into it before but don't know where to start.  But at least we know it can be done.

Kaldarasha

  • No life
  • *
  • Posts: 2138
  • Karma: 129
  • Prince of Model Editing
    • View Profile
Re: Bugfixes and Queries
« Reply #23 on: 2015-12-06 08:32:50 »
I cross my fingers for it.

DLPB

  • No life
  • *
  • Posts: 8820
  • Karma: 252
  • My love is as sharp as a needle in your eye.
    • View Profile
Re: Bugfixes and Queries
« Reply #24 on: 2015-12-06 09:16:42 »
I cross my fingers for it.

I mean I know I keep going on about this - but it really really is a big issue.  A frame limiter is a main component of the engine and it needs fixing.