Beginning work on thinking about mapping roads
Also thought-work on how to do human reproduction.
This commit is contained in:
parent
a5b7e8219b
commit
b807b21f8e
|
@ -40,6 +40,75 @@ If we're going to represent a society in which public sex is normal, then we're
|
|||
|
||||
By 'eroticised', I'm meaning deliberately intended to trigger sexual feelings in the audience — which, if the player character is present, includes the player.
|
||||
|
||||
### Breeding strategies for non-player characters
|
||||
|
||||
In order to model population growth, I need to model when two NPCs will have sex; I need to model (roughly) when two NPCs will choose to have sex.
|
||||
|
||||
This is different for female NPCs to male NPCs (and female NPCs will be much more cautious, because of the risk/cost of pregnancy), so let's consider each in turn.
|
||||
|
||||
**Note that** sex happens if and only if the conditions for both the female partner and the male partner are met.
|
||||
|
||||
**Note that** we're considering heterosexual sex only here because what I'm currently modelling is population growth, and only heterosexual sex leads to pregnancy.
|
||||
|
||||
#### Generalised breeding strategy for a female NPC
|
||||
|
||||
A female NPC will have sex with a male NPC:
|
||||
|
||||
1. Long term relationship
|
||||
1. Her life goal is `:ancestor`;
|
||||
2. His life goal is either `:ancestor` or `:citizen`;
|
||||
3. Her attitude towards him is +2 or above;
|
||||
4. They reside in the same dwelling, *or* one or other of them is of no fixed abode (in which case they will reside in the same dwelling);
|
||||
5. All other levels in her hierarchy of needs are currently satisfied.
|
||||
2. Passion
|
||||
1. His attitude towards her is +4, and
|
||||
2. Her attitude towards him is also +4;
|
||||
3. All other levels in her hierarchy of needs are currently satisfied.
|
||||
3. Social climbing
|
||||
1. Her life goal is `:climber` and
|
||||
2. His social rank is two or more higher than hers (counting `:bonnet-laird` as above `:master`);
|
||||
3. All other levels in her hierarchy of needs are currently satisfied.
|
||||
4. Transactional
|
||||
1. Need
|
||||
1. She is hungry and broke; and
|
||||
2. He has surplus food and/or money.
|
||||
2. Coercion
|
||||
1. He has something she urgently wants (the example I'm thinking of is he has abducted a child);
|
||||
3. Sex work
|
||||
1. Her life goal is `:hoarder`, and he has surplus money; or
|
||||
2. It's possible I make sex work an actual career choice -- a craft of its own.
|
||||
5. Rape
|
||||
1. If she is a slave and he is her owner;
|
||||
2. If he has defeated her in a fight;
|
||||
3. If she assesses that he will defeat her in an impending fight;
|
||||
4. Possibly, to distrct him from doing worse things to people she is protecting (e.g. children)
|
||||
|
||||
#### Generalised breeding strategy for a male NPC
|
||||
|
||||
1. Ancestor
|
||||
1. His life goal is `:ancestor`; and
|
||||
2. His attitude towards her is +2 or above;
|
||||
3. All other levels in his hierarchy of needs are currently satisfied.
|
||||
2. Long term relationship
|
||||
1. His life goal is `:ancestor` or `:citizen`;
|
||||
2. Her life goal is `:ancestor` or `:citizen`;
|
||||
3. His attitude towards her is +2 or above;
|
||||
4. They reside in the same dwelling, *or* one or other of them is of no fixed abode (in which case they will reside in the same dwelling);
|
||||
5. All other levels in his hierarchy of needs are currently satisfied.
|
||||
3. Dynastic
|
||||
1. His life goal is `:conqueror`; and
|
||||
2. Her social rank is `:ariston` or above;
|
||||
3. She has no other existing long term sexual relationship;
|
||||
4. All other levels in his hierarchy of needs are currently satisfied.
|
||||
4. Social climbing
|
||||
1. His life goal is `:climber`; and
|
||||
2. Her social rank is at least one higher than his;
|
||||
3. All other levels in his hierarchy of needs are currently satisfied.
|
||||
5. Casual
|
||||
1. His attitude towards her is +1 or above;
|
||||
2. All other levels in his hierarchy of needs are currently satisfied.
|
||||
|
||||
|
||||
## Sexual violence between non-player characters
|
||||
|
||||
In a world in which there are characters who are thuggish, who seek to dominate, terrorise and subdue other characters, whether those characters are outlaws or soldiers or aristocrats, to pretend that rape would not be used as a means to dominate, terrorise or subdue is… bowdlerisation. It's unrealistic, and it's a morally indefensible choice.
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
|||
"Anything in the game world with agency; primarily but not exclusively
|
||||
characters."
|
||||
(:require [cc.journeyman.the-great-game.objects.game-object :refer [ProtoObject]]
|
||||
[cc.journeyman.the-great-game.objects.container :refer [ProtoContainer]]))
|
||||
[cc.journeyman.the-great-game.objects.container :refer [ProtoContainer contents is-empty?]]))
|
||||
|
||||
;;; hierarchy of needs probably gets implemented here
|
||||
;;; I'm probably going to want to defprotocol stuff, to define the hierarchy
|
||||
|
@ -66,46 +66,64 @@
|
|||
`world`.")
|
||||
(tired? [actor world circle] "True if this `actor` needs rest."))
|
||||
|
||||
;; (defrecord Agent
|
||||
;; ;; "A default agent."
|
||||
;; [name craft home culture]
|
||||
;; ProtoObject
|
||||
;; ProtoContainer
|
||||
;; ProtoAgent
|
||||
(defrecord Agent
|
||||
;; "A default agent."
|
||||
[name craft home culture]
|
||||
ProtoObject
|
||||
ProtoContainer
|
||||
|
||||
;; (act
|
||||
;; “Return a world like this `world `except that this `actor `has acted in it.
|
||||
;; ‘Circle’ indicates which activation circle the actor is in.
|
||||
(contents
|
||||
"The `contents` of an actor are the contents of their pack(s) (if any), where
|
||||
a pack may be any sort of bag or container which the actor could reasonably
|
||||
be carrying."
|
||||
[actor]
|
||||
(flatten
|
||||
(map contents (filter #(satisfies? ProtoContainer %)
|
||||
(:burden actor)))))
|
||||
|
||||
;; Note that this implies that a `plan `is a function of three arguments, an
|
||||
;; actor, a world. and a circle.”
|
||||
;; [actor world circle]
|
||||
;; (let [urgent (case circle
|
||||
;; :other (cond
|
||||
;; (pending-scheduled-action? actor world circle)
|
||||
;; (plan-scheduled-action actor world circle)
|
||||
;; (empty? (:plans actor))
|
||||
;; (plan-goal actor world circle))
|
||||
;; :background (cond
|
||||
;; (threatened? actor world circle)
|
||||
;; (plan-fight-or-flight actor world circle)
|
||||
;; (pending-scheduled-action? actor world circle)
|
||||
;; (plan-scheduled-action actor world circle)
|
||||
;; (empty? (:plans actor))
|
||||
;; (plan-goal actor world circle))
|
||||
;; ;; else
|
||||
;; (cond
|
||||
;; (threatened? actor world circle)
|
||||
;; (plan-fight-or-flight actor world circle)
|
||||
;; (hungry? actor world circle)
|
||||
;; (plan-find-food actor world circle)
|
||||
;; (tired? actor world circle)
|
||||
;; (plan-find-rest actor world circle)
|
||||
;; (pending-scheduled-action? actor world circle)
|
||||
;; (plan-scheduled-action actor world circle)
|
||||
;; (empty? (:plans actor))
|
||||
;; (plan-goal actor world circle)))
|
||||
;; a’ (if urgent
|
||||
;; (assoc actor :plans (cons urgent (:plans actor)))
|
||||
;; actor)]
|
||||
;; (eval ((first (:plans a’)) a’ world)))))
|
||||
(is-empty?
|
||||
[actor]
|
||||
(empty? (:burden actor)))
|
||||
|
||||
ProtoAgent
|
||||
|
||||
(act
|
||||
“Return a map in which :world is bound to a world like this `world `except that this `actor `has acted in it; and `:actor` is bound to an
|
||||
actor like this `actor `except modified by the consequences of the action.
|
||||
‘Circle’ indicates which activation circle the actor is in.
|
||||
|
||||
Note that this implies that a `plan `is a function of three arguments, an
|
||||
actor, a world. and a circle, and returns exactly the sort of map this
|
||||
function returns.”
|
||||
[actor world circle]
|
||||
(let [urgent (case circle
|
||||
:other (cond
|
||||
(pending-scheduled-action? actor world circle)
|
||||
(plan-scheduled-action actor world circle))
|
||||
:background (cond
|
||||
(threatened? actor world circle)
|
||||
(plan-fight-or-flight actor world circle)
|
||||
(pending-scheduled-action? actor world circle)
|
||||
(plan-scheduled-action actor world circle))
|
||||
;; else
|
||||
(cond
|
||||
(threatened? actor world circle)
|
||||
(plan-fight-or-flight actor world circle)
|
||||
(hungry? actor world circle)
|
||||
(plan-find-food actor world circle)
|
||||
(tired? actor world circle)
|
||||
(plan-find-rest actor world circle)
|
||||
(pending-scheduled-action? actor world circle)
|
||||
(plan-scheduled-action actor world circle)))
|
||||
next-action (cond urgent urgent
|
||||
(empty? (:plans actor))
|
||||
(plan-goal actor world circle)
|
||||
:else (first (:plans actor)))
|
||||
consequences (apply next-action (list actor world circle))]
|
||||
;; we return consequences of the action, except that, if the action
|
||||
;; was on the plans of the actor, we remove it.
|
||||
(if-not (= next-action (first (:plans actor)))
|
||||
consequences
|
||||
(assoc consequences :actor
|
||||
(assoc (:actor consequences) :plans
|
||||
(rest (-> consequences :actor :plans))))))))
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
(ns cc.journeyman.the-great-game.objects.container
|
||||
(:require
|
||||
[cc.journeyman.the-great-game.objects.game-object :refer :all]))
|
||||
(ns cc.journeyman.the-great-game.objects.container)
|
||||
|
||||
(defprotocol ProtoContainer
|
||||
(contents
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
[mw-engine.drainage :refer [run-drainage]]
|
||||
;;[mw-engine.flow :refer []]
|
||||
[mw-engine.heightmap :refer [apply-heightmap]]
|
||||
[mw-engine.utils :refer [map-world]]
|
||||
[mw-parser.declarative :refer [compile]]
|
||||
[taoensso.timbre :refer [info]]
|
||||
[wherefore-art-thou.core :refer [*genders* generate]]))
|
||||
|
||||
(defn get-drainage-map
|
||||
|
@ -30,7 +32,13 @@
|
|||
|
||||
(def ^:dynamic *life-goals*
|
||||
"TODO: This definitely doesn't belong here, and will be moved."
|
||||
[:ancestor :citizen :climber :conqueror :explorer :hoarder :master])
|
||||
(into []
|
||||
(flatten
|
||||
(map #(repeat %2 %1)
|
||||
;; goals
|
||||
[:ancestor :citizen :climber :conqueror :explorer :hoarder :master]
|
||||
;; relative frequency of these goals
|
||||
[10 10 8 5 3 5 8]))))
|
||||
|
||||
(defn- create-npc
|
||||
;; TODO: this function needs not only to create a fully formed NPC, but
|
||||
|
@ -38,13 +46,16 @@
|
|||
[prototype]
|
||||
(let [g (or (:gender prototype) (rand-nth (keys *genders*)))
|
||||
p (generate g)]
|
||||
(merge {:age (+ 18 (rand-int 18))
|
||||
:disposition (- (rand-int 9) 4) ;; -4: surly to +4 sunny
|
||||
:gender g
|
||||
:goal (rand-nth *life-goals*)
|
||||
:family-name (generate)
|
||||
:occupation :vagrant
|
||||
:personal-name p} prototype)))
|
||||
(dissoc (merge {:age (+ 18 (rand-int 18))
|
||||
:disposition (- (rand-int 9) 4) ;; -4: surly to +4 sunny
|
||||
:gender g
|
||||
:goal (rand-nth *life-goals*)
|
||||
:family-name (generate)
|
||||
:occupation :vagrant
|
||||
:personal-name p} prototype)
|
||||
;; it's useful to have the world available to the create function,
|
||||
;; but we don't want to return it in the results because clutter.
|
||||
:world)))
|
||||
|
||||
(defn- populate-npcs
|
||||
[prototype]
|
||||
|
@ -54,10 +65,13 @@
|
|||
|
||||
(defn populate-cell
|
||||
[world cell]
|
||||
;; (info (format "populate-cell: w is %s; cell is %s" (type world) cell))
|
||||
(let [npcs (case (:state cell)
|
||||
:camp (populate-npcs {:world world :cell cell :occupation :nomad})
|
||||
:house (populate-npcs {:world world :cell cell :occupation :farmer})
|
||||
:inn (populate-npcs {:world world :cell cell :occupation :innkeeper}))]
|
||||
:camp (populate-npcs {:world world :cell cell :occupation :nomad})
|
||||
:house (populate-npcs {:world world :cell cell :occupation :peasant})
|
||||
:inn (populate-npcs {:world world :cell cell :occupation :innkeeper})
|
||||
;; else
|
||||
nil)]
|
||||
(if npcs (assoc cell :npcs npcs)
|
||||
cell)))
|
||||
|
||||
|
@ -66,7 +80,8 @@
|
|||
(probably some form of database) and return a structure which allows that
|
||||
database o be interrogated."
|
||||
[biome-map]
|
||||
(let [world (run-world biome-map (compile (slurp "resources/baking/settlement-rules.txt")) (count biome-map))]
|
||||
(let [world (run-world biome-map (compile (slurp "resources/baking/settlement-rules.txt")) (count biome-map))
|
||||
with-npcs (map-world world (vary-meta (fn [w c] (populate-cell w c)) assoc :rule-type :ad-hoc))]
|
||||
;; right, with that settled world, I'm going to put one herdsman with
|
||||
;; five animals (either all sheep, all cattle, all goats, all horses or
|
||||
;; all camels on each cell with state camp, and one settler; one farmer
|
||||
|
@ -82,7 +97,7 @@
|
|||
;; to a database I've stored all the NPCs in, and a (vector) roadmap of
|
||||
;; all the roads that have been created, and a (vector) drainage map.
|
||||
|
||||
{:world (map #(populate-cell world %) world)
|
||||
{:world with-npcs
|
||||
:roadmap []}))
|
||||
|
||||
(defn get-road-map
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
},
|
||||
{
|
||||
"path": "../MicroWorld/mw-parser"
|
||||
},
|
||||
{
|
||||
"path": "../MicroWorld/mw-ui"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
|
|
Loading…
Reference in a new issue