Thread Rating:
  • 5 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[QOL] [Feature] State AI Laws (Advanced)
State AI Laws (Advanced)

- Renamed "State Laws 1-3" to "State Standard Laws" because, uh, that's what it does. It doesn't actually state laws 1-3

- New AI Verb: State Laws (Advanced). Allows the AI to state laws out of order, skip laws, and even renumber them to match the new order provided. Neat!

prpr: UM-016

wait one hot second I just got inspired

new commit comin'

Pushed an update.

You can now specify an optional, and arbitrary, renumbering like so:

to do
1. Law 1
2. Law 3
3. Law 4

i am Not an ai main but this seems really nice to have, i think
This is quite neat, i'd suggest naming the 'standard laws' one to 'State Asimov Laws'
(09-02-2019, 02:42 AM)NateTheSquid Wrote: This is quite neat, i'd suggest naming the 'standard laws' one to 'State Asimov Laws'

I was gonna name it that until someone reminded me that they're not Asimov either :]
kurt found a bug where if you type "1;1;1" in, you get really odd results.

I've commit a fix to the pull request, but the fix is to add the following code:

// 1;1;1 becomes 1:list() and 1=2;1=3 becomes 1:(2,3), so we need to break the results down into one association per index
    var/found = 0
    for (var/index in laws_to_state)
            for (var/association in laws_to_state[index])
                    laws_to_state[index] = association
                    found = 1
                laws_to_state[index] = null
            found = 0


laws_to_state = params2list(state)
Does it let the AI just state law 1 a few hundred times?
negative; duplicates are condensed down to one statement per law

Forum Jump:

Users browsing this thread: 1 Guest(s)