Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Question about Startdwarf.rb  (Read 2626 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Question about Startdwarf.rb
« on: September 12, 2013, 10:29:42 am »

Hi everyone :)

I do have this script:
Code: [Select]
# patch start dwarf count

nr = $script_args[0].to_i

raise 'too low' if nr < 7

addr = df.get_global_address('start_dwarf_count')
df.memory_patch(addr, [nr].pack('L'))

Nice and short, it allows to chose the number of dwarves you embark with. If you pick less then seven, it raises the number to seven and gives a warning, 'too low'. But I wanted to try a Hermit-Embark with only one dwarf. I consequently removed the line "raise 'too low' if nr < 7" and tried with 1 dwarf. I get to the embark items and skills, but when I embark, the game crashes. Same thing with 2, 3 and 4 dwarves... but 5 and 6 are magically ok. No crashes, succesfull embarks.

My question is: Does anyone know why 5 are or and 4 are not? And even better: Does anyone know if a "startdwarf 1" for a hermit challange could be done? And while I am at it: Buying skills at embark is only possible till level 5, and 10 in total per dwarf. Can this maximum somehow be overridden, allowing new numbers for total skill levels and maximum skill level at embark?
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 :::

Someone64

  • Bay Watcher
    • View Profile
Re: Question about Startdwarf.rb
« Reply #1 on: October 15, 2013, 06:14:59 am »

I honestly think that one of the funnest parts of a Hermit embark is killing off the rest of your dwarves. Not that what I said helps with your problem in any way...
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Question about Startdwarf.rb
« Reply #2 on: October 15, 2013, 06:50:40 am »

It's a side effect of df, it probably sets the skills and etc for other dwarves EVEN if they are not existent. I have semi working embark (does not work with masterworks's edited exe and only on windows) that lets you change race/caste of starting party. That way you can set all except one to e.g. dogs.

Edit: ofcourse you could set them to dead and that would be easier...

Spoiler (click to show/hide)
« Last Edit: October 15, 2013, 06:53:23 am by Warmist »
Logged