[1.10] Extending Levels.txt + LvlPrest.txt

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

User avatar
afj666
Retired staff
Champion of the Light
Posts: 479
Joined: Sun Apr 20, 2003 10:15 pm
Location: Hvam St. (very small town)
Contact:
Denmark

Hand-picked

[1.10] Extending Levels.txt + LvlPrest.txt

Post by afj666 » Sun Jul 13, 2003 1:20 am

So now we can do this also in 1.10 beta

get the 1.10 BETA dlls here (link removed)

No ASM info in there yet.

a BIG thanx to SG for the info on how to do it, and his help with this one, especialy the last issue.

EDIT: added the code for extended lvlprest.txt. Thx to Myhrginoc for this one

EDIT 2: A bug has sneaked into one of the files. Should have been corected now.

EDIT 3: New version out for the 1.10 FINAL (link changed to the 1.10 FINAL)
Last edited by afj666 on Mon Nov 03, 2003 12:01 pm, edited 9 times in total.
Extended Levels Plugin | Extended Object | Plugin | CustomTbl Plugin
Your Weight Is Appropriate.... For A Medium Sized Russian Tank
Avatar Created By Go][um

User avatar
kingpin
Senior Admin
Cherub
Posts: 10905
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [1.10] Extending Levels

Post by kingpin » Sun Jul 13, 2003 1:30 am

Very nice work here, what would we do without you and Sir_General? ;)

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12062
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Myhrginoc » Sun Jul 13, 2003 5:43 pm

Maybe I am being dense, but I don't see how you get past the bin file limitation. Do you mind if I ask how you can allow more than 256 levels? This is a topic I am intensely curious about, because I came to the conclusion that increasing field widths and adding new fields really bollixes the record pointer arithmetic, and there would be potentially too many places that would need correction.

When you load a data table, all records and fields are processed through d2common.10578, which generates the bin files. The pattern of the bin record is established by a stack build that precedes the call to d2common.10578. I downloaded your plugin just a few minutes ago, fired up the game and Ollydbg, and tried to see how you expanded the data field.

When Levels.txt is loaded, the stack build produces this pattern for the first three fields:

Code: Select all

0012DFE4   6FDD2C80  ASCII "Id"
0012DFE8   00000004
0012DFEC   00000000
0012DFF0   00000000
0012DFF4   00000000
0012DFF8   6FDD7354  ASCII "Pal"
0012DFFC   00000004
0012E000   00000000
0012E004   00000001
0012E008   00000000
0012E00C   6FDD7350  ASCII "Act"
0012E010   00000004
0012E014   00000000
0012E018   00000002
0012E01C   00000000
0012E020   6FDD7344  ASCII "Teleport"
The pattern for any field is five bytes: field name, data type, data width (for Type 1 - strings), record offset, and linking address (for linked fields between tables). Data Type 4 is a signed byte (although I know some fields act as if it was Type 6 unsigned), and you will see the next field is at Offset 1.

I saw your new code here:

Code: Select all

[color=#7f00ff]6FD5CBD5   />  6A 04                PUSH 4
6FD5CBD7   |.  58                   POP EAX   <--- you just got your push right back
6FD5CBD8   |.  894424 24            MOV DWORD PTR SS:[ESP+24],EAX
6FD5CBDC   |.  EB 6D                JMP SHORT D2Common.6FD5CC4B[/color]

6FD5CC2A   |.  B8 04000000          MOV EAX,4
6FD5CC2F   |.  33F6                 XOR ESI,ESI
6FD5CC31   |.  BD 02000000          MOV EBP,2
6FD5CC36   |.  BF 03000000          MOV EDI,3
6FD5CC3B   |.  BB 14000000          MOV EBX,14
6FD5CC40   |.  C74424 1C 802CDD6F   MOV DWORD PTR SS:[ESP+1C],D2Common.6FDD2C80   ;  ASCII "Id"
[color=#7f00ff]6FD5CC48   |.  50                   PUSH EAX
6FD5CC49   |.^ EB 8A                JMP SHORT D2Common.6FD5CBD5
6FD5CC4B   |>  58                   POP EAX[/color]
6FD5CC4C   |.  897424 24            MOV DWORD PTR SS:[ESP+24],ESI
6FD5CC50   |.  897424 28            MOV DWORD PTR SS:[ESP+28],ESI
6FD5CC54   |.  897424 2C            MOV DWORD PTR SS:[ESP+2C],ESI
6FD5CC58   |.  C74424 30 5473DD6F   MOV DWORD PTR SS:[ESP+30],D2Common.6FDD7354   ;  ASCII "Pal"
6FD5CC60   |.  894424 34            MOV DWORD PTR SS:[ESP+34],EAX
6FD5CC64   |.  897424 38            MOV DWORD PTR SS:[ESP+38],ESI
6FD5CC68   |.  C74424 3C 01000000   MOV DWORD PTR SS:[ESP+3C],1
6FD5CC70   |.  897424 40            MOV DWORD PTR SS:[ESP+40],ESI
6FD5CC74   |.  C74424 44 5073DD6F   MOV DWORD PTR SS:[ESP+44],D2Common.6FDD7350   ;  ASCII "Act"
6FD5CC7C   |.  894424 48            MOV DWORD PTR SS:[ESP+48],EAX
6FD5CC80   |.  897424 4C            MOV DWORD PTR SS:[ESP+4C],ESI
6FD5CC84   |.  896C24 50            MOV DWORD PTR SS:[ESP+50],EBP
6FD5CC88   |.  897424 54            MOV DWORD PTR SS:[ESP+54],ESI
6FD5CC8C   |.  C74424 58 4473DD6F   MOV DWORD PTR SS:[ESP+58],D2Common.6FDD7344   ;  ASCII "Teleport"
6FD5CC94   |.  894424 5C            MOV DWORD PTR SS:[ESP+5C],EAX
6FD5CC98   |.  897424 60            MOV DWORD PTR SS:[ESP+60],ESI
6FD5CC9C   |.  897C24 64            MOV DWORD PTR SS:[ESP+64],EDI
6FD5CCA0   |.  897424 68            MOV DWORD PTR SS:[ESP+68],ESI

I could not see any change this had on the stack build, the section I quoted above is after processing your code for the first three fields. Level ID is still data type 4, allowing only 256 unique values. For that matter, your added code cannot do anything that the single line it replaced doesn't do, as far as I can tell.

Okay, digging further I see you nulled out the assertions, that is straightforward enough. Then you are done building levels.bin and go on to leveldefs.bin. First I see this:

Code: Select all

6FD5E427     68 9C000000            PUSH 9C
[color=#7f00ff]6FD5E42C     E9 E6BA0600            JMP D2Common.6FDC9F17
6FD5E431     90                     NOP[/color]
6FD5E432     68 9040DD6F            PUSH D2Common.6FDD4090                        ; ASCII "leveldefs"
6FD5E437     51                     PUSH ECX

[color=#7f00ff]6FDC9F17     8D4424 10              LEA EAX,DWORD PTR SS:[ESP+10]
6FDC9F1B     68 6820DD6F            PUSH D2Common.6FDD2068
6FDC9F20     50                     PUSH EAX
6FDC9F21   ^ E9 0C45F9FF            JMP D2Common.6FD5E432[/color]
Then I see a neat trick, if I interpret your change correctly---you shortened an existing assertion message to make room for a dword data location. It is in the .data section, so it is read/write and safe. Nice one! I'll have to borrow that idea.

Code: Select all

6FDD2058  4F 4C 4C 49 53 4E 5C 43 6F 6C 6C 69 73 6E 00 00  OLLISN\Collisn..
6FDD2068  [color=#7f00ff]00 00 00 00[/color] 68 52 6F 6F 6D 43 65 6E 74 65 72 00  ....hRoomCenter.
This is just a quibble, but you could have gotten your record count by replacing this block

Code: Select all

6FD5DC4B     817C24 10 85000000     CMP DWORD PTR SS:[ESP+10],85
6FD5DC53     EB 1E                  JMP SHORT D2Common.6FD5DC73
6FD5DC55     68 CE010000            PUSH 1CE
6FD5DC5A     68 E06FDD6F            PUSH D2Common.6FDD6FE0                        ; ASCII "C:\Src\Diablo2\Source\D2Common\DATATBLS\LvlTbls.cpp"
6FD5DC5F     68 C86FDD6F            PUSH D2Common.6FDD6FC8                        ; ASCII "NUM_LEVEL_IDS == nSize"
6FD5DC64     E8 AD300600            CALL <JMP.&Fog.#10023>
6FD5DC69     83C4 0C                ADD ESP,0C
6FD5DC6C     6A FF                  PUSH -1
6FD5DC6E     E8 CC310600            CALL D2Common.6FDC0E3F
6FD5DC73     897424 18              MOV DWORD PTR SS:[ESP+18],ESI
with a

MOV EAX,[EAX-4]
MOV [6FDD2068],EAX


and NOPping the remaining bytes in the assertion block. Then you wouldn't need the work done in Leveldefs. (I always try to avoid chewing up slack space at the end of the code section because it is a precious resource.)

Looking through your other code edits, I see trouble here, in the back end of d2game:

Code: Select all

03E450D6   />  51                   PUSH ECX
03E450D7   |.  52                   PUSH EDX
03E450D8   |.  53                   PUSH EBX
03E450D9   |.  E8 1854FFFF          CALL <JMP.&D2Common.#10631>
[color=#9a0000]03E450DE   |.  8A50 01              MOV DL,BYTE PTR DS:[EAX+1][/color]
03E450E1   |.  33C0                 XOR EAX,EAX
03E450E3   |.  8AC2                 MOV AL,DL
03E450E5   |.  5A                   POP EDX
03E450E6   |.  59                   POP ECX
03E450E7   |.  53                   PUSH EBX
03E450E8   \.^ E9 97E5F4FF          JMP D2Game.03D93684
This is exactly what I am talking about when I mention record pointer arithmetic. You will see I am getting the record pointer from D2Common.10631, then looking at offset 1 which is the Pal field in Levels.txt. If you were storing anything larger than a byte in the ID field, you would either truncate to one byte through D2Common.10578 or you would have to spill over into the Pal field. At best you would have repeating IDs, where Level 257 has the same ID as Level 1 and so on. This will get you in serious trouble since the parameter for D2Common.10631 is the level ID!!

Let's say you decide to move the Pal field to the end of the record, then you could make ID a two-byte field and increase the number of levels from 254 to 65534. (I am assuming FF might be used for special meaning, and 00 is a null level in Levels.txt.) Here is what you have to catch in all the DLLs:
  • Every reference to the record length, originally 1C4 but now 1C8. (Yes, you are moving a byte record, but it is ugly to misalign records off of dword boundaries. In for a dime, in for a dollar! I couldn't find any Blizzard definitions that weren't dword-aligned.)
  • Every reference to the Pal field, such as the d2game excerpt above, to change offset from 1 to 1C4. Whoops!! You just added bytes to each such instruction! In the case above, after the D2Common.10631 call you could replace the next three instructions with

    Code: Select all

    03E450DE       0FB680 C4010000      MOVZX EAX,BYTE PTR DS:[EAX+1C4]
    but you see how complicated things can get. This one just barely fit!
  • Every reference to the ID field, to be sure you are retrieving and manipulating word values instead of byte values. Probably more bytes added to each instruction.
I am really sorry to be so discouraging, but I don't see the necessary code changes to get past that one-byte allotment. Isolde could do it in a heartbeat, just by changing the structure definitions in source code. But from our end, changing record definitions is as perilous as adding an eighth character class.
Last edited by Myhrginoc on Sun Jul 13, 2003 5:54 pm, edited 2 times in total.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
afj666
Retired staff
Champion of the Light
Posts: 479
Joined: Sun Apr 20, 2003 10:15 pm
Location: Hvam St. (very small town)
Contact:
Denmark

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by afj666 » Mon Jul 14, 2003 12:30 am

ahhh well in the mess about this increasing levels to above 256 i forgot to remove it from the post also (shame on me :oops: )

No i cannot get the above level 255 level to work either and i know that i have to look through a lot of code, and do a lot of changes to get it working :-|

the reason for doing the double work with these pushes an pops, in there, was pure lazyness. if i want a DWORD to be compiled in there i need to do a PUSH 2 instead. Unfortunaley this would also require me to move all other records 3 bytes longer down, else would Pal and Act just overwrite the ID again.

the trick you mentioned is right. I did this cause i couldn't be sure if any other place would be overwritten later on so I took the pace from the assertion text.

Btw i changed the above post again
Last edited by afj666 on Mon Jul 14, 2003 12:34 am, edited 1 time in total.
Extended Levels Plugin | Extended Object | Plugin | CustomTbl Plugin
Your Weight Is Appropriate.... For A Medium Sized Russian Tank
Avatar Created By Go][um

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12062
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Myhrginoc » Mon Jul 14, 2003 1:12 am

I have another question, only tangentially related. How are you editing d2game? Every time I touch it I get a d2client loading error afterwards. Yet when I check the code everything looks okay.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
afj666
Retired staff
Champion of the Light
Posts: 479
Joined: Sun Apr 20, 2003 10:15 pm
Location: Hvam St. (very small town)
Contact:
Denmark

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by afj666 » Mon Jul 14, 2003 1:38 am

[quote=Myhrginoc";p="114240"]
I have another question, only tangentially related. How are you editing d2game? Every time I touch it I get a d2client loading error afterwards. Yet when I check the code everything looks okay.
[/quote]

Errmm?? Not sure what you mean. I edit D2Game with Ollydbg 1.09b using base address only. I don't edit it when it is in memory. And i never had any problems with D2Client loading..... :scratchhead:
Extended Levels Plugin | Extended Object | Plugin | CustomTbl Plugin
Your Weight Is Appropriate.... For A Medium Sized Russian Tank
Avatar Created By Go][um

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12062
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Myhrginoc » Mon Jul 14, 2003 6:52 am

I was editing it in memory. That worked fine in 1.09x, but apparently 1.10 is more sensitive, perhaps because it is relocated. Offsets calculate the same, but something gets haywire in it. I'll try it your way and see if it works.

I don't understand the d2client error either, as I haven't touched that file yet. And I run your changed DLL without incident.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
Sir_General
Retired staff
Champion of the Light
Posts: 443
Joined: Fri May 24, 2002 5:08 pm
Contact:

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Sir_General » Mon Jul 14, 2003 7:12 am

I do virtually all my edits while the DLLs are loaded in memory so I can see the effects as I change them. I haven't had any problems yet (with either 1.09x or 1.10).

What error is it giving you?
That's Sir_General with an _. Leave it out and I'll beat you with a rubber chicken.

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12062
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Myhrginoc » Mon Jul 14, 2003 7:56 am

Cannot load D2Client.dll: Error 998. This happens when I start the program, then pick a character for the first game. I don't find any bug report in the debug files either, it just cuts off after posting D2CMPSpriteCacheInit: 512000 for the second time.

Thinking it might be a Windows error, I found this on MSDN:

998 Invalid access to memory location. ERROR_NOACCESS

This isn't an unreasonable error on DLL load, but I cannot fathom why it would be for a DLL that I didn't touch, which loads before a DLL that I did edit, and the edit worked fine during the same session I made the changes. I could even quit the game and start a new character and the edits were fine. It didn't choke until I quit the program and came back in.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
NewbieModder
Angel
Posts: 681
Joined: Fri May 31, 2002 4:41 am
Location: Where the floating goats sing...
Contact:

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by NewbieModder » Mon Jul 14, 2003 6:34 pm

Note that I have no evidence to back this up, however, I do have some possible theories. I could be completely wrong, however.

Perhaps when editing D2game with Ollydbg, Olly steals the memory space needed for d2client, and it isn't completely freed (the classic "WHERE DID ALL MY RAM GO" problem). I've never encountered this problem, but i've never edited d2game in memory, so I don't know. If you edit d2game, and then reboot before loading again, do you still get the problem?
[align=center]
Tyromancy:
Divination or magic using CHEESE - [/color]
[/align]
The Waffle Mod Website

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12062
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Myhrginoc » Tue Jul 15, 2003 1:46 am

An interesting theory, but that wasn't it. Not only did I reboot my machine, but it was off for around 18 hours or so. No Olly fragments left for sure! But the bug is still there.

:cry: No coding??? I'm starting to get withdrawal symptoms. :roll:

I always have to shut Olly down to restart D2 from the OS. Shutting down the game does not release the exe from Olly's clutches, and if there is a clean unattach command I haven't found it yet.

The microdot below is my Olly ini file. Maybe somebody might see something I have set wrong (although these settings worked just fine for 1.09x).

[Settings]
Check DLL versions=0
Show toolbar=1
Status in toolbar=0
Use hardware breakpoints to step=0
Restore windows=1197
Scroll MDI=0
Horizontal scroll=0
Topmost window=0
Index of default font=1
Index of default colours=0
Index of default syntax highlighting=1
Log buffer size index=0
Run trace buffer size index=7
Group adjacent commands in profile=1
Highlighted trace register=-1
IDEAL disassembling mode=0
Disassemble in lowercase=0
Separate arguments with TAB=0
Extra space between arguments=0
Show default segments=1
NEAR jump modifiers=0
Use short form of string commands=1
Size sensitive mnemonics=1
SSE size decoding mode=0
Top of FPU stack=1
Always show memory size=1
Decode registers for any IP=0
Show symbolic addresses=1
Show local module names=1
Gray data used as filling=1
Show jump direction=1
Show jump path=1
Show path if jump is not taken=1
Underline fixups=1
Underline fixups in hex dump=0
Center FOLLOWed command=0
Show stack frames=1
Show local names in stack=1
Extended stack trace=1
Synchronize source with CPU=0
Include SFX extractor in code=0
SFX trace mode=0
Use real SFX entry from previous run=1
Ignore SFX exceptions=0
First pause=2
Stop on new DLL=0
Stop on DLL unload=0
Stop on new thread=0
Stop on thread end=0
Stop on debug string=0
Decode SSE registers=0
Enable last error=1
Ignore access violations in KERNEL32=1
Ignore INT3=0
Ignore TRAP=0
Ignore access violations=0
Step in unknown commands=0
Ignore division by 0=0
Ignore illegal instructions=0
Ignore all FPU exceptions=0
Warn when frequent breaks=0
Warn when break not in code=1
Autoreturn=0
Save original command in trace=0
Show traced ESP=0
Animate over system DLLs=0
Trace over string commands=0
Synchronize CPU and Run trace=0
Ignore custom exceptions=0
Smart update=1
Set high priority=1
Append arguments=1
Use ExitProcess=1
Allow injection to get WinProc=0
Sort WM_XXX by name=0
Type of last WinProc breakpoint=0
Snow-free drawing=0
Demangle symbolic names=1
Keep ordinal in name=1
Only ASCII printable in dump=0
Allow diacritical symbols=0
String decoding=0
Warn if not administrator=1
Warn when terminating process=1
Align dialogs=1
Use font of calling window=0
Specified dialog font=0
Restore window positions=1
Restore width of columns=1
Highlight sorted column=0
Compress analysis data=1
Fill rest of command with NOPs=1
Reference search mode=0
Global search=1
Aligned search=0
Allow error margin=0
Keep size of hex edit selection=0
Modify tag of FPU register=1
Hex inspector limits=1
MMX display mode=0
Last selected options card=2
Last selected appearance card=5
Ignore case in text search=1
Letter key in Disassembler=2
Looseness of code analysis=2
Decode pascal strings=1
Guess number of arguments=1
Accept far calls and returns=0
Accept direct segment modifications=0
Decode VxD calls=0
Accept privileged commands=0
Accept I/O commands=0
Accept NOPs=1
Accept shifts out of range=0
Accept superfluous prefixes=0
Accept LOCK prefixes=0
Accept unaligned stack operations=1
Show ARG and LOCAL in procedures=1
Save analysis to file=1
Analyse main module automatically=1
Analyse code structure=1
Decode ifs as switches=1
Save trace to file=0
Trace contents of registers=1
Decode tricks=0
Automatically select register type=0
Show decoded arguments=1
Show decoded arguments in stack=1
Show arguments in call stack=1
Show induced calls=1
Label display mode=0
Label includes module name=0
Highlight symbolic labels=1
Highlight RETURNs in stack=1
Ignore path in user data file=0
Ignore timestamp in user data file=1
Ignore CRC in user data file=0
Default sort mode in Names=1
Tabulate columns in log file=0
Append data to existing log file=0
Flush gathered data to log file=0
Skip spaces in source comments=1
Hide non-existing source files=0
Tab stops=8
File graph mode=2
[History]
Executable[1]=C:\WINDOWS\NOTEPAD.EXE
Executable[2]=
Executable[3]=
Executable[4]=
Executable[5]=
Executable[0]=D:\Diablo_II\game.exe
View file=D:\Diablo_II\_TestBed 1.10beta\D2Game.dll
View text file=
Object file=
Import library=
Log file=log.txt
Run trace file=D:\Diablo_II\_TestBed 1.09d\RT - NecroMage starting function.txt
API help file=
Text save file=D:\Diablo_II\_code 1.10beta\d2common.txt
Symbolic data path=D:\OllyDebug_109
[Arguments]
Executable[1]=
Executable[2]=
Executable[3]=
Executable[4]=
Executable[5]=
Executable[0]=
[Colours]
Scheme[0]=0,12,8,18,7,8,7,13
Scheme name[0]=Black on white
Scheme[1]=14,12,7,1,3,7,3,13
Scheme name[1]=Yellow on blue
Scheme[2]=1,12,3,11,14,2,7,13
Scheme name[2]=Marine
Scheme[3]=15,12,7,0,8,11,7,13
Scheme name[3]=Mostly black
Scheme[4]=0,12,8,18,7,8,7,13
Scheme name[4]=Scheme 4
Scheme[5]=14,12,7,1,3,7,3,13
Scheme name[5]=Scheme 5
Scheme[6]=1,12,3,11,14,2,7,13
Scheme name[6]=Scheme 6
Scheme[7]=15,12,7,0,8,11,7,13
Scheme name[7]=Scheme 7
[Fonts]
Font[0]=12,8,400,0,0,0,255,2,49,0
Face name[0]=Terminal
Font name[0]=OEM fixed font
Font[1]=9,6,700,0,0,0,255,0,48,1
Face name[1]=Terminal
Font name[1]=Terminal 6
Font[2]=15,8,400,0,0,0,0,2,49,0
Face name[2]=Fixedsys
Font name[2]=System fixed font
Font[3]=14,0,400,0,0,0,1,2,5,0
Face name[3]=Courier New
Font name[3]=Courier (UNICODE)
Font[4]=10,6,400,0,0,0,1,2,5,0
Face name[4]=Lucida Console
Font name[4]=Lucida (UNICODE)
Font[5]=9,6,700,0,0,0,255,0,48,0
Face name[5]=Terminal
Font name[5]=Font 5
Font[6]=15,8,400,0,0,0,0,2,49,0
Face name[6]=Fixedsys
Font name[6]=Font 6
Font[7]=14,0,400,0,0,0,1,2,5,0
Face name[7]=Courier New
Font name[7]=Font 7
[Syntax]
Commands[0]=0,0,0,0,0,0,0,0,0,0,0,0,0,0
Operands[0]=0,0,0,0,0,0,0,0,0,0,0,0,0,0
Scheme name[0]=No highlighting
Commands[1]=0,1,4,4,9,9,9,13,111,8,12,0,0,0
Operands[1]=1,0,4,13,13,2,1,6,0,0,0,0,0,0
Scheme name[1]=Christmas tree
Commands[2]=0,0,124,112,0,64,64,0,96,0,0,0,0,0
Operands[2]=0,0,0,0,0,0,0,0,0,0,0,0,0,0
Scheme name[2]=Jumps'n'calls
Commands[3]=0,0,0,0,0,0,0,0,0,0,0,0,0,0
Operands[3]=0,0,0,0,0,0,0,0,0,0,0,0,0,0
Scheme name[3]=Hilite 3
Commands[4]=0,0,0,0,0,0,0,0,0,0,0,0,0,0
Operands[4]=0,0,0,0,0,0,0,0,0,0,0,0,0,0
Scheme name[4]=Hilite 4
[Plugin Command line]
Restore command line window=0
[Plugin Bookmarks]
Restore bookmarks window=0
[Placement]
OllyTest=1,0,1021,734,0
CPU=0,0,1021,645,1
CPU subwindows=384,873,346,467,432,622,394,467
Executable modules=22,29,636,452,1
Source files=66,87,474,182,1
References=89,89,913,515,1
Breakpoints=66,87,813,550,1
Memory map=83,38,900,515,1
Call tree=110,145,792,182,1
Call stack=88,116,516,182,1
Run trace=88,116,718,504,1
Threads=88,116,591,218,1
[Appearance]
CPU scheme=0
CPU Disassembler=1,0,0,0,1
CPU Dump=1,0,1,0,4353,0
CPU Stack=1,0,0,0
CPU Info=1,0,0,0
CPU Registers=1,0,1,0
Executable modules=1,0,1,0,0
Source files=1,0,1,0,0
References=1,0,1,0,0
Breakpoints=1,0,1,0,0
Memory map=1,0,1,0,0
Call tree=1,0,1,0,0
Call stack=1,0,1,0,0
Run trace=1,0,1,0,0
Threads=1,0,1,0,0
[Columns]
CPU Disassembler=55,112,432,1536
CPU Dump=54,288,102
CPU Stack=54,60,423
Executable modules=54,54,54,54,3,1536
Source files=54,96,1536
References=54,312,1536
Breakpoints=54,54,112,216,1536
Memory map=54,54,170,54,183,3,3,3,1536
Call tree=192,192,192,192
Call stack=54,54,216,168,54
Run trace=54,54,54,54,287,1536
Threads=54,54,54,66,150,60,54,72,72
[System]
Options position=458,248
Last edited by Myhrginoc on Tue Jul 15, 2003 1:54 am, edited 1 time in total.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
NewbieModder
Angel
Posts: 681
Joined: Fri May 31, 2002 4:41 am
Location: Where the floating goats sing...
Contact:

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by NewbieModder » Tue Jul 15, 2003 8:44 pm

Check your d2client file itself. I've had this problem a couple times, even though I haven't used olly ina month. Every single mod EXCEPT Sir_General's and Zy-El gave unable to load D2client. Note that those two mods have modded DLL files. Turns out my real d2client.dll was missing 0.08 megs from the true one, even though I hadn't touched it. HMM. I wonder if that's the problem for me?
[align=center]
Tyromancy:
Divination or magic using CHEESE - [/color]
[/align]
The Waffle Mod Website

User avatar
afj666
Retired staff
Champion of the Light
Posts: 479
Joined: Sun Apr 20, 2003 10:15 pm
Location: Hvam St. (very small town)
Contact:
Denmark

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by afj666 » Tue Jul 15, 2003 10:33 pm

Hmmm, I never had any props with the D2Client.dll. :scratchhead:

btw. A new update of the Extended Levels Pack

Any of you who have tried it and used a Layer value which was 100 or above, you should get an Assertion Error. The layer is a number for the Automap, so if you use an already used it will show that map when you enter your new area. However this has been fixed so you can have up to 254 layers.
Remeber to delete all <player>.ma<nbr> files or else this wouldn't work.
Extended Levels Plugin | Extended Object | Plugin | CustomTbl Plugin
Your Weight Is Appropriate.... For A Medium Sized Russian Tank
Avatar Created By Go][um

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12062
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Myhrginoc » Thu Jul 17, 2003 6:59 am

Problem solved, at least for now. I didn't find out what was actually happening, but updating to Ollydbg 1.09d made the difference. The Copy to Executable File option is revised, and picking the lower of the two sub-options is working for me.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
Acromatic Aria
Retired staff
Champion of the Light
Posts: 364
Joined: Sun Jul 06, 2003 7:30 am
Location: North Carolina

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Acromatic Aria » Mon Jul 21, 2003 12:49 am

Is there a readme file anywhere that tells how to properly use this plugin to create new levels? I can add new entries to levels.txt and LvlPrest.txt without problem, but as soon as I try to actually try to connect to these areas using Levels.txt, I get the old Unhandled Exception: Access Violation (c0000005) error.

I used the levels.txt file from Sir General's plugin for 1.09 as a model for creating a new level (using levels.txt and LvlMaze.txt) and got the error when I tried to enter it (tried making random cave level that took the place of the one in the Cold Plains). Then I instead tried to make a new Preset level by copying the treasure level from that cave and creating a new LvlPrest.txt entry for it, but I still got the same error when I attempted to enter my new level.

User avatar
kingpin
Senior Admin
Cherub
Posts: 10905
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by kingpin » Mon Jul 21, 2003 8:06 am

I guess this is your problem.

You are using a non expansion EntryFile (Like A1L1 to A4L6) or an own made entryfile.

Solution for this. Add the entryfile to data\local\UI\ENG\Expansion or what you are using.

As example if you use A1L1

data\local\UI\ENG\Expansion\A1L1
Last edited by kingpin on Mon Jul 21, 2003 8:07 am, edited 1 time in total.

User avatar
Acromatic Aria
Retired staff
Champion of the Light
Posts: 364
Joined: Sun Jul 06, 2003 7:30 am
Location: North Carolina

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Acromatic Aria » Mon Jul 21, 2003 5:02 pm

Yep, that was it :D I've managed to add random levels. With presets I'm getting an assertion error:

Assertion Failure
Location: D2Common\DRLG\DrlgRoom.cpp, line# 604
Expression: hDungeonRoomOther

It's probably something silly I missed.

User avatar
kingpin
Senior Admin
Cherub
Posts: 10905
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by kingpin » Tue Jul 22, 2003 12:45 pm

It sounds like you are linking the same vis to several locations and that aren't possible to do.

User avatar
Acromatic Aria
Retired staff
Champion of the Light
Posts: 364
Joined: Sun Jul 06, 2003 7:30 am
Location: North Carolina

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Acromatic Aria » Sat Jul 26, 2003 9:24 pm

Here's a different kind of question: How does the game pick treasure classes for added levels? In other words, what determines the lines from Treasureclassex.txt that get referenced for the searchable objects (chests, beds, rocks, etc.) in our new areas? I already tried to control it using those level columns from levels.txt and those just change gold drops from objects. It appears that treasure classes dealing with objects can't be controled through just the text files.

Something I've noticed since using this plugin is that the game crashes pretty frequently when searching objects (I added an Act 1 cave level, but I get these crashes searching everywhere else). Maybe it's a bug in the beta that I didn't get hit by until after trying out this add in, but I commonly see:
UNHANDLED EXCEPTION: ACCESS_VIOLATION (c0000005)

pop up. I've looked several times into my own items to make sure I didn't screw something up with the treasure drops, but the monsters and chests from the first few areas of Act 1 all reference the same rows for equipment and other items. The crash has never occured from killing a monster but commonly happpens (almost once per area) when searching something.

User avatar
kingpin
Senior Admin
Cherub
Posts: 10905
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by kingpin » Sat Jul 26, 2003 10:02 pm

Remember in 1.10 you can only add typ1 objects that are for a specific act. So in act1, you can only use typ1 objects from act1. Also, typ2 objects can only be added from current act and previous ones.

Try and add a object you know works in another area and add that to the new level. If it crash, look into the log file and see what error msg you get and post it so we know what are going wrong.

User avatar
Acromatic Aria
Retired staff
Champion of the Light
Posts: 364
Joined: Sun Jul 06, 2003 7:30 am
Location: North Carolina

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by Acromatic Aria » Sun Jul 27, 2003 12:35 am

The error isn't occurring in my new level; the added level isn't even connected to anything but rather just "exists" as an entry in levels.txt and lvlmaze.txt (I had it connected before to see if the level would spawn, but it is currently disabled).

My error occurs in already existing levels in Act 1 when I search objects (the objects are not modified). It may be because of something else; I just never encountered the error until I started using the plug-in and not seeing a direct connection mentioned between levels and treasure classes made me wonder if expanding the allowed number of levels does something to misalign the treasure drops (or are treasure classes now connected to the objects?). The really annoying part is that I can't seem to intentionally reproduce this error. It just occasionally "happens." Sometimes I'll run through several areas and not see it at all; others I'll trigger it from the first thing I search in the Blood Moor (I have noticed it seems to occur a little more often when searching beds inside houses).

A little off topic: how do I know what classifies as a "typ1" object? I didn't see anything in objects.txt to suggest it.

Here's what appeared in my log file the last time the error occurred:

***** UNHANDLED EXCEPTION: ACCESS_VIOLATION (c0000005)
Fault address: 04119F50 01:00048F50 C:\Program Files\Diablo II\D2Game.dll
eax:00000000 ebx:024d007c ecx:022b9c00 edx:00000001 esi:00000003
edi:024d007c ebp:00000000 esp:0012e2bc eip:04119f50 flg:00010247
cs:001b ds:0023 es:0023 ss:0023 fs:003b gs:0000

The stack dump follows that.

User avatar
kingpin
Senior Admin
Cherub
Posts: 10905
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by kingpin » Sun Jul 27, 2003 2:10 am

Look into this post by Paul: [1.10] Unlimited NEW SuperUniques in your DS1 or use the search button ;)

There are several topics that explains what typ1/2 objects are.

User avatar
afj666
Retired staff
Champion of the Light
Posts: 479
Joined: Sun Apr 20, 2003 10:15 pm
Location: Hvam St. (very small town)
Contact:
Denmark

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by afj666 » Sun Jul 27, 2003 12:27 pm

[quote=Acromatic Aria";p="117217"]
Here's what appeared in my log file the last time the error occurred:

***** UNHANDLED EXCEPTION: ACCESS_VIOLATION (c0000005)
Fault address: 04119F50 01:00048F50 C:\Program Files\Diablo II\D2Game.dll
eax:00000000 ebx:024d007c ecx:022b9c00 edx:00000001 esi:00000003
edi:024d007c ebp:00000000 esp:0012e2bc eip:04119f50 flg:00010247
cs:001b ds:0023 es:0023 ss:0023 fs:003b gs:0000

The stack dump follows that.
[/quote]

Nice indeed. And yes you are right. There was a bug there. Files changed and updated. Included ASM changes in a txt file.
And thx for notifying of this ;)

EDIT: Btw added the new object code to the dll's also ;)
Last edited by afj666 on Sun Jul 27, 2003 1:13 pm, edited 1 time in total.
Extended Levels Plugin | Extended Object | Plugin | CustomTbl Plugin
Your Weight Is Appropriate.... For A Medium Sized Russian Tank
Avatar Created By Go][um

inhalantnut
Junior Member
Paladin
Posts: 135
Joined: Thu Jun 27, 2002 3:44 am
Location: Galesburg, IL
Contact:

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by inhalantnut » Wed Aug 06, 2003 10:47 pm

Sorry to bring up an old topic, if it's not stickied. (I'm not sure since I got here through the search) But is there an update for the new 1.10s?

User avatar
kingpin
Senior Admin
Cherub
Posts: 10905
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: [1.10] Extending Levels.txt + LvlPrest.txt

Post by kingpin » Thu Aug 07, 2003 1:36 am

He is working on a 1.10s version but aren't finished yet. So we have just to wait until its finished ;)

Post Reply

Return to “Code Editing”