Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Bogus

Pages: [1] 2
1
there seems to be no direct way to manipulate the selection of actual items a job makes, after you have defined the specifics of the item you want.

currently im using a script to forbid items that i dont want in a job (like, a bag of material that doesnt have enough of that material). bascially i forbid and remove job items after the selection was made, but this is somewhat complicated and needs a lot of checking, and releasing of the items afterwards.

so basically, to just get me a suitable item, i would have to browse through all items in existance, and then write it into the job fields, or is there an easier way?

2
Utilities and 3rd Party Applications / dwarf nutritional vectors v0.2
« on: March 30, 2016, 06:39:51 pm »
this is a second prototype, with a much more complex system and some other improvements. (the gist of what this about: making feeding your fort (much) harder and more interesting by giving food different properties and making units eat more.)

* not only item types but materials are now considered. item types have a base value, materials are composed of different types of nutrition (fat, protein, complex carbohydrates, sugar, fiber, water, alcohol).
* each of these types modfiy the base value and have different effects on the unit's hunger, thirst, stomach content/food and body fat values. for example, a PLANT_GROWTH of base value 8000 that is composed soleley of fiber will reduce hunger by about half that amount, but actually burn fat, and put a lot of useless material in the stomach. an egg with the same base value will decrease hunger by about 6000, while taking up less space in the stomach(but adding more nutrition to it). a sugary treat of the same size will cause the unit to put on some extra weight, and put enormous amounts of nutrition into the stomach, while taking up only little room.
* materials are ordered into groups tied to several plant/creature tokens, such that a group of species shares nutrition values for their materials. example:
Spoiler (click to show/hide)

using this system, no raw modfification at all is necessary, all the data is read from the table. in addition there is a set of default values for common material tokens (LEAF, FRUIT, MUSCLE, BRAIN, DRINK, ...) so this will work with pretty much any set of raws.

* no longer causes dwarves to eat more often, instead units will eat several items in a row until their hunger threshold is reached. to facilitate that, the hunger/thirst counters are stored and only written into memory after several jobs were completed.
* immoderation has a strong effect on the unit's subjective feeling of hunger. dwarves will eat up to 33% less or 88% more than their hunger would dictate. this, together with the above changes, will lead dwarves to go on massive binges, some more so than others. immoderate dwarves will grow fat and lardy (this requires further testing tho).
* this doesnt quite work so well yet with drinks, mostly because the alcohol syndrome isnt made for it (and the base value for drinks is fairly low, a beer gives about 1/5th of the normal value). dwarves will frequently drink until theyre unconscious, and then immediately drink again when they wake up.

stuff:
- drink water, give water, and serve drink are not yet implemented
- in future versions, there will be more counters that need to be stored and updated, like vitamins, etc. currently im using persist-storage to track jobs, but i am not sure it will be fast enough to update ~200 units and their counters every tick?
- is editing syndrome severity in memory feasible? do alcohol effects from multiple sources stack? i could base the alcohol effects on the alcohol content of the drink directly, if i edit the syndome after it is applied. this way there is no need for multiple alcohol templates, and it is more granual.
- stomach_content doesnt seem to do much, it just goes up to 300000 but doesnt seem to stop dwarves from eating. its conceivable that eating a lot of fibrous stuff without any nuttrition actually is dangerous.

code:
Spoiler (click to show/hide)

3
DF Modding / MAX_MULTIPLIER not working?
« on: March 28, 2016, 04:22:29 pm »
doesnt seem to have any effect. this reaction just grabs a whole stack and turns it into 3 units of powder. tried to put the token at the end as well and it was the same. i read somewhere this token was the fix for this exact problem tho, why is it not working?

Code: [Select]
[REACTION:MILL_BONES_TEETH]
[NAME:mill bones/teeth]
[BUILDING:QUERN:CUSTOM_B]
[BUILDING:MILLSTONE:CUSTOM_b]
[MAX_MULTIPLIER:1] <---
[REAGENT:bones/teeth:1:CORPSEPIECE:NONE:NONE:NONE]
[USE_BODY_COMPONENT]
[REACTION_CLASS:BONE]
[REAGENT:bag:1:BOX:NONE:NONE:NONE]
[EMPTY]
[BAG]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:3:POWDER_MISC:NONE:GET_MATERIAL_FROM_REAGENT:bones/teeth:NONE]
[PRODUCT_DIMENSION:150]
[PRODUCT_TO_CONTAINER:bag]
[SKILL:MILLING]
[CATEGORY:MILL_CORPSES]

4
im wondering how many items plants with multiple growths will yield when harvested, and how seed-type growths behave. basically, how many seeds will a plant give from growth only, and will the plant always yield 1 of each type of growth that it has?

furthermore, if i have a reaction that uses various plants with multiple item reaction products, can i use empty item products? such that i can get say a couple of seeds, fruit and leaves from one plant, and just seeds and fruit from the other? how would a blank item product look like then, or would i just leave it out?

6
Utilities and 3rd Party Applications / Hungrier Dwarves (and others)
« on: March 24, 2016, 02:17:47 pm »
Im writing a simple script to make members of the fort eat/drink more. what it does is that it browses through all units with the right civ_id
every few ticks and then increments the counters.

now the thing is, the list of active units with civ_id being the fortress civ includes a lot of random stuff. my fortress with 101 residents and 119 pets has 265 units that belong to my civ for some reason or another. what flag(s) in the unit struct can i use to distinguish eaters (dwarves and foreign residents only) from non-eaters (pets/ghosts/..) ?

7
so i made this tool to design workshop menus (which i intended to eventually make available here), it builds on eventful to catch when a workshop's sidebar ui is drawn. the problem is, it doesnt seem to work for furnaces.

i use eventful.registerSidebar to register each workshop type with its own menu, and this works for workshops. i do the same with furnaces, eventful doesnt complain or anything, but the callback is never called.

this is quite a problem, i spent a huge amount of work on this and if eventful just cant handle furnaces for some odd reason the whole thing is doomed. is there maybe anything i missed? i double and triple checked the names, etc.

8
DF Modding / dfhack: fuel added as job item is not consumed
« on: October 10, 2015, 06:29:20 am »
im trying to implement the typical vanilla [FUEL] behaviour for a custom (dfhack-made) job. basically i generate a reaction with fuel tag at some point in time while the game is running and then issue a job for it. this works fine, except the [FUEL] doesnt - the job behaves as if there was no fuel needed. i dont know why this happens, presumably because the reaction didnt exist when the game was loaded first?

so i tried to add a bar of fuel to the job struct directly, which is possible, but the fuel will not be used up in the process. my dwarf will get a bar of fuel, use it in the reaction, and then the bar of fuel will remain in the workshop.

what can i do about this?


9
while i was working on my project the idea for this little script came to my mind. i noticed that reagents used in reactions can have many more flags and settings than you can control with raw files. so what this script does is it allows you to use additional tokens in reaction raws, one for each flag that a reagent can have.

for example [MELT_DESIGNATED] and [ALLOW_MELT_DUMP]. or [MILK] and [PROCESSABLE_TO_VIAL]. possibly even [DEEP_MATERIAL], [EXTRACT_BEARING_FISH] or [MURDERED]. there are many others.

i have little to no idea what most of the flags will do, if anything. some sound more useful than others, some might even do something that cant be done right now. what exactly will happen if you use a [MILKABLE][TAMEABLE_VERMIN] reagent in your reaction is for you to find out!

how does it work: you need to run this script before loading a world, that means, at start of game. it will then whenever a world is loaded read all the reaction raws from the save folder. whenever it finds a token that is in the list, it sets the corresponding flag in the reaction struct in game.

i didnt figure out yet how auto-loading script works maybe you can tell me. presumably you have to write the name of the script into your dfhack-init?

disclaimer: i didnt test this beyond making sure it does what it does. i am in no way responsible for any financial, physical, mental and/or spiritual damages that result from the usage of this script. it is also very much an alpha version.


flags that dont have a name but just a number need to be tokenized as [number:number], where the first number stands for number of the bitfield the flag belongs to (0 for the field thats just named "flags"). the second number is the flag obviously. al flags are boolean values.

to write a reaction from memory into a file, use <scriptname>.reactionToRaw(), which will return a table of strings which can then be written into a file in the order provided. takes the reaction struct as its only argument. this will also write non-standard tokens.

code:
Spoiler (click to show/hide)

10
im trying to implement a menu script for my custom smelter that lets you select a class of ore first before presenting to you a selection of ores from that class to pick from. should be basically the same kind of ui that some built in workshops have, like forge, glassmaker etc.

now the problem is that eventful seems to only provide a callin routine for replacing the whole wokshop menu, not just the "Add new task" submenu. how would i go about just replacing that, while keeping the basic menu?

11
DF Modding / purring maggots and the fairy-hair loincloth
« on: August 31, 2015, 03:28:39 am »
i never milked any maggots myself but i know it is possible. shearing verming (fairies are vermin) should also be possible?

how exactly does the process work, you need to trap maggots and then train/tame them before you can milk them?

also, maggot milking used to be buggy in some way, is that fixed?

12
DF Modding / new harvesting mechanics
« on: October 26, 2014, 11:36:23 am »
so how exactly does the new fruit harvesting work, what kind of growth will it harvest? since leaves i assume wont be plucked off plants, and there are a couple off odd things such as artichoke hearts, how does the game determine which growths are meant to be picked and which are meant to be put into bags? how will that affect custom growths that dont go by regular names?

13
DF Modding / creating bones via reaction?
« on: October 15, 2014, 11:51:39 am »
i want to make a reaction to burn corpses or corpsepieces to bones. i noticed the BONES item type was removed some versions ago and im unsure wether CORPSE or CORPSEPIECE can do the trick. would it be possible to just make one of these made of bone and get usable bones  that way? do they have any valid subtypes?

14
DF General Discussion / climbing in fortress mode
« on: October 04, 2014, 12:25:03 pm »
is completely disabled now? i made a custom civ that starts with expert levels in climbing, as well as stance climber (like cats do, climbing with either hands or legs) but they refuse to climb at all. in fact they just sit around at the bottom of a 1z deep pit of rough soil walls, aparently unable to path out and take jobs - i didnt test if they also prefer to starve to death, but i guess they would.

which is sad, because i would love to build my fortress around the idea.

15
DF Modding / Forbidding gloves/pants/boots on unusual body parts
« on: October 01, 2014, 10:27:57 am »
i have a number of humanoids with nonstandard GRASP, STANCE and possibly LOWERBODY parts, specifically tails - but i dont want them to be able to wear any sort of armor (but weapons) on these parts. is there a way to do this?

one of the creatures has 2 legs and a tail that can be used for either walking or grasping, the other has just a massive tail to walk on.

Pages: [1] 2