Adventures.dat to Location Map?

Nightmist

Member
I'm just wondering if anyone has figured out a way to import a file using file_to_map when the file has different numbers of tab characters? (The objectives section of adventures.dat for instance) I'm trying to pull out what locations are in mafia's internal datafiles but clearly I'm having problems >>.

Thanks in advance.
 

Nightmist

Member
[quote author=efilnikufecin link=topic=701.msg3284#msg3284 date=1168511807]
I was having that same problem with itemdescs.dat. It was fixed in 10.1. Are you using the latest version?
[/quote]
Hmm, I updated to 10.1 now and updated to work with the new file format (I was using 9.9 before) but I still can't seem to get it to work, care to link me to your script?
 
presently all it does is load the map, then save it to a file in the datamaps folder. I haven't worked on it any more yet.
 

Attachments

  • TradeItems.Ash
    227 bytes · Views: 45

Nightmist

Member
Hmmm since in adventures.txt the first line is the "area" it repeats itself which means I can't just use a single key map... Effectively I'm forced to use a 3 key map and it doesn't seem to be working...

It only has the location name when theres a optional objective, no optional objective means $location[none]... Strange? I must be over looking something? File attached.
 
running that script results in cli output:
Code:
Astral 0/0 adventure=96 
none 
----- 
Astral 0/0 adventure=97 
none 
----- 
Astral 0/0 adventure=98 
none 
----- 
BatHole 8/8 adventure=30 
Bat Hole Entryway 
1 Pine-Fresh air freshener 
----- 
BatHole 8/8 adventure=31 
Guano Junction 
3 sonar-in-a-biscuit, 1 broken skull 
----- //format beyond here is copy paste. I tried normal convert methods but they did not work.
BatHole 8/8 adventure=32 none ----- BatHole 8/8 adventure=33 Beanbat Chamber 1 enchanted bean ----- BatHole 8/8 adventure=34 none ----- Beach 0/0 adventure=45 South of the Border 1 pile of candy ----- Beach 0/0 shore=1 Muscle Vacation 1 ten-leaf clover ----- Beach 0/0 shore=2 none ----- Beach 0/0 shore=3 Moxie Vacation 1 barbed-wire fence ----- Beanstalk 85/100 adventure=83 Hole in the Sky 1 Richard's star key, 1 star hat ----- Beanstalk 85/90 adventure=81 Penultimate Fantasy Airship 1 metallic A, 1 S.O.C.K. ----- Beanstalk 85/95 adventure=82 Castle in the Clouds in the Sky 1 heavy D, 1 thin black candle, 1 choiceadv ----- Casino 0/0 adventure=70 none ----- Casino 0/0 adventure=71 none ----- Casino 0/0 casino=1 none ----- Casino 0/0 casino=11 none ----- Casino 0/0 casino=2 none ----- Crimbo05 0/0 adventure=93 none ----- Crimbo06 0/0 adventure=115 none ----- Crimbo06 0/0 adventure=116 none ----- Crimbo06 0/0 adventure=117 none ----- Cyrpt 40/40 adventure=54 none ----- Cyrpt 40/40 adventure=55 none ----- Cyrpt 40/40 adventure=56 none ----- Cyrpt 40/40 adventure=57 none ----- Cyrpt 40/40 cyrpt=Yep. none ----- Dungeon 0/5 adventure=16 Haiku Dungeon 1 fairy gravy ----- Dungeon 15/0 dungeon=1 none ----- Dungeon 19/0 adventure=19 Limerick Dungeon 1 dungeoneer's dungarees ----- Dungeon 47/0 adventure=38 Enormous Greater-Than Sign 1 plus sign ----- Dungeon 47/0 adventure=39 Dungeons of Doom 1 dead mimic ----- Friars 29/29 adventure=75 Dark Neck of the Woods 1 wussiness potion, 1 ruby W, 1 dodecagram ----- Friars 29/29 adventure=76 Dark Heart of the Woods 1 box of birthday candles ----- Friars 29/29 adventure=77 Dark Elbow of the Woods 1 eldritch butterknife ----- Friars 29/29 friars=0 none ----- Gyms 0/0 clan_gym=1 none ----- Gyms 0/0 clan_gym=2 none ----- Gyms 0/0 clan_gym=3 none ----- Holiday 0/0 adventure=84 none ----- Holiday 0/0 trickortreat=Yep. none ----- Holiday 0/150 adventure=37 none ----- Island 0/30 adventure=26 Hippy Camp outfit ----- Island 0/30 adventure=27 none ----- Island 0/30 adventure=29 none ----- Island 0/30 adventure=65 none ----- Island 0/45 adventure=66 Pirate Cove outfit ----- Island 0/45 adventure=67 Pirate Cove In Disguise 1 abridged dictionary ----- Knob 0/0 adventure=114 Outskirts of The Knob 1 chef's hat ----- Knob 20/0 adventure=40 none ----- Knob 20/0 adventure=41 Knob Goblin Treasury outfit ----- Knob 20/0 adventure=42 Knob Goblin Harem outfit, 1 Knob Goblin perfume ----- Knob 20/0 knob=0 none ----- Lab 20/0 adventure=101 none ----- Lab 20/30 adventure=50 none ----- Lab 20/35 adventure=51 none ----- Lab 20/40 adventure=52 none ----- Lab 20/45 adventure=53 none ----- Manor 0/0 adventure=102 none ----- Manor 0/0 adventure=113 Haunted Pantry 1 razor-sharp can lid ----- Manor 0/10 adventure=105 Haunted Billiards Room 1 pool cue, 1 handful of hand chalk ----- Manor 0/40 adventure=104 none ----- Manor 0/6 adventure=103 none ----- Manor 0/68 adventure=106 none ----- Manor 0/68 adventure=107 none ----- Manor 0/68 adventure=109 none ----- Manor 0/85 adventure=108 none ----- McLarge 53/0 adventure=110 Icy Peak level 10 ----- McLarge 53/0 adventure=60 Goatlet 6 goat cheese ----- McLarge 53/0 adventure=61 Itznotyerzitz Mine outfit ----- McLarge 53/0 adventure=62 Ninja Snowmen 1 frigid ninja star ----- McLarge 53/0 adventure=63 eXtreme Slope outfit ----- Mountain 0/0 adventure=91 none ----- Mountain 0/0 adventure=92 The Dire Warren level 2 ----- Mountain 68/0 adventure=80 Valley Beyond Orc Chasm 1 64735 scroll, 1 lowercase N ----- Mountain 68/0 mountains=80 none ----- MoxSign 13/25 adventure=46 none ----- MusSign 0/13 adventure=47 Bugbear Pens 1 annoying pitchfork ----- MusSign 0/40 adventure=48 Spooky Gravy Barrow 1 inexplicably glowing rock ----- MusSign 0/40 adventure=49 none ----- MysSign 0/0 adventure=43 none ----- MysSign 0/30 adventure=44 none ----- Plains 0/10 adventure=18 Degrassi Knoll 1 gnollish toolbox, 1 tires ----- Plains 0/65 adventure=78 none ----- Plains 12/0 adventure=22 Fernswarthy's Tower 1 disembodied brain ----- Plains 15/0 adventure=20 Fun House 1 disease ----- Plains 18/0 adventure=21 Pre-Cyrpt Cemetary 1 smart skull ----- Plains 40/0 adventure=58 none ----- Rift 13/0 adventure=85 Battlefield (No Uniform) outfit ----- Rift 13/0 adventure=86 none ----- Rift 13/0 adventure=87 none ----- Sorceress 104/0 lair3=hedge Sorceress' Hedge Maze 3 hedge maze puzzle ----- Sorceress 104/0 lair6=5 none ----- Town 0/0 adventure=112 Sleazy Back Alley 1 spider web ----- Town 0/0 luckysewer=0 none ----- Town 0/0 sewer=0 Unlucky Sewer 1 worthless item ----- WhiteWed 0/0 adventure=88 none ----- WhiteWed 0/0 adventure=89 none ----- WhiteWed 0/0 adventure=90 none ----- WhiteWed 53/0 adventure=59 none ----- Woods 0/20 adventure=73 8-Bit Realm 1 digital key ----- Woods 29/29 adventure=79 none ----- Woods 36/0 adventure=100 Whitey's Grove 1 white picket fence ----- Woods 36/0 adventure=99 none ----- Woods 5/0 adventure=15 Spooky Forest 1 mosquito larva ----- Woods 5/0 adventure=17 none ----- Woods 5/0 adventure=25 Typical Tavern beer goggles ----- Script succeeded!

based on what I am seeing in the script, this is the expected output.
maybe we are using a different release of 10.1? on the copyright notice pane under the help menu mine indicates v10.1 Re-released on January 7, 2006

BTW the file created is attached.
 

Attachments

  • Advent.dat
    4.7 KB · Views: 45

Nightmist

Member
[quote author=efilnikufecin link=topic=701.msg3291#msg3291 date=1168519398]
running that script results in cli output:
...
based on what I am seeing in the script, this is the expected output.
maybe we are using a different release of 10.1? on the copyright notice pane under the help menu mine indicates v10.1 Re-released on January 7, 2006

BTW the file created is attached.
[/quote]
We get the same output...
The problem is that, when the record isn't fully filled in it just marks the value as "none"...

Output we get in the GCLI:
Code:
Astral 0/0 adventure=96 
none
-----

Output I'm looking for in the GCLI:
Code:
Astral 0/0 adventure=96 
Astral Mushroom (Bad Trip)
none
-----
Its listed in that order because of the alphabetical order sorting when sorted in a map.
 
I had to study it a bit, but finally figured out that you have found a bug.
Script output (saved file)
Code:
Astral	0/0	adventure=96	none	
Astral	0/0	adventure=97	none	
Astral	0/0	adventure=98	none	
BatHole	8/8	adventure=30	Bat Hole Entryway	1 Pine-Fresh air freshener
BatHole	8/8	adventure=31	Guano Junction	3 sonar-in-a-biscuit, 1 broken skull
BatHole	8/8	adventure=32	none	
BatHole	8/8	adventure=33	Beanbat Chamber	1 enchanted bean
BatHole	8/8	adventure=34	none	
Beach	0/0	adventure=45	South of the Border	1 pile of candy
Beach	0/0	shore=1	Muscle Vacation	1 ten-leaf clover
Beach	0/0	shore=2	none	
Beach	0/0	shore=3	Moxie Vacation	1 barbed-wire fence
Beanstalk	85/100	adventure=83	Hole in the Sky	1 Richard's star key, 1 star hat
Beanstalk	85/90	adventure=81	Penultimate Fantasy Airship	1 metallic A, 1 S.O.C.K.
Beanstalk	85/95	adventure=82	Castle in the Clouds in the Sky	1 heavy D, 1 thin black candle, 1 choiceadv
Casino	0/0	adventure=70	none	
Casino	0/0	adventure=71	none	
Casino	0/0	casino=1	none	
Casino	0/0	casino=11	none	
Casino	0/0	casino=2	none	
Crimbo05	0/0	adventure=93	none	
Crimbo06	0/0	adventure=115	none	
Crimbo06	0/0	adventure=116	none	
Crimbo06	0/0	adventure=117	none	
Cyrpt	40/40	adventure=54	none	
Cyrpt	40/40	adventure=55	none	
Cyrpt	40/40	adventure=56	none	
Cyrpt	40/40	adventure=57	none	
Cyrpt	40/40	cyrpt=Yep.	none	
Dungeon	0/5	adventure=16	Haiku Dungeon	1 fairy gravy
Dungeon	15/0	dungeon=1	none	
Dungeon	19/0	adventure=19	Limerick Dungeon	1 dungeoneer's dungarees
Dungeon	47/0	adventure=38	Enormous Greater-Than Sign	1 plus sign
Dungeon	47/0	adventure=39	Dungeons of Doom	1 dead mimic
Friars	29/29	adventure=75	Dark Neck of the Woods	1 wussiness potion, 1 ruby W, 1 dodecagram
Friars	29/29	adventure=76	Dark Heart of the Woods	1 box of birthday candles
Friars	29/29	adventure=77	Dark Elbow of the Woods	1 eldritch butterknife
Friars	29/29	friars=0	none	
Gyms	0/0	clan_gym=1	none	
Gyms	0/0	clan_gym=2	none	
Gyms	0/0	clan_gym=3	none	
Holiday	0/0	adventure=84	none	
Holiday	0/0	trickortreat=Yep.	none	
Holiday	0/150	adventure=37	none	
Island	0/30	adventure=26	Hippy Camp	outfit
Island	0/30	adventure=27	none	
Island	0/30	adventure=29	none	
Island	0/30	adventure=65	none	
Island	0/45	adventure=66	Pirate Cove	outfit
Island	0/45	adventure=67	Pirate Cove In Disguise	1 abridged dictionary
Knob	0/0	adventure=114	Outskirts of The Knob	1 chef's hat
Knob	20/0	adventure=40	none	
Knob	20/0	adventure=41	Knob Goblin Treasury	outfit
Knob	20/0	adventure=42	Knob Goblin Harem	outfit, 1 Knob Goblin perfume
Knob	20/0	knob=0	none	
Lab	20/0	adventure=101	none	
Lab	20/30	adventure=50	none	
Lab	20/35	adventure=51	none	
Lab	20/40	adventure=52	none	
Lab	20/45	adventure=53	none	
Manor	0/0	adventure=102	none	
Manor	0/0	adventure=113	Haunted Pantry	1 razor-sharp can lid
Manor	0/10	adventure=105	Haunted Billiards Room	1 pool cue, 1 handful of hand chalk
Manor	0/40	adventure=104	none	
Manor	0/6	adventure=103	none	
Manor	0/68	adventure=106	none	
Manor	0/68	adventure=107	none	
Manor	0/68	adventure=109	none	
Manor	0/85	adventure=108	none	
McLarge	53/0	adventure=110	Icy Peak	level 10
McLarge	53/0	adventure=60	Goatlet	6 goat cheese
McLarge	53/0	adventure=61	Itznotyerzitz Mine	outfit
McLarge	53/0	adventure=62	Ninja Snowmen	1 frigid ninja star
McLarge	53/0	adventure=63	eXtreme Slope	outfit
Mountain	0/0	adventure=91	none	
Mountain	0/0	adventure=92	The Dire Warren	level 2
Mountain	68/0	adventure=80	Valley Beyond Orc Chasm	1 64735 scroll, 1 lowercase N
Mountain	68/0	mountains=80	none	
MoxSign	13/25	adventure=46	none	
MusSign	0/13	adventure=47	Bugbear Pens	1 annoying pitchfork
MusSign	0/40	adventure=48	Spooky Gravy Barrow	1 inexplicably glowing rock
MusSign	0/40	adventure=49	none	
MysSign	0/0	adventure=43	none	
MysSign	0/30	adventure=44	none	
Plains	0/10	adventure=18	Degrassi Knoll	1 gnollish toolbox, 1 tires
Plains	0/65	adventure=78	none	
Plains	12/0	adventure=22	Fernswarthy's Tower	1 disembodied brain
Plains	15/0	adventure=20	Fun House	1 disease
Plains	18/0	adventure=21	Pre-Cyrpt Cemetary	1 smart skull
Plains	40/0	adventure=58	none	
Rift	13/0	adventure=85	Battlefield (No Uniform)	outfit
Rift	13/0	adventure=86	none	
Rift	13/0	adventure=87	none	
Sorceress	104/0	lair3=hedge	Sorceress' Hedge Maze	3 hedge maze puzzle
Sorceress	104/0	lair6=5	none	
Town	0/0	adventure=112	Sleazy Back Alley	1 spider web
Town	0/0	luckysewer=0	none	
Town	0/0	sewer=0	Unlucky Sewer	1 worthless item
WhiteWed	0/0	adventure=88	none	
WhiteWed	0/0	adventure=89	none	
WhiteWed	0/0	adventure=90	none	
WhiteWed	53/0	adventure=59	none	
Woods	0/20	adventure=73	8-Bit Realm	1 digital key
Woods	29/29	adventure=79	none	
Woods	36/0	adventure=100	Whitey's Grove	1 white picket fence
Woods	36/0	adventure=99	none	
Woods	5/0	adventure=15	Spooky Forest	1 mosquito larva
Woods	5/0	adventure=17	none	
Woods	5/0	adventure=25	Typical Tavern	beer goggles

What the saved file should have been:
Code:
Astral	0/0	adventure=96	Astral Mushroom (Bad Trip)	none
Astral	0/0	adventure=97	Astral Mushroom (Great Trip)	none
Astral	0/0	adventure=98	Astral Mushroom (Mediocre Trip)	none
BatHole	8/8	adventure=30	Bat Hole Entryway	1 Pine-Fresh air freshener
BatHole	8/8	adventure=31	Guano Junction	3 sonar-in-a-biscuit, 1 broken skull
BatHole	8/8	adventure=32	Batrat and Ratbat Burrow	none
BatHole	8/8	adventure=33	Beanbat Chamber	1 enchanted bean
BatHole	8/8	adventure=34	The Boss Bat's Lair	none
Beach	0/0	adventure=45	South of the Border	1 pile of candy
Beach	0/0	shore=1	Muscle Vacation	1 ten-leaf clover
Beach	0/0	shore=2	Mysticality Vacation	none
Beach	0/0	shore=3	Moxie Vacation	1 barbed-wire fence
Beanstalk	85/100	adventure=83	Hole in the Sky	1 Richard's star key, 1 star hat
Beanstalk	85/90	adventure=81	Penultimate Fantasy Airship	1 metallic A, 1 S.O.C.K.
Beanstalk	85/95	adventure=82	Castle in the Clouds in the Sky	1 heavy D, 1 thin black candle, 1  choiceadv
Casino	0/0	adventure=70	Roulette Tables	none
Casino	0/0	adventure=71	Poker Room	none
Casino	0/0	casino=1	Goat Party	none
Casino	0/0	casino=11	Lemon Party	none
Casino	0/0	casino=2	Pirate Party	none
Crimbo05	0/0	adventure=93	Crimbo Town Toy Factory	none
Crimbo06	0/0	adventure=115	Simple Tool-Making Cave	none
Crimbo06	0/0	adventure=116	Spooky Fright Factory	none
Crimbo06	0/0	adventure=117	Crimborg Collective Factory	none
Cyrpt	40/40	adventure=54	Defiled Nook	none
Cyrpt	40/40	adventure=55	Defiled Cranny	none
Cyrpt	40/40	adventure=56	Defiled Alcove	none
Cyrpt	40/40	adventure=57	Defiled Niche	none
Cyrpt	40/40	cyrpt=Yep.	Haert of the Cyrpt	none
Dungeon	0/5	adventure=16	Haiku Dungeon	1 fairy gravy
Dungeon	15/0	dungeon=1	Daily Dungeon	none
Dungeon	19/0	adventure=19	Limerick Dungeon	1 dungeoneer's dungarees
Dungeon	47/0	adventure=38	Enormous Greater-Than Sign	1 plus sign
Dungeon	47/0	adventure=39	Dungeons of Doom	1 dead mimic
Friars	29/29	adventure=75	Dark Neck of the Woods	1 wussiness potion, 1 ruby W, 1 dodecagram
Friars	29/29	adventure=76	Dark Heart of the Woods	1 box of birthday candles
Friars	29/29	adventure=77	Dark Elbow of the Woods	1 eldritch butterknife
Friars	29/29	friars=0	Friar Ceremony Location	none
Gyms	0/0	clan_gym=1	Pump Up Muscle	none
Gyms	0/0	clan_gym=2	Pump Up Mysticality	none
Gyms	0/0	clan_gym=3	Pump Up Moxie	none
Holiday	0/0	adventure=84	St. Sneaky Pete's Day Stupor	none
Holiday	0/0	trickortreat=Yep.	Trick-or-Treating	none
Holiday	0/150	adventure=37	Spectral Pickle Factory	none
Island	0/30	adventure=26	Hippy Camp	outfit
Island	0/30	adventure=27	Frat House	none
Island	0/30	adventure=29	Frat House In Disguise	none
Island	0/30	adventure=65	Hippy Camp In Disguise	none
Island	0/45	adventure=66	Pirate Cove	outfit
Island	0/45	adventure=67	Pirate Cove In Disguise	1 abridged dictionary
Knob	0/0	adventure=114	Outskirts of The Knob	1 chef's hat
Knob	20/0	adventure=40	Knob Goblin Kitchens	none
Knob	20/0	adventure=41	Knob Goblin Treasury	outfit
Knob	20/0	adventure=42	Knob Goblin Harem	outfit, 1 Knob Goblin perfume
Knob	20/0	knob=0	The King's Chamber	none
Lab	20/0	adventure=101	The Knob Shaft	none
Lab	20/30	adventure=50	Knob Goblin Laboratory	none
Lab	20/35	adventure=51	Menagerie 1	none
Lab	20/40	adventure=52	Menagerie 2	none
Lab	20/45	adventure=53	Menagerie 3	none
Manor	0/0	adventure=102	Haunted Kitchen	none
Manor	0/0	adventure=113	Haunted Pantry	1 razor-sharp can lid
Manor	0/10	adventure=105	Haunted Billiards Room	1 pool cue, 1 handful of hand chalk
Manor	0/40	adventure=104	Haunted Library	none
Manor	0/6	adventure=103	Haunted Conservatory	none
Manor	0/68	adventure=106	Haunted Gallery	none
Manor	0/68	adventure=107	Haunted Bathroom	none
Manor	0/68	adventure=109	Haunted Ballroom	none
Manor	0/85	adventure=108	Haunted Bedroom	none
McLarge	53/0	adventure=110	Icy Peak	level 10
McLarge	53/0	adventure=60	Goatlet	6 goat cheese
McLarge	53/0	adventure=61	Itznotyerzitz Mine	outfit
McLarge	53/0	adventure=62	Ninja Snowmen	1 frigid ninja star
McLarge	53/0	adventure=63	eXtreme Slope	outfit
Mountain	0/0	adventure=91	Noob Cave	none
Mountain	0/0	adventure=92	The Dire Warren	level 2
Mountain	68/0	adventure=80	Valley Beyond Orc Chasm	1 64735 scroll, 1 lowercase N
Mountain	68/0	mountains=80	Bridge the Orc Chasm	none
MoxSign	13/25	adventure=46	Thugnderdome	none
MusSign	0/13	adventure=47	Bugbear Pens	1 annoying pitchfork
MusSign	0/40	adventure=48	Spooky Gravy Barrow	1 inexplicably glowing rock
MusSign	0/40	adventure=49	Post-Quest Bugbear Pens	none
MysSign	0/0	adventure=43	Outskirts of Camp	none
MysSign	0/30	adventure=44	Camp Logging Camp	none
Plains	0/10	adventure=18	Degrassi Knoll	1 gnollish toolbox, 1 tires
Plains	0/65	adventure=78	Palindome	none
Plains	12/0	adventure=22	Fernswarthy's Tower	1 disembodied brain
Plains	15/0	adventure=20	Fun House	1 disease
Plains	18/0	adventure=21	Pre-Cyrpt Cemetary	1 smart skull
Plains	40/0	adventure=58	Post-Cyrpt Cemetary	none
Rift	13/0	adventure=85	Battlefield (No Uniform)	outfit
Rift	13/0	adventure=86	Battlefield (Cloaca Uniform)	none
Rift	13/0	adventure=87	Battlefield (Dyspepsi Uniform)	none
Sorceress	104/0	lair3=hedge	Sorceress' Hedge Maze	3 hedge maze puzzle
Sorceress	104/0	lair6=5	Fight the Naughty Sorceress	none
Town	0/0	adventure=112	Sleazy Back Alley	1 spider web
Town	0/0	luckysewer=0	Sewer With Clovers	none
Town	0/0	sewer=0	Unlucky Sewer	1 worthless item
WhiteWed	0/0	adventure=88	Future Market Square	none
WhiteWed	0/0	adventure=89	Mall of the Future	none
WhiteWed	0/0	adventure=90	Future Wrong Side of the Tracks	none
WhiteWed	53/0	adventure=59	Icy Peak of the Past	none
Woods	0/20	adventure=73	8-Bit Realm	1 digital key
Woods	29/29	adventure=79	Deep Fat Friar's Gate	none
Woods	36/0	adventure=100	Whitey's Grove	1 white picket fence
Woods	36/0	adventure=99	The Road to the White Citadel	none
Woods	5/0	adventure=15	Spooky Forest	1 mosquito larva
Woods	5/0	adventure=17	Hidden Temple	none
Woods	5/0	adventure=25	Typical Tavern	beer goggles

When there is no data in the objectives section of the loaded file the location name gets lost while loading. Suggestion: File a bug report. copy/paste the corrected version above, and load it instead of the internal file till the bug is fixed.
 
Top