Home | Download | Discussion | Help | Site Map | New Posts | Sign in
Replies: 35 (Who?), Viewed: 14764 times.
Page 2 of 2
1978 gallons of pancake batter
staff: moderator
Original Poster
#26 Old 8th Sep 2011 at 5:39 PM
smochina4000, that is way off topic in this thread. Please read the pure scripting tutorial to get going and then refer to the modding discussion forum to get direction.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#27 Old 8th Sep 2011 at 8:56 PM
Thank you! OK, I will search more.
Lab Assistant
#28 Old 17th Sep 2011 at 3:43 AM
Quote:
Originally Posted by Buzzler
I just looked at your code in Reflector. You only have the interaction, but it just sits there and doesn't get used. The point of the localized coding tutorial is not to get you started in script modding, but to get you started in writing localized code *after* you started script modding. Please refer to Tutorial:Sims_3_Object_Moddingwiki to see how an interaction gets added to an object.


He is doing a sim to sim interaction, not sim to object. How do you add an interaction in that case?
1978 gallons of pancake batter
staff: moderator
Original Poster
#29 Old 17th Sep 2011 at 9:51 AM
Quote:
Originally Posted by jtravers88
He is doing a sim to sim interaction, not sim to object. How do you add an interaction in that case?
Read the pure scripting tutorial to make the basic frame for a object-less mod.

Then, in the OnWorldFinished method, you can find all objects you want to add the interaction to by calling
Code:
Sims3.Gameplay.Queries.GetObjects<T>();
where T is any class that is a GameObject, e.g. Fridge. It returns an array of T.

To add your interaction to it, you call every object's AddInteraction method. Don't forget to check whether the object already has the interaction or you'll end up with your interaction being present multiple times.


Again, this is completely off-topic in this thread, so if you have further questions, please use Modding Discussion.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#30 Old 6th May 2012 at 4:06 PM
Default Is there any way for making an animation without using "smooth jazz" as intermediate?
I would like more advanced codding tutorials, learning things about sims 3 Class Libreries, have access to the function description and code my own packages as I want. I have so many ideas and don't know how to start.....
Lab Assistant
#31 Old 1st Oct 2015 at 2:14 AM
Buzzler, would you have any idea as to why twallan's STBL tool doesn't compute the correct hashes for the keys? So for example:
Code:
<?xml version="1.0"?>
<TEXT>
<KEY>DeeDawgMods/UnlocksManager/Test:IsThisWorking</KEY>
<STR>So.. is this working as expected?</STR>
</TEXT>

becomes
Code:
Unknown1: 0x0000
Unknown2: 0x0000
Unknown3: 0x00000000
--- (0x1) ---
[0] 0x365F25C6986E6C18: So.. is this working as expected?
---

But the right hash for DeeDawgMods/UnlocksManager/Test:IsThisWorking is 0x0C93BE04DBF8DA18 and not 0x365F25C6986E6C18.
XML-file used have been attached.

I would appreciate any input you might have on this.
Thanks in advance.
Download - please read all instructions before downloading any files!
File Type: zip StringsEnglish.zip (299 Bytes, 3 downloads) - View custom content
1978 gallons of pancake batter
staff: moderator
Original Poster
#32 Old 1st Oct 2015 at 9:34 PM
Curious. I can't say I ever noticed this, although I can reproduce it. I've just spent the last couple hours checking the hash algorithms, the STBL wrapper of S3PE and the STBL generation of STBL. STBL, S3PE and TS3 all generate the same hashes, STBL writes the right key and S3PE reads the right one as far as I can tell.

Did you actually try the generated STBL? I would suspect that it still works.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Lab Assistant
#33 Old 2nd Oct 2015 at 9:03 AM
Yes, I did test out the generated STBL and it didn't work.
However, if I manually change the key to 0x0C93BE04DBF8DA18, which is the correct hash according to S3PE, it works. But obviously, editing this manually would be.. well, time consuming to say the least.

But since everything seems to be in order regardless of this, I'm guessing it must be a difference between the games. As you might know, I'm developing mods for TSM (forever alone). The code for it though, seems to be exactly the same, but maybe not. I'll have to investigate that further.

Anyway, I appreciate your effort on this, as your results does help me as I now know where I need to look.
So many thanks, Buzzler!
1978 gallons of pancake batter
staff: moderator
Original Poster
#34 Old 2nd Oct 2015 at 2:51 PM Last edited by Buzzler : 2nd Oct 2015 at 10:29 PM.
All right, I think I found it. When you add two blank spaces two DeeDawgMods/UnlocksManager/Test:IsThisWorking, the resulting FNV hash is 0x365F25C6986E6C18. So STBL does something wrong when parsing the input file.

Instead of trying to debug the existing manual parsing, I rewrote most of the thing. Give it a shot.

http://www.modthesims.info/download.php?t=565291

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Lab Assistant
#35 Old 2nd Oct 2015 at 3:27 PM
Funny, I actually just came here to tell you the same thing. Came to the same conclusion after seeing that twallan manually parses the file and doesn't actually use it as a XML-file - doh!
I had actually planned to write a new application myself, but I'm happily surprised to see that you already beat me to it.

You should add it to the tutorial as an alternative.
Perhaps adding a warning somewhere that indenting causes problems with twallan's STBL application would also be beneficial.

But again, many thanks Buzzler!
1978 gallons of pancake batter
staff: moderator
Original Poster
#36 Old 2nd Oct 2015 at 5:28 PM
I will update the tutorial later today and maybe upload the new stbl version. Thanks for bringing it up.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Page 2 of 2
Back to top