Replies: 45 (Who?), Viewed: 41573 times.
Page 1 of 2
Inventor
Original Poster
#1 Old 26th Apr 2011 at 9:56 PM Last edited by velocitygrass : 22nd Jun 2013 at 8:34 AM. Reason: updated with link to grimreefer24601 wrapper post
Default Medieval CASPart Wrapper for S3PE (Updated 8/7/2011 for patch 2.0)
grimreefer24601 has taken over maintenance of the wrapper and you'll find an updated version that runs in current versions of S3PE here.

This is a wrapper for Medieval CASPart files in S3PE. This wrapper comes in two flavors. One that will read TS3 CASP files (useful for conversions) and one that doesn't.

Added a CASP Wrapper that writes patch 2.0 CASP files (and reads all versions). To convert from TSM 1.x to 2.0 CASP files simply open the Grid change a flag to something else and back and commit. The CASP should then be 2.0.

General usage info

How to use:
  • Make a backup of the s3pi.CASPartResource.dll file in your S3PE installation folder (you can also rename it, but make sure to change the extension so that it is not loaded!)
  • Copy the fitting .dll (32bit or 64bit) into your S3PE installation folder
  • Start S3PE and browse the files.

Changes/additions to the Sims 3 CASPart info:
  • Some clothing type flags have changed (e.g. EveryDay is NPC, Firefighting is Profession)
  • Blend info index elder
  • Blend info index teen
  • Medieval Profession flag
  • shoe material (Unknown4)
  • outfit material
  • unknown byte[4] that seems to be always four zero bytes

If you want to go back to reading The Sims 3 CASPart files remove the .dll and put back your backup of the old s3pi.CASPartResource.dll (or if you've renamed it, rename it back).

Wrapper for converting S3 CC to Medieval

You can find the tutorial by hotroxy777 here.

Steps to turn S3 CC into Medieval CC:
  • Install the wrapper as explained in the readme
  • Make a copy of the package you want to turn
  • Open the copy in S3PE
  • Find the CASP resource, where in the value pane you'll see "WARNING: This is not a Medieval CASP!"
  • Go into Grid and set the Clothing Flag for Profession (not to be confused with the separate Professions Flag)
  • You can also set which professions should have the CC available by setting the Profession Flag. By default all will be set.
  • Save the package and put into your Medieval mods folder

This will only fix problems with the CASP format. In my test with the New Years hat there were clipping issues, which the wrapper obviously can't fix. Some information on other problems that might occur and how to address them has been posted in the above linked tutorial by people who know more about this than I do.

Note: The Wrapper will set the elder and teen blend info index to the one for fit. I hope that it won't matter because there are no teens and elders in Medieval. I also set the outfit material to "cloth". And the version info will be changed to that of Medieval.

This will break your CC for The Sims 3, so work on copies!

This wrapper will work on both Medieval and TS3 CASP files. The only harm in using this wrapper as opposed to the Medieval only wrapper is that you might accidentally break old TS3 files.

Wrapper for Medieval only

This was the original wrapper that allows reading and changing Medieval CASP files.

Modding Tests for Medieval CASParts:

I have done some tests and unfortunately simply adding flags for certain professions is not enough to make that outfit appear in CAS for a hero of that profession. I suspect there is a hard-coded list of allowed outfits somewhere (maybe because of the way outfits can be enabled via codes or achievements).

However assigning a different Instance will work. With the latest S3PE version this is very easy: Simply select details in the context menu type in a new name and click "FNV64". This way I managed to enable the Reaper outfit for my Wizard in CAS.

Troubleshooting

This is the behavior in S3PE that I would expect:

For original S3 CASP files:
  • original S3PE wrapper => displays okay
  • Medieval only CASP Wrapper => displays error
  • S3 CC to Medieval Wrapper (original and 2.0) => displays okay with message "WARNING: This is not a medieval CASP!" before CASP info (This is what you'll want when converting TS3 CC.)

For Medieval 1.x CASP files (original or already converted/flags changed):
  • original S3PE wrapper => displays error
  • Medieval only CASP Wrapper => displays okay
  • S3 CC to Medieval Wrapper => displays okay
  • S3 CC to Medieval 2.0 Wrapper => displays with message "This is a Medieval 1.x CASP:"

For Medieval 2.0 CASP files (original or already converted/flags changed):
  • original S3PE wrapper => displays error
  • Medieval only CASP Wrapper => displays error
  • S3 CC to Medieval Wrapper => displays error
  • S3 CC to Medieval 2.0 Wrapper => displays with message "This is a Medieval 2.0 CASP:"

This should help you figure out what went wrong.

If you extracted one of the Medieval wrappers and put it in the S3PE folder but get the behavior for the original S3PE wrapper, make sure that the original wrapper .dll isn't loaded by changing its extension to something else (e.g. dll_).


License: GPL

Credit: The source code is mainly by Peter L Jones. I only made minor modifications for Medieval in CASPartResource.cs and CASPartFlags.cs.
Download - please read all instructions before downloading any files!
File Type: zip S3 CC to Medieval CASPart Wrapper.zip (65.2 KB, 4133 downloads) - View custom content
Description: Use this one if you want to convert TS3 CC to Medieval
File Type: zip Medieval CASPart Wrapperv1.0.1.zip (64.3 KB, 1446 downloads) - View custom content
Description: Use this one if you only want to edit Medieval CASP files
File Type: zip S3 CC to Medieval 2.0 CASPart Wrapper.zip (65.8 KB, 2285 downloads) - View custom content
Description: Use this one if you want to write Medieval 2.0 CASP files
Advertisement
Test Subject
#2 Old 21st Jun 2011 at 10:39 AM
Oh look, a medieval caspart wrap...FANGIRL SQUEAL!!! OMG I LOVE YOUR ICON!!! IT'S SO KAWAII!!!

This is actually pretty cool though and I can't wait to have my dad install it.
Inventor
Original Poster
#3 Old 21st Jun 2011 at 3:19 PM
Thank you
Lab Assistant
#4 Old 4th Aug 2011 at 9:16 AM
I am haveing a problem I downloaded the wapper so i can convert hairs. But its not working. I installed it as the readme said to but it is still reading the CASP as a normal sims 3 package and not a medieval package.I am not getting any kind of warning saying that it is not a medieval CASP.
I tried renameing the .dll and copying and pasteing and nothing.....I am wondering if it is because it needs the files in the sorce folder. i am not sure where to put that folder. any help would be nice
Inventor
Original Poster
#5 Old 5th Aug 2011 at 12:30 AM
Which version of S3PE are you using? What did you rename the existing s3pi.CASPartResource.dll in your S3PE folder to? When you click on a CASP resource in S3PE, do you get info about the part in the preview panel or is it empty?

The source folder is not needed at all. It is only for developers who want to look at the code.
Mad Poster
#6 Old 6th Aug 2011 at 10:05 PM
The CASPart wrappers, both versions, will not read any of the CASPs in the Deltabuild2, which are either new stuff or remade stuff with the 2.0. Whereas CASP mods I have previously made and the CASPs in the SASFullbuild2 can be read fine. The Deltabuild gives the same error info in the rightside pane as previous to your wrappers' existence.

MedievalMods and Sims3mods: Dive Cave Reset Fix, Resort Revamp, Industrial Oven Revamp, Will O' Wisp fix, UI Sounds Disabled, No Cars, Gnome Family Planner, Townies Out on the Town, No Martial Arts Clothes, Fast Skilling, etc. http://simsasylum.com/tfm/
Inventor
Original Poster
#7 Old 6th Aug 2011 at 10:54 PM Last edited by velocitygrass : 7th Aug 2011 at 7:51 PM.
@Shimrod101: Thanks for the heads-up. I haven't had time to patch Medieval yet. I will look into this, hopefully tomorrow.

ETA: I've added a Wrapper for 2.0 in the first post.
Mad Poster
#8 Old 14th Aug 2011 at 8:39 PM
Thanks, the 2.0 Wrapper works fine on the DeltaBuild CASPs.

MedievalMods and Sims3mods: Dive Cave Reset Fix, Resort Revamp, Industrial Oven Revamp, Will O' Wisp fix, UI Sounds Disabled, No Cars, Gnome Family Planner, Townies Out on the Town, No Martial Arts Clothes, Fast Skilling, etc. http://simsasylum.com/tfm/
Inventor
Original Poster
#9 Old 15th Aug 2011 at 7:05 PM
Great. Thanks for letting me know!
Test Subject
#10 Old 22nd Aug 2011 at 5:18 PM
Can someone explain to me where to put the source files? It may just be too early in the morning for me to try this, but I am completely confused. Thanks!
Inventor
Original Poster
#11 Old 22nd Aug 2011 at 7:24 PM
The source folder is not needed for editing CASP files in S3PE. It is only for developers who want to look at the code.

You only need to:
- Make a backup of s3pi.CASPartResource.dll in your S3PE installation folder (you can also rename it, but make sure to change the extension so that it is not loaded)
- Copy the fitting .dll (32bit or 64bit) into your S3PE installation folder
Test Subject
#12 Old 17th Jan 2012 at 9:18 PM
Thank you~~
Instructor
DELETED POST
20th Jan 2012 at 11:59 PM
This message has been deleted by grimreefer24601. Reason: I'm being stupid
Inventor
DELETED POST
Original Poster
21st Jan 2012 at 7:41 PM
This message has been deleted by velocitygrass. Reason: answer to deleted post
Instructor
#13 Old 11th Mar 2012 at 9:57 AM
Works great for all other files, but does not for P&N's fullbuild package.
Inventor
Original Poster
#14 Old 11th Mar 2012 at 1:38 PM
Hmm, I just installed P&N and I can see the info and grid button on the casp resources. What specifically doesn't work for you? And which resource if it's a specific one that fails?
Test Subject
#15 Old 5th Apr 2012 at 5:09 PM
umm.. i have done everything as instructed, i downloaded the latest version of s3pe, and the S3 CC to Medieval CASPart Wrapper, but somehow it doesnt work , i searched the forums but i didnt find a solution .
here is a screen of the problem:
Test Subject
#16 Old 6th Apr 2012 at 2:30 AM
I had the same problem with the newest version of the s3pe, but the wrapper worked for an older version of s3pe.
Inventor
Original Poster
#17 Old 6th Apr 2012 at 4:21 PM
Dinka13, I got the same result when I used the 32bit .dll in on my 64bit Windows 7 system. But it works with the 64bit .dll. I tested with S3PE 12-0114-2320.
Test Subject
#18 Old 6th Apr 2012 at 5:31 PM
i tried it but it still didnt work , so i decided to check the box in the S3PE and in the wrapper that it will always run the programms as administrator , now it works
thank you for your help C: and for the wrapper :D
Test Subject
#19 Old 10th Mar 2013 at 3:29 AM
This is the error I'm getting:
Error reading resource 0x034AEECB-0x01000000-0x89BDFEADE6120B47
Front-end Distribution: 13-0226-1754
Library Distribution: 13-0226-1754

Source: mscorlib
Assembly: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Could not load type 's3pi.Interfaces.DataGridExpandableAttribute' from assembly 's3pi.Interfaces, Version=1302.26.1753.32192, Culture=neutral, PublicKeyToken=null'.
----
Stack trace:
at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
at s3pi.Interfaces.AApiVersionedFields.Version(Type attribute, Type type, String field)
at s3pi.Interfaces.AApiVersionedFields.checkVersion(Type type, String field, Int32 requestedApiVersion)
at s3pi.Interfaces.AApiVersionedFields.GetContentFields(Int32 APIversion, Type t)
at S3PIDemoFE.MainForm.hasValueContentField()
at S3PIDemoFE.MainForm.getValueControl()
----
Instructor
#20 Old 10th Mar 2013 at 7:12 AM
I've had issues witht he newest S3PE and the CASP wrapper. I'm running 11-1001-1447 . I've heard of others running slightly newer versions, but this is the one I use.
Field Researcher
#21 Old 11th Mar 2013 at 12:26 AM
I was not able to use the wrapper with the newest version, what worked for me was to use an older version of S3PE and the wrapper. I hope this helps you.
Test Subject
DELETED POST
11th Mar 2013 at 5:34 AM
This message has been deleted by amoredidanza.
Test Subject
#22 Old 11th Mar 2013 at 6:05 AM
I'm getting really confused.
Test Subject
#23 Old 11th Mar 2013 at 6:10 AM
I went back to try to download an older version of S3PE like you said but I couldn't figure out how to just download an old version.
Scholar
#24 Old 11th Mar 2013 at 10:00 AM Last edited by ChickieTeeta : 11th Mar 2013 at 10:15 AM.
Quote:
Originally Posted by amoredidanza
I went back to try to download an older version of S3PE like you said but I couldn't figure out how to just download an old version.



Try the link below. This is the one I still use. I've never tried updating it since this version, but I've used this version on a 32 bit system and now on a 64 bit system, with no problems.

sourceforge.net/projects/sims3tools/files/s3pe/OldReleases/s3pe/12-0222-2102

What do you mean, 'get a life'! I'm a gamer, I have many lives.
Test Subject
#25 Old 11th Mar 2013 at 8:45 PM
I got the version working, now I just can't get the hair showing in game. Thanks guys!
Page 1 of 2
Back to top