Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 336 337 [338] 339 340 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1457052 times)

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5055 on: January 03, 2014, 07:24:19 pm »

Hi guys, not sure if this is the right place to post this - but it is a dfhack script. Not a question, just wanted to mention it as its something I've come across.

Spawnunit = I mentioned it before as spawned units cannot be trained and cannot be set as friendly/hostile/neutral or as children etc (they appear as age 1 adults)

But I just wanted to point out a potential issue with the script.
The spawned dwarves, which function perfectly at labors etc, have 2 major problems that are linked:

1) they cannot be assigned to military squads as they do not seem to appear in the list for applicants like regular fort members do - now I think of it, it may be because they are classed somehow as 'tame', but they can still be assigned labors and gain skills etc so maybe not.

2) when they die, because they are not listed like regular fort members, they come back as ghosts, but cannot be put to rest as their names do not appear in the slab memorial list. Which has lead to some FUN while testing.


Note: They DO appear in the (u)nits tab, but when they undead, they revert to [generic profession name] corpse - usually 'peasant corpse'. Unless they are thralled/husked, where they retain their name.

edit: could it be because they are listed as 1 year old, even though they are displayed and act as adults?
« Last Edit: January 03, 2014, 07:54:27 pm by TheOnlySolitaire »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5056 on: January 03, 2014, 08:01:56 pm »

1. they're not historical figures

2. they're not historical figures

Both of these problems can be fixed the same way, really.

I think the issue is stability.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5057 on: January 03, 2014, 08:07:39 pm »

They also lack natural skills. If you make a creature with NATURAL_SKILL:AXE:20, and spawn it, it wont have any axe skills.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5058 on: January 03, 2014, 08:11:38 pm »

They also lack natural skills. If you make a creature with NATURAL_SKILL:AXE:20, and spawn it, it wont have any axe skills.

Fascinating. Should be easy enough to fix, though.

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5059 on: January 03, 2014, 08:13:42 pm »

Thanks for the replies.

That makes a lot of sense - I guess it's like how peasants in villages are just their profession name until you talk to them or similar...

and how certain castes might have high natural skills in various areas, but still end up in jobs not suited to their skillset...


So how can that be fixed? I'm not a coder, but I've found the gmeditor is quite useful for getting around the hostile/friendly problem...
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5060 on: January 03, 2014, 08:16:56 pm »

Quote
I've found the gmeditor is quite useful for getting around the hostile/friendly problem...
What is that, which problems?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5061 on: January 03, 2014, 08:20:52 pm »

Well I posted here a little while ago, because all spawned units, wether dwarf or goblin or dragon, were always friendly.

But I fiddled with the gmeditor and can make creatures hostile.

I just changed the civ_id tag, which is usually a positive number, to -1, like invader_id and i thinks its population_id. That works, it's just rather clunky/a test of patience to do en-masse....
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5062 on: January 03, 2014, 08:24:22 pm »

Oh, that is nice. I always made new creatures with the CRAZED tag for that. Didnt knew you could add this to a compiled plugin. (wait, its a script, so thats all right) Guess a "spawnunit" and "spawunit hostile" would be possible then. :)
« Last Edit: January 03, 2014, 08:41:29 pm by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5063 on: January 03, 2014, 08:33:24 pm »

Yay! That would really make things easier for me- trying to test combat at a large scale, or for an extended period of time at the moment gets tedious, with having to manually edit each creatures id tags individually.

Would be brilliant to be able to spawn child equivalents of units too.

Anyway, I'll have a poke around the before I go to sleep, see if I can find a tag in the gmeditor that would make a creature a historical figure - although I'm reasonably sure that I won't find one. Or at least, one that I can make sense of....
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5064 on: January 03, 2014, 09:10:28 pm »

Isnt it that part?

Quote
df.global.unit_next_id=df.global.unit_next_id+1
   unit.relations.old_year=df.global.cur_year-5

I wonder if you could make a civ with a caste that has a maxage of 2, then spawn that caste with natural skills, an age of one, calling it "helpful spirit" or something. It would automatically have the labors fitting to the skills assigned, "does as it pleases", and will do these jobs, but you cant control it directly. After a year, the spirit expires, by dying of old age.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5065 on: January 03, 2014, 09:31:17 pm »

Isnt it that part?

Quote
df.global.unit_next_id=df.global.unit_next_id+1
   unit.relations.old_year=df.global.cur_year-5

I wonder if you could make a civ with a caste that has a maxage of 2, then spawn that caste with natural skills, an age of one, calling it "helpful spirit" or something. It would automatically have the labors fituting to the skills assigned, "does as it pleases", and will do these jobs, but you cant control it directly. After a year, the spirit expires, by dying of old age.
Old_year is actually death fromold age year.it should be in the future.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5066 on: January 03, 2014, 09:31:51 pm »

Reactions need [CAN_USE_ARTIFACT] for artifacts to be usable reagents. (To prevent antifact from being consummed). Add this to the improving reactions and it should work.
Yup, that works!

I don't know why that change isn't in the Greasing Station raws by default.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5067 on: January 04, 2014, 03:07:09 am »

Quote
I've found the gmeditor is quite useful for getting around the hostile/friendly problem...
What is that, which problems?

What do you mean, what is that?

I really think we should get the word out on gm-editor more...

gm-editor gives you a UI to edit the game's data structures. You can access with with gui/gm-editor (data structure). A few examples:

highlight a unit and type "gui/gm-editor dfhack.gui.getSelectedUnit()" in the console. You are now editing that unit.

You can also do that with getSelectedItem() and getSelectedBuilding(), mind. Also useful is dfhack.gui.getCurViewscreen().

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #5068 on: January 04, 2014, 06:22:40 am »

I do read this forum a lot, its the first time I hear about gmeditor. ^^ Even a forumwide search "gmeditor" yields nothing. Looking for "gm-editor" works. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #5069 on: January 04, 2014, 06:37:16 am »

sorry Meph, that's potentially my fault, confusing you with the wrong spelling/syntax or what have you..
I agree, the gm-editor should be talked about more. I'm still experimenting, and it does cause a lot of crashes, but it's really helpful sometimes - the uses for someone who actually knows and understands the thing...
Assuming that the gm-editor edits game files in the same way dfhack does, does that mean, whatever the gm-editor can do, can have a dfhack script written for it?

Also Putnam, you say there is an easy fix for the spawned units not being historical figures, how would I go about that, or is it something you would have to work on?
(I know you have a version of the plugin, but I'm not sure what 'forks' are being essentially coding illiterate...)
« Last Edit: January 04, 2014, 06:45:33 am by TheOnlySolitaire »
Logged
Pages: 1 ... 336 337 [338] 339 340 ... 373