More Awesome Than You!
Welcome, Guest. Please login or register.
2024 November 22, 18:06:18

Login with username, password and session length
Search:     Advanced search
540287 Posts in 18067 Topics by 6545 Members
Latest Member: cincinancy
* Home Help Search Login Register
+  More Awesome Than You!
|-+  TS2: Burnination
| |-+  The Podium
| | |-+  Oops! You Broke It!
| | | |-+  My Botched Attempt at Modding
0 Members and 3 Chinese Bots are viewing this topic. « previous next »
Pages: [1] 2 THANKS THIS IS GREAT Print
Author Topic: My Botched Attempt at Modding  (Read 12010 times)
kutto
Senator
*
Posts: 2486


Hamsome


View Profile
My Botched Attempt at Modding
« on: 2006 December 29, 00:50:57 »
THANKS THIS IS GREAT

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 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.

* zombieaging.rar (54.7 KB - downloaded 181 times.)
Logged
floopyboo
The Biter
Pinheaded Pissant
***
Posts: 1017


Back by popular demand!


View Profile WWW
Re: My Botched Attempt at Modding
« Reply #1 on: 2006 December 29, 01:07:28 »
THANKS THIS IS GREAT

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. Cheesy
Logged

http://bigbrotherlawndale.deviantart.com/

The awesomest thing on the internet.
kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #2 on: 2006 December 29, 01:53:27 »
THANKS THIS IS GREAT

All kinds of sims are affected: zombies, teens, men, women, everything.
Logged
twojeffs
Stupid Schlemiel
****
Posts: 1690



View Profile WWW
Re: My Botched Attempt at Modding
« Reply #3 on: 2006 December 29, 02:01:14 »
THANKS THIS IS GREAT

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.
Logged
kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #4 on: 2006 December 29, 02:03:12 »
THANKS THIS IS GREAT

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 (Huh)" 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.  Smiley
« Last Edit: 2006 December 29, 02:41:56 by kutto » Logged
syberspunk
Heretic
Terrible Twerp
****
Posts: 2365


ISTJ - what a crazy random happenstance


View Profile WWW
Re: My Botched Attempt at Modding
« Reply #5 on: 2006 December 29, 04:30:08 »
THANKS THIS IS GREAT

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? Huh) 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? Tongue

Ste
Logged

dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: My Botched Attempt at Modding
« Reply #6 on: 2006 December 29, 06:22:34 »
THANKS THIS IS GREAT

Wow, this is messed up. So many things wrong here.  Tongue

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

kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #7 on: 2006 December 29, 16:27:38 »
THANKS THIS IS GREAT

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.
Logged
jrd
Terrible Twerp
****
Posts: 2498



View Profile
Re: My Botched Attempt at Modding
« Reply #8 on: 2006 December 29, 17:15:18 »
THANKS THIS IS GREAT

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).
Logged
kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #9 on: 2006 December 29, 17:37:24 »
THANKS THIS IS GREAT

So, skip the zombie check, and delete all the other BHAVs?
Logged
jrd
Terrible Twerp
****
Posts: 2498



View Profile
Re: My Botched Attempt at Modding
« Reply #10 on: 2006 December 29, 18:08:22 »
THANKS THIS IS GREAT

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.
Logged
kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #11 on: 2006 December 29, 18:10:55 »
THANKS THIS IS GREAT

Ok, I'll try this out. Hopefully, it will work, and I'll be much happier.
Logged
kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #12 on: 2006 December 29, 22:00:56 »
THANKS THIS IS GREAT

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.  Sad
Logged
dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: My Botched Attempt at Modding
« Reply #13 on: 2006 December 29, 23:01:35 »
THANKS THIS IS GREAT

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?
Logged

kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #14 on: 2006 December 29, 23:17:34 »
THANKS THIS IS GREAT

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.
Logged
dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: My Botched Attempt at Modding
« Reply #15 on: 2006 December 29, 23:24:54 »
THANKS THIS IS GREAT

Right. New package.

Make a new package and add what you extracted.
Logged

kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #16 on: 2006 December 29, 23:59:41 »
THANKS THIS IS GREAT

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.
Logged
syberspunk
Heretic
Terrible Twerp
****
Posts: 2365


ISTJ - what a crazy random happenstance


View Profile WWW
Re: My Botched Attempt at Modding
« Reply #17 on: 2006 December 30, 16:45:47 »
THANKS THIS IS GREAT

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. Tongue

Ste
Logged

kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #18 on: 2006 December 30, 22:08:43 »
THANKS THIS IS GREAT

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.  Sad
Logged
syberspunk
Heretic
Terrible Twerp
****
Posts: 2365


ISTJ - what a crazy random happenstance


View Profile WWW
Re: My Botched Attempt at Modding
« Reply #19 on: 2006 December 31, 04:40:49 »
THANKS THIS IS GREAT

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
Logged

kutto
Senator
*
Posts: 2486


Hamsome


View Profile
Re: My Botched Attempt at Modding
« Reply #20 on: 2006 December 31, 04:50:13 »
THANKS THIS IS GREAT

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.  Smiley

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.
Logged
syberspunk
Heretic
Terrible Twerp
****
Posts: 2365


ISTJ - what a crazy random happenstance


View Profile WWW
Re: My Botched Attempt at Modding
« Reply #21 on: 2007 January 04, 06:24:29 »
THANKS THIS IS GREAT

I was browsing the squingey forums and I found this. 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
Logged

Baroness
witch
Breakfast of Champions!
Senator
*
Posts: 11636


Shunning the accursed daystar.


View Profile
Re: My Botched Attempt at Modding
« Reply #22 on: 2007 January 04, 06:27:24 »
THANKS THIS IS GREAT

...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.  Grin
Logged

My fists are named Feminine and Wiles.
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26288



View Profile
Re: My Botched Attempt at Modding
« Reply #23 on: 2007 January 04, 06:56:38 »
THANKS THIS IS GREAT

I would guess that "incompotence" is a Kuttoism for "inability to get the computer up".
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
Baroness
witch
Breakfast of Champions!
Senator
*
Posts: 11636


Shunning the accursed daystar.


View Profile
Re: My Botched Attempt at Modding
« Reply #24 on: 2007 January 04, 08:46:52 »
THANKS THIS IS GREAT

Hey, that's very good.  Cheesy

Kutto's computer needs Viagra.
Logged

My fists are named Feminine and Wiles.
Pages: [1] 2 Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.108 seconds with 21 queries.