More Awesome Than You!

TS2: Burnination => Oops! You Broke It! => Topic started by: kutto on 2006 December 29, 00:50:57



Title: My Botched Attempt at Modding
Post by: kutto on 2006 December 29, 00:50:57
Here is my first try at making a hack. I actually accomplished what I set out to do. I got zombies to age. However, this hack has some side effects which are less than desirable. Some sims (it seems to be random who is affected) age every hour instead of at 18:00. They keep going until they have 0 days until age transition, and then they don't age or die. Also, this error (http://www.moreawesomethanyou.com/smf/index.php?topic=6924.0) was happening prior to me messing with the game, but I wouldn't be surprised if I mucked it up further. I attached my hack.


Title: Re: My Botched Attempt at Modding
Post by: floopyboo on 2006 December 29, 01:07:28
some sims, or some zombified sims?the difference is marked, and worth looking at, particularlary since Squinge's zombie & vampire aging hack is apparently just bloatware in my game. I'd personally put up with a random zombie aging rapidly if it meant having them age. .. something about all that decaying flesh not being long for this world excites me. :D


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 29, 01:53:27
All kinds of sims are affected: zombies, teens, men, women, everything.


Title: Re: My Botched Attempt at Modding
Post by: twojeffs on 2006 December 29, 02:01:14
Gack! The first thing you need to do is delete all of the bloatware out of that package. Nukify everything that you didn't actually change.


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 29, 02:03:12
Oh, excellent! Didn't know I could do that! That makes things so much more simple.

Edit: I deleted all the BHAVs and BCONs and whatever else I wasn't changing. I left the GLOB and the OBJD, because they just seemed necessary. However, I'm now getting several "Invalid BHAV (???)" boxes. If I delete them, I can't tell if I'll actually have any aging code left.

Please, if at any time I'm being stupid, just tell me.  :)


Title: Re: My Botched Attempt at Modding
Post by: syberspunk on 2006 December 29, 04:30:08
I haven't looked at your hack, but if you are only doing a global BHAV hack, then you pretty much usually only need the BHAVs that you actually changed. You usually don't have to clone an entire object just to hack BHAVs on a global level.

So... if you didn't actually change anything in the GLOB or OBJD files, then you can delete those too. I really hope you didn't change anything in those files, because that most likely could cause very ugly problems. Especially since the AgeController globals are inherited by a lot of other things (at least I think so).

In global hacks, you usually only need to just include BHAVs, BCONs, and maybe TTAB and/or TTAs files. And even then, only include things that you actually made changes to.

It seems really strange that changing a BHAV to allow zombies to age would screw up other sims... if you follow dizzy's (I think it was dizzy? ???) instructions in that other thread, I imagine it would only be a single change of one line in a single BHAV. *shrugs*

If your hack isn't doing what you want it to do... then you should go back to the drawing board and figure out how to get it working properly. I wouldn't recommend releasing/distributing your hack for others to use, unless you are like actually requesting people to test it out. But if you know it doesn't work how you actually want it to... then... uh... what's the point? :P

Ste


Title: Re: My Botched Attempt at Modding
Post by: dizzy on 2006 December 29, 06:22:34
Wow, this is messed up. So many things wrong here.  :P

You'd best start over again. Just extract the one BHAV you want to change, add that to a new package and change that.


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 29, 16:27:38
This is really odd. I only changed two things. There are two checks for being a zombie in the "Process-Age" area. All I did was make the true point to the false, and left everything else alone. Anything else messed up is EA's fault.

You say to only leave in what I change, right? Wouldn't that just leave the zombie check? I'm not sure I understand. It seems like the game would check if they were a zombie, and then do nothing.


Title: Re: My Botched Attempt at Modding
Post by: jrd on 2006 December 29, 17:15:18
Maybe the zombie code tree pointed somewhere else. Try the following: make whatever the TRUE or FALSE is that points to the "Is Sim a Zombie" check, point to the zombie check's T or F instead (completely bypass it).


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 29, 17:37:24
So, skip the zombie check, and delete all the other BHAVs?


Title: Re: My Botched Attempt at Modding
Post by: jrd on 2006 December 29, 18:08:22
Delete anything you did not change, and in the BHAV(s) you DO change, bypass the zombie check completely.

I don't know if you had an answer to this yet, but if you see "invalid BHAV", normally don't worry about it. Since you're making a mod and not a complete replacement, the game will look in objects.package (and other downloads) for these BHAVs—they're only marked as invalid because they're not directly part of your mod. If you were to include everything in your game to the SimPE file path, it could find them, but I don't recommend you do that. SimPE is already slow enough as it is and you gain nothing by it really.


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 29, 18:10:55
Ok, I'll try this out. Hopefully, it will work, and I'll be much happier.


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 29, 22:00:56
I did everything I was told, honestly, but I still seem to be screwing something up. I deleted everything except the "Process-Age" BHAV. I altered it so that the zombie check was completely bypassed. In the game, nobody aged at all. Then, I deleted the check. Now, aging is unchanged. Zombies still don't age, but people do.

How are these zombies not aging when there's no more zombie check? I don't get it.  :(


Title: Re: My Botched Attempt at Modding
Post by: dizzy on 2006 December 29, 23:01:35
How about reading what I posted?

1) Start over
2) Load objects package and *extract* the one thing you want to change
3) New
4) Add what you extracted in step 2
5) Save your new package
6) Modify it, commit, save again

Why are you having problems with this?


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 29, 23:17:34
I thought that was what I did. I started over. I extracted only the age contoller out of objects.package. What do you mean by new? New package? Wouldn't that have the same effect as deleting what I didn't change? Around step 3 and 4. That's where I'm having problems it seems.


Title: Re: My Botched Attempt at Modding
Post by: dizzy on 2006 December 29, 23:24:54
Right. New package.

Make a new package and add what you extracted.


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 29, 23:59:41
If you don't mind me asking, what is the effect of the new package? It looks pretty much it was before.

Either way, I followed your instructions step by step. I'll be testing it soon. Hopefully, I did it right this time.


Title: Re: My Botched Attempt at Modding
Post by: syberspunk on 2006 December 30, 16:45:47
I thought that was what I did. I started over. I extracted only the age contoller out of objects.package. What do you mean by new? New package? Wouldn't that have the same effect as deleting what I didn't change? Around step 3 and 4. That's where I'm having problems it seems.

This doesn't seem right. I think you are extracting far too much than you actually need to. You should just use the filter and put the Group # and Instance # (as dizzy provided in his other post I believe). In the resource window that lists all the resources in the object package, just click on BHAVs. Just extract that single BHAV. Then create a new package, and add that single BHAV.

Also... when we say delete all other BHAVs, we meant other complete BHAVs. We don't mean delete all the other lines inside the BHAV you are trying to edit. The semantics might be confusing. But I don't know how else to explain this.

When you click on a BHAV in the resource window, each BHAV consists of several lines. You can see these lines in the Plug-in View. You should edit the line that checks for whether a sim is a zombie or not. Theoretically you can do this in two ways:

1) Edit the line that checks for whether a sim is a zombie or not. It is probably called "Sim - Is a Zombie?" or whatever. Edit the true target to be the same as the false target. So... regardless of whether the sim is a zombie or not, it should do the same thing. Do this for all lines that test if a sim is a zombie.

2) Edit the line previous to the "Sim - Is a Zombie?" line. Change the target of the previous line that points to the "Sim - Is a Zombie" line to the false target of "Sim - Is a Zombie?" line.

This would be only slightly more complicated, but has the same effect. I would suggest the 1st option, since that would be simpler. If you sort the lines, then you can do the 2nd option, and hopefully the previous line will actually be the line just above it. When I say "previous" I mean the line that "points to" or has the "Sim - Is a Zombie?" line as one of it's targets, which could either be the true or false target. You would have to follow the red or green arrows to figure it out. If you click on a line, the arrows that point to it should light up. You can trace them back to the "previous" line(s). Sorting should make it less confusing, but not always. :P

Ste


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 30, 22:08:43
All I've kept in my new package is one BHAV: Process-Age. It has about 20 lines in it. I tried method one to begin with. It made it so no one aged at all. Then, I tried method two and its the one I tested most recently. It aged people normally and zombies didn't age at all. It's almost like it's not being read by the game.  :(


Title: Re: My Botched Attempt at Modding
Post by: syberspunk on 2006 December 31, 04:40:49
That is very strange...

Did you make sure to commit and save your changes? The file itself should be saved as a .package

Also... after placing your test hack into your downloads folder, I would run a hack conflict testing tool, just in case you may already have some hack that already overrides this particular BHAV.

I am looking at the AgeController globals... and the only two instances that I see which refer to Zombies relevant to aging are:

###
# Group = 0x7F07FBBC, Instance = 0x1054
# Title = Sub - Decrement Age Days Left


###
# Group = 0x7F07FBBC, Instance = 0x1055
# Title = Sub - Handle Aging Sims

So... I would guess that you would have to modify both of those BHAVs for zombies to be treated properly. I did not see any reference to zombies inside the "Process - Age BHAV. But then again... I'm looking at the Pets code. Older versions may handle this differently I suppose...

Ok wait... I'm looking at the OFB code:

Code:
###
# Group = 0x7F07FBBC, Instance = 0x1003
# Title = Process - Age
#
# Format = 8009, Params = 0, Locals = 1
# Tree type = 0, Header flag = 6, Tree version = 23 (35), Cache flags = 0

     0: Global(Allow Aging) != 0; true: 11, false: true
     1: My Attribute 0x0 != Global(Day of Month); true: 5, false: B
     2: Stack Object := 0; true: 3, false: error
     3: Set to Next: person; true: 6, false: B
     4: stack obj's person data Age Days Left (0x5B) := -1 (0xFFFF); true: 14, false: error
     5: My Attribute 0x0 := Global(Day of Month); true: 2, false: error
     6: stack obj's person data Person Type (0x20) == Const 0x104(Person Types):0x0(0); true: 18, false: 3
     7: Stack Object := 0; true: 8, false: error
     8: Set to Next: person; true: 9, false: true
     9: stack obj's person data Person Type (0x20) == Const 0x104(Person Types):0x0(0); true: 19, false: 8
     A: .Sub - No Party?(Stack Object); true: 10, false: 8
     B: My Attribute 0x1 != Global(Hour); true: C, false: true
     C: My Attribute 0x1 := Global(Hour); true: 7, false: error
     D: .Push - Age Transition(Stack Object); true: 8, false: 8
     E: stack obj's motives Sleep state (0xB) == 0; true: D, false: 8
     F: .Sub - Kill the Cake(Stack Object); true: E, false: error
    10: .BirthdayCakeList - Remove(Stack Object, Me); true: F, false: error
    11: Global(Hour) == Const 0x1000(Tuning):0xC(18 (0x12)); true: 1, false: B
    12: Want Satisfy: GUID 0x0DF1C014 ($int days to Sim's Birthday) with person in Stack Object; true: 13, false: 13
    13: Want Satisfy: GUID 0x8DFADE3E ($int days to Birthday) with value stack obj's person data Age Days Left (0x5B); true: 1A, false: 1A
    14: Local 0 := stack obj's person data Age Days Left (0x5B); true: 15, false: error
    15: Local 0 < 0; true: 16, false: 12
    16: Local 0 := 0; true: 12, false: error
    17: stack obj's person data Age Days Left (0x5B) -- and > -1 (0xFFFF); true: 14, false: 4
    18: Zombie - Is Sim a Zombie?(Stack Object); true: 3, false: 1C
    19: Zombie - Is Sim a Zombie?(Stack Object); true: 8, false: 1B
    1A: .Sub - Age Days Left - Text Notification Barrage; true: 3, false: error
    1B: Vampire - Is Sim a Vampire?(Stack Object); true: 8, false: 1E
    1C: Vampire - Is Sim a Vampire?(Stack Object); true: 3, false: 1D
    1D: Robot - Sim Is Servo?(Stack Object, 0); true: 3, false: 17
    1E: Robot - Sim Is Servo?(Stack Object, 0); true: 8, false: A

Change:

Quote
    18: Zombie - Is Sim a Zombie?(Stack Object); true: 3, false: 1C
    19: Zombie - Is Sim a Zombie?(Stack Object); true: 8, false: 1B

to

Quote
    18: Zombie - Is Sim a Zombie?(Stack Object); true: 1C, false: 1C
    19: Zombie - Is Sim a Zombie?(Stack Object); true: 1B, false: 1B

Theoretically... that should work. But I can't guarantee it.

Assuming you have OFB. It looks like the NL code would be similar. If you only have Unii, that will be a slightly different story. You would still pretty much make the true and false targets the same for each line you change.

Turn debug mode on and see if you get any errors just in case. If this doesn't help... you may have to dig around further with the aging code, as perhaps some other BHAV may be responsible for daily aging. *shrugs*

Ste


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2006 December 31, 04:50:13
I am running OFB, and I have NL and Uni. It is saved as a .package file. I'm heading to bed right now, but in the morning I'll run a conflict checker and make sure I've set those values on the zombies checks. In all my testing, I've been playing with debug mode on to check on errors, and the only one I got was one caused by your hack, but you've fixed that.  :)

Thanks for all your help so far. I'm sure my incompotence is wearing your patience thin by now. I really didn't expect this to be as difficult as this is.


Title: Re: My Botched Attempt at Modding
Post by: syberspunk on 2007 January 04, 06:24:29
I was browsing the squingey forums and I found this (http://www.insimenator.net/showthread.php?t=26625). Supposedly it works. I don't use it tho, so I can't confirm. But maybe you can take a look at it and see if it works. And then open it up in SimPE and compare it to your mod to help you see what you might have done wrong or missed. The best way to learn is by looking at other mods.

Ste


Title: Re: My Botched Attempt at Modding
Post by: witch on 2007 January 04, 06:27:24
...I'm sure my incompotence is wearing your patience thin by now...

Sorry mate but I have to tell you this, on my first skim read I thought it said impotence. I felt my eyes do a double take.  ;D


Title: Re: My Botched Attempt at Modding
Post by: J. M. Pescado on 2007 January 04, 06:56:38
I would guess that "incompotence" is a Kuttoism for "inability to get the computer up".


Title: Re: My Botched Attempt at Modding
Post by: witch on 2007 January 04, 08:46:52
Hey, that's very good.  :D

Kutto's computer needs Viagra.


Title: Re: My Botched Attempt at Modding
Post by: notveryawesome on 2007 January 07, 14:06:59
At least Kutto's trying, which is more than I can say (I'm terrified of the new SimPE).

Edit: Erm, I just realised that my comment could easily be misconstrued. What I meant was: at least Kutto is trying his hand at modding (NOT trying to get his computer up). Oh bloody hell! No matter how I phrase it, it just seems a bit... dirty. Sorry, Kutto - I tried to stand up for you (please forgive the aweful pun - I really can't help myself sometimes).


Title: Re: My Botched Attempt at Modding
Post by: miros on 2007 January 07, 16:47:40
I would guess that "incompotence" is a Kuttoism for "inability to get the computer up".

I have a computer with that problem. 


Title: Re: My Botched Attempt at Modding
Post by: kutto on 2007 January 07, 18:44:04
Arg. I checked the alterations I made. I made the zombie check have the same true result as the false result. Nothing happens. No errors, no aging for zombies, but other sims still age normally. It's still like it's not even being read by the game. No hack conflicts were found. This is absolutely frustrating. I have no idea why this wouldn't work.

I'm going to look around the whole thing instead of just in this BHAV. I don't know if OFB has those two BHAVs you mentioned, but I'll look for those first.

Oh, and for those interested, I don't give my computer Viagra. I give it Cialis.  :P


Title: Re: My Botched Attempt at Modding
Post by: wes_h on 2007 January 08, 03:55:06
I give it Cialis.

I always wondered what marketing jean-yus created a name for a drug that enables an impotent male to have sex that would be pronounced as "See Alice".

Poor Alice. Or maybe lucky Alice (a hard man is good to find).