Readme
- Fix missing traits
This commit is contained in:
parent
0180d2d02e
commit
6e455bbc97
2 changed files with 26 additions and 7 deletions
14
README.md
Normal file
14
README.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Sims Personality Generator
|
||||||
|
|
||||||
|
As the name suggets, this will generate a persoanlity for The Sims 1 and 2. If you set one trait higher than other, it will automatically adjust itself to compensate for the difference.
|
||||||
|
|
||||||
|
## Background
|
||||||
|
|
||||||
|
I wanted to play The Sims 2 with my characters. Problem was I've been spoiled by traits. How do I create an ideal personality within these limitations? What if I have a random generator that gives me some options but also is smart enough to let me set some bias towards Playfulness or Nice?
|
||||||
|
|
||||||
|
The code itself was initially generated using the Qwen Coder model because I wouldn't know to begin. While it is easy to generate random numbers, I also had to have it to account for one being higher than the other. How? That was the point in asking the AI for a template, with that taken into consideration.
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
I license this project under the GPL-3.0 license - see [LICENSE](LICENSE) for details.
|
19
Sim.cs
19
Sim.cs
|
@ -1,11 +1,15 @@
|
||||||
namespace SimsPersonalityGenerator;
|
namespace SimsPersonalityGenerator;
|
||||||
|
|
||||||
|
public enum Traits { Nice, Neat, Outgoing, Active, Playful }
|
||||||
|
|
||||||
public class Sim
|
public class Sim
|
||||||
{
|
{
|
||||||
|
|
||||||
public int Niceness { get; private set; }
|
public int Niceness { get; private set; }
|
||||||
public int Neatness { get; private set; }
|
public int Neatness { get; private set; }
|
||||||
public int Outgoingness { get; private set; }
|
public int Outgoingness { get; private set; }
|
||||||
public int Activeness { get; private set; }
|
public int Activeness { get; private set; }
|
||||||
|
public int Laziness { get; private set; }
|
||||||
public int Playfulness { get; private set; }
|
public int Playfulness { get; private set; }
|
||||||
|
|
||||||
public Sim()
|
public Sim()
|
||||||
|
@ -13,35 +17,36 @@ public class Sim
|
||||||
GenerateRandomPersonality();
|
GenerateRandomPersonality();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTraitHigher(string trait, bool isHigh)
|
// TODO: Fix trait mix up
|
||||||
|
public void SetTraitHigher(Traits trait, bool isHigh)
|
||||||
{
|
{
|
||||||
switch (trait.ToLower())
|
switch (trait)
|
||||||
{
|
{
|
||||||
case "niceness":
|
case Traits.Nice:
|
||||||
if (isHigh)
|
if (isHigh)
|
||||||
Niceness = Math.Min(10, Neatness + 5);
|
Niceness = Math.Min(10, Neatness + 5);
|
||||||
else
|
else
|
||||||
Neatness = Math.Min(10, Niceness + 5);
|
Neatness = Math.Min(10, Niceness + 5);
|
||||||
break;
|
break;
|
||||||
case "neatness":
|
case Traits.Neat:
|
||||||
if (isHigh)
|
if (isHigh)
|
||||||
Neatness = Math.Min(10, Activeness + 5);
|
Neatness = Math.Min(10, Activeness + 5);
|
||||||
else
|
else
|
||||||
Activeness = Math.Min(10, Neatness + 5);
|
Activeness = Math.Min(10, Neatness + 5);
|
||||||
break;
|
break;
|
||||||
case "outgoingness":
|
case Traits.Outgoing:
|
||||||
if (isHigh)
|
if (isHigh)
|
||||||
Outgoingness = Math.Min(10, Playfulness + 5);
|
Outgoingness = Math.Min(10, Playfulness + 5);
|
||||||
else
|
else
|
||||||
Playfulness = Math.Min(10, Outgoingness + 5);
|
Playfulness = Math.Min(10, Outgoingness + 5);
|
||||||
break;
|
break;
|
||||||
case "activeness":
|
case Traits.Active:
|
||||||
if (isHigh)
|
if (isHigh)
|
||||||
Activeness = Math.Min(10, Niceness + 5);
|
Activeness = Math.Min(10, Niceness + 5);
|
||||||
else
|
else
|
||||||
Niceness = Math.Min(10, Activeness + 5);
|
Niceness = Math.Min(10, Activeness + 5);
|
||||||
break;
|
break;
|
||||||
case "playfulness":
|
case Traits.Playful:
|
||||||
if (isHigh)
|
if (isHigh)
|
||||||
Playfulness = Math.Min(10, Outgoingness + 5);
|
Playfulness = Math.Min(10, Outgoingness + 5);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue