Diablo 2 mods
 


Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Aug 07, 2017 3:01 am 
 Post subject: [1.10] Expanding Waypoints
 
Offline
Arch-Angel
User avatar

Age: 31
Joined: Wed Mar 18, 2009 4:52 am
Posts: 1023
Location: Philippines
Gender: Male
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&hilit=waypoint#p219175

and from our code-editing wiki:

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


where:

pPlayerData->pWaypointData[3]  //0-2 is for each difficulty?


now the waypoint bit table as analyzed by retired senior coder Myhrginoc

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 07, 2017 4:27 pm 
 Post subject: Re: [1.10] Expanding Waypoints
 
Offline
Senior Moderator
Senior Moderator
User avatar

Age: 26
Joined: Sat Mar 25, 2006 1:22 pm
Posts: 8791
Location: The Land of the Dead
Gender: Male
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


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 08, 2017 1:04 am 
 Post subject: Re: [1.10] Expanding Waypoints
 
Offline
Arch-Angel
User avatar

Age: 31
Joined: Wed Mar 18, 2009 4:52 am
Posts: 1023
Location: Philippines
Gender: Male
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


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 09, 2017 7:51 am 
 Post subject: Re: [1.10] Expanding Waypoints
 
Offline
Site Admin
Site Admin
User avatar

Joined: Sat Jan 11, 2003 12:51 pm
Posts: 10677
Gender: None specified
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

_________________
CLICK HERE To Read The Forum Terms of Service

Diabolic Studios Website | Diabolic Studios Forum


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 10, 2017 2:07 am 
 Post subject: Re: [1.10] Expanding Waypoints
 
Offline
Arch-Angel
User avatar

Age: 31
Joined: Wed Mar 18, 2009 4:52 am
Posts: 1023
Location: Philippines
Gender: Male
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


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 11, 2017 1:43 pm 
 Post subject: Re: [1.10] Expanding Waypoints
 
Offline
Crusader
User avatar

Joined: Sat Apr 02, 2011 6:28 pm
Posts: 99
Gender: Male
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


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 11, 2017 11:19 pm 
 Post subject: Re: [1.10] Expanding Waypoints
 
Offline
Arch-Angel
User avatar

Age: 31
Joined: Wed Mar 18, 2009 4:52 am
Posts: 1023
Location: Philippines
Gender: Male
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Black Rock template by onyx (based on BlackSoul for phpBB2)