Bay 12 Games Forum

Please login or register.

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

Author Topic: [MODDING] General modding questions thread  (Read 148769 times)

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #765 on: November 19, 2021, 12:32:04 pm »

When a creature is spawned at the edge of the map how does it have its caste chosen? Is it random weighted by POP_RATIO?
It should be, but it's not. All castes have an equal chance of spawning in the wild. If you want a rare caste, you can make multiple copies of the common caste.
Thank you. Well I was more concerned my rare castes wouldn't show up ever so at least it breaks in favour of them all being possible. I suppose I could use the multiple copies of the same caste method though, I'm using a script to generate a creature with ~70 castes anyway.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #766 on: November 20, 2021, 02:17:31 pm »

When a creature is spawned at the edge of the map how does it have its caste chosen? Is it random weighted by POP_RATIO?
It should be, but it's not. All castes have an equal chance of spawning in the wild. If you want a rare caste, you can make multiple copies of the common caste.

Could you elaborate on this a bit more?. Im aware popratio works just fine in intelligent populations.
  • From what i think you're saying and my own experience, if there's a very small desired percentage of a wild-creature appearing they'll be split, so essentially for /100, you need a 100 castes. But in a intelligent creature it would be magnified further by pop-ratio as well as be a horrendous mess for certain lists like embark if its one your race has tamed in W.G
To that end id probably say make a Creature Variation template to quickly automate [/98 WILD_RATIO] in a generic [CASTE:MALE1], 2 3 etc so on and forth to keep the creature file itself simple.
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #767 on: November 20, 2021, 02:30:52 pm »

When a creature is spawned at the edge of the map how does it have its caste chosen? Is it random weighted by POP_RATIO?
It should be, but it's not. All castes have an equal chance of spawning in the wild. If you want a rare caste, you can make multiple copies of the common caste.

Could you elaborate on this a bit more?. Im aware popratio works just fine in intelligent populations.
  • From what i think you're saying and my own experience, if there's a very small desired percentage of a wild-creature appearing they'll be split, so essentially for /100, you need a 100 castes. But in a intelligent creature it would be magnified further by pop-ratio as well as be a horrendous mess for certain lists like embark if its one your race has tamed in W.G
To that end id probably say make a Creature Variation template to quickly automate [/98 WILD_RATIO] in a generic [CASTE:MALE1], 2 3 etc so on and forth to keep the creature file itself simple.

Pop ratio works fine in intelligent populations, and when domestic creatures are born on-screen (possibly offscreen as well, haven't checked).  But when wild animals roam onto the map, pop ratio is ignored.  (Unless it was fixed recently, haven't checked in a while.)  This would indeed make a mess of embark lists.  Unfortunately I don't know of any way to get around this.

Does anyone know what actually determines whether an attack causes a body part to sail away in an arc? I'm trying to make a natural creature part attack to lop off heads and limbs, but no matter how much I adjust the attack's contact percentage, penetration percentage, the size of the body part itself, even turning the limb into adamantine, all it does is tear the body parts into loose shreds.

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #768 on: November 20, 2021, 03:32:23 pm »

I think there might be a solution with the [ANIMAL] entity tokens, if you simply make [CREATURE_CLASS:AUXILLARY_CASTE] class token for your excess castes, it should omit them from being used for the civ. If not, you can simply exclude the creature altogether from civilizations with another species wide [ANIMAL] entity arguement to reduce the odds to nil (mainly preventing elves foiling your plans and bringing a 100 types of wild boar forever), however restrictive that might be for your worldbuilding and provision something alternative such as a imperfect duplicate for yourself with much simpler correct castes.
  • This effect of [ANIMAL] is so powerful, it can make goblins disown owning trolls, and they dont even have [PET] but rather [USE_EVIL_ANIMALS] that automates the behaviour to collect evil-semi-intelligents.

As for sharp bodies, im no expert but id probably put emphasis on learning whether body parts can be sharp in the first place, and if your creature is correctly proportioned (limbsize, bodyweight, str/agi, skills) relative to the contact area you're trying to inflict. EI horns and teeth work by applying force to the centre of the bite to shred the tearing of skin and tissue, rather than being inhereintly serrated, like a dinosaur or sharktooth, where trying to latch would just have them slide off with a chunk for clean cuts such as what you're after.
Logged

Kat

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #769 on: November 21, 2021, 06:50:18 am »

Is there any way yet, to make a wider variety of foods ? E.g. if you had a flour food product, and a fruit, is there a way to make fruit pies ? Or are prepared meals still unmoddable ?

Also, I'd like a difference between beers and liquors, for alcohol. Like... you can make barley beers, and also barley whiskys, and I kind of think there should be a difference in the tasks required from a brewer.

E.g. instead of just "brew drink from plant", the brewer should make a wort from the plant, stored in a barrel, which can then be made directly into a beer, or wine, or other low strength alcoholic drink. Or, using fuel, distil the wort into a strong alcohol.
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #770 on: November 21, 2021, 02:31:18 pm »

Is there any way yet, to make a wider variety of foods ? E.g. if you had a flour food product, and a fruit, is there a way to make fruit pies ?

People often reach for cheeses as a idea of a (eat in one prepared) meal, such as bags of flour being directly compatible to be turned into bread "Cheese". Outside of 'Pie Cheese', being less realistic when you can't layer over a veneer of graphics (will be MUCH improved by graphical steam release including inbuilt overrides for maggoty animated dwarven cheese), all we have to work with, is detailed below in its own item_food.txt file defining the kitchen recipies that exist in a universal sense rather than having them be hardcoded.

Code: [Select]
[ITEM_FOOD:<Identifier>]
[NAME:<name>]
[LEVEL:<numerical amount of ingredients>]

With no particular bias because there's a few mods out there, this old one i've just checked being the first i found on a boardwide search has a large selection of pre-done numerical descript recipies. Things You Eat (TYE)

But having applemeat hamburgers, with tallow dressing, sheep eye bun, and boiled lettuce would only be superficial to the name and mental image, so you'd probably have to put things aside for realism yourself by sorting kitchen materials with what makes you happiest. as this issue report shows and explains.
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #771 on: November 21, 2021, 04:03:05 pm »

Is there any way yet, to make a wider variety of foods ? E.g. if you had a flour food product, and a fruit, is there a way to make fruit pies ? Or are prepared meals still unmoddable ?

Also, I'd like a difference between beers and liquors, for alcohol. Like... you can make barley beers, and also barley whiskys, and I kind of think there should be a difference in the tasks required from a brewer.

E.g. instead of just "brew drink from plant", the brewer should make a wort from the plant, stored in a barrel, which can then be made directly into a beer, or wine, or other low strength alcoholic drink. Or, using fuel, distil the wort into a strong alcohol.

You can use plants!  You can create a fake plant, and use that as a product of a reaction - and unlike cheese, you can even set its icon and give it a prefstring (so creatures will prefer it).  While this does not have the ability to combine materials like with regular prepared meals (you won't get stuff like "it is made from dwarven flour and cat tripe") you can use a plant material's REACTION_MAT to make specific results.

I used this a lot in the Rise of the Mushroom Kingdom mod.  In addition to producing various alternative drinks from plants (teas and juices), I also gave various plants (and a few other materials) COOK_MAT, PASTA_MAT, and CAKE_MAT reaction classes.  The COOK_MAT would cook items straight, PASTA_MAT required making dried pasta from a plant powder with the FLOUR reaction class, then cooking it with another ingredient (whose PASTA_MAT material would determine the result), and finally cakes could be made by combining flour, sugar, an egg, and one more ingredient, which would determine the actual cake produced.

In this example, for instance, I have sweet strawberries which can be made into tasty cakes, and mild cocoa beans which can be cooked into chocolate and then made into either chocolate pasta or chocolate cakes.  You could also make cooking reactions require fuel (and even make a magma kitchen), but I didn't do this.

There is no way of determining exactly which materials would be used in these reactions - it is similar to brewing and cooking in this way.  If you wanted to be more specific you would have to make a separate reaction for each product.

As far as drinks go, it's basically the same as adding alcohol, but with a different reaction class and a new reaction to use it.  Non-alcoholic DRINK materials will still fulfill alcoholics' needs (there is no way to make a drink that sates thirst but is not considered alcohol) but I considered it balanced because they do not create the euphoria mood boost, but also don't cause alcohol poisoning.

The only weakness of this method is that your products would be stored in the plant stockpile, not in the prepared food stockpile.  I also don't think there is a way to get caravans to bring the custom cooked foods.  But other than that it's probably your best option.

Spoiler: reaction_cooking_rotmk (click to show/hide)

Spoiler: plant_standard_rotmk (click to show/hide)

Spoiler: plant_cooking_rotmk (click to show/hide)

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #772 on: November 24, 2021, 04:38:59 pm »

Does anyone know how [NUMBER:AS_NEEDED] in position tokens work?  I'm trying to create a civ with a lot of generals, but they never seem to show up in worldgen.  Are AS_NEEDED positions exclusive to fort mode?

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #773 on: November 24, 2021, 05:41:01 pm »

Its not easy to grasp much of what they do unless you follow a individual who's held the position and therefore is historically relevant enough, to warrant a mention. AS_NEEDED does as much by the demand of the role, so captains in the civ's armies (which are relied upon to provide solider fodder, restricting and allowing creature-classes in this directly affects what composition of armies attack) swarm to the army controller and commanded by a general, so when they need another army controller (unlikely, the swarm size is not capped to 100's of 1000s of nonhistoric captains with teams of 10 men) one will be pulled out of the void to lead.
  • Which is for a lack of [postion:captain] they'll pull upon historic site population militia instead which are competent enough to lead themselves, though lieutenants are mostly even more unrealized than anything else.

Apparently Generals arrive with the monarch, so a setting a static number like 10 and forcing a monarch's arrival by command or building up the requirements would be interesting to see if this is still intact (i suspect its not, two weaponmasters oft accompany the king but i havent seen a general in a long while). The Marshal royal advisor also applies another civ-member lent to leading the army, as a pocket general.
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #774 on: November 25, 2021, 02:32:11 am »

Its not easy to grasp much of what they do unless you follow a individual who's held the position and therefore is historically relevant enough, to warrant a mention. AS_NEEDED does as much by the demand of the role, so captains in the civ's armies (which are relied upon to provide solider fodder, restricting and allowing creature-classes in this directly affects what composition of armies attack) swarm to the army controller and commanded by a general, so when they need another army controller (unlikely, the swarm size is not capped to 100's of 1000s of nonhistoric captains with teams of 10 men) one will be pulled out of the void to lead.
  • Which is for a lack of [postion:captain] they'll pull upon historic site population militia instead which are competent enough to lead themselves, though lieutenants are mostly even more unrealized than anything else.

Apparently Generals arrive with the monarch, so a setting a static number like 10 and forcing a monarch's arrival by command or building up the requirements would be interesting to see if this is still intact (i suspect its not, two weaponmasters oft accompany the king but i havent seen a general in a long while). The Marshal royal advisor also applies another civ-member lent to leading the army, as a pocket general.

Ah, I think I get it. Tell me if I understand this correctly:

When a site needs to fight a battle, it first decides how many fighters there will be, and then generates the minimum positions necessary to control all of the soldiers needed. Since a site militia can have as many captains as it wants (each with 10 soldiers), there is no reason to create civ-level military controllers.

What about if the monarch wants to attack a site? Will it generate a civ-level MILITARY_STRATEGY position, or will it use a site militia? Can giving the monarch a COMMANDER token encourage it to create generals? (Though I expect it still probably wouldn't need more than one unless the number of soldiers a general could command was capped.)

But basically, to have more generals I would need to restrict the maximum number of soldiers per general.

Another question - can site-level nobles be replaced by civ-level nobles? Can I make a syatem where local militia leaders often rise through the ranks and become the king, or do they have to lose their old position and then get lucky enough to be randomly selected for a civ-level position?

(I'm trying to make a civ where the leader often has high combat skills. So far the best I've managed is adding the MILITARY_STRATEGY tag to the king to increase the chances of weak rulers being killed off.)

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #775 on: November 25, 2021, 04:29:25 am »

When a site needs to fight a battle, it first decides how many fighters there will be, and then generates the minimum positions necessary to control all of the soldiers needed. Since a site militia can have as many captains as it wants (each with 10 soldiers), there is no reason to create civ-level military controllers.

Yeah you got it. Mostly, there is 1 case for another controller you can touch upon though circumstantially, and that's when you're fighting more than one war at once.

I say a pocket general for a Marshal, because if the civ can bring around its attention, one general (not lieutenants, they dont have [POSITION:MILITARY_STRATEGY]) can be stuck in one conflict while two generals could lead offensives on multiple fronts with another required military controller, but it probably wont be very clean about how its resources are split if all the population rushes over to captainship of army no#1, leaving not enough to muster that the civ is happy with for army no#2 with the previously mentioned lack of control.

I was referring to the [POSITION:CAPTAIN], since each actual fortress mode militia captain and commander has military strategy so you can control them for missions and playability in-mode, but they aren't drawn up for attacks and only defence since they're bound to the [SITE] (without breaking the baseline captain position).

What about if the monarch wants to attack a site? Will it generate a civ-level MILITARY_STRATEGY position, or will it use a site militia? Can giving the monarch a COMMANDER token encourage it to create generals? (Though I expect it still probably wouldn't need more than one unless the number of soldiers a general could command was capped.)

The monarch has a alternative role, with the [RESPONSIBILITY:MILITARY_GOALS] they can preface their reasoning and mobilize the entire nation already, which pulls in the generals to doing as they dictate without a explicit command because the nation is at war generally. A important examples of the artifact arc df had already underwent before the villians arc (another motivation per a scheme) is a monarch will explicitly levy the entire might of the nation to pursue "its goal" such as a looted artifact of their family, which makes it personal enough for them to press the issue and put resources they have towards it.
  • Though vanilla dwarves are already not very partial to going to war in the first place, because they have restrictive ONLY_IF_SANCTIONED ethic responses to hostile nations, so can't join without a exemplary purpose, like honoring a alliance, and a lack of proper siege trigger tokens.
Monarchs can lead with [RESPONSIBILITY:MILITARY_STRATEGY] like the general position has if you mod it onto them, but then they can just nominate themselves to lead the battle instead of delegating it (it was their plan and reasoning after all, so generals might be important to shielding the monarch from harm, which is very likely to happen from previous civ-testing)

At the moment i wouldnt know how to approach unit capping, its something for DFhack scripts or Toady to sort out.
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #776 on: November 26, 2021, 08:24:16 am »

Are there any sources or information for how personality/civ values or opposing religious spheres impact likelihood for two civs being allies or enemies?  I have seen, on occasion, a religion mentioned as a reason for war (I made a civ that worships fire and they mentioned their enemy's worship of water) and sometimes someone will mention a value (I've seen "There is also the issue of their lawlessness" for a civ that has a high LAW value attacking a civ with a low LAW value), but these seem rare in comparison to civs that go to war over differences in ethics.

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #777 on: November 26, 2021, 08:54:43 pm »

Are there any sources or information for how personality/civ values or opposing religious spheres impact likelihood for two civs being allies or enemies?  I have seen, on occasion, a religion mentioned as a reason for war (I made a civ that worships fire and they mentioned their enemy's worship of water) and sometimes someone will mention a value (I've seen "There is also the issue of their lawlessness" for a civ that has a high LAW value attacking a civ with a low LAW value), but these seem rare in comparison to civs that go to war over differences in ethics.

Well toady informed much of the community on the relationship of spheres friend & enemies, and there's already a chart for ethics [also based on what toady's revealed]

Ethics are just more prevalent to sensibilities it would seem, the very difference in ethics is what seperate elves from obtaining PTSD from chopping wood (aside a large respect for nature) as the Toady reveals, a big bridge of different viewpoints without everything else lobbed in too.
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #778 on: November 27, 2021, 11:29:24 am »

Are there any sources or information for how personality/civ values or opposing religious spheres impact likelihood for two civs being allies or enemies?  I have seen, on occasion, a religion mentioned as a reason for war (I made a civ that worships fire and they mentioned their enemy's worship of water) and sometimes someone will mention a value (I've seen "There is also the issue of their lawlessness" for a civ that has a high LAW value attacking a civ with a low LAW value), but these seem rare in comparison to civs that go to war over differences in ethics.

Well toady informed much of the community on the relationship of spheres friend & enemies, and there's already a chart for ethics [also based on what toady's revealed]

Ethics are just more prevalent to sensibilities it would seem, the very difference in ethics is what seperate elves from obtaining PTSD from chopping wood (aside a large respect for nature) as the Toady reveals, a big bridge of different viewpoints without everything else lobbed in too.

Yeah, I used that ethics chart, I just would like more detailed information on the other factors that go into the relationships between two entities.  Right now all of the information I can find is infuriatingly vague.

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #779 on: December 01, 2021, 10:59:50 am »

So it is actually possible to make a secret that allows a creature to use specific animation or resurrection abilities during worldgen, without creating random generated experiment creatures.  Just give it EXPERIMENT_ONLY interaction that either animates or resurrects corpses, and to prevent generic necromancers from creating the custom creature, leave out the I_SOURCE:EXPERIMENT from the interaction.  However, this cannot be used to target live creatures with specific effects, since this will only occur during experiments.

Contrary to what i was just looking for (and found some limited but informative answers 1# about), this is a great resource to know about when looking into trying to make psuedo wizard towers with pseudo apprentices that aren't some flavor of intelliundead. As experiments are often used as attack fodder besides zombies if any, and have no immediate ressurective properties as consequence for in-game play they're the perfect subjects.

Experiments themselves come in multiple categories, which are then peppered into predefinitions (there are always beastial, humanoid and giant variants filling slots of any world with experiments enabled in wg) if any deeper customization of experiments that im interested in for histfig can be called upon, if not a single custom critter in this way is fine too. I have a little bit of theory for this detailed here, though i haven't got very far in my own modding with it.


1#: Is there a way to make world-gen zombies a living race instead?
Logged
Pages: 1 ... 50 51 [52] 53 54 ... 61