The Sims 1 Html Webpages Files

Discussion in 'Contribute' started by francot514, Mar 15, 2016.

  1. francot514

    francot514 Well-Known Member

    Im trying to figure out how The Sims 1 Html worked out, right now i will try to understand how the game generate the Html files, and how to parse Javascript code inside it, my main objective is be able to recreate this into TSO, so when you create character and house, a html webpage file is generated with all related info.

    You can find files here if you want to check for it and help me completing this
    http://simsvilleroleplay.bugs3.com/public_html/
  2. francot514

    francot514 Well-Known Member

    -Html file format basics:
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Language" content="en">

    Custom meta with HTTP data connection / cache?
    Using iso-8859-1 charset.
    <LINK REL=StyleSheet HREF='thesims.css' TYPE='text/css'>
    Basic usage CSS style to decorate the page.

    <script language='Javascript'>
    Uses Javascript
    Last edited: Mar 15, 2016
  3. pisarz1958

    pisarz1958 Administrator Staff Member Moderator

    You could just hardcode most of the stuff and just put your data in the right places.
  4. francot514

    francot514 Well-Known Member

    What do you mean?? Hardcode sims data??
  5. pisarz1958

    pisarz1958 Administrator Staff Member Moderator

    Uhm. Nope.
    As you've probably noticed, all these generated websites look exactly the same. Obviously, because they're based on the same template. So, you could create your own template and every time you export something to html, fill it out with data with some dead-simple scripts.
  6. francot514

    francot514 Well-Known Member

    Yes, thats the problem, which scripts are used, and how the game handle it, do you know something about generating premade html pages??
  7. pisarz1958

    pisarz1958 Administrator Staff Member Moderator

    You basically don't need to care about anything else than generating html files. The easiest solution would be using custom tags and replacing them in your C# code.

    This is going to be not-the-best-example-ever, but you might just understand what I mean.
    So let's say you have a file called index.html and there is something like:
    <html>
    <h1>{{ FAMILY_NAME }}</h1>
    <p>blah blah blah</p>
    </html>

    And you want to generate a HTML file with the family name which is in the game, for example. So what's stopping you from just loading the html file, replacing "{{ FAMILY_NAME }}" string with your variable and saving as a new one?
  8. francot514

    francot514 Well-Known Member

    Yes i get it, but not just about HTML, i will need to understand and parse Javascript to generate other functions inside pages.
  9. pisarz1958

    pisarz1958 Administrator Staff Member Moderator

    Why? It's just a part of the template. Just make sure that data is in the right places, formatted in the right way.
  10. francot514

    francot514 Well-Known Member

    Yes, im trying to achieve it, using html tags in C# is not that easy, right now trying to modify person edit screen to allow export html files..

Share This Page