Game client modified by Gilbertus

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

Re: Game client modified by Gilbertus

Postby gomimin » Wed Jan 12, 2011 7:39 pm

very nice 'n' smooth! Thanx!

First run with python 2.4 gave me a syntax error, installed 2.71 (recommended) and there it goes...

better than my attempts sticking it together in Irfan View :lol:
User avatar
gomimin
 
Posts: 175
Joined: Tue Dec 28, 2010 12:29 am
Location: W11

map.html Session Browsing

Postby naqaden » Wed Jan 12, 2011 8:47 pm

I made a small addition to the map.html that comes in the Gilbertus \map\ directory. This lets you choose any previous session by date, instead of only the most recent/current session. It is zip'd and attached below.

Unfortunately, it uses ActiveX so it requires Internet Explorer :|


For those who feel more comfortable making the modifications themselves, it's just a bit of javascript and html:

1) add these javascript functions:
this reads each subfolder in the directory you put it in (\map\) and searches for "tile_*_*.png" or that subfolder is ignored
Code: Select all
function sessionList(){
  var mapAXO = new ActiveXObject("Scripting.FileSystemObject");
  var mapPath = unescape(window.location.href.substring(8,window.location.href.lastIndexOf("/")+1));
  var fileName = new RegExp('tile_-?\\d+_-?\\d+\\.png',["i"]);
  sessionSubFolders = new Enumerator(mapAXO.GetFolder(mapPath).SubFolders);
  var sessionIndex = 0;
  for (; !sessionSubFolders.atEnd(); sessionSubFolders.moveNext()){
    sessionFiles = new Enumerator(mapAXO.GetFolder(mapPath+sessionSubFolders.item().Name).Files);
    var fileIndex = 0;
    for (; !sessionFiles.atEnd(); sessionFiles.moveNext()){
      if(fileName.test(sessionFiles.item().Name)){
        var sessionName = new Date(sessionSubFolders.item().Name * 1);
        sessionName = sessionName.toString();
        if(sessionName == "NaN") sessionName = sessionSubFolders.item().Name;
        document.getElementById("session_select").options[sessionIndex] = new Option(sessionName,sessionSubFolders.item().Name);
        if(sessionSubFolders.item().Name == currentSession) document.getElementById("session_select").selectedIndex = sessionIndex;
        sessionIndex++;
        break;
      }
    }
  }
}

function mapLoad(mapSelection){
  currentSession = mapSelection;
  initialize();
}


2) edit the html body tag to call the new sessionList() function:
Code: Select all
<body onload="initialize();sessionList();">


3) add the following div below the existing "map_canvas" div:
Code: Select all
  <div style="margin:0;padding:0;position:absolute;top:29px;right:5px;">
    <select id="session_select" style="width:204px;font:12px arial;color:#000000;background-color:#ffffff;border:2px solid black;" onChange="mapLoad(this.options[this.selectedIndex].value)">
      <option value="">IE ActiveX Needed for Map List</option>
    </select>
  </div>


EDIT:
fixed a problem with path encoding that caused the script to break
fixed a problem that caused the script to hide some session maps
You do not have the required permissions to view the files attached to this post.
Last edited by naqaden on Fri Jan 14, 2011 9:16 pm, edited 1 time in total.
Fred wrote:no killing moths / or putting / boiling water on the ants
naqaden
 
Posts: 7
Joined: Mon Dec 27, 2010 7:31 am

Re: Game client modified by Gilbertus

Postby Truth0 » Thu Jan 13, 2011 1:00 am

Wow. Amazing work. I think I love you. (I'll PM you later)
Truth0
 
Posts: 100
Joined: Thu Dec 09, 2010 5:12 am

Re: Game client modified by Gilbertus

Postby Pacho » Thu Jan 13, 2011 5:32 am

I'm glad this client replaced mine =v
Pacho
 
Posts: 712
Joined: Wed Jun 10, 2009 2:21 am

Re: Game client modified by Gilbertus

Postby gomimin » Thu Jan 13, 2011 5:14 pm

@Pacho
if you weren't plowing 'n' paving the ground... :D TY!

Another way of viewing older maps is just editing (Notepad) the map folders js...but you've have to do it everytime... ;)
User avatar
gomimin
 
Posts: 175
Joined: Tue Dec 28, 2010 12:29 am
Location: W11

Re: Game client modified by Gilbertus

Postby naqaden » Thu Jan 13, 2011 10:15 pm

gomimin wrote:Another way of viewing older maps is just editing (Notepad) the map folders js...but you've have to do it everytime... ;)

yeah, I was starting to get bothered by that.

btw I'm aware of a couple bugs with my script and I will update when I have time.
1) apparently sessions can exist without the center tile (tile_0_0.png) so they're getting ignored when they shouldn't
2) the directory path is getting encoded improperly (paths with spaces break it)

EDIT:
updated previous post with fixes
Last edited by naqaden on Fri Jan 14, 2011 9:20 pm, edited 1 time in total.
Fred wrote:no killing moths / or putting / boiling water on the ants
naqaden
 
Posts: 7
Joined: Mon Dec 27, 2010 7:31 am

Re: Game client modified by Gilbertus

Postby Truth0 » Thu Jan 13, 2011 11:09 pm

Pacho wrote:I'm glad this client replaced mine =v


We still love you, too, Pacho.
Truth0
 
Posts: 100
Joined: Thu Dec 09, 2010 5:12 am

Re: Game client modified by Gilbertus

Postby matiasdk2 » Fri Jan 14, 2011 7:56 pm

im getting this error :

"java platform SE binary stopped working"

i dont know what to do :cry:

tryed 32 and 64 client , im using windows 7 x64 btw
matiasdk2
 
Posts: 151
Joined: Fri Jan 14, 2011 7:12 pm

Re: Game client modified by Gilbertus

Postby Gedrean » Sat Jan 15, 2011 12:54 am

matiasdk2 wrote:im getting this error :

"java platform SE binary stopped working"

i dont know what to do :cry:

tryed 32 and 64 client , im using windows 7 x64 btw


1. Check the Troubleshooting Thread, at: viewtopic.php?f=5&t=12278
2. Java Version installed?
3. Have you installed 64-bit Java or 32-bit Java?
4. Problems with OTHER Java apps or sites?
Zampfeo wrote:(On the topic of Open Spaces in W4)
You won't be saying that in a week or two when you realize how many abandoned homes there are. A 30 second boat ride south of my village literally bring you to the ghetto. There's abandoned claims everywhere with the occasional newb taking things and raiders patrolling. It reminds me of Detroit.
Gedrean
 
Posts: 222
Joined: Wed Dec 29, 2010 5:30 am

Re: Game client modified by Gilbertus

Postby Agarrett » Sat Jan 15, 2011 1:16 am

Can I view all the map placed together? How would I view that? I need to make a path for my friends back between two places. All I can view is the current session's map.
User avatar
Agarrett
 
Posts: 673
Joined: Sat Oct 24, 2009 11:37 pm
Location: East of Nowhere

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 1 guest