{Script}

{CSS}

Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

s3hq (HQ Modification Helper) v1.0.0.0

207
Project: ts3tools Description: Application created to suppress patch-compatibility updates of HQ Modification;
The application will affect The Sims 3 GraphicsRules file for the original mod purposes.
Objective: Allow easy toggle between |enable/disable| |limit sizes| over the referring mod.
GUI
- Texture Size Multiplier 512px or 256px;
   - Switching the Texture Size Multiplier will allow different Texture Sizes to be set;
   - While 256px is not something I consider "significative" change, might help with the usage for some users.

Instead of having to rewrite a bunch of files everytime a patch comes out, this will, hopefully, be able to patch the GraphicRules from now on.
If you like the tools of this project, you can write a review of it or simply click "Like" on the project review page.


Preview GUI (Graphical User Interface)




s3sr (Scripter) v0.0.9.3092

47
Project: ts3tools Description: Process batch operations on the game packages through a Custom Script.
Objective: Export a Game resource(s) from The Sims 3 to another package altering its default attributes.
Custom Extension: (*.s3sr), allows easy running of script operations along with the tool.

Attention
This is a "complex" tool, if you are unfamiliar with resource editing avoid this.
It is recommended, however, only use it in case someone provides you an already written script file for it.

DO NOT share the output package of your script created with this tool.
It breaks the purpose of this application, in case of structure changes on resource(s).



Preview GUI (Graphical User Interface)


s3ce (Sims3Pack CommandLine Extractor) v1.1.0.74

27
Project: ts3tools Description: Extract Sims3Pack-oriented files through cmd (CommandLine) or via WinShell.
Objective: Make the extracting process of those files easier and user-friendly.
GUI
- Set a custom Extraction Directory;
- Integrate the program to Pescado's s3rc;
   - Attempt to fix or/and decrapify the generated package;
- Add a handler when you right-click with any Sims3Pack to extract them;


Preview GUI (Graphical User Interface)


Reverse Engineering on Blogger (Atom/HTTP)

19

Well, I wanted to create an Error Report feature to use within my tools.
Which would send me the data of any exception/crash my applications might cause.


To implement such feature I was thinking on, since I don't own any website, to make Error Report being actually sent as an usual comment on a special page I make on Blogger.

You can find Blogger APIs for .NET to study more about Atoms (RSS) and how they implemented it.
But I don't want to import such thing as this would require me to provide my own login information.
Even encrypted, anyone with enough knowledge can reverse-engineer it to get.
If one's willing, one does.

After some struggling I found to be better to send POST data using System.Net.WebRequest from C#.

Blogger requires some POST data to be sent such as:
(When Comment-Form is used as an iFrame)
Variable Type Description
securityToken string Token Hash to verify Autenticity
blogID unique int Blog UID (Unique Identifier
[pageID | postID] unique int [Page | Post] UID (Unique Identifier)
encodedIds string Cached Author IDs. (Encoded with UTF-8)
encodedSelectedId string Current Author IDs. (Encoded with UTF-8)
showPreview bool false to submit.
true to return to Comment-Form with Preview Data.
photourl string URL of Photo
photowidth int Width in Pixels of Photo
photoheight string URL of Photo
openIdUri string if OpenID, it's URI
anonName string Anomymous ? "Anonymous" : Custom Name
anonURL string Anomymous ? "" : Custom URL
commentBody string Message as HTML (Encoded with UTF-8)
identityMenu string Identity Chosen.
"CURRENT" | "NONE" | "OPENID" | "NAMEURL" | "ANON"

Using the following C# written functions I am able to send POST data.
WebResponse HTTP_Send(string URi, string QueryParams, string Method)
{
  WebRequest httpRequest = WebRequest.Create(URi);
  httpRequest.ContentType = "application/x-www-form-urlencoded";
  httpRequest.Method = Method;
  byte[] bytesParams = Encoding.ASCII.GetBytes(QueryParams);
  Stream os = null;

  try
  {
    httpRequest.ContentLength = bytesParams.Length;
    os = httpRequest.GetRequestStream();
    os.Write(bytesParams, 0, bytesParams.Length);
  }
  catch (WebException ex)
  {
    MessageBox.Show(ex.ToString(), "HTTP Request Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    return null;
  }
  finally
  {
    if (os != null)
      os.Close();
  }

  return httpRequest.GetResponse();
}

string HTTP_Response(WebResponse httpResponse)
{
  try
  {
    if (httpResponse == null) 
      return null;
    StreamReader sr = new StreamReader(httpResponse.GetResponseStream());
    return sr.ReadToEnd().Trim();
  }
  catch (WebException ex)
  {
    MessageBox.Show(ex.ToString(), "HTTP Response Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    return null;
  }
}
However, seems like, either some specific key is missing, or blogger know the data is being sent by an application.
Even with the request of the POST data running fine, Blogger does not create the comment as it should.

This code may serve for many purposes, allowing you to send GET/POST data to other websites.
(Examples)
// Send 'param1=Value&Param2=Value' via GET method to 'http://www.domain.com/'
WebResponse sendData = HTTP_Send("http://www.domain.com/", "param1=Value&Param2=Value", "GET");
// Gets the response in HTML
string responseData = HTTP_Response(sendData);

More info at comments.

s3lc (Language Changer) v1.0.1.13

8
Project: ts3tools Description: Change The Sims 3 Game Language through registry operations.
Objective: Change the game language easily.


Preview GUI (Graphical User Interface)