Mac Quest Reward Code Listing

This forum is dedicated to platform-specific issues, discussions and tools relating to D2 modding for the Mac.

Moderator: Contrail

Post Reply

0
No votes
 
Total votes: 0

User avatar
Contrail
Retired staff
Paladin
Posts: 169
Joined: Sun Jul 13, 2003 1:37 am
Location: Austin, TX
Contact:

Mac Quest Reward Code Listing

Post by Contrail » Sat Oct 06, 2007 11:12 pm

I've been hunting down quest reward code locations in the Mac version of Diablo II 1.10, and I thought I'd share what I've found so far. I've modeled the format after the PC version of this list. One thing I haven't figured out yet is how the Mac version is getting the correct item to drop from the numbers being passed as an argument in r5 to the item creation function.

Update: I've figured it out, instead of putting the item code into r5 in one chunk, the Mac version has to put in the first two characters first and then add the last two characters separately. Figuring that out let me find a few more item spawns.

Also, the locations of the rune drops and the table of class-specific items for Anya's quest reward were taken from this post and included in this post in an attempt to gather all of the information about quest rewards on the Mac in one place.

ACT 1 QUEST REWARD CODE LOCATION :
**********************************

A1Q1 - Den of Evil Skill Reward :

Code: Select all

002c6968:  807f000c	lwz	r3,12(r31)
002c696c:  38800005	li	r4,5
002c6970:  38a00001	li	r5,1
002c6974:  38c00000	li	r6,0
002c6978:  4bf23b69	bl	0x1ea4e0
A1Q3 - Deciphered Scroll Spawn at Akara :

Code: Select all

002c2d18:  3ca0626b	lis	r5,25195
002c2d1c:  807c0000	lwz	r3,0(r28)
002c2d20:  809c000c	lwz	r4,12(r28)
002c2d24:  38a56420	addi	r5,r5,25632
002c2d28:  38c00000	li	r6,0
002c2d2c:  38e00002	li	r7,2
002c2d30:  39000001	li	r8,1
002c2d34:  4bff487d	bl	0x2b75b0
A1Q3 - Ring Reward at Akara for Rescuing Cain :

Code: Select all

002c2e50:  807c0000	lwz	r3,0(r28)
002c2e54:  38c00007	li	r6,7
002c2e58:  38e00004	li	r7,4
002c2e5c:  8803006d	lbz	r0,109(r3)
002c2e60:  2c000002	cmpwi	r0,2
002c2e64:  41820020	beq-	0x2c2e84
002c2e68:  40800024	bge-	0x2c2e8c
002c2e6c:  2c000001	cmpwi	r0,1
002c2e70:  40800008	bge-	0x2c2e78
002c2e74:  48000018	b	0x2c2e8c
002c2e78:  38e00006	li	r7,6
002c2e7c:  38c0001e	li	r6,30
002c2e80:  4800000c	b	0x2c2e8c
002c2e84:  38e00006	li	r7,6
002c2e88:  38c0003c	li	r6,60
002c2e8c:  3ca07269	lis	r5,29289
002c2e90:  809c000c	lwz	r4,12(r28)
002c2e94:  38a56e20	addi	r5,r5,28192
002c2e98:  39000001	li	r8,1
002c2e9c:  4bff4715	bl	0x2b75b0
A1Q5 - Charsi Imbue Reward :

Code: Select all

not yet found
ACT 2 QUEST REWARD CODE LOCATION :
**********************************

A2Q1 - Book of Skill Spawn :

Code: Select all

002d2520:  2c030001	cmpwi	r3,1
002d2524:  40820074	bne-	0x2d2598
002d2528:  3ca06173	lis	r5,24947
002d252c:  807e0000	lwz	r3,0(r30)
002d2530:  809e000c	lwz	r4,12(r30)
002d2534:  38a57320	addi	r5,r5,29472
002d2538:  4bf7e959	bl	0x250e90
A2Q1 - Book of Skill Usage :

Code: Select all

00243688:  7fe3fb78	mr	r3,r31
0024368c:  38800005	li	r4,5
00243690:  38a00001	li	r5,1
00243694:  38c00000	li	r6,0
00243698:  4bfa6e49	bl	0x1ea4e0
ACT 3 QUEST REWARD CODE LOCATION :
**********************************

A3Q1 - Potion of life Spawn :

Code: Select all

002d8c80:  3ca07879	lis	r5,30841
002d8c84:  807a0000	lwz	r3,0(r26)
002d8c88:  809a000c	lwz	r4,12(r26)
002d8c8c:  38a57a20	addi	r5,r5,31264
002d8c90:  38c00000	li	r6,0
002d8c94:  38e00002	li	r7,2
002d8c98:  39000001	li	r8,1
002d8c9c:  4bfde915	bl	0x2b75b0
A3Q4 - Potion of life Usage :

Code: Select all

00243958:  7fe3fb78	mr	r3,r31
0024395c:  38800007	li	r4,7
00243960:  38a01400	li	r5,5120
00243964:  38c00000	li	r6,0
00243968:  4bfa6b79	bl	0x1ea4e0
A3Q2 - Ring of Ormus Spawn:

Code: Select all

002da73c:  807d0000	lwz	r3,0(r29)
002da740:  38c00015	li	r6,21
002da744:  8803006d	lbz	r0,109(r3)
002da748:  2c000002	cmpwi	r0,2
002da74c:  4182001c	beq-	0x2da768
002da750:  4080001c	bge-	0x2da76c
002da754:  2c000001	cmpwi	r0,1
002da758:  40800008	bge-	0x2da760
002da75c:  48000010	b	0x2da76c
002da760:  38c00023	li	r6,35
002da764:  48000008	b	0x2da76c
002da768:  38c0004b	li	r6,75
002da76c:  3ca07269	lis	r5,29289
002da770:  809d000c	lwz	r4,12(r29)
002da774:  38a56e20	addi	r5,r5,28192
002da778:  38e00006	li	r7,6
002da77c:  39000001	li	r8,1
002da780:  4bfdce31	bl	0x2b75b0
A3Q1 - Lam Esen Tome spawn :

Code: Select all

002ddc10:  7c0802a6	mflr	r0
002ddc14:  93e1fffc	stw	r31,-4(SP)
002ddc18:  3ca06262	lis	r5,25186
002ddc1c:  7c7f1b78	mr	r31,r3
002ddc20:  90010008	stw	r0,8(SP)
002ddc24:  38a56220	addi	r5,r5,25120
002ddc28:  9421ffc0	stwu	SP,-64(SP)
002ddc2c:  4bf73265	bl	0x250e90
A3Q1 - Lam Esen Tome Usage :

Code: Select all

002de8ac:  2c030001	cmpwi	r3,1
002de8b0:  40820040	bne-	0x2de8f0
002de8b4:  7fc3f378	mr	r3,r30
002de8b8:  38800004	li	r4,4
002de8bc:  38a00005	li	r5,5
002de8c0:  38c00000	li	r6,0
002de8c4:  4bf0bc1d	bl	0x1ea4e0
ACT 4 QUEST REWARD CODE LOCATION :
**********************************

A4Q1 - Izual Quest Skill Point Bonus :

Code: Select all

002e5040:  807e000c	lwz	r3,12(r30)
002e5044:  38800005	li	r4,5
002e5048:  38a00002	li	r5,2
002e504c:  38c00000	li	r6,0
002e5050:  4bf05491	bl	0x1ea4e0
A4Q2 - Hellforge Rune Drop :

Code: Select all

not yet found
A4Q2 - Hellforge Rune Table :

Code: Select all

0044A4FD: r01 r02 r03 r04 r05 r06 r07 r08 r09 r10 r11 r12 r13 r14 r15 r16
          r17 r18 r19 r20 r21 r22 r23 r24 r25 gpv gpr gpb gpy gpg gpw skz
          gzv glr glb gly glg glw skl gsv gsr gsb gsy gsg gsw sku 
ACT 5 QUEST REWARD CODE LOCATION :
**********************************

A5Q1 : item socket by Larzuk

Code: Select all

not yet found
A5Q2 - Rune Drop by Qual-Kehk :

Code: Select all

not yet found
A5Q2 - Rune Drop Table :

Code: Select all

0044AFE3: r07 r08 r09
A5Q3 : Rescue Anya Class Item Reward

Code: Select all

00348eb8:  7c661b78	mr	r6,r3
00348ebc:  80770000	lwz	r3,0(r23)
00348ec0:  8097000c	lwz	r4,12(r23)
00348ec4:  7f05c378	mr	r5,r24
00348ec8:  38e00006	li	r7,6
00348ecc:  39000001	li	r8,1
00348ed0:  4bf6e6e1	bl	0x2b75b0
A5Q3 : Class Item Reward Table

Code: Select all

0044B158: am1 am2 am3 am4 am5 am6 am7 am8 am9 ama amb amc amd ame amf ba1
          ba2 ba3 ba4 ba5 ba6 ba7 ba8 ba9 baa bab bac bad bae baf ne1 ne2
          ne3 ne4 ne5 ne6 ne7 ne8 ne9 nea neb nec ned nee nef pa1 pa2 pa3
          pa4 pa5 pa6 pa7 pa8 pa9 paa pab pac pad pae paf ob1 ob2 ob3 ob4
          ob5 ob6 ob7 ob8 ob9 oba obb obc obd obe obf dr1 dr2 dr3 dr4 dr5
          dr6 dr7 dr8 dr9 dra drb drc drd dre drf ktr wrb axf ces clw btl
          skr 9ar 9wb 9xf 9cs 9lw 9tw 9qr 7ar 7wb 7xf 7cs 7lw 7tw 7qr 
- Contrail
Last edited by Contrail on Sun Oct 14, 2007 12:12 am, edited 1 time in total.

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Post by Necrolis » Sat Oct 06, 2007 11:47 pm

:roll: 8-O 8-O thats very very VERY good work indeed :mrgreen:
what disassembler are you using?
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Hans
Dark Alliance Beta Test
Dominion
Posts: 6438
Joined: Sat Oct 02, 2004 5:14 pm
Location: Toronto, Ontario, Canada

Post by Hans » Sun Oct 07, 2007 1:12 am

Great job indeed.
"Hi. My name is Hans, and I am addicted to a game that is not yet been made" - Card carrying member of D3 Addictions Anonymous, since June 2008.
Card carrying member of Mentaldom, since May 2006 - Zy-El Hardcore.
"German pornstar/Bee Gee lookalike" & "The Blacksmith"
Trying to picture Hans as a Dominion...nah it isn't working sorry. It's the mustache that gets me every time - Al-T.
"All men play on 127" O-H - Hans
"Okay, time out. This is Zy-El. The mod of total excess. Since when would any Zy-El lover do only what's necessary?" - Metropolis Man
Zy-El Wiki|New Zy-El Website

User avatar
Contrail
Retired staff
Paladin
Posts: 169
Joined: Sun Jul 13, 2003 1:37 am
Location: Austin, TX
Contact:

Post by Contrail » Sun Oct 07, 2007 2:59 am

Necrolis";p="358397" wrote::roll: 8-O 8-O thats very very VERY good work indeed :mrgreen:
what disassembler are you using?
:oops: :) I do have the advantage of having some Mac programming experience, although it's with higher level languages than assembly. It would've been a lot harder if I didn't have the information already gathered about the PC version to help me, though. I'd really like at least small-scale code editing to be possible for the Mac, which is why I've been putting in the time and effort to find these code segments.

I've been using a variety of tools - vdacpp to get a text dump of the disassembled code, HexEdit for doing actual editing of files, DDD as an interface for gdb to set breakpoints while running the game, and PEFViewer to help sort out what's actual code and what belongs to one of the data sections.

I've also been using OllyDbg on a PC for comparison purposes, which has been really helpful. I was only able to isolate the quest item creation function by looking for one of the constants I'd seen in the PC version, which happened to only occur in that function.

- Contrail

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Post by Necrolis » Sun Oct 07, 2007 11:41 am

from this list we can actually start deriving functions, like addstat, which can allow for a bit more than modification(as there appears to be some free space in the (carbon) file)
that should be the spawning code for Lam Esen Tome(the "bbb " part)

Code: Select all

004EC708  62 62 62 00 00 00 00 00 BD A1 FF B4 7C 08 02 A6  bbb.....½¡ÿ´|¦
I don't have a mac so i can't test that...
Reference to the Horodric Cube(i only took those with a terminating byte)

Code: Select all

00401D3B  42 6F 78 20                                      Box
00401D83  42 6F 78 20                                      Box
0052739F  42 6F 78 20                                      Box
book of skill item code

Code: Select all

003F67C2  61 73 73 20                                      ass
it appears that chersts use hardcoded tc's instead of item codes(from what i can see)...



slightly ot

Code: Select all

00402F6C                          62 73 64 20 04 01 00 00          bsd ..
00402F7C  74 61 78 20 04 01 00 00 76 6F 75 20 04 01 00 00  tax ..vou ..
00402F8C  74 6F 77 20 05 01 00 00 74 61 78 20 05 01 00 00  tow ..tax ..
00402F9C  72 69 6E 20 06 01 00 00 66 6C 64 20 03 01 00 00  rin ..fld ..
00402FAC  68 67 6C 20 0A 01 00 00 66 6C 64 20 03 01 00 00  hgl ...fld ..
00402FBC  68 62 74 20 09 01 00 00 68 62 74 20 09 01 00 00  hbt ...hbt ...
00402FCC  63 72 6E 20                                      crn
unknown table of item types(my be referanced by multiple code segments...)

Code: Select all

003EE62C              48 69 72 65 61 62 6C 65 73 5C 41 6D      Hireables\Am
003EE63C  61 7A 6F 6E 49 63 6F 6E 00 00 00 00 00 00 00 00  azonIcon........
003EE64C  00 00 00 00 48 69 72 65 61 62 6C 65 73 5C 53 6F  ....Hireables\So
003EE65C  72 63 65 72 65 73 73 49 63 6F 6E 00 00 00 00 00  rceressIcon.....
003EE66C  00 00 00 00 48 69 72 65 61 62 6C 65 73 5C 42 61  ....Hireables\Ba
003EE67C  72 62 61 72 69 61 6E 49 63 6F 6E 00 00 00 00 00  rbarianIcon.....
003EE68C  00 00 00 00 48 69 72 65 61 62 6C 65 73 5C 50 61  ....Hireables\Pa
003EE69C  6C 61 64 69 6E 49 63 6F 6E 00 00 00 00 00 00 00  ladinIcon.......
003EE6AC  00 00 00 00 48 69 72 65 61 62 6C 65 73 5C 4E 65  ....Hireables\Ne
003EE6BC  63 72 6F 6D 61 6E 63 65 72 49 63 6F 6E 00 00 00  cromancerIcon...
003EE6CC  00 00 00 00 48 69 72 65 61 62 6C 65 73 5C 41 73  ....Hireables\As
003EE6DC  73 61 73 73 69 6E 49 63 6F 6E 00 00 00 00 00 00  sassinIcon......
003EE6EC  00 00 00 00 48 69 72 65 61 62 6C 65 73 5C 44 72  ....Hireables\Dr
003EE6FC  75 69 64 49 63 6F 6E                             uidIcon
the hced player party icons
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Contrail
Retired staff
Paladin
Posts: 169
Joined: Sun Jul 13, 2003 1:37 am
Location: Austin, TX
Contact:

Post by Contrail » Sun Oct 07, 2007 3:04 pm

Necrolis";p="358462" wrote:from this list we can actually start deriving functions, like addstat, which can allow for a bit more than modification(as there appears to be some free space in the (carbon) file)
Well, things are complicated a bit by the PEF container structure used by the Diablo II (Carbon) file. There are actually four seperate PEF containers in the file - the Diablo II application itself, the StormCarbon library, a CursorDeviceLib library (most likely used to change the cursor to the gauntlet cursor), and Bink Carbon Library (used to play the cinematics). Each of these are divided into three sections, a loader section used to access external library functions, a code section that contains the actual executable code, and a data section. For the Diablo II application, the code section starts at 00008dd0 and ends at 00424D3C, and the data section starts at 00424D40 and ends at 00451E3C. So only free space in the Diablo II application's code section would be easily usable.

I've been keeping a list of functions I've found (largely through comparison of the Mac code to the PC code), which I should probably clean up and post as well.
that should be the spawning code for Lam Esen Tome(the "bbb " part)

Code: Select all

004EC708  62 62 62 00 00 00 00 00 BD A1 FF B4 7C 08 02 A6  bbb.....½¡ÿ´|¦
I don't have a mac so i can't test that...
That offset is actually part of the StormCarbon lib, so I don't think it's a reference to Lam Esen's Tome.
Reference to the Horodric Cube(i only took those with a terminating byte)

Code: Select all

00401D3B  42 6F 78 20                                      Box
00401D83  42 6F 78 20                                      Box
0052739F  42 6F 78 20                                      Box
Only the first two are actually part of the Diablo II code, and looking at them in context it's clear that they're part of a couple of error message strings that relate to the cube.
book of skill item code

Code: Select all

003F67C2  61 73 73 20                                      ass
Again, in context this is part of an error message (as the end of the word 'class'). Also, in general the Mac version doesn't seem to use ascii data for individual hardcoded items (particularly notable is that ascii 'vps' never appears by itself in the file despite the Cow King being hardcoded to drop 8 of that item code when first killed). The only item codes we've successfully found are for when multiple item codes are dropped or it chooses from more than one item code.
it appears that chersts use hardcoded tc's instead of item codes(from what i can see)...
Isn't that true of the PC version as well?
slightly ot

Code: Select all

00402F6C                          62 73 64 20 04 01 00 00          bsd ..
00402F7C  74 61 78 20 04 01 00 00 76 6F 75 20 04 01 00 00  tax ..vou ..
00402F8C  74 6F 77 20 05 01 00 00 74 61 78 20 05 01 00 00  tow ..tax ..
00402F9C  72 69 6E 20 06 01 00 00 66 6C 64 20 03 01 00 00  rin ..fld ..
00402FAC  68 67 6C 20 0A 01 00 00 66 6C 64 20 03 01 00 00  hgl ...fld ..
00402FBC  68 62 74 20 09 01 00 00 68 62 74 20 09 01 00 00  hbt ...hbt ...
00402FCC  63 72 6E 20                                      crn
unknown table of item types(my be referanced by multiple code segments...)
Right before the table starts is the text 'MonsterRegion.cpp', for what it's worth.

Hardcoded text strings (including the icons you found) can be found both in large chunks towards the end of the code section and in the data section for the Diablo II application.

- Contrail
Last edited by Contrail on Sun Oct 07, 2007 3:07 pm, edited 1 time in total.

User avatar
Incompetent
Forum Regular
Angel
Posts: 938
Joined: Wed Mar 02, 2005 12:45 pm

Post by Incompetent » Sat Oct 13, 2007 7:34 pm

Contrail";p="358408" wrote:I'd really like at least small-scale code editing to be possible for the Mac, which is why I've been putting in the time and effort to find these code segments.
I'd be happy if I could just do some text editing on the Mac (like the skills and missiles tables for instance) - I tried using Souricette's MPQTool, but ran into serious difficulties :( (then again, this was a while ago - perhaps some good advice has been posted since then). Unfortunately I have no coding skills, so I gave up at that point. So it's great to see someone both interested in Mac modding and with the skills to do it. I'll be following your work on both a mod and modding tools with great interest, as this might mean I can restart work my own DII mod.

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Post by Necrolis » Sat Oct 13, 2007 8:36 pm

Gold chests with hced drops use the d2createitemunit func, and then spawn some gold....Pity about the item codes(maybe they are using .Bin table line ids to spawn items...), though i have never seen any item code errors on the x86 version.... Storm handles the mpqs, construction and destruction of ptgame (and ptplayer i think) as well as some other net an house keeping funcs.... I think something that should be high on the mac CE list would be full merc slots....
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Contrail
Retired staff
Paladin
Posts: 169
Joined: Sun Jul 13, 2003 1:37 am
Location: Austin, TX
Contact:

Post by Contrail » Sat Oct 13, 2007 8:51 pm

Incompetent";p="359527" wrote:I'd be happy if I could just do some text editing on the Mac (like the skills and missiles tables for instance) - I tried using Souricette's MPQTool, but ran into serious difficulties :( (then again, this was a while ago - perhaps some good advice has been posted since then). Unfortunately I have no coding skills, so I gave up at that point. So it's great to see someone both interested in Mac modding and with the skills to do it. I'll be following your work on both a mod and modding tools with great interest, as this might mean I can restart work my own DII mod.
I haven't had much trouble using MPQTool, personally. You might want to try using it again, and then if you still have problems I might be able to help you figure out what's going wrong. One thing you do need to make sure of is that whatever program you're using to edit the text files keeps the PC style linebreaks the original files have, though. I'm considering making a program specifically for editing the D2 text files because of that problem.

(Which reminds me, I need to get the DC6 editor for the Mac I've created packaged up and submitted to the admins here.)

ETA:
Necrolis";p="359536" wrote:Gold chests with hced drops use the d2createitemunit func, and then spawn some gold....Pity about the item codes(maybe they are using .Bin table line ids to spawn items...), though i have never seen any item code errors on the x86 version.... Storm handles the mpqs, construction and destruction of ptgame (and ptplayer i think) as well as some other net an house keeping funcs.... I think something that should be high on the mac CE list would be full merc slots....
Actually, I've just figured out what's going on with at least some of the item codes. They're split between two different instructions, the first one puts the first two letters in the high-order bytes of the register, and a second one puts the next two letters into the low-order bytes of the register. I'll show you what I mean using the code from Akara's ring award:

Code: Select all

002c2e8c:  3ca07269	lis	r5,29289
...
002c2e94:  38a56e20	addi	r5,r5,28192
You can see that the last two bytes of the first instruction are 72 and 69, ascii for 'r' and 'i'. The 'lis' instruction means 'Load Immediate Shifted' and it puts the value in the low-order halfword of the instruction (0x7269) into r5 but left shifted 16 places so it gets put into the high-order halfword of the register, leaving the low-order halfword of the register all zeroes.

The last two bytes of the second instruction are 6e and 20, ascii for 'n' and ' '. The 'addi' instruction means 'Add Immediate' and it adds the value in the low-order halfword of the instruction (0x6e20) to the current value of r5. This results in r5 holding the value 0x72696e20, aka 'rin '.

So any hardcoded values being passed this way using r5 will have an instruction of the form 3ca0xxxx, where 'xxxx' is the ascii values for the first two letters of the item code. I should be able to find a few more things by looking for that.

And I haven't looked at any of the code relating to the mercenaries yet, so I don't know how difficult it'd be to add more inventory slots to them.

- Contrail
Last edited by Contrail on Sat Oct 13, 2007 9:42 pm, edited 1 time in total.

User avatar
Sir Xavius
Junior Member
Paladin
Posts: 177
Joined: Mon Oct 04, 2004 6:27 pm
United States of America

Post by Sir Xavius » Wed Jan 09, 2008 8:42 pm

Incompetent";p="359527" wrote:I'd be happy if I could just do some text editing on the Mac (like the skills and missiles tables for instance) - I tried using Souricette's MPQTool, but ran into serious difficulties :( (then again, this was a while ago - perhaps some good advice has been posted since then). Unfortunately I have no coding skills, so I gave up at that point. So it's great to see someone both interested in Mac modding and with the skills to do it. I'll be following your work on both a mod and modding tools with great interest, as this might mean I can restart work my own DII mod.
Since i've been on hiatus, you and have not been introduced. I have moderate experience in editing the .txt files and using them in my own little mod. Like you, i had problems in trying to mod for the Mac, but broke thru with serious discoveries about how files are saved and edited with MSExcel. Then i wrote up a complete article on how to prpoerly edit and store your .txt files using MPQTool, but the only problem was editing .tbl files, an absolute necessity. My article on saving .txt files is here, but the only way to solve the .tbl file problem with MPQTool and OS9 (which i still use) was to go buy a used Virtual PC (3.0 did the job). With that i use AJF's TBLEdit to add strings. If you have any specific questions let me know. (Keep in mind i'm still on OS9 and Excel98.)

User avatar
Incompetent
Forum Regular
Angel
Posts: 938
Joined: Wed Mar 02, 2005 12:45 pm

Post by Incompetent » Fri Jan 11, 2008 1:30 am

Incompetent";p="359527" wrote:I'd be happy if I could just do some text editing on the Mac (like the skills and missiles tables for instance) - I tried using Souricette's MPQTool, but ran into serious difficulties :( (then again, this was a while ago - perhaps some good advice has been posted since then). Unfortunately I have no coding skills, so I gave up at that point. So it's great to see someone both interested in Mac modding and with the skills to do it. I'll be following your work on both a mod and modding tools with great interest, as this might mean I can restart work my own DII mod.
OK, I just tried using MPQTool with text files made by a PC user (tsuru - I wanted to test the latest version of Eastern Sun but at the moment only a text file update is available, so I tried to modify the MPQ for the previous version of Eastern Sun). I followed the usual procedure, getting a modified DII app to make bins, converting their endianness and then putting them in the MPQ. The end result was that numbers ended up in the wrong places, just like with my own modding efforts.

The files I'm talking about are here:

http://miyoshino.la.coocan.jp/eswiki/?ChangesInR6 (new txt files)

http://homepage3.nifty.com/miyoshino/es/es3top.htm (I was trying to mod the es300_R5H_mac MPQ)

I suspect therefore that my problem was not that I was using Excel wrong (I didn't do anything to tsuru's text files apart from put them in the MPQ, not even opening them), but that something is going wrong in either the bin conversion or the endianness change. It could be that there's a major problem with tsuru's files, but it seems unlikely. Maybe my patched DII app is damaged and produces faulty bins (despite otherwise functioning as a DII app). I used MPQTool to modify the Carbon app - should I have instead patched the Classic app? (The version of MPQTool I've been using is the Carbon one.) Does the Classic app need a different MPQ to the Carbon one?

@Sir Xavius: I notice you use Classic, but I assumed this was out of inertia/dislike for Mac OS X/using an old computer. Could it also be that the Carbon tools don't work properly? Fortunately my Mac has a G5 processor, which means it can still run Classic (though it can't run true Mac OS 9), so I can switch over if necessary, though it is a bit of a hassle.

User avatar
Hans
Dark Alliance Beta Test
Dominion
Posts: 6438
Joined: Sat Oct 02, 2004 5:14 pm
Location: Toronto, Ontario, Canada

Post by Hans » Fri Jan 11, 2008 1:58 am

Incompetent: You may want to try running it in the - direct - txt patch that Contrail created. Here is the link to download it http://machellforge.googlepages.com/patches .
"Hi. My name is Hans, and I am addicted to a game that is not yet been made" - Card carrying member of D3 Addictions Anonymous, since June 2008.
Card carrying member of Mentaldom, since May 2006 - Zy-El Hardcore.
"German pornstar/Bee Gee lookalike" & "The Blacksmith"
Trying to picture Hans as a Dominion...nah it isn't working sorry. It's the mustache that gets me every time - Al-T.
"All men play on 127" O-H - Hans
"Okay, time out. This is Zy-El. The mod of total excess. Since when would any Zy-El lover do only what's necessary?" - Metropolis Man
Zy-El Wiki|New Zy-El Website

User avatar
Incompetent
Forum Regular
Angel
Posts: 938
Joined: Wed Mar 02, 2005 12:45 pm

Post by Incompetent » Sun Jan 13, 2008 1:49 pm

Hans";p="373106" wrote:Incompetent: You may want to try running it in the - direct - txt patch that Contrail created. Here is the link to download it http://machellforge.googlepages.com/patches .
Ah, OK. This seems to be working.

However, I also tried to use the bins made by DII with Contrail's patch to modify the MPQ and the result was exactly the same as with the MPQTool process - all the numbers came out in the wrong places. So I don't know what is going wrong here, as the files work fine in -direct -txt mode.
Last edited by Incompetent on Sun Jan 13, 2008 2:03 pm, edited 2 times in total.

User avatar
Hans
Dark Alliance Beta Test
Dominion
Posts: 6438
Joined: Sat Oct 02, 2004 5:14 pm
Location: Toronto, Ontario, Canada

Post by Hans » Sun Jan 13, 2008 2:10 pm

I know when Contrail and Careyagimon put together their changes and released a Mac patch for ES( increased gold and the merc slots ). I believed it used the - direct - txt option.

I have the zip file it is under 3megs in size. You may be able to add the txt files to the folder and it might work. I can test to see if I can get the txt files to work on my parents Mac. The next time I am there would be on a Thursday.
Last edited by Hans on Sun Jan 13, 2008 2:11 pm, edited 1 time in total.
"Hi. My name is Hans, and I am addicted to a game that is not yet been made" - Card carrying member of D3 Addictions Anonymous, since June 2008.
Card carrying member of Mentaldom, since May 2006 - Zy-El Hardcore.
"German pornstar/Bee Gee lookalike" & "The Blacksmith"
Trying to picture Hans as a Dominion...nah it isn't working sorry. It's the mustache that gets me every time - Al-T.
"All men play on 127" O-H - Hans
"Okay, time out. This is Zy-El. The mod of total excess. Since when would any Zy-El lover do only what's necessary?" - Metropolis Man
Zy-El Wiki|New Zy-El Website

Post Reply

Return to “Mac Modding”