define needs hierarchy
All checks were successful
studiorailgun/trpg/pipeline/head This commit looks good

This commit is contained in:
austin 2025-01-05 19:19:48 -05:00
parent ab38723bf7
commit 03a82bbc67
2 changed files with 313 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package org.studiorailgun.sim.character;
import org.studiorailgun.Globals; import org.studiorailgun.Globals;
import org.studiorailgun.sim.character.emotion.EmotionData; import org.studiorailgun.sim.character.emotion.EmotionData;
import org.studiorailgun.sim.character.needs.NeedsHierarchy;
import org.studiorailgun.sim.character.vis.CharacterAppearance; import org.studiorailgun.sim.character.vis.CharacterAppearance;
import org.studiorailgun.sim.space.Location; import org.studiorailgun.sim.space.Location;
@ -30,6 +31,11 @@ public class Character {
*/ */
EmotionData emotions; EmotionData emotions;
/**
* The needs hierarchy for the character
*/
NeedsHierarchy needs;
/** /**
* The id of the location of this character is in * The id of the location of this character is in
*/ */
@ -112,6 +118,15 @@ public class Character {
return Globals.world.getLocation(this.locationId); return Globals.world.getLocation(this.locationId);
} }
public NeedsHierarchy getNeeds() {
return needs;
}
public void setNeeds(NeedsHierarchy needs) {
this.needs = needs;
}
} }

View File

@ -0,0 +1,298 @@
package org.studiorailgun.sim.character.needs;
/**
* Structure that stores the desires of a character
*/
public class NeedsHierarchy {
//
//tier 1 needs
//
/**
* How hungry the character is
*/
float hunger;
/**
* How thirsty the character is
*/
float thirst;
/**
* How sheltered the character feels
*/
float shelter;
//
//tier 2 needs
//
/**
* How likely the character feels that their tier 1 needs will continue to be met in the future
*/
float security;
/**
* How likely the character feels they will be safe from harm in the immediate future
*/
float safety;
//
//tier 3 needs
//
/**
* How satisfied the character is with their social life
*/
float friendship;
/**
* How satisfied the character is with their family life
*/
float family;
//
//tier 4 needs
//
/**
* How accomplished the character feels at their pursuits
*/
float accomplishment;
/**
* How free the character feels
*/
float freedom;
/**
* How high does the character perceive their status in society as being
*/
float status;
//
//tier 5 needs
//
/**
* How much the character feels they have lived up to their potential
*/
float potential;
public float getHunger() {
return hunger;
}
public void setHunger(float hunger) {
this.hunger = hunger;
}
public float getThirst() {
return thirst;
}
public void setThirst(float thirst) {
this.thirst = thirst;
}
public float getShelter() {
return shelter;
}
public void setShelter(float shelter) {
this.shelter = shelter;
}
public float getSecurity() {
return security;
}
public void setSecurity(float security) {
this.security = security;
}
public float getSafety() {
return safety;
}
public void setSafety(float safety) {
this.safety = safety;
}
public float getFriendship() {
return friendship;
}
public void setFriendship(float friendship) {
this.friendship = friendship;
}
public float getFamily() {
return family;
}
public void setFamily(float family) {
this.family = family;
}
public float getAccomplishment() {
return accomplishment;
}
public void setAccomplishment(float accomplishment) {
this.accomplishment = accomplishment;
}
public float getFreedom() {
return freedom;
}
public void setFreedom(float freedom) {
this.freedom = freedom;
}
public float getStatus() {
return status;
}
public void setStatus(float status) {
this.status = status;
}
public float getPotential() {
return potential;
}
public void setPotential(float potential) {
this.potential = potential;
}
}