Commit 3be9427
committed
Implement dorf-buffing in pimp-it.lua
This is a rough, but working implementation of `pimp-it.lua` and sister file `dorf_tables.lua`
dorf_tables.lua:
- Implements configuration data for pimp-it.lua
pimp-it.lua:
- optimizes dwarves for labor
--selects jobs from configuration data and applies them to dwarven citizens
--applies professions from the above 'jobs'
--generates pseudo-random labor skill ratings for the above 'professions'
--applies dwarf types according to job configurations, and random chance (eg. soldier, smart, speedy, etc)
Date: Thu Dec 14 19:12:38 2017 -0800
Rebasing branch 'lua-dorf-buffing' on 'f08b1a3'.
Changes to be committed:
new file: dorf_tables.lua
new file: pimp-it.lua
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is a combination of 8 commits.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is the 1st commit message:
{WIP} Adds pimp-it.lua - dorf_jobs partially implemented
On branch lua-dorf-buffing
Changes to be committed:
new file: pimp-it.lua
----------------------------------
This is the commit message DFHack#2:
{WIP} Updates tables: dorf_types, dorf_profs
----------------------------------
This is the commit message DFHack#3:
{WIP} Completes dorf_types{} and dorf_profs{}
----------------------------------
This is the commit message DFHack#4:
{WIP} Completes first section of professions{}
----------------------------------
This is the commit message DFHack#5:
{WIP} Groups and Sorts the remaining professions{} entries.
----------------------------------
This is the commit message DFHack#6:
{WIP} Completes professions{}, Modified dorf_jobs{} (renamed it also)
----------------------------------
This is the commit message DFHack#7:
Adds dorf_tables.lua - Moved config tables from pimp-it.lua
Cut dorf tables from pimp-it.lua and included with new file 'dorf_tables.lua'
Tables:
> attrib_levels - levels of competency for attributes
> dorf_types - types of dorfs (eg. soldier, artist, strong, genius, etc.)
> dorf_jobs - custom profession configurations (required professions, prioritized professions, tertiary-professions, dorf types to apply)
> professions - profession definitions (current dwarves with the profession, maximum dwarves, ratio of dwarves relative to population, skills with any bonuses to
apply)
Changes to be committed:
new file: dorf_tables.lua
----------------------------------
This is the commit message DFHack#8:
{WIP:done} Completes (pimp-it algo complete)
Fully implemented pimp-it algorithm.
pimp-it.lua changes:
- Added a number of debug print lines (requires argument)
- Removed all configuration data tables from pimp-it.lua
- Rewrote entire algorithm based on new data structures
-- Fully~ debugged (*fingers crossed*)
- Rewrote argument processing
dorf_tables.lua changes:
- Removed keyword local from table declarations
- Added function to Reset the 'cur' field throughout the 'professions' table
Changes to be committed:
modified: dorf_tables.lua
modified: pimp-it.lua1 parent e771237 commit 3be9427
2 files changed
Lines changed: 840 additions & 0 deletions
0 commit comments