Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DFhack question.  (Read 1792 times)

Weizen1988

  • Bay Watcher
    • View Profile
DFhack question.
« on: December 07, 2016, 03:20:38 pm »

So, im bored and messing around with dfhack spawning stuff, trying to spawn giant tortoises. far as I know the command is spawnunit Creature name (in this case GIANT TORTOISE) Caste (MALE/FEMALE) ive tried underscoring in the creature name so its GIANT_TORTOISE, since many creatures seem to follow that pattern, it tells me no existing creature, I use GIANT TORTOISE, like the files say, and it wont accept either gender, yet the files also show that those are correct, and that MALE or FEMALE are the proper castes. So the correct line should read spawnunit GIANT TORTOISE MALE to spawn a male giant tortoise, but it just tells me its wrong and returns and error. what am I doing wrong?

Edit: can we only spawn creatures that -could- appear? This world im in is all tropical rainforest as far as I can tell, so they wouldnt be native to this world at all.
« Last Edit: December 07, 2016, 03:26:24 pm by Weizen1988 »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFhack question.
« Reply #1 on: December 08, 2016, 05:53:29 pm »

Put quotes around "GIANT TORTOISE". spawnunit has no compunctions about spawning impossible units; it'll spawn a DOES_NOT_EXIST unit for you just fine AFAIK, unless Dwarf Fortress itself has code in place to prevent those from sticking around.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFhack question.
« Reply #2 on: December 10, 2016, 10:38:31 pm »

spawnunit has no compunctions about spawning impossible units; it'll spawn a DOES_NOT_EXIST unit for you just fine AFAIK
No it won't - it has to look up the creature ID based on the name you specified, and if it can't find it it'll say "Invalid race" and bail out.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFhack question.
« Reply #3 on: December 11, 2016, 12:38:21 am »

No, I mean something like a CENTAUR that exists in the raws but has the [DOES_NOT_EXIST] token.

Weizen1988

  • Bay Watcher
    • View Profile
Re: DFhack question.
« Reply #4 on: December 12, 2016, 11:23:48 am »

spawnunit has no compunctions about spawning impossible units; it'll spawn a DOES_NOT_EXIST unit for you just fine AFAIK
No it won't - it has to look up the creature ID based on the name you specified, and if it can't find it it'll say "Invalid race" and bail out.
This is the thing im dealing with, im not trying to spawn things with a does_not_exist tag, im trying to spawn big turtles, or hell, anything shelled that I can breed, little water on this embark, and seemingly nothing lives in it, and no sign of aquifer for an aquifer turtle, if I put in GIANT_TORTOISE MALE, i get invalid race, because unlike most of the creatures ive seen, giant tortoise has no underscores in the name, if i put in GIANT TORTOISE MALE, its a valid race, but invalid "caste" in spite of that being the species name and caste listed in the raws, at least as I understand them.

Thought, can it possibly not tell where the name of the creature ends and the caste assignment begins? So the lack of underscores makes it think im trying to spawn a Giant with the caste of Tortoise, and thus possibly adding an underscore to the creature name itself in the raws might make them spawnable? Since GIANT is its own creature, referenced as such in the files, lacking an underscore in the name of certain creatures might result in it thinking you are trying to spawn a Giant rather than a tortoise, ive seen several other animals with the same, im going to guess typo? That just feels like a remarkably stupid solution.

Edit: It was a stupid solution because I think im wrong now, ive just encountered a Honey Badger Man, and those are HONEY BADGER MAN in the files, no underscores or anything, so if I was right it would have mistaken that for trying to spawn a Honey with the caste of Badger, with an extra argument Man added on the end. Im not a programmer though, so I dont know how any of this works.
« Last Edit: December 12, 2016, 11:31:42 am by Weizen1988 »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFhack question.
« Reply #5 on: December 12, 2016, 08:18:54 pm »

I already answered that:

Put quotes around "GIANT TORTOISE".

Weizen1988

  • Bay Watcher
    • View Profile
Re: DFhack question.
« Reply #6 on: December 13, 2016, 01:07:26 am »

I already answered that:

Put quotes around "GIANT TORTOISE".
Alright, thank you, ill give it another shot.
Logged