Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 47 48 [49] 50 51 ... 243

Author Topic: DFHack 50.13-r1  (Read 811333 times)

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #720 on: January 09, 2018, 12:30:05 pm »

I haven't made a pull request or issue out of the anon fields because I don't know what they are, only that they seem to relate to the relation strength/level in some way, and the script largely manages to match what DF produces, so it's a fair way from a usable shape (what strainer gets is basically messy half baked research notes).
I messed with that script some time during the autumn and then lost interest for various reasons, so it hasn't been used for anything by me (the script itself is basically experimentation). You've actually seen the whole script then I provided it for some help with getting other info, and made the (correct) comment that using the find operation is better than trying to roll my own bugged one (and I haven't fixed it since I haven't used the script...), but the snippet was from the end of the fairly large script and not the focus of the issue at hand.
Logged

strainer

  • Bay Watcher
  • Goatherd
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #721 on: January 09, 2018, 02:34:21 pm »

Lethosor wrote: "Can you explain what the fields you used are?"

In the relations_indicator.lua script Fleeting Frames uses anon3 ( in figure.info.relations.list(0..n) ) as a vector of 'feeling_types' with values interpreted like this:

Code: [Select]
--[[List of options I've noticed with changing that value:
0: Hero
1: Friend
2: Grudge
3: Bonded
6: Good for Business
7: Friendly Terms? (unsure)
10: Comrade
17: Loyal Soldier
18: Considers Monster (hm, could be interesting RP-wise)
26: Protector of the Weak

Others seemed to default to Friendly terms
with just few points on 7 as second relation.
Perhaps anon_1 and anon_5 may also matter.
--]]

Those values have considerable matches with
unit_relationship_type.h starting from "friend".

Like this:

Code: [Select]
enum unit_relationship_type : int16_t {
None = -1,
Pet,
Spouse,
Mother,
Father,
LastAttacker,
GroupLeader,
Draggee,
Dragger,
RiderMount,
Lover,
unk10,
Sibling,             //
Child,               //hero  xxx
Friend,              //friend 1
Grudge,              //grudge 2
Worship,             //bonded 3
AcquaintanceLong,    //4 ?
AcquaintancePassing  //5 ?
Bonded,             
Hero,
ConsidersViolent,    //4 ?
ConsidersPsychotic,  //5 ?
GoodForBusiness,     //goodfor business 6
FriendlyTerms,       //friendly terms  8
ConsidersKiller,     //8 ?
ConsidersMurderer,   //9 ?
Comrade,             //comrade 10
MemberOfRespectedGr  //11 ?
MemberOfHatedGroup,  //12 ?
EnemyFighter,        //13 ?
FriendlyFighter,     //14 ?
ConsidersBully,      //15 ?
ConsidersBrigand,    //16 ?
LoyalSoldier,        //loyal soldier 17
ConsidersMonster,    //considers monster 18
ConsidersStorytelle  //19 ?
ConsidersPoet,       //protectorofweek 20?
ConsidersBard,
ConsidersDancer,
Master,
Apprentice,
Companion,
FormerMaster,
FormerApprentice,
ConsidersQuarreler,
ConsidersFlatterer,
Hunter,
ProtectorOfTheWeak

Ive not means to resolve these properly but will try using anon3 in mean time to get freind info to complete unit descriptions which will look something like this:

Code: [Select]
'121yr fcs-2 Datos Blibberanok Expert Thrower (lv6 ap43 xp12)
 Extremely gregarious.Very adoring,rude,leisurely. Rgds Friendship++ Peace-
 Likes Surviving,platinum,shields,bolts,opposum men... Gods:Laven,Zul
 Fam 2/6 Frn 4/6 wif lvr pet kil3 loy3 gru1 pri-1 
« Last Edit: January 09, 2018, 02:37:24 pm by strainer »
Logged
Klok the Kloker !

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #722 on: January 09, 2018, 05:11:14 pm »

Continuing the guessing, an anon_3 value of 7 is more likely to be AcquaintanceLong, as even grudges have a 7 as well, in which case Friendly Terms may be the fallback if there aren't any other modifiers. anon_4 seems to have the same length as anon_3 and might be some kind of strength value, but it doesn't determine the order of the Friendly Terms entries, nor whether a unit is shown on the relations screen or not.
In my one year old fortress I've got a 23 coupled with a 7 as well, though it's listed as Friendly Terms (actually I had another one on a visitor's list, but obviously I can't compare that with what the game shows).
It can be noted that Passing Acquaintances seem to have an empty anon_3 vector (Rather than something that would match up with AcquaintancePassing).
Thus, it seems the vector contains elements from another enum type that shares a lot of the values with unit_relationship_type, but not in the same order, and probably a smaller set.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #723 on: January 09, 2018, 05:53:29 pm »

1. I removed everything from figure.info.relations.list, and relationships screen still showed family relationships (and other subclasses of histfig_hf_link) but "friendly terms", "passing acquaintance", and suchlike disappeared.

2. I removed everything from figure.histfig_links and all family relationships disappeared. Only Pets left (maybe something else for other units).

3. I removed unit.relationship_ids.Pet from pets and they disappeared.

.anon_3 indeed looks like unit_relationship_type values starting with Friend.
.anon_5 controls the position on relationships screen.
.anon_4 have no idea.

Actually, I think .anon_4 is indeed some sort of relationship level or a counter, well, it has to be. If a unit is a Friend with someone, .anon_3 will have two entries - Friend and Friendly Terms. If I set .anon_4 for Friend entry to 0, the relationship stops showing as Friend and is shown as Friendly Terms. I thought maybe the game would remove Friend type eventually if I decrease its value but that didn't happen (so far).

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #724 on: January 10, 2018, 05:15:43 am »

I've now seen Friend, Grudge, and Bonded matching 1, 2, 3 in anon_3. I've also seen visitors that have Friend without AcquaintanceLong (7), although I've seen cases where the same visitor has both (1) and (1, 7) entries.
I've seen a number of 23 entries both as (1, 7, 23) and (7, 23), but still don't know what 23 is. In at least one case the person was the spouse.
The primary control for order seems to be Friend/Grudge/Bonded, and within that group the order was in HF Id order on the cases I examined.
Once the Friend/Grudge/Bonded cases have been dealt with the first control for order seems to be anon_5, as mifki said, with HF Id controlling the order when the anon_5 value is the same.
AcquaintanceLong (7) entries with an anon_5 value of 0 seem to be suppressed from display.
Passing Acquaintances again seem to be sorted first on anon_5 and then on HF Id.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #725 on: January 10, 2018, 05:40:04 am »

I've seen a number of 23 entries both as (1, 7, 23) and (7, 23), but still don't know what 23 is. In at least one case the person was the spouse.

What's the problem with 23? Just change any of the links to have this type or remove 1 and 7 in your case. For me it gives "Considers Quarreler".

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #726 on: January 10, 2018, 05:47:13 am »

Thanks mifki. So far I've just observed, not changed anything.

Anyway, this seems to sort the units in the same order as DF does (just checked on a small number of units, though).
Spoiler (click to show/hide)

It's quite possible there are additional cases not covered by this.
Logged

strainer

  • Bay Watcher
  • Goatherd
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #727 on: January 10, 2018, 06:59:52 am »

Spouse ConsideredQuarreller - hehehe

Thanks for resolving these - impressive!

A summary:

If we skip master to formerApprentice (which are in histfig_links ), looks like the 'feelingType' has a clear run with the enum from FriendlyTerms/Frienemy, to the last: ProtectorOfTheWeak.

Just values 4,5,6 are ~~left unindicated~~. Theyre considersviolent,  consdrpsychotic, goodforbiz

The anons would be:
anon3 - feeling
anon4 - counter  //~experience
anon5 - position //listing

This is like the 'social memory' of the units. To think this directs their interactions and emotions generated between them (170 of them! in emotion_type.h) The games relationship listing seems just the surface overview.
« Last Edit: January 11, 2018, 05:05:16 am by strainer »
Logged
Klok the Kloker !

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #729 on: January 10, 2018, 07:54:27 am »

strainer wants it for a compact description (about 10 posts up). I originally wanted it to see gremlin relationships (in the unlikely case I'll ever get two of opposite genders with less than 10 years age difference who are willing to marry the opposite gender again).
Apart from that, there is also the general reason that it hasn't been mapped properly yet (DF hackers abhor an information vacuum)...

I suspect anon_4 is some kind of counter/experience/weight thing, as strainer said. It's possible it might tick over and bump anon_5 at some time somehow, but that's a pure guess.

In the past I've seen units climb in the relations list as a result of pre nuptial treatment, and I've also seen the relation drop in the list for a deceased relation, but I didn't do any investigation beyond the vanilla DF screens in either case.
Logged

strainer

  • Bay Watcher
  • Goatherd
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #730 on: January 10, 2018, 09:49:35 am »

mifki: why did you want to be able to get this data?

Ive done a big extension of the lmanager screen 'manipulator' to include a list mode for units mental and physical attributes, and which does nice coloring of all the labors to show how good the dwarf will be at doing them (which is a bit OP actually because dorfs with right attributes for jobs do MUCH better a them) And im adding a three line description option which for the current focused unit will relate its strongest traits, its goal, its likes, gods, its 'regards' (the things that can confict with traits), focus, cavedin... and an idea of how popular it is, and how much family it has. Should look something like this:

Code: [Select]
'121yr fcs-2 Datos Blibberanok Expert Thrower (lv6 ap43 xp12)
 Extremely gregarious.Very adoring,rude,leisurely. Rgds Friendship++ Peace-- Mirth+
 Likes Surviving,Outwork+,platinum,shields,a fabric,opposum men...   Gods:Laven,Zul
 Fam 2/6 Frn 4/6 wif lvr pet kil3 loy3 gru1 pri-1 

I put some screenshots up in this post

Its got a limited cheat mode for rearranging skill points after embark, and a deeper one for unlimited skill changing. The highlight colors are moddable with a theme file. The sorts are going to be much improved with this latest info - no sadistic medics, fanciful performers etc.
Logged
Klok the Kloker !

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #731 on: January 10, 2018, 11:02:28 am »

i got problems with mousequery not responding to the mouse being in the bottom or right border.
this did not occur in 43.x.x but only in 44.x.x
i'm using a 5:4 screen and running DF windowed 1280x960.
maybe there's something wrong with the calculation of the position and/or size of the areas for mouse scrolling.
Mousequery hasn't changed at all. What specific mousequery feature are you referring to? "mousequery edge"? Are you using TWBT, and if so, does the issue occur with DFHack's (not TWBT's) version of mousequery?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #732 on: January 10, 2018, 11:32:05 am »

Does anyone know exactly when the Event Manager onBuildingCreatedDestroyed() triggers?

For creation, is it as soon as you place the building, as soon as the dwarf begins working on the building, on finishing the building, or something else?
For destruction, is it when you mark the building to be destroyed, when it starts to be destroyed, on finishing destruction, or something else?
Logged

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #733 on: January 10, 2018, 12:34:08 pm »

i got problems with mousequery not responding to the mouse being in the bottom or right border.
this did not occur in 43.x.x but only in 44.x.x
i'm using a 5:4 screen and running DF windowed 1280x960.
maybe there's something wrong with the calculation of the position and/or size of the areas for mouse scrolling.
Mousequery hasn't changed at all. What specific mousequery feature are you referring to? "mousequery edge"? Are you using TWBT, and if so, does the issue occur with DFHack's (not TWBT's) version of mousequery?
i used the 44.x LNP and the 1.9 Meph and it occured in both versions.
i used twbt without multilevel view and it did scroll correctly at the top and left edge, but not on the right and lower edge.
it does work in all the 42.x and 43.x versions.
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1 | 0.44.03-beta1 (dev)
« Reply #734 on: January 10, 2018, 07:37:20 pm »

Do both of those installations include TWBT? If so, again, can you try with the mousequery plugin distributed with DFHack? I know that DFHack's version hasn't changed since 0.43.05, but I can't make any guarantees about TWBT's version of mousequery (or TWBT itself) not changing things. It doesn't look like TWBT's mousequery.cpp has changed, but it's possible that TWBT has changed something.

Also, what specific mousequery feature are you referring to? Run "mousequery" and you should see a list of features, like this:
Code: [Select]
mousequery [plugin|rbutton|track|edge|live] [enabled|disabled]
  plugin: enable/disable the entire plugin
  rbutton: enable/disable right mouse button
  track: enable/disable moving cursor in build and designation mode
  edge: enable/disable active edge scrolling (when on, will also enable tracking)
  live: enable/disable query view when unpaused
Disable one at a time, like "mousequery track disable", until whatever you're talking about doesn't work at all.

Anyway, if this doesn't occur with DFHack's mousequery plugin, downloaded from https://github.com/dfhack/dfhack/releases, there isn't anything I can do to fix it.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.
Pages: 1 ... 47 48 [49] 50 51 ... 243