Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 31 32 [33] 34 35 ... 54

Author Topic: Dwarf Companion - new version linked @first post  (Read 99884 times)

bartavelle

  • Bay Watcher
  • Coin coin!
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #480 on: October 01, 2008, 12:37:26 pm »

Is there any specific reason why the combat reports don't work? I keep getting an invalid list index error when I try to use it.

I did not update it for a long time. I suppose that it will be completly broken when next release comes out, so I'm just waiting for it to update the code.
Logged

Gertack

  • Bay Watcher
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #481 on: October 03, 2008, 09:50:26 pm »

I will add the unchampionize script in the next release. It is however true that it would be better that creatures be really unowned when butchered. It would require a bit more work.

Doesn't look like the dwarves will use the bones, skulls, or fat of formerly-owned pets, unfortunately.  At least with the fat I can dump it and let it rot...
Logged

Earthquake Damage

  • Bay Watcher
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #482 on: October 05, 2008, 07:28:34 pm »

DC fails to work properly once I'm running a fort.  It loads fine in the main and embark menus, but once I embark it stops working properly.  When I try to restart it, I get this:

Code: [Select]
version generic version, pid 4412, player 1c8
2107 words loaded
race 0 loaded
race 1 loaded
race 2 loaded
race 3 loaded
4b3b23
d457f4 d73868 d73844
Traceback (most recent call last):
  File "dfcompanion_prototype.py", line 409, in <module>
  File "dfcompanion_prototype.py", line 403, in __init__
  File "dfcompanion_prototype.py", line 123, in initList
  File "dwarfdbg.pyc", line 897, in getCreatures
  File "dwarfdbg.pyc", line 439, in getCreature
  File "dwarfdbg.pyc", line 288, in getName
  File "dwarfdbg.pyc", line 189, in printName
IndexError: list index out of range

I have no idea what to do from here.
Logged

bartavelle

  • Bay Watcher
  • Coin coin!
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #483 on: October 06, 2008, 12:30:50 am »

Could you upload your save file somewhere?
Logged

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #484 on: October 06, 2008, 12:45:48 am »

Posting to confirm the unconscious 'bug'.
When you heal an injured dwarf that was resting, he will keep the unconscious state (exhaustion 60 thousand something). It's not really a bug I suppose. DC does exactly what it says. It heals a dwarf. It just does not wake them up.
Doing that manually fixes that proper.
So whenever I heal a dwarf, I also set the exhaustion value to 0 and press apply.

Oh - and, Bartavelle and Valdemar, thank you and many compliments for your great tool.
« Last Edit: October 06, 2008, 12:49:31 am by martinuzz »
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #485 on: October 06, 2008, 12:51:22 am »

As for Earthquake damage's post: I have always understood that you should embark / load BEFORE you start DC.
Isn't that the problem?
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

Earthquake Damage

  • Bay Watcher
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #486 on: October 06, 2008, 08:38:32 am »

Could you upload your save file somewhere?

If you think it's save-specific, then it could be anything given that my game is heavily modded.

So I tried it on vanilla.  It worked.

Then, seeing that the problem was related to getting and/or printing names, I tried adding a new language file (LATIN from Rome Fortress 2.0, which you should be able to get from the modding forum) and set dwarves to use it.  Crash.  The only differences from vanilla DF this time was the addition of a new language file and setting the MOUNTAIN entity to use the new language.

So apparently languages can cause DC to crash.  Hell if I know why.  It doesn't crash when I set a dwarf's custom nickname and/or profession to an arbitrarily long string, so it's probably not that the words are too long.

EDIT:  So, I tried generating a new world with my heavily modded raws, only I removed the new language files and set all entities to use the standard languages.  DC works like a charm.  It's clearly a language issue.
« Last Edit: October 06, 2008, 03:23:13 pm by Earthquake Damage »
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #487 on: October 06, 2008, 03:27:09 pm »

I believe it crashes because companion is set to only find 4 languages (human, goblin, dwarf, and elf) but if it finds more it doesn't know what to do with the extras and fails.

Doesn't have to be a fort language either any extra languages anywhere will cause the error. 

I recall there being a way to fix it and I had used it successfully in the past, but I don't remember how it's done.  Maybe scan around a bit on all the companion threads and you should find what needs to be done to fix it.

P.S. Had something to do with messing with the code to tell it to just ignore any extras it finds or something.
« Last Edit: October 06, 2008, 03:29:39 pm by Greiger »
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

bartavelle

  • Bay Watcher
  • Coin coin!
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #488 on: October 07, 2008, 01:06:41 am »

Yes I hardcoded the use of 4 languages. The following line in dwarfdbg.py could be altered:

for race in range(4):

So that more languages are used. (I suppose)
Logged

Earthquake Damage

  • Bay Watcher
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #489 on: October 07, 2008, 05:46:29 pm »

Given that I know little more about Python other than it's a snake, can someone explain how I might modify DC to not crash if it finds too many or too few (in case I crank the limit to "for race in range(100):" or something)?
Logged

Eita

  • Bay Watcher
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #490 on: October 07, 2008, 08:47:20 pm »

Hey, uhh... Does Companion work at all with 40d?
Logged

bartavelle

  • Bay Watcher
  • Coin coin!
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #491 on: October 08, 2008, 12:43:50 am »

Hey, uhh... Does Companion work at all with 40d?

It should.
Logged

bartavelle

  • Bay Watcher
  • Coin coin!
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #492 on: October 08, 2008, 12:45:56 am »

Given that I know little more about Python other than it's a snake, can someone explain how I might modify DC to not crash if it finds too many or too few (in case I crank the limit to "for race in range(100):" or something)?

You would need to get the quantity of languages from somewhere. I have been toying with another method of getting data that would not have that kind of problems. For now it is easier to do it "by hand".
Logged

Gertack

  • Bay Watcher
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #493 on: October 10, 2008, 12:51:11 am »

Mine shaft (http://www.dwarffortresswiki.net/index.php/Exploratory_mining#Mine_shafts) helper:

Spoiler (click to show/hide)

MAKE A BACKUP.  NO, MAKE TWO.

Use "reveal" rules apply: only works on loaded tiles, so use designate for mining to load them.

Execute with one number to designate mine shafts for that many levels starting at the bottom. Execute with two numbers for a starting level number (bottom = 0) and number of levels to designate. Puts upward stairs on the lowest level of the map if you designate it.  All other levels are up/down stairs except for the highest level given if you specify more than one at a time.

NOT RECOMMENDED TO USE ON LEVELS WITH ANY SORT OF DIGGING ALREADY ON THEM.  It tries to avoid open air and already dug sections.  It happily tries to dig a staircase in water or inside trees.

If you've offset your mine shafts differently, change the lines that look like:

if ((x16 * 16 + dx) % 3) != 1

Where the "!= 1" part is the number to change to (0, 1, 2). Both X and Y could vary for you; I picked the number that reveals the most area on the map.

(Note that I use 40c and the offset 0x264 worked better than Dwarf Companion's 0x260. It couldn't change the last block with 0x260.  YMMV.)
Logged

Gertack

  • Bay Watcher
    • View Profile
Re: Dwarf Companion - 0.14 out, 14/09/2008
« Reply #494 on: October 11, 2008, 02:56:12 pm »

One fly in the ointment is that DF seems to keep track of whether anything in a tile has been designated, and if that flag isn't set it won't check the individual blocks ni the tile for designations. So if the entire map is designated, you'd have to manually redesignate one block per tile to get DF to search it.
Logged
Pages: 1 ... 31 32 [33] 34 35 ... 54