Simblesse Oblige Forum Index Simblesse Oblige
Forums for serious Simmers to share knowledge about The Sims 1
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Magic Crystals - new ability (Palm Reading) possible?
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    Simblesse Oblige Forum Index -> Hacker's Hideout
View previous topic :: View next topic  
Author Message
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Sun Jun 07, 2015 1:44 am    Post subject: Reply with quote

The above is generic stuff that is good to know for every project but I'm hesitant to additional feedback publicly because I don't know how much you want revealed before you are ready to share the object with everyone.

I do have to say, though, that I totally love your added magic!
LOVE IT! thumbsup thumbsup
I think her returning to her sink so much kinda interferes with it a bit and she'd be even more fun with that bit removed.

I did have her get stuck in a far corner whenever there was nothing for her to do. Dirty dishes would unstick her (I a not sure if gardening would as well. She fixated on the plants when she arrived and I think everything is all watered now. My assumption s ANY task would help unstick her). (I am testing her on a small lot with very little furnishings so she blows through her tasks pretty quickly.)

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Simscilla
Member
Member


Joined: 01 Apr 2011
Posts: 58

PostPosted: Sun Jun 07, 2015 9:31 am    Post subject: Reply with quote

Raeven, you are a star smile I am happy you like it! And thank you so much for checking the file and writing down this generic stuff! I always get confused with Error and False - to me, they both read 'mistake' laugh

Test lot is the Agent family which I got from SimEchoes. Six very successful Sims without any sense of housekeeping. Even with stoves that give them cooking skills, they've got just one sticky cooking point each! So they use your Nearly Napa Grill, producing a lot of dirt which trankfully attracts flies and roaches. They hardly ever take a plate from the table, and when they decide to cook, every surface on the lot is in use and they get that tablet with the cans from the fridge, which is another source for piles of junk. Great for study!

It took me several days to hunt down 'Undefined Transition'. At least I thought I did, and I would not have sent the file had there been a remaining error report. Sorry about that. That usually happened after she cleaned something and before she picked up piles of junk from the floor.

So... no return to the sink? Where else should she go? Sending her straigth to the easel? I thought about levitating, for she might like to return home but the evil man Mr. Zdongk made her housebound to the sink? That sink is so pretty, it could belong to a Fairy's home.

The core of the Magic Maid is the BHAV 4221 Process line from the Scullery Maid. I did not change anything in the way it runs, as any alteration led to that fast nodding of running code. I was wondering why the line with the EP comes after the action when it usually comes before.

But now that I have a safe copy as a starting point, I'll change the lines like you said and will let you know.
Back to top
View user's profile Send private message
Simscilla
Member
Member


Joined: 01 Apr 2011
Posts: 58

PostPosted: Sun Jun 07, 2015 10:47 am    Post subject: Reply with quote

sent!
Back to top
View user's profile Send private message
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Sun Jun 07, 2015 3:01 pm    Post subject: Reply with quote

(You're having coffee with me again today! :))

Let me know if anything about her should be kept under wraps until she is revealed so I don't spill any beans. (For future reference: That backfires when your surprise feature is too obscure, by the way. To this day I still don't think anyone realizes that when the pirate toilet clogs it clogs full of toads and actually starts spawning toads on your lot LOL) It sounds like we are talking freely about her design. But shut me up if I got that wrong.

Quote:
So they use your Nearly Napa Grill, producing a lot of dirt which thankfully attracts flies and roaches.

Right?? And buffet tables. Between drills, buffet tables and strays I get a chance of flies even though it is a sparse lot. My little test family has 4 kids (I was checking out little Servo-kids skins I did.) I'm also testing the at-home camping tent to see if it's too bad to release when I get the website done and did, so I don't have messy beds to reliably produce roaches. I need to do that.

Quote:
At least I thought I did, and I would not have sent the file had there been a remaining error report.

Understood. The main reason mentioned it was figuring you ahve 2 copies installed in your game. That makes any and all testing you do invlaid. Your best bet is to remove all copies from the game. Save it with her uninstalled and then reinstall the lates version of her only. Then you know for sure there is just the one and you sorta reset her.
The error should definitely have shown up in your game. It's failure to do so is an indication that something is amiss.

Quote:
The core of the Magic Maid is the BHAV 4221 Process line from the Scullery Maid. I did not change anything in the way it runs, as any alteration led to that fast nodding of running code. I was wondering why the line with the EP comes after the action when it usually comes before.

I'm not sure what you mean by fast nodding of running code.
It sounds like you are saying the other scullery maid is also like that. If so then it was a mistake that needs correcting. I am assuming that the line read " >0", not "8", though since that scullery maid did not use any magic and simply needed to know if roaches were possible in the game or not (they were introduced with the first expansion pack so Vanilla games do not them)

If that wasn't what you meant then you 'd have done it when adding repair and gardening to the BHAV. Rewriting the BHAVS first really helps to avoid doing that when adding in new lines.

Quote:
So... no return to the sink? Where else should she go?

In and of itself it's not bad that she returns to the sink. The weirdness came in when she was claning floods in the bathroom. She'd mop one flood then return to the sink and then return to the bathroom and mop up one more and back to the kitchen. It ddn't flow very well. Might be inherited but definitely very noticeable with your additions.

(I also found that she would cast in between watering each of the flower beds whcih I happen to have laid out next to each other.)

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Sun Jun 07, 2015 3:03 pm    Post subject: Reply with quote

It is my belief, by the way, that that the corner she got stuck in whenever idle is where the car portal is. It's where the Schoolbus parks. I cannot figure out why she would be trying to get to the carportal, though, and have not tried her on other lots (where the carportal is in another location).


EDIT:
OH I wanted to ask - Since your NPC is casting real spells instead of "practicing", does she contribute to the lot's magic cast counter? Will it effect things like magic flowers and roots and/or the spells casting police and/or scare non-magicals?

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Sun Jun 07, 2015 3:40 pm    Post subject: Reply with quote

Testing. Got this straight away:

Quote:
Error: Undefined Transition.
Iterations: 12
Frame 1:
Stack Object id: 0
Node: 6
Tree: id 4221 name 'Process' version 29
from .\downloads\beta\simscilla\magic_maid\rml_kitchenslave_magic
Prim state: 0
Params: Locals: 0 0


Both priv: Repair and priv: Gardening can return a either a True or a False so there needs to be a "True", "False" or a Goto instruction in both columns. The one thing that it cannot be is "Error"

"Error" means just that. "Something has gone horribly wrong. Stop the program from running"

False simply means no, untrue,unsuccessful.
Example:
- Find something to repair. Did you find something?
- No (False)
- OK then Go Gardening.

True means yes, true, successful
Example:
- Find something to repair. Did you Find something?
- Yes (True), this shower (Stack Object) is broken.
- OK, Then go fix it.

All together:
Example #1
- Find something to repair. Did you Find something?
- Yes (True), this shower (Stack Object) is broken.
- OK, Then go fix it.
- OK done that (True).
- OK Look for something (else) to repair. Did you find something?
- No (False)
- OK. Go Garden.
Example #2
- Find something to repair. Did you Find something?
- Yes (True), this shower (Stack Object) is broken.
- OK, Then go fix it.
- I can't. (False) It's blocked off and I can't get to it.
- OK Look for something (else) to repair. Did you find something?
- No (False)
- OK. Go Garden.

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Sun Jun 07, 2015 3:41 pm    Post subject: Reply with quote

What is happening in your code is

- OK Look for something to repair. Did you find something?
- No (False Return)
- IMPOSSIBLE!!! ERROR!

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Sun Jun 07, 2015 4:00 pm    Post subject: Reply with quote

You could fix this a couple of ways.

one way is in the Process BHAV. Change
Code:
priv: repair [7, Error]

to
Code:
priv: repair [7, 7]
(for example)

Or you can make changes inside of the repair BHAV changing the "False"s found in it to "True"s.

That way the private call will return "True" whether the subroutine succeeded in finding and fixing things or not. This is how the "Clean A Table" BHAV is set up and why the private call tot he BHAV can have "error" in the false column.

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Sun Jun 07, 2015 4:49 pm    Post subject: Reply with quote

The other True/False/Error issue is with the EP Checks.

I mentioned yesterday that there must always be a both a True and A False return for EP checks, which should never be "Error". Your EP Check does, indeed, have a True and False return, but it's False return is a "False" instruction rather than a GoTo instruction.

This is not inherently bad or anything but in this particular circumstance "false" isn't the way to go.

EP Checks are meant to allow something to happen if the EP is installed (True return) or, if it isn't (False return), the alternative happens.

So Here's how your Process BHAV is working right now:

Is MM installed?
Yes - carries on and rolls a random number. If that is under 20 then blah blah blah

No - Stop and return (as False) to the main BHAV. Nothing else in Process even gets looked at (including the things other games could run.

Back in the Main BHAV the private call to Process also has a "false" instruction in the False return column. Not good. Never good in a Main BHAV.

Main BHAVS are (as mentioned in the page I linked to a few pages back) the heartbeat of an object. They MUST continue looping. They must never stop - It does not matter if it is "true" or "false" instruction, stopping the "heartbeat" is bad.

So anyone who puts this object in their game and does not have MM installed will return false from "process" to Main and then Main will stop.

Look in your Main BHAV to see where/how the heartbeat is looping. It's easy to spot in this object because it is just the one line "priv:Process" looping onto itself over and over.

The game loads up, the main starts at the top and runs line by line and then loops "priv:Process" for the rest of the time that the game is running.

When I first did Process up I made sure it never returned False so it did not matter what I had as the false instructions in my main. In some cases you might actually want iit to loop differently under different conditions (like the chair looping differently depending on whether someone is sitting in it.) but to keep THIS simple we'll stick with a rule that this Process BHAV must never return a "False"

So .. the EP checks.

What purpose are they serving in there?
That will help you figure out what instructions to put into the True and the False return columns.

Confession time: I secretly made you a present the other night. It is my version of a magical Scullery Maid based on the features you mentioned so you could see my approach and how it differed from yours. (I'm especially enamored with the fact that if you give 6 people the same set of instructions, you wind up with 6 different results. Even if it is something specific like a cake recipe. That is actually one of my favorite things about people. We each have an indescribably personal influence on the world. It's Awesome. I thought you would enjoy that too.) The intention was to wait until you completed yours so I didn't distract or influence in any way. This is also why when I have been helping it's been vague. "this needs changing because blah" rather than "Change THIS to TTHHIISS"

I confessed all of that because I want to use the real examples of how I used EP checks in this version. It's a more specific solution than the posts before today.


SO...

I put in the EP check "Is MM installed"

If Yes ... run the magical pest disposal stuff
If Not ... run the roach stomping (ignoring flies) version.

That EP check is in there for this specific decision and the True/False returns reflect that.

Another approach might have been
the EP check "Is MM installed"

If Yes ... run the magical pest disposal stuff
If Not ... move on to cleaning (ignoring roaches and flies altogether)

(Technically, though, I think maybe they would use the spray can. I forget if roaches count as "something that needs cleaning". But that is a side design issue)
EDIT: Confirmed. She sprays the roaches as part of her cleaning protocol.

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain


Last edited by Raeven on Sun Jun 07, 2015 5:45 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Sun Jun 07, 2015 5:08 pm    Post subject: Reply with quote

The same hold true for the random numbers.
What purpose is that serving?
That dictates how it is to be used.

At the moment (and i know this can change so I hesitated bringing it up) there is a 20% chance the maid will run through the entire routine of
Code:
dispose of bugs if applicable
then cleaning
then repairing everything that needs it ,
then gardening everything,
then  (if HD is installed) cleaning a table
then the crystal ball

-OR-
an 80% chance of
Code:
skipping to just the crystal ball

and then starting the process over again from "clean"

I suspect you don't actually want that random number in there at ll and would like her to just do the list of stuff. So those two lines (choosing a random number and then checking to see if it is under 20) are not really needed.

(I also suspect that you actually meant for it to loop back to killing the insects rather than excluding that once the loop begins. )

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
purplewowies
Member
Member


Joined: 30 Nov 2008
Posts: 573

PostPosted: Mon Jun 08, 2015 3:23 am    Post subject: Reply with quote

Raeven, I feel like jumping in to tell you that the way you explain things makes me feel like I'm totally capable of hacking, even though my last "job" was that nanny from years ago that I never finished. smile
Back to top
View user's profile Send private message Send e-mail
Simscilla
Member
Member


Joined: 01 Apr 2011
Posts: 58

PostPosted: Mon Jun 08, 2015 9:54 am    Post subject: Reply with quote

Now you have coffee with me. When I got home from work last night I've read through all your postings and I was jumping with joy. Squealing, too. laugh I just did not know what to say. I still don't know but I will try to get this happy feeling inside of me into words.

Not only did you turn this thread into a tutorial which enables me to hack an object to my taste, you also gave me a good feeling about myself while doing this! You helped me to understand - there is not just one way, it is more about finding my style of hacking. I still have to learn so much about the rules, how to read BHAV's and which ways to follow to make code work. This was also a lesson on patience. And doing only one thing at a time... to see what happens and to alter if necessary. That way I could keep track of what I did.

The nodding - she came from the sink and stood still, only her head was shaking like it was trembling, and I understood there was a loop running so fast she became rigid.

I've just sent the final version of this file smile I hope it now works like it should.

ps: Getting through her chores by skipping most of them in order to read her crystal ball is not that bad... rolleyes could be me on some days, longing for 'quitting time' at work (which does not completely match the beauty and relief connected with german 'Feierabend'). The dirty plates and piles of junk will remain in place for me until I take care of them!
Back to top
View user's profile Send private message
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Mon Jun 08, 2015 3:19 pm    Post subject: Reply with quote

PurpleWowies, You totally CAN! But/And you are right. it's deceptively simple. Taken individually each and every piece is super simple. And you'll note I said IS not SEEMS. Totally doable. Yay! The difficulties lies in the fact that you've got about a billion little pieces that you need to fit together. And all billion need to play nice. So projects (for me at least) tend to go along the lines of : Easy, esy , no problem, oh I AM clever, easy, easy, piece of cake, easy, wait. what just happened?

If you want we can start a thread and work through the nanny here after this project. It's sorta a bonus for me to be able to tinker with something I love without getting utterly lost in it LOL


Simscilla wrote:
there is not just one way, it is more about finding my style of hacking
YES! yesy yes. I always used to tell people that when they wanted to give up on a project because it has "already been done". IMPOSSIBLE!! No one will ever be able to make th same thng you make. Ok. Delighted outburst over. Wait.. little more (YAY!!!) ok. That done.

Quote:
And doing only one thing at a time... to see what happens and to alter if necessary. That way I could keep track of what I did.


Makes sense! I used to add BHAVs in that popped up a dialog box when I needed to check things out. Maybe not in this particular situatojn but figured I'd mention it before I forget. I don't think it counts as a real "break point" but perhaps it does. (I'm not a programmer so I never know the nuances).


(a bit of FYI sharing) For me it was a matter of keeping the whole thing as simple as possible. Find It, Clean It. No further instructions like identifying what it is and doing something different if. When I am first designing something I have to rough it out and keep it as simple as possible. I always have plans to expand on it more in future so figure I'll refine some bits and add other stuff. Never quite managed a version 2 of anything though LOL

Incidentally, I left in "return to sink" in all of the ones based on her for the purpose of keeping track of them while testing. NPCs can get into the kookiest corners if you don't rein them back in!

Quote:
ps: Getting through her chores by skipping most of them in order to read her crystal ball is not that bad...

Ah no she only did that the first loop, as I recall. So, because of the way it looped, there was an 80% chance that is how she would start her play session. She didn't slack the rest of the time.

Even if it DID looped in for rest of the day I, personally, don't think it would be at all disruptive. Especially the way you've set it up. The way everything is lined up all repairs and gardening would be completed. She's just interspersing her clean up duties with a bit of divination. The animation is fairly short and I really can't see her falling behind on clean-up duties. In fact these live-ins have more free time than they know what to do with! biggrin

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Mon Jun 08, 2015 3:47 pm    Post subject: Reply with quote

I have not gone to test the latest yet but I wanted to post a couple more things.

LEAVE WHEN THE SPAWNER IS DELETED

Everyone is pretty used to the move_objects cheat and don't strictly need this but it's a nice convenience to add in. The original scullery maid was meant to have it but for some reason I could not get it working and ran out of time. I did add it into my second version (the "modern" one) BUT while I was working on her I whipped up a version for Ruth (Bag of Tricks) to offer with her roman stuff and that one, unfortunately, does not have it.

It turns out it is easy as pie to add in YAY

Whenever the NPC returns to it's spawner/sink, it must, of course, find the thing first. ("Set to Next Object of GUID blahblah" ... "Relationship of stack object to me thing thing") Of course, the NPC does not have to "return" to sink to check to see if it still exists). That just happens to be the only time I have her check to see if it exists

That "Set to next..." line will return false if the sink has been deleted.
Ye Olde scullery maid's code basically says. "huh. oh well" (A false instruction is in the false return) and carries on with the rest of her coding until someone manually deletes her.

Instead add a new line in to Function:368 ("glob: Leave")
When the spawner-sink can't be found it will return false; Change those instructions to go to the new "glob: Leave" line

Now when someone deletes the sink the NPC will finish running through it's routine, try to return to sink, discover it is not there and walk off of the lot.

I chose walking because it's super generic and built into the game already. Obviously it can be gussied up by anyone who wants to have a fiddle so that a car picks them up or they jump into a whole or anything at all but no matter what way the NPC disappears itself, the code would be inserted into that same place.

Other thing to mention is a new (for me) discovery ... Actually I am confused by it because I distinctly remember this not being the case so perhaps I simply screwed something up somehow but this is what I saw yesterday:

I had an NPC (not yours. I've not tested yours on away lots) water flowers on community lots and on downtown lots and the flower bed graphic reset.

Again, possible It was a glitch but figured I'd mention it in case you've not tested on away lots yet. (You have to imagine every way someone might try to use the object and account for it. Simplest way is to disable that, of course)



LeaveIfNoSpawnerFound2.gif
 Description:
 Filesize:  2.56 KB
 Viewed:  2122 Time(s)

LeaveIfNoSpawnerFound2.gif



_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Raeven
Member
Member


Joined: 24 Aug 2006
Posts: 4075

PostPosted: Mon Jun 08, 2015 7:19 pm    Post subject: Reply with quote

DAGNABIT!!! angry

Something was niggling away at me as "wrong" and I finally realized what it is.

The EP checks are incorrect. blush

Peter explains here
http://simblesseoblige.com/viewtopic.php?p=12133#12133

"8" only means "Making Magic/Spellbound" when the it is checking whether that "Game Edition FLAG" is set:
Code:
Global ( from Simulation ) Game Edition Flag Set? Spellbound


We have to use 239 to mean "all eps up to Makin Magic is installed ". (255 if deluxe must also be installed)

Code:
Global ( from Simulation ) Game Edition >= 8

means Vacation or higher is installed.
Should read like this instead
Code:
Global ( from Simulation ) Game Edition >= 239

_________________
"Laws control the lesser man... Right conduct controls the greater one." -Mark Twain
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Simblesse Oblige Forum Index -> Hacker's Hideout All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 5 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group