Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 49 50 [51] 52 53 ... 120

Author Topic: [MODDING] 0.44.x GENERAL MODDING QUESTIONS THREAD - NOW IN ALLCAPS EDITION  (Read 188679 times)

billw

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #750 on: August 07, 2018, 07:18:10 am »

The single largest problem is changes to vanilla raws. These are sometimes necessary for a variety of reasons and detecting them with general algorithms is difficult at best. The worst example is probably reactions--if you add a new reaction, it must be merged into entity_default if you want dwarves to use it. Multiple mods which add new reactions thus cannot be easily mergeable with standard mod installation (i.e. merge the mod folder in).

PyLNP has a mod merger included but it's, uh, not nearly good enough. I've thought about coming up with some sort of bespoke algorithm for mod merging, but it's not something that can keep my attention for long enough to do--it essentially requires keeping a list of every token every object has. This is essentially the same thing as writing an entire raw parser from scratch, primarily due to the complexities of creature modding, syndromes and related object-in-object stuff.

My first thought as to how to do this: discourage modding vanilla creatures entirely, except by way of creature variations. Warn that making in-place mods to vanilla creatures rather than using creature variations to make all changes will lead to unexpected behavior, and don't even bother attempting to merge creature changes. Creatures are seriously that complex--the subtleties of creature-level vs caste level tokens, materials, tissues and the like make it nigh-infeasible to merge multiple mods that change one creature together unless such changes are entirely in the form of adding creature variations.

For the rest, any nested stuff is simple to deal with. PERMITTED_REACTION's placement in the entity does not matter whatsoever; pydwarf adds them by just putting them on the same line as [ENTITY:MOUNTAIN] (or whatever they're set to), which works perfectly.

I am considering tackling this issue, I have some hopefully relevant experience in non destructive data merging systems. However first I need to get a thorough understanding of the format. Some things I am interested in looking into:
- a raw merging system with rich heuristics and pattern matching capabilities. e.g. modify all x that match y, copy a from b to all x that match y, create a using b as template for all b that match x.
- a mod ordering system (simple like BOSS in Oblivion).
- a format to express a mod as a set of operations and/or diffs that can be applied.
- a tool to automatically create a mod from this format from a base and modded set of raws.
- a tool that can non-destructively enable/disable these mods, with both automatic heuristic conflict resolution (based on knowledge of the meaning of the raws, or hints provided by the mods themselves, or applied from another source), and manual conflict resolution with a user friendly interface (e.g. mod x wants to replace this reaction that mod y also wants to replace, which one do you want, or shall I rename one of them and keep both?).

How does this sound for a start? I have yet to do the research required to know what issues there might be with these ideas, but I wanted to get them out there and perhaps people with more experience can weigh in.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #751 on: August 07, 2018, 07:47:41 am »

That's all basically ideal.

It's a bit unusual to point out a specific language for stuff like this (at least I feel like it is), but python is probably the preferred language just in case all this can be added to the LNPs.

billw

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #752 on: August 07, 2018, 08:25:19 am »

Unfortunately I am a beginner in Python, ideally I would like to use C#+WPF, but I know cross platform support would be a highly desirable feature, so I am quite torn.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #753 on: August 07, 2018, 05:02:31 pm »

The most important part is the algorithms and I can convert from one language to another myself pretty easily. If it would be significantly faster to write it in C#, do so.

Chrispy

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #754 on: August 24, 2018, 05:24:55 pm »

Does dfhack's adamantine-cloth-wear command affect other types of modded metal cloth?

If it doesn't, how would I go about giving those new metal cloth types the same command?
Logged
Quote from: Toady
"This suggestion is very broad."
≡«+large yellow diamond+»≡
On the item is an exceptionally designed image of a diamond in yellow diamond.

Kat

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #755 on: August 25, 2018, 03:56:24 am »

Is it possible for a material to have a syndrome so that weapons/ammunition made of that material will have extra effects against particular species ?

I am thinking in particular of things like silver swords vs werecreatures/vampires. And more esoteric things like mithril vs goblins.
Logged

ZM5

  • Bay Watcher
  • Accomplished RAW Engineer
    • View Profile
    • Steam
Re: [MODDING] 0.44.x questions thread
« Reply #756 on: August 25, 2018, 04:18:40 am »

Materials being effective against particular creatures is handled within the creatures themselves - so for vanilla werebeasts or other procedural creatures you're out of luck, since they can't be edited (werebeasts already have randomized weaknesses to certain metals, but without looking into the worlds files its impossible to find out what they are). Same for vampires since they aren't actually separate creatures, they're just a syndrome tacked onto an existing creature.

The token itself looks something like this:
[MATERIAL_FORCE_MULTIPLIER:INORGANIC:SILVER:10:1]
In this case, it makes it so when the creature is attacked with a silver object, the force of that object is multiplied by 10, making it deal far more damage. If something like a megabeast has this token, npcs who give you kill quests for it will actually bring it up - hence why its impossible to find it out for vanilla werebeasts, since you don't get kill quests for them at the moment.

When it comes to other syndromes (like causing blisters), I think the issue is that they don't trigger at all or only do so with stuck-ins, I admittedly forget which one it is.

billw

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #757 on: August 27, 2018, 11:55:37 am »

How can I reveal cave sites after embark? I checked out the dfhack world_site structure and it appears to be mostly unknown and with no obvious "reveal on map" flag. I can't find a script or plugin that seems to do this, although it would be useful for idiots like me who started without them revealed and now wants to raid them!

/edit NM i made a script that works: http://www.bay12forums.com/smf/index.php?topic=171900.0
« Last Edit: August 27, 2018, 12:29:04 pm by billw »
Logged

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #758 on: August 28, 2018, 05:03:15 pm »

Advanced World Parameters allows you to reveal all cave sites...
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #759 on: August 28, 2018, 05:33:08 pm »

Advanced World Parameters allows you to reveal all cave sites...
After embark...
Logged

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #760 on: August 31, 2018, 07:02:48 pm »

Is there a way to make and allow the reaction to specify stone, metal or wood, Instead of it being randomly chosen and having to make multiple reactions for each metal?

Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: [MODDING] 0.44.x questions thread
« Reply #761 on: August 31, 2018, 07:08:49 pm »

like "I want to use Cedar Wood" this time around? Idk if that's possible with custom reactions but you can make 3 "general" ones


[REAGENT:wood:1:LOG:NONE:NONE:NONE] - logs aka wood
[REAGENT:stone:1:BOULDER:NONE:NONE:NONE][WORTHLESS_STONE_ONLY] - stone
[REAGENT:metal:150:BAR:NONE:NONE:NONE][FIRE_BUILD_SAFE] - metal (i'm sure soap is not fire safe)

Also do note you have access to [CATEGORY] tag so you can have a workshop organizally cluttered, instead of 6 pages of clutter
Logged

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #762 on: August 31, 2018, 07:31:54 pm »

I knew how to choose between those 3, was just using those materials as example, was just curious on if it was possible to specify on the material itself, but I guess I cant, I may end up using categories for it then >.<
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

Blastbeard

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #763 on: September 01, 2018, 03:30:07 am »

I want to get more mileage out of the building interface in adventure mode without using DFhack. To be more specific, I want to make walls and floors from stone and stone blocks. I have the means to produce any material I need, I just can't use anything other than wood and I get the impression that's currently a hard coded feature. I'm also interested in building more workshops, firstly a forge but eventually everything. Workshops seem less likely to be a fixed point, but I'm not exactly new to being wrong. Is there something I can modify to get this working or are there too many hard coded elements to work around at the moment?
Logged
I don't know how it all works, I just throw molten science at the wall and see what ignites.

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: [MODDING] 0.44.x questions thread
« Reply #764 on: September 01, 2018, 06:34:09 am »

I want to get more mileage out of the building interface in adventure mode without using DFhack. To be more specific, I want to make walls and floors from stone and stone blocks. I have the means to produce any material I need, I just can't use anything other than wood and I get the impression that's currently a hard coded feature. I'm also interested in building more workshops, firstly a forge but eventually everything. Workshops seem less likely to be a fixed point, but I'm not exactly new to being wrong. Is there something I can modify to get this working or are there too many hard coded elements to work around at the moment?

Firstly, I believe when I was doing my testruns I was able to use Stone for walls and floor, but that was once all the wood was gone, I could be misremembering this, or this was a feature that I wasn't aware DFHack added.

Second, It is unfortunately hardcoded to only allow Carpenter's Workshop, and no others. DFHack would be required for more buildings to be added. (unsure if there is a mod/hack for this)
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...
Pages: 1 ... 49 50 [51] 52 53 ... 120