Welcome to
Mod The Sims
Online: 1275
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 68 (Who?), Viewed: 1737 times.
Search this Thread
Old 30th Oct 2020, 10:19 PM #26
Battery
Field Researcher

Join Date: Dec 2008
Posts: 385
Thanks: 827 in 5 Posts
8 Achievements


ok can you upload your solution ?
Old 30th Oct 2020, 10:27 PM #27
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


@Battery ,

Here. Class2 and Class3 are my code, Class4 is the original cane code.

https://mega.nz/folder/LNBiGRaS#TU4s0rmSIb20j99p8I9GfQ
Old 30th Oct 2020, 10:33 PM #28
Battery
Field Researcher

Join Date: Dec 2008
Posts: 385
Thanks: 827 in 5 Posts
8 Achievements


irgh its one of those vs solutions that prevents sd from opening it i need to create a new solution for it


E:
using static Cyrus.Sims3Game.CanesForEveryone.Class3; in class2.cs using directives cant contain things like static public etc E: this is a mistake on my end c# 9.0 allows that
Last edited by Battery : 30th Oct 2020 at 11:36 PM.
Old 30th Oct 2020, 10:46 PM #29
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


@Battery ,

I did that because I got some errors with things on another class, put some using directives, tried to point to a exact class inside the other Classes, and VS suggested that to me. It worked, so I maintaned that in.
Old 30th Oct 2020, 10:54 PM #30
Battery
Field Researcher

Join Date: Dec 2008
Posts: 385
Thanks: 827 in 5 Posts
8 Achievements


class4.cs has no namespace at all but still contains a class

in class4 you need to implement all your interfaces there are a few mising
Last edited by Battery : 30th Oct 2020 at 11:05 PM.
Old 30th Oct 2020, 11:02 PM #31
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


@Battery ,

Class4 I did not use at all. It's just a copy/paste of the cane code, as I said. When trying to make the mod work, I just used Class2 and Class3.
Old 30th Oct 2020, 11:10 PM #32
Battery
Field Researcher

Join Date: Dec 2008
Posts: 385
Thanks: 827 in 5 Posts
8 Achievements


in the onpreload method you would need to apply the canges you made to your naming

Cane.UseCane.Singleton = new NewUseCane.Definition();

wont work in this new context you need to access it via all paths

Cane.UseCane.Singleton = new Class3.NewUseCane.Definition();
Old 30th Oct 2020, 11:28 PM #33
Battery
Field Researcher

Join Date: Dec 2008
Posts: 385
Thanks: 827 in 5 Posts
8 Achievements


ok i cleaned up your solution you can use this as a base to start from.
please dont use c# features tha sd doesnt support, im not going to redo the same classes over and over again anymore to fix the same erros

this should compile
Download - please read all instructions before downloading any files!
File Type: 7z Cyrusstuff.7z (27.1 KB, 2 downloads)
Old 1st Nov 2020, 1:20 AM #34
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


It seems I found what has been causing some of the problems. The Jazz Script for the cane postures is limited to elders, and I'm trying to fix it... But SmoothJazz keeps giving me the same error, for some reason.
I open the script and try to edit these lines:

Code:
Parameter "x:Age" = "elder"
Parameter "y:Age" = "child"


To these:

Code:
Parameter "x:Age" = "youngadult"
Parameter "y:Age" = "child"


When I try to save, after making just this one change, SmoothJazz tells me that the code got a syntax error on line 43. (For reference, those two lines are line 8 and 9) Even when I restore the script to its original form, it continues to give the same error. Would someone know what exactly is happening? (I also tried to change the x parameter to child, just to see if it would work, but it continued giving me the same error.)
Old 1st Nov 2020, 6:30 PM #35
Lyralei
Virtual gardener



Join Date: Dec 2013
Posts: 3,095
Thanks: 3444 in 22 Posts
24 Achievements


Quote:
Originally Posted by Battery
As for the "frankensteined code" while you disagree there i am still of the opinion that testing each step one by one might be your best chance instead of trying to fix the whole code at once.
I second this! Most of the time whenever I copy paste some EA code (especially a whole feature), it always breaks for some reason. And sometimes it's really just because of the usage of things. Or thinking I understood what the code does (and what communicates with what) but actually don't. And that's where print statements are your friend

So indeed, try to copy small bits and pieces and test those, rather than the whole lot.
Old 1st Nov 2020, 10:37 PM #36
PuddingFace
Scholar

Join Date: Aug 2014
Posts: 1,065
Thanks: 1565 in 30 Posts
9 Achievements


Quote:
Originally Posted by CyrusBanefort
It seems I found what has been causing some of the problems. The Jazz Script for the cane postures is limited to elders, and I'm trying to fix it... But SmoothJazz keeps giving me the same error, for some reason.
I open the script and try to edit these lines:

Code:
Parameter "x:Age" = "elder"
Parameter "y:Age" = "child"


To these:

Code:
Parameter "x:Age" = "youngadult"
Parameter "y:Age" = "child"


When I try to save, after making just this one change, SmoothJazz tells me that the code got a syntax error on line 43. (For reference, those two lines are line 8 and 9) Even when I restore the script to its original form, it continues to give the same error. Would someone know what exactly is happening? (I also tried to change the x parameter to child, just to see if it would work, but it continued giving me the same error.)


Are you using the latest version of SmoothJazz? The ModTheSims version is not the latest. Use this version http://www.simlogical.com/ContentUp...te/uploads/842/ and make sure you are using this version if you have both installed and also post what's on line 43.

If you like my mods. Consider supporting me on Patreon

Follow me on
Twitter
Instagram
Old 2nd Nov 2020, 1:04 AM #37
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


@PuddingFace ,

Yes, apparently, I was using the wrong version, and I managed to create the jazz script, export it, and put it in the mod package. But now, when I try to use the cane, ErrorTrap gives me a script error and the sim is resetted.
Old 2nd Nov 2020, 1:06 AM #38
PuddingFace
Scholar

Join Date: Aug 2014
Posts: 1,065
Thanks: 1565 in 30 Posts
9 Achievements


You still have the original Jazz by EA right? You might have to work on the Jazz again.

If you like my mods. Consider supporting me on Patreon

Follow me on
Twitter
Instagram
Old 2nd Nov 2020, 2:51 PM #39
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


@PuddingFace ,

What exactly could be causing the script errors? Is putting "youngadult" correct or should I put something different?
Old 2nd Nov 2020, 9:04 PM #40
PuddingFace
Scholar

Join Date: Aug 2014
Posts: 1,065
Thanks: 1565 in 30 Posts
9 Achievements


Quote:
Originally Posted by CyrusBanefort
@PuddingFace ,

What exactly could be causing the script errors? Is putting "youngadult" correct or should I put something different?


Line 43 is giving error so post the code in line 42, 43 and 44. I can't tell otherwise.

If you like my mods. Consider supporting me on Patreon

Follow me on
Twitter
Instagram
Old 3rd Nov 2020, 5:42 PM
Lyralei
This message has been deleted by Lyralei. Reason: Woops, replied to an ancient reply
Old 3rd Nov 2020, 7:50 PM #41
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


@PuddingFace ,

Here's lines 40 to 45.

Code:
State "e_elderCane_idle01_"
    {
        Transitions to "Loop"
        Play 0x6b20c4f3:0x38000000:"a_elderCane_idle01_cane" for "cane"
        Play 0x6b20c4f3:0x38000000:"a_elderCane_idle01_x" for "x"
    }
Old 4th Nov 2020, 1:56 AM #42
PuddingFace
Scholar

Join Date: Aug 2014
Posts: 1,065
Thanks: 1565 in 30 Posts
9 Achievements


I don't see anything that could be an error. What is the error exactly, does it say anything? And also post the line 39.

Maybe just upload the Jazz file completely so I can open it on my computer with Smooth Jazz and check.

If you like my mods. Consider supporting me on Patreon

Follow me on
Twitter
Instagram
Last edited by PuddingFace : 4th Nov 2020 at 6:09 AM.
Old 4th Nov 2020, 9:56 PM
CyrusBanefort
This message has been deleted by CyrusBanefort. Reason: Wrong message
Old 4th Nov 2020, 9:58 PM #43
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


@PuddingFace .

According to the other version of SmoothJazz, the error was in the character 24. Oh, by the way, I ended up sending lines 39 to 45, not 40 to 45.
Here's the jazz file of the cane animations:
Download - please read all instructions before downloading any files!
File Type: rar eldercane.rar (1.1 KB, 2 downloads)
Description: jazz file
Old 5th Nov 2020, 4:58 PM #44
Lyralei
Virtual gardener



Join Date: Dec 2013
Posts: 3,095
Thanks: 3444 in 22 Posts
24 Achievements


Quote:
Originally Posted by CyrusBanefort
@PuddingFace .

According to the other version of SmoothJazz, the error was in the character 24. Oh, by the way, I ended up sending lines 39 to 45, not 40 to 45.
Here's the jazz file of the cane animations:
Seems like it might actually be more about the whole tab and space issue (SmoothJazz is super strict on those). I explained a fix for that in my tutorial right here:*

(scroll to "I got a "Parser doesn't recognise literal" error, what do I do?" )https://modthesims.info/showthread....118#post5637118

Hope that helps!
Old 5th Nov 2020, 9:32 PM #45
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


Ok, I managed to get rid of the script errors by deleting the T and G values in the jazz scripts. But, I still can't get the animations to actually appear. What could I be doing wrong?
Old 5th Nov 2020, 9:43 PM #46
PuddingFace
Scholar

Join Date: Aug 2014
Posts: 1,065
Thanks: 1565 in 30 Posts
9 Achievements


Um I didn't get any error with Smooth Jazz. It saved into the package just fine. Uploaded the .package with the .Jazz file inside.

Edit:-what do you mean by t and g values?
Download - please read all instructions before downloading any files!
File Type: 7z ElderCaneWalk.7z (2.6 KB, 2 downloads)

If you like my mods. Consider supporting me on Patreon

Follow me on
Twitter
Instagram
Old 5th Nov 2020, 10:25 PM #47
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


@PuddingFace ,

After I downloaded the latest version of SmoothJazz, that was not the problem anymore, it was the script errors ErrorTrap would give when trying to use the cane. This was also solved, and now I am here trying to figure out why the animations don't play.
Old 5th Nov 2020, 11:32 PM #48
PuddingFace
Scholar

Join Date: Aug 2014
Posts: 1,065
Thanks: 1565 in 30 Posts
9 Achievements


Oh ok sorry.

Upload the error trap document maybe?

If you like my mods. Consider supporting me on Patreon

Follow me on
Twitter
Instagram
Old 6th Nov 2020, 12:37 AM #49
CyrusBanefort
Original Poster

Lab Assistant

Join Date: Jun 2017
Posts: 130
Thanks: 116 in 2 Posts
4 Achievements


@PuddingFace ,

It's okay.
That problem was solved, errortrap is not giving me script errors anymore. However, the animations still don't appear, even if the script is executed correctly. Perhaps there's a difference in the elder skeleton and the adult skeleton? That goes in the realm of guesswork, as animations aren't my forte.
Old 6th Nov 2020, 12:52 AM #50
PuddingFace
Scholar

Join Date: Aug 2014
Posts: 1,065
Thanks: 1565 in 30 Posts
9 Achievements


The skeletons are same but maybe we need to duplicate and then rename the duplicated animations using Blender.

Export the animations with Canes to a folder. Now import the animations into Blender. Then export but change the name, switch the 'e's to 'a's so e2a becomes a2a for eg.

The animations that are already 'a' don't need to be changed.
Also in the Jazz script change x:age from elder to adult.

The Jazz Script you gave me seems to be about harassing with cane and not about walking with the cane. Maybe I am mistaken.

If you like my mods. Consider supporting me on Patreon

Follow me on
Twitter
Instagram
Reply


Section jump:


Powered by MariaDB Some icons by http://dryicons.com.