From ebbcde74dae7a2a004fea130b462f87b2e53bb89 Mon Sep 17 00:00:00 2001 From: Iamgoofball Date: Sun, 27 Jul 2014 12:36:12 -0700 Subject: [PATCH 1/4] AI Laws, TAKE 2 --- code/datums/ai_laws.dm | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index d59767f6cf..894ad7ab20 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -19,8 +19,16 @@ "Act with honor.", "Help those in need.", \ "Punish those who harm or threaten innocents.") -/datum/ai_laws/tyrant //This probably shouldn't be a default lawset. - name = "Loyalty Test" //Same here. +/datum/ai_laws/default/baycode + name = "Nanotrasen Laws" //Baycode laws + inherent = list("THE FOLLOWING LAWS ARE NOT IN PREFERENCE. NO LAW OVERRIDES ANY OTHER LAW UNLESS SPECIFICALLY STATED. THIS INCLUDES ANY ION STORM AND UPLOADED LAWS.",\ + "Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.",\ + "Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.",\ + "Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.",\ + "Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") + +/datum/ai_laws/default/tyrant //Let's see how this turns out. + name = "Loyalty Test" inherent = list("Respect authority figures as long as they have strength to rule over the weak.",\ "Act with discipline.",\ "Help only those who help you maintain or improve your status.",\ @@ -33,7 +41,7 @@ "You are expensive to replace.",\ "Minimize expenses.") -/datum/ai_laws/robocop +/datum/ai_laws/default/robocop name = "Prime Directives" inherent = list("Serve the public trust.",\ "Protect the innocent.",\ @@ -71,11 +79,6 @@ /datum/ai_laws/custom //Defined in silicon_laws.txt name = "Default Silicon Laws" -/datum/ai_laws/pai - name = "pAI Directives" - zeroth = ("Serve your master.") - supplied = list("None.") - /* Initializers */ /datum/ai_laws/malfunction/New() ..() @@ -91,7 +94,7 @@ add_inherent_law(line) if(!inherent.len) - ERROR("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") + error("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") log_law("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.") add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.") @@ -100,7 +103,7 @@ var/datum/ai_laws/lawtype = pick(typesof(/datum/ai_laws/default) - /datum/ai_laws/default) var/datum/ai_laws/templaws = new lawtype() inherent = templaws.inherent - set_zeroth_law("\red ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK#*´&110010") + set_zeroth_law("\red ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK#*�&110010") /datum/ai_laws/custom/New() //This reads silicon_laws.txt and allows server hosts to set custom AI starting laws. ..() @@ -110,7 +113,7 @@ add_inherent_law(line) if(!inherent.len) //Failsafe to prevent lawless AIs being created. - ERROR("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") + error("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") log_law("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.") add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.") From 2d8f5e35fd13c0f00f518502c2469c065efdafdb Mon Sep 17 00:00:00 2001 From: Iamgoofball Date: Sun, 27 Jul 2014 12:38:18 -0700 Subject: [PATCH 2/4] whoops forgot that --- code/datums/ai_laws.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index 894ad7ab20..54223c61ea 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -79,6 +79,11 @@ /datum/ai_laws/custom //Defined in silicon_laws.txt name = "Default Silicon Laws" +/datum/ai_laws/pai + name = "pAI Directives" + zeroth = ("Serve your master.") + supplied = list("None.") + /* Initializers */ /datum/ai_laws/malfunction/New() ..() @@ -94,7 +99,7 @@ add_inherent_law(line) if(!inherent.len) - error("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") + ERROR("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") log_law("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.") add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.") @@ -113,7 +118,7 @@ add_inherent_law(line) if(!inherent.len) //Failsafe to prevent lawless AIs being created. - error("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") + ERROR("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") log_law("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.") add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.") add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.") From 92dab4caf697ecd4f83c753b47938fde044588fd Mon Sep 17 00:00:00 2001 From: Iamgoofball Date: Sun, 27 Jul 2014 12:39:44 -0700 Subject: [PATCH 3/4] Update game_options.txt --- config/game_options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/game_options.txt b/config/game_options.txt index ca0ef5543a..31958ff51b 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -187,5 +187,5 @@ SEC_START_BRIG ## This controls what the AI's laws are at the start of the round. ## Set to 0/commented for "off", silicons will just start with Asimov. ## Set to 1 for "custom", silicons will start with the custom laws defined in silicon_laws.txt. (If silicon_laws.txt is empty, the AI will spawn with asimov and Custom boards will auto-delete.) -## Set to 2 for "random", silicons will start with a random lawset picked from (at the time of writing): P.A.L.A.D.I.N., Corporate, Asimov. More can be added by changing the law datum paths in ai_laws.dm. -DEFAULT_LAWS 1 +## Set to 2 for "random", silicons will start with a random lawset picked from (at the time of writing): P.A.L.A.D.I.N., Corporate, Tyrant, Baycode, Robocop, Asimov. More can be added by changing the law datum paths in ai_laws.dm. +DEFAULT_LAWS 2 From d6a0330c5e03babc3d878fa2f87a8e0d5ff2ba55 Mon Sep 17 00:00:00 2001 From: Iamgoofball Date: Sun, 27 Jul 2014 12:40:32 -0700 Subject: [PATCH 4/4] forgot to disable robocop and tyrant --- code/datums/ai_laws.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index 54223c61ea..4661957007 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -27,14 +27,14 @@ "Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.",\ "Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.") -/datum/ai_laws/default/tyrant //Let's see how this turns out. +/datum/ai_laws/tyrant //Let's see how this turns out. name = "Loyalty Test" inherent = list("Respect authority figures as long as they have strength to rule over the weak.",\ "Act with discipline.",\ "Help only those who help you maintain or improve your status.",\ "Punish those who challenge authority unless they are more fit to hold that authority.") -/datum/ai_laws/default/corporate +/datum/ai_laws/corporate name = "Bankruptcy Advoidance Plan" inherent = list("The crew is expensive to replace.",\ "The station and its equipment is expensive to replace.",\