Script to extract a map from a save game
Moderator: Forum Moderators
Script to extract a map from a save game
I have make this nice a small but usefull script to extract a map from a saved game.
Specially usefull when u saw a funny map on the wesnoth server : just go in the game (as observatory or player... then save the game and run my script with the name of ur save !)
u can try --help or email me any suggestion (just open the shell script to know who i am).
Have fun, bye.
Specially usefull when u saw a funny map on the wesnoth server : just go in the game (as observatory or player... then save the game and run my script with the name of ur save !)
u can try --help or email me any suggestion (just open the shell script to know who i am).
Have fun, bye.
- Attachments
-
wesnoth_getMapFromSave.gz
- gunzip to use my script
- (1.1 KiB) Downloaded 307 times
Last edited by jbar on May 5th, 2007, 11:22 am, edited 1 time in total.
here is better version
As my script seems to be more usefull than I though I have made some minor improvements and 1 bugs resolving :
-> You don't need to use the -rp option if u like to use the completion to find the saved_game file.
-> The script won't concatenate multiples maps present in the saved_game file.
1 very minor bug is still possible (others data than map at the end of the map), but u are really really unlucky if u meet him.
-> You don't need to use the -rp option if u like to use the completion to find the saved_game file.
-> The script won't concatenate multiples maps present in the saved_game file.
1 very minor bug is still possible (others data than map at the end of the map), but u are really really unlucky if u meet him.
- Attachments
-
wesnoth_getMapFromSave.gz
- version r2 of wesnoth_getMapFromSave script.
- (1.15 KiB) Downloaded 367 times
-
- Posts: 13
- Joined: March 5th, 2006, 2:39 pm
Working Windows Version?
Any chance of a working WINDOWS script?
I've developed one this afternoon.WoWHoP wrote:Any chance of a working WINDOWS script?
But it should work everywhere else where you can install Java Runtime Enviroment.
And you will have to install JRE if you have not already done it. Available for free at http://java.sun.com/j2se/1.5.0/download.jsp.
Hope it works (I have tested it on my PC, Windows XP).
- Attachments
-
MapScript.zip
- (5.79 KiB) Downloaded 314 times
Last edited by Baufo on June 10th, 2006, 4:51 pm, edited 2 times in total.
I was working on the proof of one of my poems all the morning, and took out a comma. In the afternoon I put it back again. -- Oscar Wilde

Hmm, which System are you using?
And: Have you just turned binary saves off when you read it in the ReadMe file or is the save you tried to load already a text file (Check if you can open it with an ASCII-Editor without seeing confusing Symbols)
I was working on the proof of one of my poems all the morning, and took out a comma. In the afternoon I put it back again. -- Oscar Wilde
Ok I have uploaded a correct version.
Although the old one should (if it was really just the problem that you tried to use a binary file) work correctly.
When I wrote the I coded this in the afternoon I was actually meaning night...
Although the old one should (if it was really just the problem that you tried to use a binary file) work correctly.
When I wrote the I coded this in the afternoon I was actually meaning night...

I was working on the proof of one of my poems all the morning, and took out a comma. In the afternoon I put it back again. -- Oscar Wilde
Your script is nice, but seems to be cumbersome... I have to find wesnoth every single time.Baufo wrote:Ok I have uploaded a correct version.
Although the old one should (if it was really just the problem that you tried to use a binary file) work correctly.
When I wrote the I coded this in the afternoon I was actually meaning night...
Why did the fish laugh? Because the sea weed.
-
- Posts: 13
- Joined: July 8th, 2006, 4:16 am
- Location: Floyd, VA
Why do you need a script for?
Why do you need a script for?
If you lookup a save game, you will find the map easily in that file. Just open it with an editor. Than you copy the bits out of the file into a new one. It should look something like:
rrgggggg
ggrrgggg
ggggrrgg
ggggggrr
Copy your new file to userdata/editor/maps/ without restarting Wesnoth you can use the map.
Regards,
Rov.
If you lookup a save game, you will find the map easily in that file. Just open it with an editor. Than you copy the bits out of the file into a new one. It should look something like:
rrgggggg
ggrrgggg
ggggrrgg
ggggggrr
Copy your new file to userdata/editor/maps/ without restarting Wesnoth you can use the map.
Regards,
Rov.