Fallout 2 Interactive Random Encounter Map (HTML)

Discussion in 'Fallout General Modding' started by phobos2077, Feb 25, 2014.

  1. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    I've made a world map to see what random encounters are on what tile of the map. It's a crude 1 day work (most time spent studying python and parsing data), maybe I'll improve it later.

    Showcase:
    http://phobos2077.ucoz.org/f2_worldmap/
    (currently contains data from EcCo mod v0.6.1)
    Download:
    http://yadi.sk/d/DJ2iHGTyJZ6dp

    It is written in JavaScript and uses json file with worldmap data. To generate your own worldmap.json, use python3 script inside archive.

    Note: image was not made by me, but downloaded from somewhere (googled it)

    Edit: updated page again.
     
    Last edited: Aug 29, 2014
    • [Like] [Like] x 7
  2. .Pixote.

    .Pixote. Venerable Relic of the Wastes
    Modder

    Sep 14, 2009
    Thanks phobos2077, it's very interesting stuff.
     
  3. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    Update map again. Now you can browse all encounter tables and encounter types and see distribution of selected type on the map. The opacity of red rectangles in calculated:
    • for encounter table: encounter rate for this table (for each day time)
    • for encounter type: multiplier of encounter rate of the tile AND maximum chance to encounter selected type on this tile
     
    Last edited: Feb 26, 2014
  4. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Looks pretty great. It would be nice if there's a way to close the data window (it'll block some tiles from selecting) or clear red rectangles. Currently I have to reload the page for those two in my Firefox 27.
     
  5. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    You can clear red rectangles by pressing ESC or by clicking Database link.
     
  6. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Thanks. Pressing ESC does clear red rectangles, but clicking Database link doesn't, and the data window is still there.
    Oh well, it's probably due to my Fx27, reloading the page doesn't hurt I guess.
     
    Last edited: Feb 26, 2014
  7. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    Updated. Added Hide link to hide popup. Also added detailed encounter information to link titles.
     
  8. caasi

    caasi First time out of the vault

    Mar 4, 2014
  9. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    I saw a notification from github :)
    Not sure what you want to improve, but I have no problem with that.

    This is a modding tool and it does what it was designed for :)
    It would be cool if you could make a worldmap.txt generator from it, but that will require serious UI change. Besides, it will still require python script to produce output, unless you decide to make pure JS worldmap.txt generator (I'd advice against it, because python have a powerful library to work with ini files: theoretically, you can apply change to some aspects of worldmap and write them to .txt, without erasing all comments, other sections, etc.).
    This is not required for my mod, as I don't have problem editing worldmap.txt by hand for my small adjustments. The only problem was visualization, and it is solved now :)
     
    • [Like] [Like] x 1
  10. caasi

    caasi First time out of the vault

    Mar 4, 2014
    So that's really your account! I will perform the translation later!

    What I did for now:

    1. You can click the selected grid to hide the menu, like what you do to show the menu.
    2. Few CSS changes, so it will not display type twice.
    3. I changed the way you calculate the maxChance, because in some situation, I got 0 or undefined maxChange. But I don't think I get your idea right, so feel free to change it.
    4. Use class selectors so the program don't have to add and remove DOM elements all the time.

    I am not familiar with Fallout modding, so I don't know what a worldmap.txt is and how it can be useful, will google for it later. :oops:

    I know Python is a powerful language with great communities. If I want to do a pure JS generator, maybe I'll use node.js(a server side JavaScript environment), but just like what you mentioned, I am not sure if npm(node package manager) has any good tool for processing ini.

    BTW, I think frameworks like Angular.js, Ember.js or Knockout.js that deal with data bindings are great for this interactive map. But using them means to rewrite the whole application. :crazy:
     
  11. Cubik2k

    Cubik2k Where'd That 6th Toe Come From?
    Modder

    Nov 22, 2005
    Really nice tool :)
    It could be very fine, if you will make it as an encounter editor ;) Long time ago I tried to do such tool but I have no time for modding now :/
     
  12. phobos2077

    phobos2077 Mildly Dipped
    Modder

    Apr 24, 2010
    Currently, I don't plan to do it. Editing existing encounters is not so hard with text editor :) You just search relevant encounters and encounter tables and change them. Developers normalized data pretty well there.
    However, It's another story if you need to build new worldmap for a TC mod...