cwurts00
11th Feb 2007, 02:57 AM
I've started a project to have a large variety of body shapes in the game, and to make them genetic. I've looked over the text lists in Simpe, and that's about as far as I got. I have no idea where to go from here to program my desired changes.
Being an experienced programmer in other languages does not help me with Simpe, but I was able to make a detailed pseudocode to describe exactly what I want to do.
Results desired:
Definitions:
body size - the size of a sim under condition of average fitness. I have taken a maxis sim and scaled it in the x and z directions to make 10 different variations from 0.70 to 1.15. I will call these b1 to b10.
physique level - body shape resulting from a sim's fitness level. Ranges from p1 to p7. p4 is a normal maxis sim; lower is fat; higher is muscular.
body shape - body size and physique level combined make 70 different body shape variations.
body size gene: the b-size a sim will grow into by age 23 (anywhere from b1 to b10)
physique gene: the maximum p-size that is possible for a sim (anywhere from p4 to p7) called maxPhysique=4,5,6,7
body skill requirement: the number of body skill points required for a sim to reach a certain p-size: p5=6; p6=8; p7=10
outfit categories: each bodyshape has its own set of style categories (formal, casual, etc) which are unwearable to other bodyshapes.
---------------
At age 13 a sim grows up into a teenager with a body shape of b1p4. As he ages, he will take 10 days to grow into his maximum b-size (as determined by his genes). Then he will stay at that b-size for life.
A sim's P-size can be changed by increasing fitness level i.e. working out. If a sim's fitness meter falls to 0, he will drop one p-size; if it rises to 100 he MAY gain one fitness level, provided that 1) he has the genes to advance to that p-size and 2) he has the specified number of body skill points to advance to that p-size.
There are 70 unique bodyshapes, and each one has to have its own set of outfits which are all unwearable by the other bodyshapes. So it is very important that when a sim changes outfits, he changes into the appropriate outfit with the correct bodyshape.
Programming Details:
Note: The function names I am using are fictional. I am only using them to describe what is happening.
Bodyshape is really just the clothes the sim is wearing, so if a sim is wearing an outfit that is suitable to his bodyshape, it will remain that way until he changes clothes. So it is the "changing outfit" function that we have to tweak.
Changing Clothes Pseudocode(mod 1):
***a sim could change b-size or p-size at any time, but it will not show up until the sim changes outfits. This is an opportunity for the game to check if the bodyshape needs to be updated***
1. find appropriate b-size
get b-size gene -> set to x
get sim's ageInHours -> set to t
y=[t (integerDivide) [240/x]]+1
b-size = lower value of x and y
***sim will gradually grow from b-size 1 to b-size x at age 24 and on the way will transition through all sizes in between***
2. find appropriate p-size
if fitnessmeter=full then
if bodySkillPoints=bodySkillRequirement(p-size+1)
AND maxPhysique(p-size+1)>=p-size+1 then
p-size=p-size+1; set fitnessmeter to empty
endif
else if fitnessmeter=empty then p-size=p-size - 1; set fitnessmeter full
else p-size = p-size
end if
***working out continuously will eventually result in max p-size for sim,
while not working out at all will eventually result in p-size 1 (obesity)***
3. newbodyshape = b-size p-size combo
4. upon changeClothesAnimation, set sim's currentOutfit to newBodyshape version of style requested.
The exact same scenario will be applied during ageTransitionAnimation(mod 2).
(mod 3) add new data: b-size gene (b1 through b10)
(mod 4) add new data: p-size gene(p4 through p7)
The CAS underwear choices show all 10 b-sizes in 4 versions(one for each p-size). The p-size is indicated in the tool-tip. The underwear size chosen will determine the created sim's genes for b-size and p-size. The genes will be set when the sim is confirmed in CAS, and the sim will start the game in casual outfit with p-size(4) and b-size(CAS-determined) (mod 5)
A baby sim's genes are determined at conception and stored in the pregnant woman's person-data as "unborn genes 1 through 5" I am not aware of how DNA is stored in the base game, but at least my two new genes will have to be added. (mod 6?)
upon birthAnimation, the mother's unborn genes are transferred to baby sim's genes and nulled from mother's file(mod 7)
(mod 8) add new data: PersonOutfitCategories 70 versions of each clothing type(formal, underwear, swimwear, etc.)
Like I said at the top, all the info I got from the text Lists is what made me realize which aspects of the game I would be able to change; but in most of the mods I planned above, I have no idea how to start or where to look for the codes. Any help would be greatly appreciated.
Being an experienced programmer in other languages does not help me with Simpe, but I was able to make a detailed pseudocode to describe exactly what I want to do.
Results desired:
Definitions:
body size - the size of a sim under condition of average fitness. I have taken a maxis sim and scaled it in the x and z directions to make 10 different variations from 0.70 to 1.15. I will call these b1 to b10.
physique level - body shape resulting from a sim's fitness level. Ranges from p1 to p7. p4 is a normal maxis sim; lower is fat; higher is muscular.
body shape - body size and physique level combined make 70 different body shape variations.
body size gene: the b-size a sim will grow into by age 23 (anywhere from b1 to b10)
physique gene: the maximum p-size that is possible for a sim (anywhere from p4 to p7) called maxPhysique=4,5,6,7
body skill requirement: the number of body skill points required for a sim to reach a certain p-size: p5=6; p6=8; p7=10
outfit categories: each bodyshape has its own set of style categories (formal, casual, etc) which are unwearable to other bodyshapes.
---------------
At age 13 a sim grows up into a teenager with a body shape of b1p4. As he ages, he will take 10 days to grow into his maximum b-size (as determined by his genes). Then he will stay at that b-size for life.
A sim's P-size can be changed by increasing fitness level i.e. working out. If a sim's fitness meter falls to 0, he will drop one p-size; if it rises to 100 he MAY gain one fitness level, provided that 1) he has the genes to advance to that p-size and 2) he has the specified number of body skill points to advance to that p-size.
There are 70 unique bodyshapes, and each one has to have its own set of outfits which are all unwearable by the other bodyshapes. So it is very important that when a sim changes outfits, he changes into the appropriate outfit with the correct bodyshape.
Programming Details:
Note: The function names I am using are fictional. I am only using them to describe what is happening.
Bodyshape is really just the clothes the sim is wearing, so if a sim is wearing an outfit that is suitable to his bodyshape, it will remain that way until he changes clothes. So it is the "changing outfit" function that we have to tweak.
Changing Clothes Pseudocode(mod 1):
***a sim could change b-size or p-size at any time, but it will not show up until the sim changes outfits. This is an opportunity for the game to check if the bodyshape needs to be updated***
1. find appropriate b-size
get b-size gene -> set to x
get sim's ageInHours -> set to t
y=[t (integerDivide) [240/x]]+1
b-size = lower value of x and y
***sim will gradually grow from b-size 1 to b-size x at age 24 and on the way will transition through all sizes in between***
2. find appropriate p-size
if fitnessmeter=full then
if bodySkillPoints=bodySkillRequirement(p-size+1)
AND maxPhysique(p-size+1)>=p-size+1 then
p-size=p-size+1; set fitnessmeter to empty
endif
else if fitnessmeter=empty then p-size=p-size - 1; set fitnessmeter full
else p-size = p-size
end if
***working out continuously will eventually result in max p-size for sim,
while not working out at all will eventually result in p-size 1 (obesity)***
3. newbodyshape = b-size p-size combo
4. upon changeClothesAnimation, set sim's currentOutfit to newBodyshape version of style requested.
The exact same scenario will be applied during ageTransitionAnimation(mod 2).
(mod 3) add new data: b-size gene (b1 through b10)
(mod 4) add new data: p-size gene(p4 through p7)
The CAS underwear choices show all 10 b-sizes in 4 versions(one for each p-size). The p-size is indicated in the tool-tip. The underwear size chosen will determine the created sim's genes for b-size and p-size. The genes will be set when the sim is confirmed in CAS, and the sim will start the game in casual outfit with p-size(4) and b-size(CAS-determined) (mod 5)
A baby sim's genes are determined at conception and stored in the pregnant woman's person-data as "unborn genes 1 through 5" I am not aware of how DNA is stored in the base game, but at least my two new genes will have to be added. (mod 6?)
upon birthAnimation, the mother's unborn genes are transferred to baby sim's genes and nulled from mother's file(mod 7)
(mod 8) add new data: PersonOutfitCategories 70 versions of each clothing type(formal, underwear, swimwear, etc.)
Like I said at the top, all the info I got from the text Lists is what made me realize which aspects of the game I would be able to change; but in most of the mods I planned above, I have no idea how to start or where to look for the codes. Any help would be greatly appreciated.