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 - Roses

Pages: 1 2 3 [4] 5 6 ... 131
46
Utilities and 3rd Party Applications / Re: DFHack 0.47.04-r1
« on: August 06, 2020, 01:37:09 pm »
Question about the onReactionComplete eventful trigger. IIRC it only triggers when a product is actually created, is that still true? Also, if using both onReactionComplete and onJobCompleted will the always trigger in the same order, or will it be somewhat random which one triggers first?

47
It may not still be true, but a long time ago Urist DaVinci (who I haven't seen around in awhile) did a lot of work figuring out combat mechanics and equations. You can find his threads here and here. Below I copied the small section of one of the posts that talked about contact area and penetration.

"The contact area of a body part is just: area=(part size)^(2/3)
The contact area of an armor item is also identical to the volume and thickness

If the weapon has a smaller contact area than the layer, the layer's volume is reduced by the ratio of areas.

Tissue layer thickness and armor thickness use the same units as the penetration size in the weapon raws. The weapon's penetration numbers are used when deciding how far jammed bone fragments can penetrate, which is odd when considering blunt weapons."

48
Alright, I've got the basics of the Enhanced Reactions all up and running. I am still experimenting and testing a bit with how the various triggers are being handled together (onJobCompleted and onReactionComplete) along with my custom triggers, but they seem to all be cooperating together. The trick being making sure that the required information is available regardless of if a product from a reaction is created or not.

Currently script calling is enabled through the system, which lets you do anything you could want, but I am also working on getting shortcuts set up for some of the more obvious uses (miasma/smoke generation, long time reactions, variable reactions, power/water/magma consumption, etc...).

Some of my previous work on the Enhanced Reactions has been invalidated with the 0.47 release as well, which means I still want to go through and make sure I am not duplicating anything that is currently doable with the new reactions.

49
Utilities and 3rd Party Applications / Re: DFHack 0.47.04-r1
« on: July 09, 2020, 01:08:43 am »
<snip>

It's looking really good, I will try and take some time in the next couple of days to really go through in detail, but I'm liking what I am seeing. I don't really have much to say about it right now, but I wanted to make sure I took the time to thank you for your work.

50
Utilities and 3rd Party Applications / Re: Corruption Detection
« on: July 06, 2020, 10:30:54 pm »
I've looked for bad items in the item list and haven't found them. The problem, from the outside, is that the corruption is seen by one or more equipment lists containing garbage entries, but those are generated on the fly (I've tried hacking them to remove a bad entry, and it's back the next time the list is generated). To me, it seems that the structure the data comes from isn't the regular item lists, but something else, unknown what (Toady would know, but I don't think anyone has asked him).
Yeah, military equipment (assuming that's what "equipment" is referring to) is likely stored separately from the items themselves.
Were you modifying the equipment list in a viewscreen? Those are indeed usually temporary copies. I'm not familiar with the exact structures at play here, but I could take a look at one of the corrupted saves.

I've looked in the past, but I've never been able to find the root location of the items. I'm thinking that somewhere there is a list of types, subtypes, mat_types, and mat_subtypes and that for one reason or another one of the four gets incorrectly filled in (or maybe not filled in) and then when the equipment lists get filled from those lists the corruption occurs.

My thought for why it is stored this way is because that is how the entity resources are stored, and I have had corrupted entity lists when I have accidentally removed a subtype entry and not the corresponding type entry.

51
Utilities and 3rd Party Applications / Re: DFHack 0.47.04-r1
« on: July 06, 2020, 11:48:59 am »
You certainly could fairly easily combine a few things and create a script that allows you to extract blood, tears, pus, etc... You could even have it set up like the gui/create-item script where you select an extractor, an extractee, and the material to extract. You could also turn it into a more automated thing by creating reactions for extracting blood and such, and then tie the script into those reactions so that they functions similarly to how the milking reaction goes.
How make script and reactions for this script?

You would need to combine the work that Rumrusher did with a heavily modified create-item script. You could also use the reaction-trigger hooks to set up a script, that would probably be more work, but also more configurable.

If you were asking if someone would make the script for you, probably not, as it is probably not of a lot of interest to most of the people that routinely write scripts. But it would be a great exercise for you to learn how to write scripts.

52
Utilities and 3rd Party Applications / Re: DFHack 0.47.04-r1
« on: July 05, 2020, 02:12:46 pm »
You certainly could fairly easily combine a few things and create a script that allows you to extract blood, tears, pus, etc... You could even have it set up like the gui/create-item script where you select an extractor, an extractee, and the material to extract. You could also turn it into a more automated thing by creating reactions for extracting blood and such, and then tie the script into those reactions so that they functions similarly to how the milking reaction goes.

53
so you're saying one could slap an attack on the unit modify it and have it target themselves?
well then that's one work around to get control of which body part you want to shoot.

Hmmm, normally I would say no because projectile attacks don't function the same as normal attacks and self targeted attacks usually don't work, but if your goal is to be able to target specific body parts in adventure mode (or say a special ammo that always targets the head or legs or something) it may actually be possible by modifying the projectile right before it hits the target. I'll have to explore how the game handles projectile attacks.

For reference, I was referring to melee attacks, which can easily be added and modified such that you can change the velocity, hit chance, and target body part of an attack.

54
so I just got an adv mode idea given how stealth works and how it's invisible to the player but not to everyone else. is it possible to make Dfhack npcs that spawn in and hide out of site to do stuff you can't just force with dfhack yet.
like making an unit named Aimed Shot that hits like a space station and sets up aimed attacks that pierce and probably sticks into the person you told Aim to hit.
you could even set up how much force and damage the attacks are you could even assign the same historical figure to Aimed Shot so any kills they get would transfer over to the player.

this script idea would only work as long as the whole sneaking thing isn't fixed and probably break if someone uses any reveal any hidden units scripts.

Theoretically I think it would be possible, but spawning units with DFHack can be problematic, so I'm not sure you would want to do that too much. I also don't think there are too many things that a hidden npc could do that you couldn't do without it. For instance, in your example, you can already make an attack and add it to a unit and modify it's attack values

55
-snip- Also there would be mandatory maintenance and support part as anything that does not eat/sleep/bleed is boring and must have drawbacks

Feel like the big issue with golems is if you give them emotions or not, if you don't they probably work fine until one goes extremely distracted and crafting with them might get shoddy I heard, if you do give them emotions then they act like an immortal fort citizen that is affected by corpses and stress can cause them to go mad so you end up having to find a way to de-stress the golems.
which already feels like maintenance.

You could set up "pylon" buildings that periodically de-stress golems automatically when they walk by them. For even more flavor you could make them naturally super weak and slow, then have the pylons give them a massive strength and speed boost which lasts a certain amount of time, so you would need them to almost always be close to the building

Wouldn't it be like alcohol dependency? Dwarf golems drinking without aperture, and getting eventual decline of neglect for not standing near pylons, or visiting a tavern for a mechanical refill even if they can't party (can't choke because no lungs, also easiest way to get served drinks until full least in current version is to be unable to speak and take part in socialising)

Plumphelmet-men visitors just stand in the corner sipping their drinks, its not really known how they're supposed to have fun.

That's actually a pretty interesting thought train. You could fairly easily set up a race that suffers the positives and negatives of ALCOHOL_DEPENDENT but attaching it to a separate building/object. For example, you could have playable elves that suffer negative thoughts and speed reductions if they haven't passed by a tree lately. Or humans that need a "church" building.

EDIT: Is there any modder(s) that would like to partner with me to come up with some good examples and use cases? I honestly haven't played DF for awhile and have spent most of my time writing lua and c++ code for it instead (a job hazard, as writing code is what I do for a living) and could use a modder to help me understand the sorts of stuff that is actually wanted. As an incentive I am willing to offer my services as a script writer.

56
-snip- Also there would be mandatory maintenance and support part as anything that does not eat/sleep/bleed is boring and must have drawbacks

Feel like the big issue with golems is if you give them emotions or not, if you don't they probably work fine until one goes extremely distracted and crafting with them might get shoddy I heard, if you do give them emotions then they act like an immortal fort citizen that is affected by corpses and stress can cause them to go mad so you end up having to find a way to de-stress the golems.
which already feels like maintenance.

You could set up "pylon" buildings that periodically de-stress golems automatically when they walk by them. For even more flavor you could make them naturally super weak and slow, then have the pylons give them a massive strength and speed boost which lasts a certain amount of time, so you would need them to almost always be close to the building

57
Added some simple examples to the system list, Enhanced Reactions are almost ready to go. I will post more detailed and complex examples once they are ready.

58
DF Modding / Re: i am confused about the format and [SELECT_CASTE]
« on: June 14, 2020, 03:13:42 pm »
yes but i still do not understand why you would want to do something that are applied to all castes after you have defined castes when that would mean writing one additional line of code in [SELECT_CASTE:ALL] and pressing tab one additional time per line of code you want to apply to all your castes, why not just leave defining castes to the end of the document and defining tissue colors and hair lengths and stuff a bit earlier? Why do they use this seemingly ineffective method? Is there some kind of reason why it is necessary to define all the tissue appearances last? Is it so that they can be found`and edited more easily? is it necessary to define tissue appearance at the very end of the creature for some technical reason? Sorry if i come of as a bit rude i just dont understand

As long as the appearance modifiers are defined after the tissues they modify, I'm fairly certain they don't need to be declared after the castes.

Also, the tabs are not necessary, there is no indentation requirements for the raws, so it really is just one extra line

59
Utilities and 3rd Party Applications / Re: DFHack 0.47.04-r1
« on: May 22, 2020, 10:03:34 am »
Exactly - I would be more concerned about optimizing the loop body, since that's presumably run more often.

More just wanted to make sure that the x = y or z syntax wasn't stupidly expensive (it's not in the other languages I code in, so I didn't have a good handle on it). That being said, I should have just run a little test case (which I just did) with a million calls there was no appreciably difference in run times (when the SubTable was present the second was slightly faster, when the SubTable was not present the first was slightly faster, but within a few percent of eachother each time I ran)

60
Utilities and 3rd Party Applications / Re: DFHack 0.47.04-r1
« on: May 21, 2020, 01:46:37 pm »
Question about speed in lua, is there a notable difference between these two?

Code: [Select]
if Table.SubTable then
  for k,v in pairs(Table.SubTable) do
    ...
  end
end

vs

Code: [Select]
for k,v in pairs(Table.SubTable or {}) do
  ...
end

Pages: 1 2 3 [4] 5 6 ... 131