So I finally decided to dust off the random creature creation script that I had created before. I have added a GUI and many other features. See the GUI below, and read how the script works. It is almost ready for release, with just a few more options that need to be moved from the black box of the code into easily configurable options. Let me know what you think!
Roses: the middleware that you are building with the Civilization, Class, Spells and Event Systems have in my opinion the touch of genius.
# in file civilizations.txt
[CIV:PLAINS]
[NAME:humans from the north]
[LEVELS:1]
[LEVEL_METHOD:YEARLY:100]
[LEVEL:0]
[LEVEL_NAME:started in the stone age]
[LEVEL_REMOVE:CREATURE:PET:ALL:ALL]
[LEVEL_REMOVE:CREATURE:WAGON:ALL:ALL]
[LEVEL_REMOVE:CREATURE:MOUNT:ALL:ALL]
[LEVEL_REMOVE:CREATURE:PACK:ALL:ALL]
[LEVEL_REMOVE:CREATURE:MINION:ALL:ALL]
[LEVEL_REMOVE:CREATURE:EXOTIC:ALL:ALL]
[LEVEL_REMOVE:CREATURE:FISH:ALL:ALL]
[LEVEL_REMOVE:CREATURE:EGG:ALL:ALL]
...
# in file civilizations.txt
[CLASS:SQUIRE]
[NAME:squire:squires]
[EXP:10:20]
[LEVELS:2]
[BONUS_PHYS:STRENGTH:50:75:100]
[BONUS_MENT:WILLPOWER:10:20:30]
[BONUS_SKILL:AXE:1:2:2]
[BONUS_TRAIT:ANGER:-5:-5:-5]
[LEVEL_BONUS_PHYS:AGILITY:25]
[LEVEL_BONUS_MENT:FOCUS:100]
[LEVEL_BONUS_SKILL:SHIELD:1]
[LEVEL_BONUS_TRAIT:GREED:-5]
...
# in file spell.txt
[SPELL:SPELL_TEST_1] <- simply label each [SPELL] as they are labeled in the classes.txt file
[CDI:INTERACTION:SPELL_FIRE_FIREBALL] <- and place any interaction information you have here
[CDI:ADV_NAME:Fire Ball]
[CDI:TARGET:C:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:C:15]
[CDI:USAGE_HINT:ATTACK]
[CDI:VERB:cast Fire Ball:casts Fire Ball:NA]
[CDI:TARGET_VERB:is caught in a ball of fire:is caught in a ball of fire]
[CDI:MAX_TARGET_NUMBER:C:1]
[CDI:WAIT_PERIOD:2000]
[SPELL:SPELL_TEST_2]
[CDI:INTERACTION:SPELL_FIRE_FIREBALL_GREATER]
[CDI:ADV_NAME:Fire Ball]
[CDI:TARGET:C:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:C:20]
[CDI:USAGE_HINT:ATTACK]
[CDI:VERB:cast Greater Fire Ball:casts Greater Fire Ball:NA]
[CDI:TARGET_VERB:is caught in a ball of fire:is caught in a ball of fire]
[CDI:MAX_TARGET_NUMBER:C:1]
[CDI:WAIT_PERIOD:3000]
...
# in file events.txt
[EVENT:SAMPLE_EVENT]
[NAME:this is a sample event]
[CHECK:MONTHLY]
[CHANCE:10]
[DELAY:RANDOM:12000]
[REQUIREMENT:BUILDING:SAMPLE_WORKSHOP:1]
[REQUIREMENT:COUNTER:GLOBAL:SAMPLE_COUNTER:10]
[REQUIREMENT:TIME:10000]
[REQUIREMENT:POPULATION:50]
[REQUIREMENT:WEALTH:TOTAL:10000]
[REQUIREMENT:CLASS:SAMPLE_CLASS:3]
[REQUIREMENT:SKILL:MINER:15]
[REQUIREMENT:KILLS:GOBLIN:10]
[REQUIREMENT:DEATHS:ALL:50]
[REQUIREMENT:TRADES:PLAINS:5]
[REQUIREMENT:SIEGES:EVIL:5]
[EFFECT:1]
[EFFECT_NAME:first sample effect of the event]
[EFFECT_CHANCE:100]
[EFFECT_DELAY:STATIC:100]
[EFFECT_CONTINGENT:0]
*EFFECT_REQUIREMENT:* <- same as for just normal REQUIREMENT
[EFFECT_UNIT:RANDOM:ALL]
[EFFECT_ITEM:RANDOM:ALL]
[EFFECT_LOCATION:RANDOM:ALL]
[EFFECT_BUILDING:RANDOM:ALL]
[EFFECT_ARGUMENT:1]
[ARGUMENT_WEIGHTING:100,100,100]
[ARGUMENT_VARIABLE:HUMAN_MERCHANT,ELF_MERCHANT,DWARF_MERCHANT]
[EFFECT_SCRIPT:"building/subtype-change -from EMPTY_MERCHANTS_STALL -to !ARG_1 -dur 25200"]
Why I think so:
- Dwarf Fortress (DF) raws are a declarative language where the modder describe what he intend to be done by the simulation, but where all the complexity of the HOW is somewhat hidden from him.
- DFHACK has tried from its inception to expand the universe of things (mechanisms) that can be expressed with DF raws, to this end the DF team have tried many different approaches to be able of communicating to the simulation that more functionalities were required within the limits actually implemented.
- Then an army of admiring DF followers have taken all the disparate weapons disponibles to them (Lisp, Perl, C++, c# ,Go , java, AutoHotKey ,Python, Ruby, Lua, ...) to fight their way to this noble end:
Expand the unique content in DF.
- Like a modern Tower of Babel these army of peasants, without discipline, with humble equipment, abilities and skills, even if barely able of communicate and understand each other, all of them can feel that their hearts are broken by the love to this game,
all those hearts singing the same love song!!!- Like warriors and poets of old time, against impossible odds they battle, each time they lose, but their will is like stone and strong are their hearts, their faith will never abandon them.
What you have done with these four files: civilizations.txt, classes.txt, spell.txt and events.txt is not new, I know, you could do the same before with moddtools and some other scripts.
So where is the genius? For me it is
in using exactly the same format of DF raws to expand what can be declared and autolimiting yourself to the tiny 146 Kb of lua.dll; you have removed the principal limitation of the workers in the Babel Tower, they all can now communicate and expand new original content in the most basic language of the DF universe, the DF raw language!
In order of being absolutely mimetic with native DF raws, at the beginning of each one of those 4 files it could be added
CIV_PLAINS
[OBJECT:CIV]
...
CLASS_SQUIRE
[OBJECT:CLASS]
...
SPELL_default
[OBJECT:SPELL]
...
EVENT_default
[OBJECT:EVENT]
...
And then even enable to separate each one of these 4 new expanded categories in different files like the native DF raws do as a way of encapsulating contents.
The innovation is using or mimicking what is there from the very beginning (DF declarative Lang-like) to do new and wonderful things, could your hard and masterful work, into these new mechanisms and abstractions to approach the hard earned results of the dwarven SCIENCE to the basic modder, inspire others to give birth to a new era in this community.
We all thanks your silent hard work and dedication! We are so lucky to have so much people like you in our community...
Putnam has already started playtesting your middleware in his forbent mod, he is maybe the first pioneer but soon there will be others striking the uncharted earth of the frontiers of DF modding