Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 5 6 [7] 8

Author Topic: Holidays  (Read 9229 times)

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Holidays
« Reply #90 on: September 30, 2019, 09:55:25 am »

When you give four colours to the daisies, do you mean four at once, or the entire flower cycling through those colours in order?

Also, you might want to check up ladybug in Voliol's various vivants.

brolol.404

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #91 on: September 30, 2019, 10:28:30 am »

When you give four colours to the daisies, do you mean four at once, or the entire flower cycling through those colours in order?

Also, you might want to check up ladybug in Voliol's various vivants.

Going to have four different colored daisies so the ground is decorated with a wide array of colored flowers (same for all of the folwers).

Thanks. Will check it out. My ladybug will be pretty simple. Just a color/name/description change from a vanilla bug/beetle. (Mainly there to add more color/variety to spring).

I am also going to try and add a new firefly vermin. Basically a copy/paste of the vanilla firefly but a lot more common and have a GLOWTILE and yellow GLOWCOLOR for adventure mode. Also only in SPRING. So when wandering adventure mode at night in spring there is a good chance to see a lot of fireflys in the darkness

brolol.404

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #92 on: September 30, 2019, 12:20:34 pm »

The following have been added:

GRASS:
clovers (bright green, white, bright purple, bright red)
daisies (white, yellow, bright red, bright purple)
dandelions (white, yellow, bright green)
poppies (white, bright red, yellow)
bluebells (bright purple, bright blue)
tulips (white, yellow, bright red, bright purple)
bluebonnets (bright blue)
primrose (white, yellow, bright red, bright purple)

VERMIN:
firefly (glowtile)
ladybug
hummingbird

I am debating on making different types of butterflies (e.g. swallowtail) or just making a generic "butterfly" that comes in many different colors.

EDIT: decided to go with the generic "butterfly" for now which comes in the seven bright colors
« Last Edit: September 30, 2019, 01:03:51 pm by brolol.404 »
Logged

brolol.404

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #93 on: September 30, 2019, 02:03:45 pm »

Is there a variable to check for a female caste and a function to impregnate/birth a dwarf (even if not married)?

Im thinking of the following function:

Code: [Select]
function holiday_rabbit_impregnate()
 local units = {}
 local n = 0
 for i,unit in pairs(df.global.world.units.active) do
  if dfhack.units.isDwarf(unit) then
    n = n + 1
    units[n] = unit
  end
 end
 while n > 0 do
  local holiday_pregnancy_chance = math.random(3)
  if units[n] == IS FEMALE
   if (holiday_pregnancy_chance == 1) then
    units[n] IS NOW PREGNANT/GIVE BIRTH
   elseif (holiday_pregnancy_chance == 2 or holiday_pregnancy_chance == 3) then
    -- nothing happens
   end
  end
  units[n] = nil
  n = n - 1
 end
end

I am thinking that this function would check all dwarves if they are female and impregnate roughly 33% of them.

Roses

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #94 on: September 30, 2019, 03:39:18 pm »

To check that they are female change
Code: [Select]
if dfhack.units.isDwarf(unit) thento
Code: [Select]
if dfhack.units.isDwarf(unit) and unit.sex == 0 then(0 is female, 1 is male)

To make them pregnant, I seem to remember there being various scripts that could do that already. catsplosion.lua comes to mind, but I'm not sure if that was every expanded to work on any creature, you would need to check. There may be another script in the default repo that does it as well
Logged

brolol.404

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #95 on: October 01, 2019, 07:29:21 am »

To check that they are female change
Code: [Select]
if dfhack.units.isDwarf(unit) thento
Code: [Select]
if dfhack.units.isDwarf(unit) and unit.sex == 0 then(0 is female, 1 is male)

To make them pregnant, I seem to remember there being various scripts that could do that already. catsplosion.lua comes to mind, but I'm not sure if that was every expanded to work on any creature, you would need to check. There may be another script in the default repo that does it as well

Awesome thanks. I will check through those scripts. thinking about this more, I assume that this doesn't check age? Is there a way to only check for adult females?

On a similar note is there a df variable that checks for marriage and a function to marry two dwarves after I check for their single status?

Something like:

Code: [Select]
function holiday_marriage()
 local unitsf = {}
 local unitsm = {}
 local n = 0
 local m = 0
 for i,unit in pairs(df.global.world.units.active) do
  if dfhack.units.isDwarf(unitf) and unit.sex == 0 and IS SINGLE then
    n = n + 1
    unitsf[n] = unitf
  elseif dfhack.units.isDwarf(unitm) and unit.sex == 1 and IS SINGLE then
    m = m + 1
    unitsm[m] = unitm
  end
 end
 while n > 0 and m > 0 do
  local holiday_marriage_chance = math.random(3)
  if (holiday_marriage_chance == 1) then
   unitsf[n] IS NOW MARRIED TO unitsm[m]
  elseif (holiday_marriage_chance == 2 or holiday_marriage_chance == 3) then
   -- nothing happens
  end
  unitsf[n] = nil
  n = n - 1
  unitsm[m] = nil
  m = m - 1
 end
end

EDIT: I guess this wouldn't include gay marriages but I'm not sure how to do this without splitting up the female and male castes.

« Last Edit: October 01, 2019, 07:47:05 am by brolol.404 »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Holidays
« Reply #96 on: October 01, 2019, 10:18:47 am »

Fireflies can be pretty nice, though iirc TWBT didn't display vermin transparency unless vermin was over an item (haven't looked into fixing that bit), so there's that to consider as far as sprites go.

Also, different types of butterflies probably - there are already butterflies in the game; in fact Boatmurdered was flooded with magma due monarch butterfly remains jamming a door open.

For marrying, there's gui/family-affairs lua script example; though it's probably more in-depth than you need you can invoke it  with run_command and two ids of units you want to marry.

For checking femaleness, there is also dfhack.units.isFemale(unit). Mostly works the same as Roses said, expect in the edge case of modded races or vanilla antmen queens (caste 3). (It's also stored in species raws, on the off chance that function isn't what you want). Similarly, .isAdult(unit) for checking if somebody is adult.

However, it's not possible to make non-dwarf creature give birth to a dwarf - you must transform them into dwarf for the duration of birth. If you do this, make sure the genes the offspring gets are valid dwarf genes; otherwise if they get an invalid colouration the game may crash when you look at their thoughts and preferences.

Also don't forget about father's genes either when doing that.

brolol.404

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #97 on: October 01, 2019, 12:18:15 pm »

Fireflies can be pretty nice, though iirc TWBT didn't display vermin transparency unless vermin was over an item (haven't looked into fixing that bit), so there's that to consider as far as sprites go.

Do vermin not show up at all in adventure mode or only with certain graphics? I was hoping there would be little "lights" in the darkness in adventure mode.

Also, different types of butterflies probably - there are already butterflies in the game; in fact Boatmurdered was flooded with magma due monarch butterfly remains jamming a door open.

I'll give them proper types. Only butterflies in game currently are monarchs (from what I can see). I was hoping to make them more common and varied in the spring.

For marrying, there's gui/family-affairs lua script example; though it's probably more in-depth than you need you can invoke it  with run_command and two ids of units you want to marry.
Thanks I'll check this out.

For checking femaleness, there is also dfhack.units.isFemale(unit). Mostly works the same as Roses said, expect in the edge case of modded races or vanilla antmen queens (caste 3). (It's also stored in species raws, on the off chance that function isn't what you want). Similarly, .isAdult(unit) for checking if somebody is adult.

Thanks. I'll check this out too.

However, it's not possible to make non-dwarf creature give birth to a dwarf - you must transform them into dwarf for the duration of birth. If you do this, make sure the genes the offspring gets are valid dwarf genes; otherwise if they get an invalid colouration the game may crash when you look at their thoughts and preferences.

Also don't forget about father's genes either when doing that.

I was planning on having the creature's only marry/give birth with/to their own species (e.g. humans only give birth to humans) so hopefully this won't be a problem.

brolol.404

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #98 on: October 01, 2019, 01:19:55 pm »

What do you guys think of the names of these holidays?

The Shamrock Holiday has come! (celebrates luck and prosperity)
The Holiday of Life has come! (celebrates fertility and innocence)
The Fire Festival has come! (celebrates summer and industry)
The Harvest Festival has come! (celebrates food and alcohol)
The Holiday of Souls has come! (celebrates afterlife and ancestors)
The Great Hunt has come! (celebrates hunting and adventure)
The Hearth Holiday has come! (celebrates giving and charity)
The Holiday of Oaths has come! (celebrates marriage and commitment)

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Holidays
« Reply #99 on: October 01, 2019, 05:11:59 pm »

Vermin show up, but only pretty much with the exact base tilesheet tile you give them. No creature  graphics for them either. (Theoretically fixable, but no one has had the motivation; I think it was Nopal who went through the effort of making lot of such graphics, though they've erased their posts since.)


Hm, given that it causes randomly new marriages and nothing else, the last one is less Holiday of Oaths and more Holiday of blooming, flashfire romance.


Wasn't sure what aspect of Halloween you'd emphasize. With a name like the Holiday of Souls, it could be worked into doing something with ghosts, as well as satisfying "spend time with family" need (with the focus on fun thoughts, I was expecting more the Holiday of Homages).


The Holiday of Life might be better called Day of Sowing or something (not sure what the proper english equivalent would be) to be a spring mirror of Harvest Festival.

Also, I just noticed bright green clovers + bright blue bluebells could make visual issues like with finding garnierite veins in microcline. Maybe separate those with different growth timings.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Holidays
« Reply #100 on: October 01, 2019, 09:33:12 pm »

What do you think about adding years? "It's the year of the bear", all means gives a bonus. "It's the year of the carp", more fish spawn, etc. Some passive effect that lasts the entire year.
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 :::

brolol.404

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #101 on: October 02, 2019, 08:46:44 am »

Hm, given that it causes randomly new marriages and nothing else, the last one is less Holiday of Oaths and more Holiday of blooming, flashfire romance.

I was hoping to rp it as dwarves in your fort getting married after knowing each other for awhile, but I guess that's true that random people could end up getting married after only knowing each other for a few days (especially after a migrant wave). I was also thinking of maybe a way to incorporate contracts, boundary disputes, agreements, etc. A holiday where people are all about making oaths and signing contracts. Could have diplomats and outpost liaisons from all of the civs you know come to make deals, talk and discuss things?

Wasn't sure what aspect of Halloween you'd emphasize. With a name like the Holiday of Souls, it could be worked into doing something with ghosts, as well as satisfying "spend time with family" need (with the focus on fun thoughts, I was expecting more the Holiday of Homages).

Yeah. I was thinking ghosts and other things coming back to life (maybe reanimation for the day or slabs breaking?), spooky stuff, but I dont want to create too much issue in the fort where the holiday becomes more of a pain then fun, causing tantrums and such.

I could change the holiday to be more about ancestors though. I could create a new friendly ghost creature that doesnt scare people and have a bunch of those show up as visitors.

The Holiday of Life might be better called Day of Sowing or something (not sure what the proper english equivalent would be) to be a spring mirror of Harvest Festival.

I like this idea. I wonder if there is a way to make this day beneficial for farmers to plant seeds? Maybe a bonus to the grow skill temporarily?

Also, I just noticed bright green clovers + bright blue bluebells could make visual issues like with finding garnierite veins in microcline. Maybe separate those with different growth timings.
Thanks. I didnt think of this. I'll look at it.

What do you think about adding years? "It's the year of the bear", all means gives a bonus. "It's the year of the carp", more fish spawn, etc. Some passive effect that lasts the entire year.
Cool idea. I'm down for this, but I'm not sure how to code it. The code would start over every time the game started up, so it would have to know what year was associated with what animal. Maybe making 10 animals and then somehow dividing the year by 10 would give a consistent remainder on the fraction or something? This could also create a new years holiday on Granite 1.

Roses

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #102 on: October 02, 2019, 09:10:54 am »

What do you think about adding years? "It's the year of the bear", all means gives a bonus. "It's the year of the carp", more fish spawn, etc. Some passive effect that lasts the entire year.
Cool idea. I'm down for this, but I'm not sure how to code it. The code would start over every time the game started up, so it would have to know what year was associated with what animal. Maybe making 10 animals and then somehow dividing the year by 10 would give a consistent remainder on the fraction or something? This could also create a new years holiday on Granite 1.

current_animal_year = df.global.cur_year%number_of_animal_years
So if the current year was year 68 and you have 12 animals, you would be on the 8th animal.
Logged

brolol.404

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #103 on: October 02, 2019, 09:44:45 am »

What do you think about adding years? "It's the year of the bear", all means gives a bonus. "It's the year of the carp", more fish spawn, etc. Some passive effect that lasts the entire year.
Cool idea. I'm down for this, but I'm not sure how to code it. The code would start over every time the game started up, so it would have to know what year was associated with what animal. Maybe making 10 animals and then somehow dividing the year by 10 would give a consistent remainder on the fraction or something? This could also create a new years holiday on Granite 1.

current_animal_year = df.global.cur_year%number_of_animal_years
So if the current year was year 68 and you have 12 animals, you would be on the 8th animal.
Thanks. Can you write out the math on this for me?

What is the equation for x = 68%12?

Roses

  • Bay Watcher
    • View Profile
Re: Holidays
« Reply #104 on: October 02, 2019, 10:46:20 am »

It's the modulo stuff again

68%12 = 68 modulo 12 = 8
Because
68/12 = 5 and 8/12

Basically just calculates the remainder after a division

As a side note, just because I like math, as humans we almost exclusively work in mod 10 because we have 10 fingers. That's why when we count we go up to 10 and then we get to 11 which is just 10 + 1 or 10 + 11%10. But an intelligent species with only 8 fingers would probably work in mod 8. So their counting convention would "reset" at 8, just like ours "resets" at 10. Of course this isn't necessarily true as various civilizations throughout history have used different base modulo despite having 10 fingers, but it is interesting to think about
Logged
Pages: 1 ... 5 6 [7] 8