Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 7 8 [9] 10

Author Topic: [Modding][Premium Dwarf Fortress][Steam Workshop](Done!) Raw Changes Superthread  (Read 22108 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile

Code: [Select]
[CUT_ITEM_HELM:ITEM_HELM_CAP]

It's just CUT_ITEM, you're duplicating raws by doing this, check your errorlog. If you were using SELECT_ITEM_HELM, that wouldn't work either, it's just SELECT_ITEM for all item types.

Really? I seem to have gathered that the way cut and select worked was by adding that to the beginning of the entry you want to affect. For example, the post above which doesn't work (shoulda been a hint, I suppose). To me, it looked like [ENTITY:MOUNTAIN] gets selected by adding SELECT_ between the bracket and ENTITY. Or, [INORGANIC:ILMENITE] gets cut by adding CUT_ the same way. I suppose this means the [CUT_USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE] I've been using means nothing when read by the game. I thought it was a universal tool that could select and cut any particular thing, but I guess it's more like all the rest of the tokens: a list of tokens that are specifically defined, and limited to only what shows up on that list.

Thank you very much for making it clear that those examples brought me to the wrong conclusion. I'll make a clear glass statue in your honor.

What errorlog? How do I access this? I've heard of it, but assumed that it involved some 3rd-party software that I don't have installed.

You should not be making guesses like these. I mentioned earlier in the thread every single cut/select token and, yes, they're all hardcoded.

Bihlbo

  • Bay Watcher
    • View Profile

You should not be making guesses like these. I mentioned earlier in the thread every single cut/select token and, yes, they're all hardcoded.

So much of modding DF is guessing, experimenting, testing, and learning from your mistakes that if I stopped "making guesses like these" I'd just have to stop trying. Yes, I've read that list. You left the nature of how they are to be used, how they are defined and used by the game, and what the scope of this new CUT_ thing is supposed to cover all up to guesswork. Much like [LOG_CURRENT_ENTRY]. I've tried adding that to the beginning of a file, to the middle of an entry, etc. Still have no idea what it does. "It works for all object types that SELECT and CUT work with" doesn't mean anything to me. Or rather, I can think of about half a dozen things that could mean, which requires me to guess, experiment, and test to discover the truth.

I wish I could think like a programmer, I'd probably understand things better. But I don't.
Logged

Man0warable

  • Bay Watcher
    • View Profile

You should not be making guesses like these. I mentioned earlier in the thread every single cut/select token and, yes, they're all hardcoded.

So much of modding DF is guessing, experimenting, testing, and learning from your mistakes that if I stopped "making guesses like these" I'd just have to stop trying. Yes, I've read that list. You left the nature of how they are to be used, how they are defined and used by the game, and what the scope of this new CUT_ thing is supposed to cover all up to guesswork. Much like [LOG_CURRENT_ENTRY]. I've tried adding that to the beginning of a file, to the middle of an entry, etc. Still have no idea what it does. "It works for all object types that SELECT and CUT work with" doesn't mean anything to me. Or rather, I can think of about half a dozen things that could mean, which requires me to guess, experiment, and test to discover the truth.

I wish I could think like a programmer, I'd probably understand things better. But I don't.

The specifics of what CUT and SELECT do and how they are used was already discussed earlier in the thread. I myself even provided examples of both. As for LOG_CURRENT_ENTRY, a more explicit explanation for this can be found on the wiki:

Quote
one can use [LOG_CURRENT_ENTRY], which logs the full contents of the object in question to logs\current_entry.txt. This can be useful to make sure that the patch is doing what you think it is.

More details and examples on modding can be found here: https://dwarffortresswiki.org/index.php/Modding
That page contains all of the pertinent information that you need to mod Dwarf Fortress. This thread was made to centralize information on the new modding system as the wiki was not accepting info for the new version at the time. Now that the wiki has been updated, all info in this thread is being steadily migrated to it. Your efforts in learning the new modding system should be focused on reading the wiki rather than this thread. You can even download other mods and use their code as examples to learn from. As Putnam stated, there is no need for guesswork here.
Logged

Bihlbo

  • Bay Watcher
    • View Profile

Quote
one can use [LOG_CURRENT_ENTRY], which logs the full contents of the object in question to logs\current_entry.txt. This can be useful to make sure that the patch is doing what you think it is.

Thanks for answering part of my question, I appreciate it.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile

I wrote that to the wiki actually, ha.

You should not be making guesses like these. I mentioned earlier in the thread every single cut/select token and, yes, they're all hardcoded.

So much of modding DF is guessing, experimenting, testing, and learning from your mistakes that if I stopped "making guesses like these" I'd just have to stop trying. Yes, I've read that list. You left the nature of how they are to be used, how they are defined and used by the game, and what the scope of this new CUT_ thing is supposed to cover all up to guesswork. Much like [LOG_CURRENT_ENTRY]. I've tried adding that to the beginning of a file, to the middle of an entry, etc. Still have no idea what it does. "It works for all object types that SELECT and CUT work with" doesn't mean anything to me. Or rather, I can think of about half a dozen things that could mean, which requires me to guess, experiment, and test to discover the truth.

I wish I could think like a programmer, I'd probably understand things better. But I don't.

Yeah, sorry, I gave the entire scope of CUT and SELECT. What I listed was every single one that can be used, there is no more. I thought that was implied. Similarly, the "ENTRY" in [LOG_CURRENT_ENTRY] refers to individual objects--CREATURE objects, ENTITY objects, ITEM objects etc., all the ones you can use SELECT and CUT with.

How they are to be used I... thought I did explain? [CUT_CREATURE:x] removes the creature from the raws as if it were never defined. [SELECT_CREATURE:x] lets you continue adding stuff to an existing creature just as if you were defining it in the first place. There is little more to it than that.

kiiranaux

  • Bay Watcher
  • , who choked on [PRO_POS] own ambition!
    • View Profile


To be specific: SELECT_ and CUT_ work no matter where they're put. Starting a file with
Code: [Select]
patch_ will simply make it not be loaded. The edit that added that claimed that I was the one providing the info, but I never said anything like that, eek.


Thanks for the info Putnam. I personally have made no wiki edits this month.
Although this is an old topic, can you say more about what you DO need to start a file with? I've always been lax with making sure the file names match that first line (eg., "inorganic_rock_new") or whatever and if there are things that make the file not be read, like calling it patch_, I'd love to learn more about those.
Logged
The Highfantasy Mod/Pack. Civs, Creatures, Systems, Balance.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile

So far as I can tell, it just needs to start with the same start as the file title. Inorganic files need to start with inorganic_ or whatever, that's about it. I don't think it needs to match?

Bihlbo

  • Bay Watcher
    • View Profile

Yeah, sorry, I gave the entire scope of CUT and SELECT. What I listed was every single one that can be used, there is no more. I thought that was implied. Similarly, the "ENTRY" in [LOG_CURRENT_ENTRY] refers to individual objects--CREATURE objects, ENTITY objects, ITEM objects etc., all the ones you can use SELECT and CUT with.

How they are to be used I... thought I did explain? [CUT_CREATURE:x] removes the creature from the raws as if it were never defined. [SELECT_CREATURE:x] lets you continue adding stuff to an existing creature just as if you were defining it in the first place. There is little more to it than that.

What tripped me up is that I understood how modding worked in the previous two versions, having been at it a while, and that told me that select and cut aren't possible. Now they are! This is totally new, and does something never before done in DF. As such, I didn't guess that they'd be limited by previous modding knowledge and limitations. I imagined that it's possible these functions can alter tokens instead of being hard-coded tokens themselves, and that's what it looks like when (thanks to the [SELECT_ENTITY] token being structured the way it is) you go to select the dwarf by simply adding "SELECT_" between the open bracket and ENTITY:MOUNTAIN]. "Oh," I surmised, "cool, now you can select elements of an object and cut out the parts you want to remove, and select which part of it to edit, like [SELECT_CASTE:MALE] and [SELECT_MOLAR_MASS]. It'll be nice to use that as a GOTO tool." Seeing a list of CUT_ tokens in the context of this thread looked like no more than, "These are the attempts I've tried, and found to work," not "These are the tokens that exist, sorry that there aren't any more than this." So, just a simple misunderstanding fueled by my over-active imagination, and I'm exceedingly grateful that you corrected me. I was just... waaay off.
Logged

kiiranaux

  • Bay Watcher
  • , who choked on [PRO_POS] own ambition!
    • View Profile

Just noting for all of us that the wiki needs updates for how to modify those dang layered creature graphics.
here's what i've found so far, for using the vanilla layered sprites to display SOMETHING for new modded things.

Adding an additional recognized metal: you need a whole new tag []
Adding an additional recognized weapon: you add the weapon after the existing weapon using :______]
Adding an additional recognized skin color: you add the skin color after existing skin colors using :____]
Adding an additional recognized gender/caste: (not sure which yet - neither is throwing an error. More testing req'd)

Tomorrow i'll look add adding new castes beyond male/female
« Last Edit: January 03, 2023, 12:53:09 pm by kiiranaux »
Logged
The Highfantasy Mod/Pack. Civs, Creatures, Systems, Balance.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile

Yeah, sorry, I gave the entire scope of CUT and SELECT. What I listed was every single one that can be used, there is no more. I thought that was implied. Similarly, the "ENTRY" in [LOG_CURRENT_ENTRY] refers to individual objects--CREATURE objects, ENTITY objects, ITEM objects etc., all the ones you can use SELECT and CUT with.

How they are to be used I... thought I did explain? [CUT_CREATURE:x] removes the creature from the raws as if it were never defined. [SELECT_CREATURE:x] lets you continue adding stuff to an existing creature just as if you were defining it in the first place. There is little more to it than that.

What tripped me up is that I understood how modding worked in the previous two versions, having been at it a while, and that told me that select and cut aren't possible. Now they are! This is totally new, and does something never before done in DF. As such, I didn't guess that they'd be limited by previous modding knowledge and limitations. I imagined that it's possible these functions can alter tokens instead of being hard-coded tokens themselves, and that's what it looks like when (thanks to the [SELECT_ENTITY] token being structured the way it is) you go to select the dwarf by simply adding "SELECT_" between the open bracket and ENTITY:MOUNTAIN]. "Oh," I surmised, "cool, now you can select elements of an object and cut out the parts you want to remove, and select which part of it to edit, like [SELECT_CASTE:MALE] and [SELECT_MOLAR_MASS]. It'll be nice to use that as a GOTO tool." Seeing a list of CUT_ tokens in the context of this thread looked like no more than, "These are the attempts I've tried, and found to work," not "These are the tokens that exist, sorry that there aren't any more than this." So, just a simple misunderstanding fueled by my over-active imagination, and I'm exceedingly grateful that you corrected me. I was just... waaay off.

I'm a dev now and was speaking from a position of using the string dump and having been the first to test CUT and SELECT at all, haha. I'm not exactly making that obvious here, I think.

kiiranaux

  • Bay Watcher
  • , who choked on [PRO_POS] own ambition!
    • View Profile

@Putnam can you shed some light on the following - does the new layered graphic tag CONDITION_CASTE allow more than one caste after the :, or can you define multiple [CONDITION_CASTE:_____] in a row additively, or neither?

« Last Edit: January 04, 2023, 05:28:18 pm by kiiranaux »
Logged
The Highfantasy Mod/Pack. Civs, Creatures, Systems, Balance.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile

@Putnam can you shed some light on the following - does the new layered graphic tag CONDITION_CASTE allow more than one caste after the :, or can you define multiple [CONDITION_CASTE:_____] in a row additively, or neither?

EDIT: Neither one appears to throw an error, which implies that it's (the former), because if (the former) then (the latter) would just man overwriting and will still not throw an error. Whereas if it were (the latter), then instances of (the former) would throw an error.

So do it like this. [CONDITION_CASTE:MALE:MALEALSO:MALEOMEGA:MALEPURPLE] etc.



Looks like you can't do that, but you can do this:
Code: [Select]
[CONDITION_CASTE:MALE]
[CONDITION_CASTE:MALEALSO]
[CONDITION_CASTE:MALEOMEGA]
and it'll work fine

Bihlbo

  • Bay Watcher
    • View Profile

Has the LITTERSIZE tag been re-added to the game? Or is it still removed?

The only way I can think to test would be to give a creature a huge littersize, then play for a year or so to see if they have 2 offspring or 200. Please save me a few hours.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile

Has the LITTERSIZE tag been re-added to the game? Or is it still removed?

The only way I can think to test would be to give a creature a huge littersize, then play for a year or so to see if they have 2 offspring or 200. Please save me a few hours.

Checked in the code, seems to be there

Bihlbo

  • Bay Watcher
    • View Profile

Has the LITTERSIZE tag been re-added to the game? Or is it still removed?

The only way I can think to test would be to give a creature a huge littersize, then play for a year or so to see if they have 2 offspring or 200. Please save me a few hours.

Checked in the code, seems to be there
Much obliged
Logged
Pages: 1 ... 7 8 [9] 10