[1.10] Expanding Waypoints

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

Post Reply
User avatar
weapon-x
Forum Legend
Arch-Angel
Posts: 1027
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines
Contact:
Philippines

[1.10] Expanding Waypoints

Post by weapon-x » Mon Aug 07, 2017 3:01 am

Howdy everyone,

i am thinking of expand usable waypoints this coming weekend, so i am trying to brainstorm as early as now :mrgreen:

searching through the forums i found this ancient post:

viewtopic.php?f=8&t=10576&p=219175&hili ... nt#p219175

and from our code-editing wiki:

Code: Select all

struct pWaypointData
{
	WORD nFlags[12];						//0x00
};
where:

Code: Select all

pPlayerData->pWaypointData[3]  //0-2 is for each difficulty?
now the waypoint bit table as analyzed by retired senior coder Myhrginoc

Code: Select all

WAYPOINT TABLE
index  pHistory bits  waypoint name

00   0100 0000 0000  Rogue Camp
01   0200 0000 0000  Cold Plains
02   0400 0000 0000  Stony Field
03   0800 0000 0000  Dark Forest
04   1000 0000 0000  Black Marsh
05   2000 0000 0000  Outer Cloister
06   4000 0000 0000  Jail Level 1
07   8000 0000 0000  Inner Cloister
08   0001 0000 0000  Catacombs Level 2
09   0002 0000 0000  Lut Gholein
0A   0004 0000 0000  Sewers Level 2
0B   0008 0000 0000  Dry Hills
0C   0010 0000 0000  Halls of the Dead Level 2
0D   0020 0000 0000  Far Oasis
0E   0040 0000 0000  Lost City
0F   0080 0000 0000  Palace Cellars Level 1
10   0000 0100 0000  Arcane Sanctuary
11   0000 0200 0000  Canyon of the Magi
12   0000 0400 0000  Kurast Docks
13   0000 0800 0000  Spider Forest
14   0000 1000 0000  Great Marsh
15   0000 2000 0000  Flayer Jungle
16   0000 4000 0000  Lower Kurast
17   0000 8000 0000  Kurast Bazaar
18   0000 0010 0000  Upper Kurast
19   0000 0020 0000  Travincal
1A   0000 0040 0000  Durance of Hate Level 2
1B   0000 0080 0000  The Pandemonium Fortress
1C   0000 0000 0100  City of the Damned
1D   0000 0000 0200  River of Flame
1E   0000 0000 0400  Harrogath
1F   0000 0000 0800  Frigid Highlands
20   0000 0000 1000  Arreat Plateau
21   0000 0000 2000  Crystalline Passage
22   0000 0000 4000  Glacial Trail
23   0000 0000 8000  Halls of Pain
24   0000 0000 0010  Frozen Tundra
25   0000 0000 0020  The Ancients' Way
26   0000 0000 0040  Worldstone Keep Level 2
looking at the waypoint data structure

we have WORD nFlags[12], and each flag in the subject array *by definition, could hold (65,535) or (1111111111111111), that's 16 bits which translates to 16 waypoints :P correct me if i am wrong.

anyhow, so i was thinking "what if we re-code the waypoint system so we could utilize all this rich bit flags variables to our heart's desire?" :twisted: that would be awesome...

Question:

ummm, would manipulating bits in the pPlayerData->pWaypointData[Difficulty] automatically gets saved on the character? or do we have to edit the savefile routine to accomplish this?

sorry i am just throwing-out ideas as i do not have my files with me til' this coming weekend. :)

any ideas?

cheers :)
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain

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

Hand-picked

Re: [1.10] Expanding Waypoints

Post by Necrolis » Mon Aug 07, 2017 4:27 pm

The flags will automatically get saved. the index used is controlled by levels.txt. you have only 11 WORDS to use however, as the first WORD is used as the waypoint checksum (either 0x101 or 0x102). Also note that D2Common.#11150 (the read from save file) always sets the first waypoint as activated.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"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
weapon-x
Forum Legend
Arch-Angel
Posts: 1027
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines
Contact:
Philippines

Re: [1.10] Expanding Waypoints

Post by weapon-x » Tue Aug 08, 2017 1:04 am

Necrolis" wrote:The flags will automatically get saved. the index used is controlled by levels.txt. you have only 11 WORDS to use however, as the first WORD is used as the waypoint checksum (either 0x101 or 0x102). Also note that D2Common.#11150 (the read from save file) always sets the first waypoint as activated.
ah, thanks for the input sir

will mess with the waypoint system as soon as i can.

cheers!
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain

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

Hand-picked

Re: [1.10] Expanding Waypoints

Post by kingpin » Wed Aug 09, 2017 7:51 am

You can extend waypointdata Struct by change Its size. IF you extend the filesave code you dont run into Any issues and change code that access the waypointdata

User avatar
weapon-x
Forum Legend
Arch-Angel
Posts: 1027
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines
Contact:
Philippines

Re: [1.10] Expanding Waypoints

Post by weapon-x » Thu Aug 10, 2017 2:07 am

kingpin" wrote:You can extend waypointdata Struct by change Its size. IF you extend the filesave code you dont run into Any issues and change code that access the waypointdata
howdy sir,

i think re-writing the filesave code, or the whole savefile_write system itself would be the best thing to do, as this will allow us to add more custom stuff, fix the savefile limit, add custom quests, perhaps add new equipment slots, new inventory and a ton of other cool stuff :)

however, it seemed my CE knowledge needs a major brush-up and i believe i could not accomplish this yet in my current level :oops:

but it would be awesome to be able to do this :)
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain

User avatar
Mnw1995
Posts: 99
Joined: Sat Apr 02, 2011 6:28 pm

Re: [1.10] Expanding Waypoints

Post by Mnw1995 » Fri Aug 11, 2017 1:43 pm

D2Common.#11148 only allocates 16 Bytes, so it is WORD[8] not WORD[12].. First WORD is used for the checksum as Necrolis already said, so there are 7*16 = 112 Bits usable for Waypoints, which is more than twice as much as in Vanilla..

You can easily use these 112 Bits without rewriting any save code, you only need to rewrite the Waypoint panel code on the client, which is based on some hardcoded tables.. Only if you want to have more than 112 waypoints, you'd need to rewrite the savefile code for waypoints

User avatar
weapon-x
Forum Legend
Arch-Angel
Posts: 1027
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines
Contact:
Philippines

Re: [1.10] Expanding Waypoints

Post by weapon-x » Fri Aug 11, 2017 11:19 pm

Mnw1995" wrote:D2Common.#11148 only allocates 16 Bytes, so it is WORD[8] not WORD[12].. First WORD is used for the checksum as Necrolis already said, so there are 7*16 = 112 Bits usable for Waypoints, which is more than twice as much as in Vanilla..

You can easily use these 112 Bits without rewriting any save code, you only need to rewrite the Waypoint panel code on the client, which is based on some hardcoded tables.. Only if you want to have more than 112 waypoints, you'd need to rewrite the savefile code for waypoints
ah... thanks for the tip bro... good thing i haven't started messing with the system yet...

i'll see what i can do.

cheers! :)
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain

Post Reply

Return to “Code Editing”