Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#26 Old 4th Oct 2011 at 5:29 AM
This --> http://www.drealm.info/simlogical/s...oolTutorial.htm is amazingly helpful. Its actually pretty easy to use existing EAxis outfits to make the templates too. Another interesting point of note is that uniforms must be in Everyday. It won't accept things in other categories. That explains why job outfits are always in Everyday, even if they are hidden. I might consider fixing some of my recat mods to hide the job clothes instead of moving them.

I'm having a touch of difficulty making the public schools have uniforms, but thats prolly just because its late and I haven't poked at it enough yet. No worries, making good progress. Well, mostly anyways. This project was picked (picken? pooked?) back up for the September School theme, but irl school hit me at the same time so I missed it. I'm so close to being done with it (so she says, even though she hasn't included the Enthusiasm stuff yet) I should just push through and get it done before going back to my other projects.
Advertisement
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#27 Old 23rd Oct 2011 at 6:44 AM
Ok, school uniforms are working for all of the ones that need it, both private and public. A+

I never was able to get the Fun bar to not max out for kids in the middle, either they liked it or they hated it. That's a bit annoying but I can live with it.

As for the EP check, that's failing hardcore. I can't seem to find a place in my code to stick it to get called... lame sauce. I'm using Numenor's EP check and I'm looking for E. I included some dialog boxes to let me know what was happening, but none of them ever showed up.

Enthusiasm, big problem here. Either my line is not being called, or I'm not doing something correct here, but there doesn't seem to be any boost for them. The amount variable seems to not be recognized, which is weird because I'm copying it straight from 'Nighttime Activity - Abduction'. I suck at this.

Packages included for people who know more about this to poke at for me and tell me where I have screwed up. Halp?
Attached files:
File Type: rar  Afterschool_Public-TrackTeam-Edit.rar (59.5 KB, 7 downloads) - View custom content
Field Researcher
#28 Old 23rd Oct 2011 at 11:29 PM
The pie menu on your school object is still pointing to the semiglobal "Interaction - At School" (x201A) rather than your local version (x1302). Try changing that and see if it fixes the problem.

On my site I have dozens more Sims 2 mods. These mods come with no support so use them at your own risk.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#29 Old 24th Oct 2011 at 5:20 PM
So, when I changed that to point to the one in my package instead, something else broke. Going to school drops out of the queue. Then instead I tried leaving that interaction alone and instead put a pointer in the Motive bhav that I know gets called, but it still doesn't work. What is the difference between 'Interaction', 'CT', 'Function', and 'Sub'? Can I put a sub in a sub? I'm going to try sticking that code directly in the Motive one instead of calling it, just to see if my code even works.
Field Researcher
#30 Old 25th Oct 2011 at 5:55 AM
To the game, a BHAV is just a BHAV like any other. The naming conventions are for humans. Interaction is used for BHAVs called from pie menus, Function when called from Object Functions, Sub when called by other BHAVs including other subs, and CT when called by other objects using Run Tree By Name. But you can call a BHAV anything you want. I seem to remember some modder who labeled all his BHAVs with the same name for some obscure reason, which made the code really hard to follow.

As for dropping out of the queue, that sounds like it's just exiting early. The problem is figuring out where. Are you playing in debug mode to see if you are getting errors? In the code you posted I see an unknown BHAV in Interaction At School, and an unknown constant in TEST. Are the kids changing into uniforms before it drops out? Because that would indicate you are getting to that line. I've had times I've had to put a debug message on every fricking line of code to find out where it's having problems.

On my site I have dozens more Sims 2 mods. These mods come with no support so use them at your own risk.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#31 Old 25th Oct 2011 at 4:21 PM
I don't think they changed clothes. I'm not confident my debug message code was working properly either. I know this is a lot of hand holding, but can you show me the code you use for them, just so I know I'm doing them right? Debugging debug code seems really irksome. I'll do more tests and see what that unknown code was. I was pretty sure Inge gave me a clean base game clone of the schools to work from, but maybe not.
Field Researcher
#32 Old 25th Oct 2011 at 10:16 PM
The one thing I noticed on the debug messages is on the second line of operands, the x14 and x02 aren't necessary for a "message" dialog type. SimPE has the bad habit of not clearing out excess data when you use the wizards, so I suggest clicking the X button to the right of the operands to zero them all out before using the wizard. Sometimes the excess data can create mysterious errors.

On my site I have dozens more Sims 2 mods. These mods come with no support so use them at your own risk.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#33 Old 27th Oct 2011 at 5:15 AM Last edited by Phaenoh : 29th Oct 2011 at 6:19 PM.
Well, I think I made some progress tonight, but I pretty much just gave up on the idea of it checking EPs and I'll just do two versions. I was having no luck using any of the EP checkers, it just kept throwing errors. Prolly cuz I wasn't putting it in the right place, or I wasn't feeding it the right variables. Dunno.

The enthusiasm bit is still driving me bonkers as well. I can't get the darn thing to work. It throws an error too, but I don't know how to fix it.
An error occurred in object 'Freya Sim'
Error: Invalid Constant

I've flat out stolen the code for an Enthusiasm Boost from the Alien Abduction code, but for some reason its different and doesn't work. My second constant is either [unknown] or [not set] and I don't know why it would be different. It just doesn't seem to recognize the number. I thought that maybe it was missing a BCON so I imported the one that seemed to be linked to it, but that didn't seem to help it find its missing constant. Arg! What am I doing wrong now?
[global 0x0621] Enthusiasm - Boost (Absolute) (4 args: Const 0x016F:0x09 ("Science" Value: 0x00D4), Const 0x2005:0x0F ([not set]), Stack Object ID 0x0000, My 0x000B (object id))
Attached files:
File Type: rar  Afterschool Activities.rar (59.5 KB, 10 downloads) - View custom content
Field Researcher
#34 Old 30th Oct 2011 at 5:50 AM
I haven't looked at the file you attached, but I can see one problem just from the line you posted.

Resources such as BHAVs and BCONs exist in one of three domains: private, semiglobal and global. Private resources are available only to a specific object type. So the public school object and the private school object would each have private constants which can be recognized because the BCONs and BHAVS all are numbered x1###. The private school object can't use public school private resources and vice versa. (Well, not directly, but let's not confuse the issue.)

Semi-global resources are available to all objects of a certain category. So public and private school belong to the semi-global group "JobSchoolData", the collection of school objects. These resources are all numbers x2###. Telescopes, not surprisingly, belong to Telescope semi-globals. All the semiglobal groups are actually called global (as in Telescope Globals) which might be confusing, but they are really semi-globals.

Global resources are available to everything, and they are numbered x0###.

In the example, you are using constant 0x016F which is a global constant, so that's fine. But you are also using constant 2005:0F which is a semiglobal constant. Since you took that routine from telescopes, that must be a telescope semiglobal constant and can't be seen by school objects. Presumably that's the amount of the boost. You can look it up in Telescope Globals to see what the value is and then either use a literal value in your routine, or create your own private constant in the school object by either creating a BCON or adding it to an existing BCON.

On my site I have dozens more Sims 2 mods. These mods come with no support so use them at your own risk.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#35 Old 30th Oct 2011 at 11:47 PM
Ok, after an entire day of poking around in my code I've discovered that my code was never even being called, and after I fixed that it started throwing errors left and right. First its bad constants, then bad arrays. Short of a miracle, there is no way I'm getting this done for the September Children's theme. I hate to admit defeat, but nothing is working right and I'm out of time.

I tried the BCON approach, and then tired a couple different literal values, and none of them seemed to make a difference in the enthusiasm, even after I got that part to stop throwing errors. If you see something simple that I'm missing and can show me how to fix it, I'll keep going, otherwise, I need to stick this back in my unfinished folder for a while.

Attached files:
File Type: rar  Afterschool Activities.rar (59.5 KB, 9 downloads) - View custom content
Retired Duck
retired moderator
#36 Old 2nd Nov 2011 at 3:56 AM
Error log?
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#37 Old 2nd Nov 2011 at 4:03 AM
Do you just swoop in right when I need a miracle? I was having a darn hard time letting go of this theme. I'd never missed one before and it was just eating at me.
Attached files:
File Type: rar  ObjectError_N003_t43693.rar (11.1 KB, 7 downloads) - View custom content
Retired Duck
retired moderator
#38 Old 2nd Nov 2011 at 5:09 AM
Lol! Sorry, I've had a grand total of two hours of internet access over the past two weeks, so I only just got here. Cyjon's been helping plenty though!

Try changing the dialog type on line 0xD (13) of "Sub - Start Motive Deltas" to something other than "Phone Book - Services"? Perhaps "Message" or "Text Notification"?
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#39 Old 2nd Nov 2011 at 6:11 AM
It's always the simple stuff that trips me up isn't it? I fixed that, and did the same with the others like it, but the same bug is still happening, the kid gets teleported back into the middle of my house and I can't direct her to walk to school or get on the bus. New version of code and error log included.
Attached files:
File Type: rar  Afterschool Activities.rar (70.6 KB, 13 downloads) - View custom content
Retired Duck
retired moderator
#40 Old 2nd Nov 2011 at 7:46 AM
I can see why it's failing, but I'm not sure what you are intending that line to do.

This line:
0x0E (14): [prim 0x0002] Expression (Local 0x0000 /= Unused 0x000A)
is saying "set Local 0x00 to (Local 0x00 divided by Unused variable 0x0A)".

Did you perhaps mean:
0x0E (14): [prim 0x0002] Expression (Local 0x0000 /= Literal 0x000A)
which says "set Local 0x00 to (Local 0x00 divided by ten)
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#41 Old 2nd Nov 2011 at 5:43 PM Last edited by Phaenoh : 2nd Nov 2011 at 6:28 PM.
Yay! That fixed it. Now I'm back to one of my previous problems though. The fun stat doesn't really seem to be based on the personality of the kid. I've got two kids I'm testing with, one is super active and the other not so much. As expected the super active kid loves going to Track Team and the other hates it, (fun meters maxed out on either ends by the time they get home) but when I put them both in regular school, the super active kid is still really happy when the come home and the other is still really bummed (though not as much as before).

Ok, I did a tad more testing, and I've found that somewhere I've got some CC somewhere messing with the school fun values. Under an actual clean testing environment, both kids' fun score tanks to about 75%. This leads me to believe that the negative values I'm achieving by placing kids in an activity that isn't supposed to be fun for them works, but I'm a little concerned about the super happy maxed out fun version now. I'll need to tweak at my values.

Edit: found it! now I can work with real values instead.
Field Researcher
#42 Old 3rd Nov 2011 at 3:51 AM
Sorry, I've been tied up with my own hideous debugging nonsense so I haven't had a chance to look at this. Glad Echo stepped in to help out

On my site I have dozens more Sims 2 mods. These mods come with no support so use them at your own risk.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#43 Old 4th Nov 2011 at 1:53 AM
While I've got a few very smart people in the room, and things are starting to look up again, does anyone know how to change the school's carpool from the bus to anything else? I'm finding like 6 different references to Bus and Carpool within all the BHAVs and BCONs and either I suck at this (likely) or none of them seem to control it.

Also, from what I can tell, schools are built like jobs, and children are at level 1 and teens are at level 2 with no chance of promotion. The grade level seems to be job performance. Anyone see a way of re-enabling promotions? I'd love to be able to promote someone to Captain of the Football Team.

Thirdly, chance cards. Which areas do I need to edit to make them pop up more often, be unique to each school activity, and have choices instead of the just being notifications on the sidebar? I'd love to be able to give options on what Book Club will read next.
Field Researcher
#44 Old 4th Nov 2011 at 2:39 AM
Regarding the carpool, yes but not easily. You'd have to do something similar to what you've done so far, make a private version of a semiglobal routine. Each school object's "Function - Main" calls the semiglobal "Sub - Process" which eventually calls "Sub Preload Bus" when it gives the one-hour warning, and then later calls "Function Create Car" when it's time for the bus to appear. You'd need to create your own versions of all three routines. So "Function Main" would call your "Sub Process" which would be the same as the semiglobal one, but would call your own versions of "Sub Preload Bus" and "Function Create Car". The latter two would use the GUID of the car you want instead of the GUID of the bus.

Note that those were only the two references to the bus I found. There might be more, for example at the end of the school day.

Job promotions are handled in "Sub Get Paid" in Job Globals, which is called by "Interaction At Work". Start with that as a basis and convert it to something similar for schools.

School chance cards are handled by the semi-global "Sub - Chance Card" and the dialogs by "Sub - Chance Card - Dialog". The actual card text is kept in each school object's dialog strings, and the reward in a bunch of BCONs. You could create private versions of the semiglobal routines to change the way dialogs are handled. Look at the way jobs handle chance cards (start with "Sub - Chance Card - Jobs" in Job Globals) to see how you handle choices and have multiple BCONs depending on choice A or B, and whether the result is good or bad.

On my site I have dozens more Sims 2 mods. These mods come with no support so use them at your own risk.
Retired Duck
retired moderator
#45 Old 4th Nov 2011 at 3:44 AM
Quote: Originally posted by Cyjon
Regarding the carpool, yes but not easily. You'd have to do something similar to what you've done so far, make a private version of a semiglobal routine.


Just a side thought on that... Phae, how would you feel about including a smallish global mod as part of your project? If you're not completely against it, then here's one option:

- Create an empty package. This will be a required global mod package for custom schools to work.
- Import the 0x2005 BCON from the schools semi-globals. Change its instance to a value in the 0x1000 range which isn't currently used by the school object, and change its group id to "0x7F647BAD".
- At the end of this BCON, add the two GUID numbers for the bus' tile 0. (That is, 0xAC03 and 0x4E2F).
- Import the "Sub - Preload Bus" BHAV from the school semi-globals (keeping the same TGI). Change the two "Temp :=" lines to point it to lines 0x00 annd 0x01 in the BCON above.
- Import "Function - Create Car" (keeping the same TGI).
- Change the Set to Next line to this: Set to Next (Stack Object ID 0x0000, Object of type GUID in temp 0/1)
- Just before the Set to Next is called, add two "Expression" commands, to copy the last two GUID numbers from the BCON into temp 0 and temp 1 (the ones for the bus' tile 0).
- Change this line Create New Object Instance (GUID 0x8C032A00 ... to Create New Object Instance (GUID: Temp 0x0000,1 ...
- Before this line, add two Expression commands which copy the GUID numbers for the master tile in the car into temp 0 and temp 1 (The ones stored in lines 0x00 and 0x01 of the BCON).

If you run this in-game with the existing school, it should work exactly as it always has. The normal bus should arrive with no issues.

To customize your special schools, copy that BCON into your object, and replace the GUIDs with the ones for the alternative vehicle you want them to take.

It sounds kind of complicated, so you will probably decide it's not worth the effort, but it would keep your custom school objects tidy and uncluttered, and make new ones essentially "drop-in-able". (It's how EA should probably have written their code in the first place, really!)

If someone doesn't install the global mod package, then all schools will just fall back to using the bus.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#46 Old 4th Nov 2011 at 6:04 AM
Echo, I think I like where you are going with this. I've already got my School Changer Object that is required for all my activities to work, and they aren't 'drop-in-able'. I need them all, and it only recognizes the 20 I've made. I could easily add it into there, right? Additionally, I could run BHAV checks asking if it should send the regular bus because this is a normal start or end time, or send the special car earlier or later than usual. Can I also have different cars for the different schools? I want my sports teams taking the white athletic bus and the academic kids taking minivans or town cars. I imagine with some interesting twists, I can handle bringing friends home who aren't in the same activity but still have the same end time as well. I'm pretty sure I understood most of your code and can impliment it with one exception, what do I do to copy the guid's over?

The promotions bit seems like it will take some more exploring, so I'll work on the carpools and the chance cards first. This project's projected end time just soared off into mid December, but I'd much rather do this thing right and be done with it than the half-assery hurry-up-get-done I was doing before trying to fit to the theme's deadline. YAY!
Retired Duck
retired moderator
#47 Old 4th Nov 2011 at 6:45 AM
To copy the GUIDs into Temp 0 and Temp 1, you just need lines like these:
[prim 0x0002] Expression (Temp 0x0000 := Const [end half of GUID])
[prim 0x0002] Expression (Temp 0x0001 := Const [front half of GUID])

Also, one thing at a time! Let's see if the carpool theory even works before you add too much complexity! There may be other issues I haven't accounted for, like sharing vehicles and arrival times and the like.

I didn't actually look at your school changer object, but it should be fine to put the global overrides in there as long as they have the correct groups set.
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#48 Old 4th Nov 2011 at 4:25 PM
I think I followed what you said, but I got tripped up on a couple of things. For starters, do I have all the instance and group numbers right? Everytime I did it through the Import Semi-Globals box, it made it part of the 0xFFF group instead of leaving it alone so I found the original files in the Objects file and copied them.

Secondly, you said to add the bus guid to the end of the list (2 and 3), but then say to have them reference lines 0 and 1. :?

Did I do the "[prim 0x0002] Expression (Temp 0x0000 := Const [end half of GUID])" stuff right?

And lastly, how do I get the "Change this line Create New Object Instance (GUID 0x8C032A00 ... to Create New Object Instance (GUID: Temp 0x0000,1 ..." to work? My wizard was greyed out and I don't know the op codes for it.
Attached files:
File Type: rar  bus.rar (386 Bytes, 8 downloads) - View custom content
Retired Duck
retired moderator
#49 Old 6th Nov 2011 at 2:16 AM
Quote:
Secondly, you said to add the bus guid to the end of the list (2 and 3), but then say to have them reference lines 0 and 1. :?

Two different GUIDs. One's the master tile (the out-of-world one), and one's the lead tile (tile 0).

The Expressions were pretty close. The first one should have loaded into Temp 0 while the second should have loaded into Temp 1, but other than that no issues.

Group IDs look fine.

To change calls without a wizard, just change the numbers in the operands boxes and watch what happens to the text below. Each operand normally only affects one part of the text, so when you find the one which touches the part you want to change, then just manipuate that operand until it says what you want.

Try the attached, see if it lets you change vehicles on a school-by-school basis
Attached files:
File Type: zip  bus.zip (458 Bytes, 7 downloads) - View custom content
Doing all the things, and *mostly* not failing.
retired moderator
Original Poster
#50 Old 6th Nov 2011 at 3:59 PM
Well, an interesting thing happened during testing. I started by placing all the kids in the one activity I'm testing everything in, and when 8am rolled around, no bus ever showed up. I clicked on them to 'Walk to School' and they were unable to do so, it just dropped out of their queue. I tried it again with one kid in the testing activity and another in one I hadn't touched in a while, neither kid could go to school. As soon as I had them quit the activity and drop back into regular school, they happily walked off to class.

When I import the BCON, I'm supposed to leave it's Group number alone right? I wasn't sure which order the vehicle GUIDs were supposed to go in, so I tried both ways. Same problem for both.
Page 2 of 3
Back to top