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.

Messages - Quietust

Pages: 1 ... 5 6 [7] 8 9 ... 560
91
DF Modding / Re: Historical figure personality analysis science
« on: November 30, 2021, 04:25:34 pm »
Are you able to actually see the code?  How did you figure all this out?
I identified the function for creating history_event_collection_warst (which is extremely easy to find because of runtime type information, or RTTI), and I traced that backwards to find the function used for declaring wars (or accepting/refusing peace treaties) during worldgen, then I found the function call that takes a unit_personality and an array of personality facet weights and figured out which weights were being assigned.

Of course, this was only possible because I had already located the relevant code in version 0.28.181.40d so I knew exactly what I was looking for.

The code itself is just x86 assembly language with some annotations, looking mostly like this:
Code: [Select]
1405031ea ad8    48 8d 8d b0     LEA      RCX=>weights2,[RBP + 0x1b0]
                   01 00 00
 1405031f1 ad8    e8 2a 91 f8 ff  CALL     init_personality_weights                                    void init_personality_weights(in
 1405031f6 ad8    b8 01 00 00 00  MOV      EAX,0x1
 1405031fb ad8    89 85 68 02     MOV      dword ptr [RBP + weights2[46]+0x9d8],EAX
                   00 00
 140503201 ad8    89 85 fc 01     MOV      dword ptr [RBP + weights2[19]+0x9d8],EAX
                   00 00
 140503207 ad8    89 85 04 02     MOV      dword ptr [RBP + weights2[21]+0x9d8],EAX
                   00 00
 14050320d ad8    89 85 50 02     MOV      dword ptr [RBP + weights2[40]+0x9d8],EAX
                   00 00
 140503213 ad8    4c 8b 6d f0     MOV      R13,qword ptr [RBP + local_9e8+0x9d8]
 140503217 ad8    49 8b 8d 30     MOV      RCX,qword ptr [R13 + 0x130]
                   01 00 00
 14050321e ad8    48 8d 95 b0     LEA      RDX=>weights2,[RBP + 0x1b0]
                   01 00 00
 140503225 ad8    48 8b 49 18     MOV      RCX,qword ptr [RCX + 0x18]
 140503229 ad8    e8 b2 d8 40 00  CALL     unit_personality::getOverallScore                           int getOverallScore(unit_persona
and this:
Code: [Select]
14050326e ad8    48 8d 8d b0     LEA      RCX=>weights2,[RBP + 0x1b0]
                   01 00 00
 140503275 ad8    e8 c6 90 f8 ff  CALL     FUN_14048c340                                               undefined FUN_14048c340()
 14050327a ad8    b8 01 00 00 00  MOV      EAX,0x1
 14050327f ad8    89 85 68 02     MOV      dword ptr [RBP + weights2[46]+0x9d8],EAX
                   00 00
 140503285 ad8    89 85 fc 01     MOV      dword ptr [RBP + weights2[19]+0x9d8],EAX
                   00 00
 14050328b ad8    89 85 04 02     MOV      dword ptr [RBP + weights2[21]+0x9d8],EAX
                   00 00
 140503291 ad8    89 85 c4 01     MOV      dword ptr [RBP + weights2[5]+0x9d8],EAX
                   00 00
 140503297 ad8    49 8b 8d 30     MOV      RCX,qword ptr [R13 + 0x130]
                   01 00 00
 14050329e ad8    48 8d 95 b0     LEA      RDX=>weights2,[RBP + 0x1b0]
                   01 00 00
 1405032a5 ad8    48 8b 49 18     MOV      RCX,qword ptr [RCX + 0x18]
 1405032a9 ad8    e8 32 d8 40 00  CALL     unit_personality::getOverallScore                           int getOverallScore(unit_persona
(the indices on the "weights" and "weights2" arrays identify which traits are being evaluated - the "unit_personality::getOverallScore" function is being called against historical_figure.info.personality)

Also, can you figure out why the brainscan script can't find any patterns?
I haven't looked at your script, so I don't know why it wouldn't have found anything.

92
DF Modding / Re: Historical figure personality analysis science
« on: November 30, 2021, 01:13:33 pm »
Something that might be of interest to you: during my analysis of version 0.28.181.40d, I discovered that a few specific personality traits did indeed have an impact on worldgen behavior:
* High values of EXCITEMENT_SEEKING / ACHIEVEMENT_STRIVING and low values of CAUTIOUSNESS would make civ leaders more likely to declare wars in general
* High values of EXCITEMENT_SEEKING / ACHIEVEMENT_STRIVING / ANGER / SELF_EFFICACY would make civ leaders more likely to declare wars, even in the face of insurmountable odds

I managed to locate the same logic in version 0.47.05, and it's very similar:
* High values of CONFIDENCE, AMBITION, THOUGHTLESSNESS, and EXCITEMENT_SEEKING increase the chances of declaring wars in general
* High values of CONFIDENCE, AMBITION, THOUGHTLESSNESS, and ANGER_PROPENSITY increase the chances of declaring "unwinnable" wars
There's an additional check against EXCITEMENT_SEEKING and AMBITION by itself, and it seems to be in the general proximity of code for establishing alliances.

93
It sounds like this is a known bug - whenever you switch a squad's alert state, all of its members will revert to Civilian mode, and they won't actually start obeying their new orders (which switches them back to Military mode) until the beginning of the next day.

94
Some screenshots of your alert's Schedule might be of use in diagnosing your problem - even better would be a copy of your saved game uploaded to DFFD.

95
I'm glad to see that very much, because it means that Tarn can just make the game without focusing on optimization too much, and the technology of the future will just make it run faster. and it's the best thing ever for the game.
I disagree - just because computers are getting faster does not mean people should be encouraged to be sloppy and write inefficient code. After all, there are still plenty of older computers out there which are perfectly functional.

96
DF Gameplay Questions / Re: High population issues other than just FPS?
« on: November 12, 2021, 01:51:27 pm »
I'm trying to figure out what's going on with some crashes.  The crash frequency is currently about 1x a week.  It's too random and unpredictable currently to make a report at this point.  I've never let a fort get above 250 dwarves until this one, so I'm strongly suspecting that is a major factor.  But it was my previous understanding that the only downside to large populations was FPS loss. 
Are you using any third-party utilities such as DFHack or Dwarf Therapist? If so, it's possible your crashes are being caused by one of them, rather than by a bug in the game itself.

Other than that, I've never heard of high dwarf populations causing instability.

97
DF General Discussion / Re: Future of the Fortress
« on: November 12, 2021, 09:08:31 am »
In the z-status screen, other than prepared meals, what else is included in the "Other" category of the Food Stores?

Bonemeal, as it usually is has its own category of powder_misc_creature, sort of nessecity given you could embark ontop of a bonegrinding monster lair and then need somewhere to store the "food", but not really useful unless you find somewhere to mod it in yourself, dwarves dont make a concious effort to attempt to eat it themselves.

A alternative would be like saying you could grind up animal-dye (a powdery substance) out of vermin (sea snails and beetles), which there are some mods to do exactly that to give more expansion to the category. IRL this would be like grinding pangolin scales or big-game horns into 'folk-medicine' as like what exists in certain Asian cultures.

So for the more tame embarks, the "Other" category would most likely only be referring to prepared meals then?
The wiki states that it also includes stuff like flour, syrup, and even dyes.

Looking at my disassembly of 0.47.05, the following items are counted: prepared meals, cheeses, raw (i.e. unprepared) fish, eggs, non-raw-edible plants/growths (since edible ones count as "Plants"), "food-like" globs (e.g. fat/tallow and rock nut paste/cakes), and all plant powders (including dyes).

98
DF Gameplay Questions / Re: Confiscate Stolen Goods
« on: November 08, 2021, 09:15:24 am »
In another thread I suggested trying to assign the artifact to a Display Case or Pedestal and it was successful - if your thief is in a Cage, you might want to try that.

99
Asob Momuzzokun has been possessed!
Presumably not the "usual" type of possession, since Asob's already had a strange mood (and made that Garnierite bed).
Then again, I suppose anything is possible when Demons are involved.

100
DF General Discussion / Re: Future of the Fortress
« on: November 01, 2021, 12:38:50 pm »

What is the question here, all of the post? Only the edit is marked in green.

Would like to know the proper names of the enum values, for verification. They're just integers in compiled code, so DFHack has them as best guesses based on use. Posting the correct names would be easier and more useful than answering the original (now unmarked and spoilered) question, which involves a specific segment of code.

DFHack's term "VERMIN_ESCAPED_PET" is either overly specific, DFHack's got something out of order, or Toady's code is checking the wrong one for some reason.

Edit: Just added the integer values to my post and noticed "CONTAINS_ITEM" and "VERMIN_ESCAPED_PET" share a value of 10. This might suggest it's an issue in the code, but "UNIT_HOLDER" doesn't have the same problem.
For what it's worth, all of the "general_ref" names were taken directly from the class names (which are visible in RTTI), and for the other enum there's a function that's used to load references from savegames and it logs unique error messages for each type (e.g. "Nuked Vermin Reference (Escaped Pet)") and I used those for the names.

101
Civilized humanoids having bite attacks. Better off being cut IMO until the AI gets to the point where it can recognize situations where biting would actually be appropriate (e.g. when your limbs are bound or missing).

I feel obligated to provide a comedic counterexample.

102
update: a guild representative came. No elven diplomat though. I already have an agreement with them, but I guess if one starts the game like this, no way to annoy the elves by cutting trees would exist?

Good enough for me, the elves will bring me giant grizzly bears (sadly they don't seem to have any giant great cats this time) with the next caravan so I may breed them.
The stock raws should already have Diplomats, but they don't arrive at the same time as the caravan - they show up a bit earlier or later, and they also only show up once you have a Baron.

Also, if you wanted the Trader position to be named something other than "Guild Representative" (which is appropriate for Human civilizations but probably not the Elves), you could've renamed it in the script before running it.

103
   [PRODUCT:75:1:BAR:NONE:GET_MATERIAL_FROM_REAGENT:item:NONE][PRODUCT_DIMENSION:1]
Remark: BAR items normally have a dimension of 150, so what you're producing is effectively a tiny sliver of an ingot (of which you would need 150 in order to create a single sword).

104
Positions can't just be added to the raws for an existing world, because the raws are only used when dynamically creating new civilizations during worldgen - if you want to add a position to an existing civilization, you have to add it in-memory.

Fortunately, you wouldn't have to start from scratch - if you have DFHack, you can edit the "hack/scripts/fix/merchants.lua" script and modify it to apply to Elves instead of Humans (and probably also skip the "ESTABLISH_COLONY_TRADE_AGREEMENTS" responsibility, since I think that was there due to a misunderstanding when I initially wrote it).

105
Is it possible to assign the artifact to a display case or pedestal while it's being carried by a unit?

Pages: 1 ... 5 6 [7] 8 9 ... 560