ai_laws
Vars | |
hacked | Hacked laws Syndicate uploaded laws which are above all other laws These laws will go away when an AI is reset |
---|---|
id | The ID of this lawset, pretty much only used to tell if we're default or not |
inherent | Core laws Inherent laws are the "core" laws of the AI Reseting the AI will not remove these, these are intrinsit to whatever lawset they are running. |
ion | Ion laws Special randomized (usually) laws which are above all over laws These laws will go away when an AI is reset |
name | The name of the lawset |
owner | The silicon linked to this lawset |
protected_zeroth | If TRUE, the zeroth law of this AI is protected and cannot be removed by players under normal circumstances. |
supplied | Supplied laws Supplied laws are supplied in addition to the inherent laws - after the fact These laws will go away when an AI is reset |
zeroth | Zeroth law A lawset can only have 1 zeroth law, it's the top dog. Removed by things that remove core/inherent laws, but only if protected_zeroth is false. Otherwise, cannot be removed except by admins |
zeroth_borg | Zeroth borg law It's just a zeroth law but specially themed for cyborgs ("follow your master" vs "accomplish your objectives") |
Procs | |
add_hacked_law | Adds the passed law as an hacked law. |
add_inherent_law | Adds the passed law as an inherent law. Simply adds it to the bottom of the inherent law list. No duplicate laws allowed. |
add_ion_law | Adds the passed law as an ion law. |
add_supplied_law | Adds the passed law as a supplied law at the passed priority level. Will override any existing supplied laws at that priority level. |
clear_hacked_laws | Clears all hacked laws. |
clear_inherent_laws | Clears all inherent laws from this lawset. |
clear_ion_laws | Clears all ion laws. |
clear_supplied_laws | Clears all supplied laws. |
clear_zeroth_law | Unsets the zeroth (and zeroth borg) law from this lawset |
copy_lawset | Makes a copy of the lawset and returns a new law datum. |
get_law_amount | Gets the number of how many laws this AI has |
get_law_list | Generates a list of all laws on this datum, including rendered HTML tags if required |
remove_hacked_law | Removes the passed law from the hacked law list. |
remove_inherent_law | Removes the passed law from the inherent law list. |
remove_ion_law | Removes the passed law from the ion law list. |
remove_law | Removes the law at the passed index of both inherent and supplied laws combined. |
remove_supplied_law_by_law | Removes the supplied law by law text, replacing it with a blank. |
remove_supplied_law_by_num | Removes the supplied law at the passed number. |
replace_random_law | Removes a random law and replaces it with the new one |
set_zeroth_law | Sets this lawset's zeroth law to the passed law |
Var Details
hacked
Hacked laws Syndicate uploaded laws which are above all other laws These laws will go away when an AI is reset
id
The ID of this lawset, pretty much only used to tell if we're default or not
inherent
Core laws Inherent laws are the "core" laws of the AI Reseting the AI will not remove these, these are intrinsit to whatever lawset they are running.
ion
Ion laws Special randomized (usually) laws which are above all over laws These laws will go away when an AI is reset
name
The name of the lawset
owner
The silicon linked to this lawset
protected_zeroth
If TRUE, the zeroth law of this AI is protected and cannot be removed by players under normal circumstances.
supplied
Supplied laws Supplied laws are supplied in addition to the inherent laws - after the fact These laws will go away when an AI is reset
zeroth
Zeroth law A lawset can only have 1 zeroth law, it's the top dog. Removed by things that remove core/inherent laws, but only if protected_zeroth is false. Otherwise, cannot be removed except by admins
zeroth_borg
Zeroth borg law It's just a zeroth law but specially themed for cyborgs ("follow your master" vs "accomplish your objectives")
Proc Details
add_hacked_law
Adds the passed law as an hacked law.
add_inherent_law
Adds the passed law as an inherent law. Simply adds it to the bottom of the inherent law list. No duplicate laws allowed.
add_ion_law
Adds the passed law as an ion law.
add_supplied_law
Adds the passed law as a supplied law at the passed priority level. Will override any existing supplied laws at that priority level.
clear_hacked_laws
Clears all hacked laws.
clear_inherent_laws
Clears all inherent laws from this lawset.
clear_ion_laws
Clears all ion laws.
clear_supplied_laws
Clears all supplied laws.
clear_zeroth_law
Unsets the zeroth (and zeroth borg) law from this lawset
This will NOT unset a malfunctioning AI's zero law if force is not true
Returns TRUE on success, or false otherwise
copy_lawset
Makes a copy of the lawset and returns a new law datum.
get_law_amount
Gets the number of how many laws this AI has
- groups - What groups to count laws from? By default counts all groups
Returns a number, the number of laws we have
get_law_list
Generates a list of all laws on this datum, including rendered HTML tags if required
Arguments:
- include_zeroth - Operator that controls if law 0 or law 666 is returned in the set
- show_numbers - Operator that controls if law numbers are prepended to the returned laws
- render_html - Operator controlling if HTML tags are rendered on the returned laws
remove_hacked_law
Removes the passed law from the hacked law list.
remove_inherent_law
Removes the passed law from the inherent law list.
remove_ion_law
Removes the passed law from the ion law list.
remove_law
Removes the law at the passed index of both inherent and supplied laws combined.
For example, if a lawset has 3 inherent and 3 supplied laws... Calling this with number = 2 will remove the second inherent law while calling this with number = 4 will remove the first supplied law
Returns the law text of what law that was removed.
remove_supplied_law_by_law
Removes the supplied law by law text, replacing it with a blank.
remove_supplied_law_by_num
Removes the supplied law at the passed number.
replace_random_law
Removes a random law and replaces it with the new one
Args: law - The law that is being uploaded remove_law_groups - A list of law categories that can be deleted from insert_law_group - The law category that the law will be inserted into
set_zeroth_law
Sets this lawset's zeroth law to the passed law
Also can set the zeroth borg law, if this lawset is for master AIs. The zeroth borg law allows for AIs with zeroth laws to give a differing zeroth law to their child cyborgs