Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - expwnent

Pages: 1 ... 72 73 [74] 75 76 ... 113
1096
DF Modding / Re: Dwarven Heritage Project, version 1.1
« on: July 01, 2012, 10:23:15 am »
Can you send me the save? It really shouldn't crash.

1097
DF Modding / Re: Dwarven Heritage Project, version 1.1
« on: July 01, 2012, 12:02:33 am »
Version 1.1 is up. Fixed many things. Now names are consistent, dwarves with no parents get new unique last names, and it correctly handles the case where you have more dwarves than last names. It should also be faster. In a world with about 200,000 historical dwarves, it took about two minutes for me.

Unfortunately, it has to run through every single historical dwarf in history to correctly measure the age of last names and deal with new dwarves. Fortunately, as long as you only have a few tens of thousands of historical dwarves it should be done in just a few seconds. Even if you have hundreds of thousands, it will only take a few minutes.

I also made it print out the founder of each name in your fort, the name of the eldest living dwarf in the world with that name, and the eldest living dwarf in your fort with that name.

1098
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r1
« on: June 29, 2012, 06:11:58 pm »
Think it could be possible to change the point of view when playing fortress mode? Ie North to South etc?

I'm betting that's among the hardest of hardcoded things in the game.  Almost certainly not.

It might technically be possible to just rotate the entire damn map by changing EVERYTHING in memory but it would be extremely difficult to do and would probably be slow.

1099
DF Modding / Re: Dwarven Heritage Project
« on: June 29, 2012, 05:59:40 pm »
What do you do with the thingy you download?
Does it happen in Legends Mode, or just once you load up a fortress?

Just put it in (df folder\hack\scripts\heritage.lua and run it with "lua hack/scripts/heritage.lua". Load a save in dwarf mode first. Requires DFHack, of course. I wrote it for DFHack 0.34.11 r1. I don't know if they do backwards compatibility or not but it should probably work with later versions.

Just wanted to say that this sound extremely awesome. Does it use the same tech as dfhack ?

Thanks! Yes, it uses and depends completely on DFHack. Would have been essentially impossible without it.

1100
DF Modding / Re: Masterwork mod vivisection
« on: June 29, 2012, 01:46:21 pm »
Quote
Code: [Select]
[PLANT:SILPHIUM]
   [NAME:silphium][NAME_PLURAL:silphium][ADJ:silphium]
   [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
      [MATERIAL_VALUE:4]
      [EDIBLE_VERMIN]
      [EDIBLE_COOKED]
   [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
   [PICKED_TILE:231][PICKED_COLOR:2:0:1]
   [SHRUB_COLOR:2:0:1]
   [DEAD_SHRUB_COLOR:0:0:1]
   [GROWDUR:1425]
   [

Is that last [ a typo?

1101
DF Modding / Re: Dwarven Heritage Project
« on: June 29, 2012, 01:18:36 pm »
I could have done it that way. It would even have been a lot easier. I just thought this system was more interesting.

1102
DF Modding / Re: Masterwork mod vivisection
« on: June 29, 2012, 03:30:12 am »
Good stuff. Looks useful.

1103
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r1
« on: June 29, 2012, 03:14:41 am »
Have you tried putting magma a few extra z-levels above where you want it? Sometimes that helps.

1104
DF Modding / Dwarven Heritage Project, version 1.2.1
« on: June 29, 2012, 12:23:48 am »

Introduction:

In vanilla DF, last names are randomized. Dwarves do not inherit the last names of their ancestors. I just finished writing an lua script that changes that. It works on both historical figures and the dwarves in the current fort.

Here's the rules of the new system, in no particular order:

1. Suppose parent1 and parent2 have a child. The four possible last names for it are parent1.lastname1, parent1.lastname2, parent2.lastname1, and parent2.lastname2. The child inherits two of these names based on a pattern to be described later. The names inherited by the child depend on the child index of the child (first-born, second-born, etc), and the age of the names in question.

2. A name is considered to be "born" when it is FIRST used. Even if the first dwarf to have that name is dead, it still counts. Dwarves that were born before year 0 count. A name can be older than the world. Nothing special happens with that, though.

3. Let the four names in question of a dwarf and its spouse be A,B,C and D. First, sort these names based on age (of name), breaking ties alphabetically. Let's call sorted names, in order 1,2,3 and 4. The child last name pattern is (1 2), (1 3), (1 4), (2 3), (2 4), (3 4), then it repeats. This pattern is designed to make older names more frequent, leading to a small number of common last names.

4. No dwarf can have the same last name twice.

5. No dwarf can have the same full name as another dwarf.

6. A dwarf with no parents, or one with parents who are lost to history, must have both last names be unique.

7. In the event of a conflict due to the previous rules, the dwarf in question's second last name is randomly assigned to a new, unused last name until the conflict is resolved. This (should be) the only way new last names are created, other than the starting 7 dwarves in a fort.

8. Note that last names of dwarves will always be sorted in order of name age. Older last names will always come before younger last names.

9. Also note that gender is not taken into account, including gender of parents.

10. These rules apply only to dwarves. More accurately, they apply only to the primary race of the current fort.

11. In the event that there are so many dwarves that not all of them can have unique names, the system just gives up and allows repeats.


Possible improvements: I've considered giving royalty a special extra last name, like what happens with dwarves that kill a lot of enemies. This extra last name would always be passed on unless there's a conflict, so you can tell which dwarves are descended from a monarch, and if so, which ones. The only problem is I don't know how to determine who was a civilization leader and when in lua. Advice on this is very welcome. Doing the rest of it shouldn't be that hard.


Troubleshooting:

1. Save first. Keep a backup. You don't want to lose a save over this (though I never have).

2. In earlier versions, there was a problem where DFTherapist would crash after running this plugin, but saving and reloading the world fixed it.

3. It might mess up legends a little, especially with the names of leaders.

4. It's possible that it will print names and sort them alphabetically based on the wrong language. All of my language files are the same, so I didn't bother checking.

5. It works best if you do NOT cull unimportant historical figures, for obvious reasons.

6. Sometimes it confuses LegendsViewer into thinking that some dwarves are the same. I suspect this is because their last names don't have the right part of speech, and so they are treated as nonexistant. It should work fine in-game.


Thoughts:

A dwarf doesn't necessarily share a last name with a sibling, or even a parent.

This mod does not change any gameplay mechanics, but I think it adds some very interesting flavor to the game. Every dwarf has exactly two Families, one for each last name. In theory, the game should only generate only as many Families as necessary to prevent repeated last names, but I've seen it generate quite a few.


Installation:

Requires DFHack. Was written for DFHack 0.34.11 r1. Install that or a later version first.

The script itself is probably horribly illegible, but it should work. Just put it in hack\scripts\heritage.lua and run it with "lua hack/scripts/heritage.lua".

Load a save in dwarf mode first. Legends mode won't crash, but it also won't actually change anything because DF doesn't change save files in legends mode. It will run in adventure mode, but I think it doesn't actually do anything. I wouldn't try it.

After running, it should output all the last names that are present in your fort (among the living), most frequently-used names last.

You will, of course, need to rerun the script any time a dwarf has children in your fort. Fortunately, the script is very fast.

Github Page: https://github.com/expwnent/DFHeritage
Download link: https://github.com/expwnent/DFHeritage/zipball/master

Newest version: 2012 August 21. Fixed a few minor issues.

1105
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r1
« on: June 28, 2012, 07:26:41 pm »
Can someone explain to me how to use make_sort_order defined in utils.lua? I don't understand the documentation. What is key supposed to do? Are you supposed to pass it an array of sorting data tables as the second argument?

1106
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r1
« on: June 28, 2012, 03:11:40 pm »
Maybe he wants to turn murky pools into normal dirt tiles, as well as getting rid of the water.

1107
DF Dwarf Mode Discussion / Re: !!SCIENCE!! Thread: Operation FPS Bomb
« on: June 28, 2012, 10:45:09 am »
Did you remember to save and reload before measuring? That can improve FPS.

1108
DF Dwarf Mode Discussion / Re: !!SCIENCE!! Thread: Operation FPS Bomb
« on: June 27, 2012, 09:51:37 pm »
Great work! I'll stop worrying so much about non-pathable open space.

1109
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r1
« on: June 27, 2012, 09:48:06 pm »
Is there a way to get the material of a tile in lua? I've been trying to figure it out without any luck. dig.cpp just uses MapExtras::MapCache, but I can't seem to find an lua equivalent to that.

1110
No, you don't like/hate individual castes. They're all the same.

Pages: 1 ... 72 73 [74] 75 76 ... 113