{Script}

{CSS}

s3sr (Scripter) v0.0.9.3092

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)


License
This application is licensed under GNU GENERAL PUBLIC LICENSE.
By using or modifying this application, you are and must agree with its terms.

Applications Policy

Credits
General Credits
Peter L. Jones (s3pi)


Requirements
.NET Framework v3.5 | Or grab the latest v4.0
Windows XP | Vista | 7
High-Privilege Account (Administrator Rights)

Usage
Extract the file with WinRar or 7Zip
Run the executable to define the game directory paths.
(At first run, the application will attempt to create its extension on the registry)
Once you change the settings and close to save, you can just double click the script file (*.s3sr) to run it's instructions.

Todo List
  • Advanced Statistics
  • Update Checker
  • Array Pattern?
  • OBJK Handling
  • Stencil Addition via Script for OBJD (Stil dunno understands...)
  • New Attributes ?

Change Log

Script Pattern
:: Comment Line
[SECTION]
{Key}
OBJD/OBJK/CASP Instruction

Scripts Available


Script Descriptions/Examples
::Comments Description
Used to add comments to the script.
The lines where they are located will not be readen by the application.

If you use a comment in the script it must respect:
  • Be located anywhere on the script, EXCEPT between {Key} instructions.

[SECTION] Description
Defines to what game the instructions below this instruction will be applied to.
The script can contain multiple sections, but they all must respect the following:
  • SECTION must be located between square brackets in the line it is applied;
  • MUST be a valid SECTION value, otherwise the operation will be aborted.

{Key} Description
This instruction will be only used in the output package.
It will create an _KEY reference to the following Script Instruction.
Providing an output package easier to understand by other viewers.

If you provide this instruction it must respect the following:
  • Name must be between curly brackets in the line it is applied;
  • Located 1 (One) line before Script Instruction
This Instruction is not necessary to provide.
If not provided, the Script Instruction will not contain a _KEY reference to it in the output package.

Instruction Description
Provides information on what to change on the specified resource.
A Instruction must respect the following:
  • FIRST Attribute MUST be the Resource Type (OBJD, OBJK or CASP);
  • EACH Attribute MUST be separated using space;
  • EACH Attribute MUST be separeted from it's value using a colon;
  • MUST provide the Resource Information:
    • Resource Instance value, ALWAYS;
    • Resource Group value, ONLY IF it is different than default (zero/null);
  • Regarding the Resource Attribute Name:
    • Case-Insensitive;
    • IF it's is not a valid Attribute Name it will be ignored by the application;

Valid Instruction Attributes List
SECTION
Value Description
BASE Section Instructions for Base Game
EP01 Section Instructions for EP01 (World Adventures)
SP01 Section Instructions for SP01 (High-End Loft Stuff)
EP02 Section Instructions for EP02 (Ambitions)
SP02 Section Instructions for SP02 (Fast Lane Stuff)
EP03 Section Instructions for EP03 (Late Night)
SP03 Section Instructions for SP03 (Outdoor Living Stuff)
EP04 Section Instructions for EP04 (Generations)
STORE Section Instructions for Store Content
CUSTOM Section Instructions for Custom Content (Mods)

IDENTIFIER
Name Type Value Pattern Description
Group uint 0x00000000 Resource Group Reference
Instance ulong 0x0000000000000000 Resource Instance Reference

OBJD
Name Type Value Pattern
isStealable bool 1 or 0
isReposessable bool 1 or 0
objectTypeFlags uint 0x00000000
wallPlacementFlags uint 0x00000000
roomCategoryFlags uint 0x00000000
movementFlags uint 0x00000000
roomSubCategoryFlags ulong 0x0000000000000000
functionCategoryFlags uint 0x00000000
functionSubCategoryFlags ulong 0x0000000000000000
buildCategoryFlags uint 0x00000000
slotPlacementFlags uint 0x00000000
cutoutTilesPerLevel uint 0x00000000
ambienceTypeHas uint 0x00000000
levels uint 0x00000000
moodletGiven uint 0x00000000
moodletScore int 0
price float 0.0
FireType uint 0x00000000
BuildBuyProductStatusFlags uint 0x00000000
isScriptEnabled bool 1 or 0
isVisibleInWorldBuilder bool 1 or 0

OBJK
Name Type Value Pattern
ScriptClass string stringvalue

CASP
Name Type Value Pattern
AgeGender uint 0x00000000
Clothing uint 0x00000000
ClothingCategory uint 0x00000000
SortingPriority float 0.0




46 comments :

#MK said...

Beta Release Available.

#MK said...

In case of error, report me back on this thread or send me an email with the log registered by the application.

Anonymous said...

Will there be a tutorial? This tool; while very useful seeming, makes S3PE which was awful for me to get used to look positively user friendly.

I have a basic idea.. (edit script-pattern file then click s3sr) .. But a little enlightenment on how the edit should look would be nice. Maybe a screenshot?

#MK said...

A "tutorial" is basically what's already in this post.

The (*.s3sr) file is a plain-text file encrypted in ASCII.
I am currently looking for people willing to create scripts with it.

Its purpose it to exactly make the processing through game packages easily.
In case of a structure change in the resource (OBJD/CASP), which happens sometimes by the developers.
This tool exists for that, as it will extract from the user own game files.

#MK said...

Well, when people start developing their own scripts you will get the idea how they work.
There's a "test" script on the source file, on the readme directory, you can take a look at it.

#MK said...

Update: v0.0.9.27 Available

lilisims.com said...

(I apologize for the delay! ~ I shared what I created already earlier now. (I'm going to the doctor = I hope for it everything will be fine) ~ And I write to You on a weekend:))

Anonymous said...

Downloaded, extracted, ran once to enter the alternative folder for the store stuff, downloaded scripts to alter catalog categorizations but it gives me en error when running double clicking the scripts:
"Exception @ "UGFyc2VTY3JpcHQuY3M= 139";
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
System.IO.Directory.GetFiles(String path)
s3sr.ParseScript.Start(String[] path_Scripts)"

Is it doing this because my computer isn't in english? (My documents folder doesn't exist under that name) *confused*

#MK said...

Thanks for the error log, there will be a new version soon, will recommend you to test when available, so that you can see if it persists.

It could be problem of the language, I've seen many applications to have problems regarding characters not being into the default ASCII, but in Unicode/UTF-8. What language is it exactly?

Anonymous said...

My system language is French. "My Documents" is "Mes Documents" and "Administrator" is "Administrateur". What is odd is that there is no special characters or accents in the filepaths but I don't see what else could be the reason since the filepaths are set correctly and I didn't get any errors regarding NET framework or whatever other component.

I'll wait for an update, thanks for answering.

#MK said...

Thanks. I see. The log error doesn't store he exception message itself, you happen to remember the path it was shown?

Anonymous said...

Sorry for the delay ^^
Here's the full error log: (I replaced the computer name with XXX)
Exception @ "UGFyc2VTY3JpcHQuY3M= 139";

System.IO.DirectoryNotFoundException: Impossible de trouver une partie du chemin d'accès 'C:\Documents and Settings\Administrateur.XXX.000\Mes documents\Electronic Arts\The Sims 3\DCCache'.

à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

à System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)

à System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)

à System.IO.Directory.GetFiles(String path)

à s3sr.ParseScript.Start(String[] path_Scripts)

Maybe the program doesn't like the DCCache forlder set up for the store stuff? I have store stuff both in the DCCache (installed with the launcher, like worlds) AND in package form in mods so I've set up the DCCache as the main filepath for store stuff and the \Mods\Packages\EAStore as an alternate filepath. The output filepath is set to C:\Documents and Settings\Administrateur.XXX.000\Bureau\test

Well, I hope it helps.

#MK said...

Thank you for your log, it helps a lot.
The problem in here is that I direct the program to lookup the default english directory.
And as you have a different system language the path would be different.

French would actually be "Documents\Electronic Arts\Les Sims 3"
Is that correct? If so, the next update shall fix this issue with French system language.

Anonymous said...

No it's "Mes documents\Electronic Arts\Les Sims 3"
(C:\Documents and Settings\Administrateur.XXX.000\Mes documents\Electronic Arts)
Yes, it's odd that the French My documents fullpath mixes English and French at the same time, windows always did that. I never understood why, probably to make everyone confused lol

Looking forward for the next update!

Anonymous said...

Oops didn't paste the last part of the fullpath; my bad ^^
C:\Documents and Settings\Administrateur.XXX.000\Mes documents\Electronic Arts\Les Sims 3

#MK said...

Update: v0.0.9.3012 Available

Anonymous said...

It now works for French OS! YAY! Thank you for this tool, I can now correct some store stuff that were installed with the launcher.

#MK said...

Oh, I am glad that issue is now solved.
Thank you for your report.

#MK said...

Update: v0.0.9.3083 Available

Unknown said...

I'm trying to use this tool, but everytime I double click the excutable file I get this error log:

Exception @ "U2V0dGluZ3MuY3M= 123";


System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.

en s3sr.Settings.Read(Boolean forceFirstRun)

Double clicking a s3sr script will also result in the same error log. At first I thought it was due to Generatiosn, but now that it is updated I cannot see what's the problem.

#MK said...

Sims MX, perhaps the application doesn't have rights to access the registry.
Try right-click the executable and click "Run as administrator".

Unknown said...

I tried running the application as administrator. The error logs keep appearing, but I managed to get the [BASE]-tagged scripts to work. Expansion packs and stuff packs are not detected by the application and running a script that has content for those packs will not generate a .package file.

Also when running [STORE]-tagged scripts I get different error logs. When I'm asked if I want to backup and I say yes, I get this: "Exception @ 'UGFyc2VTY3JpcHQuY3M= 139';" when I say no, I get "Exception @ 'UGFyc2VTY3JpcHQuY3M= 379';" I changed the Store's location from "DCCache" to "DCBackup" with no results.

#MK said...

Well that first error lies that the application can't read the installation setup directories from the registry.

I could write an application to show your current registry roots, but that can lead that it may not work reading the registry as well.

So, I would ask you to go to your registry to the following key:

64-bit: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Sims]

32-bit: [HKEY_LOCAL_MACHINE\SOFTWARE\Sims]

Export it and if you could please send me the .reg file;
There only lies info I can see if your setup is different than the default (french was, and had to fix);

Just in case, check if you are running last s3sr build, as well to have .NET Framework 3.5 or latest hotfix/build.

Unknown said...

I've sent you the key.

Killc*a said...

I tried to write my own script (I changed buymode categories of some objects). It works fine for all objects except from Generations (EP04). My game is in German, if that matters (so the path for this EP is C:\Program Files\Electronic Arts\Die Sims 3 Lebensfreude), and I defined the right paths for every EP in s3cr.

Is it a problem in the program or am I doing something wrong?
Thank you in advance!

#MK said...

Killc*a, I did fixed that issue, but it isn't present in this last build, which is why the tool does not parse the script with EP04.
I did not had time to work on my projects this week, but I hope I can get this last build uploaded this weekend.

Killc*a said...

Thank you! I will wait for the next version.

#MK said...

Update: v0.0.9.3089 Available

Killc*a said...

It works for EP04 stuff now. Thank you!
But I ran into another problem. I want to recategorie some store stuff (officially bought and installed via the launcher). I checked "Decrypt Store Files" and I get this error message when I run my script file:

Exception @ "UGFyc2VTY3JpcHQuY3M= #006";


System.IO.IOException: Die Datei "C:\Users\(my username)\AppData\Local\Temp\tmpEDD9.tmp" ist bereits vorhanden.

bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

bei System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)

bei System.IO.File.Copy(String sourceFileName, String destFileName)

bei s3sr.ParseScript.Start(String[] path_Scripts)

(The first sentence means that the file already exists.)

#MK said...

Thank you, Killc*a, you and Sims MX have both the same issue.

I will investigate that, though I know the problem already, so I will be implementing a fix as soon as possible when I get on working on the tool.

#MK said...

Update: v0.0.9.3092 Available

Indiasong said...

Just downloaded it and when I click on the file to install I get the message s3sr has stopped functionning, in French of course.

Indiasong said...

And I wanted to say I can't open your page with IE9.it opens but it is impossible to scroll, and I can't close the page, or do anything with the other pages I have opened. I have to forceclose the process, which gets as high as 190000k.
Chrome lets me scroll, but as if it was paddling in molasses.

#MK said...

Indiasong, does it show any warning/error before the crash?
Perhaps you should try to run it as Administrator;

As for my page, I would say my blog is too heavy for applications that pretend to work as browsers (IE)~ :P
But yeah, I need to fix my CSS abuse (CSS addicted here)!

Amanda said...

Hi Anach,

Great tool, been a tremendous help to me thus far.

Just wondering if there is a way to utilise the "UISortPriority" field in the OBJD resource? I see that field isn't listed in the valid attribute list, but I didn't know if there was some way for me to add it or if it's something you would have to do when/if you update.

This would enable you to change the UISortPriority from 0x00000000 to say 0x00005000 on multiple files thus making them all show up at the end of the catalogue listing, instead of having to do them one by one (not fun!). It's another good way to get your cc organised.

Just wanted to check since I'm not an avid programmer, but sometimes I can figure things out if I know where to look to make changes.

Appreciate any input, and thanks again for what you've accomplished so far. After successfully manually merging a stubborn object into the main launcher .dbc files and getting it to work as if the launcher had actually installed it has given me the desire to learn new things.

Amanda said...

Hi again

First, sorry for calling you Anach on previous post, was reading another forum post and spazzed.

Second, I actually managed to add the UISortPriority to the source files by fiddling around, and it works! So no need to even bother with my other post above.

My new question:

If you have like 50 files in your STORE folder and want to make the same change to all of them as a batch, is there any way to do this without having to list each item separately in the script file? I guess like using a "wildcard" in the Instance value so that it makes changes to everything in the folder?

#MK said...

Amanda, sorry for late reply.

The "UISortPriority" field will be in the next build.
As for your question, that is possible, yes.
I think that would be a great feature for this tool, as it fits its purpose to batch operations.
It will implemented in the build as well.

Amanda said...

No worries on reply delay. Gave me time to fiddle and learn things for myself, which is good right?

I actually managed to write a small program that creates the script file for me. It's kinda primitive, but it works ok, so for now I'm making a master script that contains every item in the game with my preferred settings. If I ever want to make a change, I just find the InstID in the master script and edit whichever field I choose for a particular item.

On a back burner, I noticed there are quite a few items that I normally change so that I can use them in CAW. If, however, the items happen to be CommonBlock Version C, the "isplaceableonroof" and "isvisibleinworldbuilder" fields will not be available unless you first use s3pe to change to either Version D (roof) or Version E (worldbuilder), and your prog will error out if you try to edit the "isvisibleinworldbuilder" flag on something below version E. You're probably already aware, just wanted to make mention.

Anyway, looking forward to updates. I am really, really enjoying working with this. The hardest part is actually trying to decide "HOW" to group all of this stuff...is it a flower?...is it a sculpture?...is it part of a set?...brain collapse...

Take care!
Amanda

Nox said...

I'm so looking forward to the update version. I'm making OBJD for my wrong-categoried CC and google led me here. What Amanda said is really intriguing, imagine I have different folders for Plants, Mirrors, Display...then I only have to run the a specified script for each folder..:D Is it really possible?

Killcia said...

Could you please update it for Pets? I can't choose a path for EP5.

Anonymous said...

Hi #aWT. Thank you for this awesome Tool. I have used it for my Custom Food Script:

http://nonasims.wordpress.com/2012/05/11/edit-your-custom-foods-easily-s3sr-objk-resource-scripts-batch-processing-no-s3pe-needed/

Pamela said...

Update: v0.0.9.3089 Available

Unknown said...

aWT, will you update the file to support the latest expansion packs? I downloaded the latest version and it only supports packs older than Town Life Stuff.

yanmaneee said...

moncler outlet
air max 95
zx flux
off white jordan 1
coach outlet online
yeezy
kd shoes
nike air force 1
fila online shop
michael kors outlet

yanmaneee said...

supreme clothing
golden goose outlet
yeezy
yeezy
supreme outlet
jordan shoes
golden goose

Anonymous said...

kyrie 5 spongebob
kd shoes
curry 6
yeezy
supreme outlet
off white hoodie outlet
Golden Goose
supreme
yeezy
golden goose outlet