Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: A new modding challenge - Water based civ  (Read 2785 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
A new modding challenge - Water based civ
« on: September 06, 2015, 03:17:40 am »

Hey everyone,

Soon enough I'm back from my trip and I'm going to start working on DF again. Some might have noticed that I appear in the forums more often lately. One thing I really want to do is pick up a project a user named Eko started: http://www.bay12forums.com/smf/index.php?topic=142899.0

He abandoned the idea; and I tried my hand at it, coming up with a slightly different concept and design: http://www.bay12forums.com/smf/index.php?topic=142899.msg6409254#msg6409254

To sum it up real quick: A good, water-based snake/merfolk people called Naga. Egg-layers, workshop require water to work, they move faster and get special abilities in water, aquatic pets, and they can create aquifers.

BUT! I stumbled into a lot of problems when testing features. I'd love some feedback or other modders to come up with alternatives or fixes; or some dfhack scripts that might circumvent the biggest issues.

- Egg-laying civs. Do they work in the current version or die out in worldgen? Are the eggs fertilized? Can I stop the civ from bringing eggs to the food-stockpile and eating them?

- Interactions, self-targetted, with IE_LOCATION:IN_WATER do trigger, but very randomly and very seldomly. I tried making Naga affect themselves with a syndrome that gives 300% speed when in water, it works, but they only use it very rarely. Dfhack could probably fix that.

- I need a way for a workshop to create a 3/7 aquifer. Even amphibic and aquatic civ-members think deep water is bad, so 3/7 is best. (1-2 evaporates, 4-7 is dangerous terrain). I'd really need a dfhack script that plants a water source at a location, triggered from a workshop. I thought about a 3x3 workshop with 4 reactions, one for each direction.

- Aquatic pets love 7/7 water, but panic in 1-6/7 water. This means that there is no interaction between pets and owners. Civ-members will not path into deep water, pets will not path out of deep water. This means no shearing, milking, pasturing, training, butchering, etc. I tried amphibic pets, but I might as well take land-based pets then, because amphibic sharks just "walk" around on land all the time. I also tried giving them nobreathe when Naga are nearby, but nobreathe aquatic creatures also path onto land, just to suffocate as soon as the nobreathe effect wears off. In short: Is there any way to get aquatic pets into 1-3/7 water, or civ members into 4-7/7 water?

- The alternative would be using aquariums and vermin-sized pets, like electric eels and jellyfish, and custom reactions to harvest/milk them. I havent tried this in ages, but can spawnunit create vermins in traps, do they breed, can specific vermin be used in reactions? I think not...

- SPECIFIC_FOOD:X does not seem to work on civ members. Couldnt find a way around that.

- Kelp and coral-growing should take a lot of time, a timer-based createitem script triggered in the workshop would be nice. A bit like simulating a farmplot, just that it requires ingredients and water, instead of soil and seeds.

- I'd love do so some electric and ice magic for them. Electrocution fits well with tritons, greek goods, and people standing around in water; while ice magic would be highly effective because of the water, freezing traps are easy to make if you have lots of water around. Electrocution I can simulate with interactions and syndromes; but for ice/temperature control I'd have to use dfhack. Roses and me talked about this specific trap once.

Is anyone interested in such a project? Because without help, I can't do it. My alternative would be a nature-based civ, either make Elves playable (would also love some plant/tree growing scripts), or an Insect/Hivemind race, that developes based on organic foods they eat... surface, cavern 1, 2 and 3 would get different grasses and your units mutate into different types based on the grasses they have access to.
« Last Edit: September 06, 2015, 03:20:59 am by Meph »
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 :::

AceSV

  • Bay Watcher
  • [SUPER_VILLAIN]
    • View Profile
Re: A new modding challenge - Water based civ
« Reply #1 on: September 06, 2015, 10:20:57 am »

This reminds me of my duck civ from Furry Fortress.  For FuFo2 I have planned to replace the duck civ with a penguin civ and have an alternate snake civ based on nagas.  Penguins will use trident, cutlass, dagger, harpoon gun, bayonette and pirate themed clothing, Snakes will get trishula, katar, tulwar, zaghnal, bhuj, gada, chakram and India themed clothing. 

I might have a few common interests here, but I'm not as interested in breaking the mold and using DFhack as you are.  If you know of a crash course in DFhack you could show, I might take a look at it. 

It's really a bummer that player AI just can't path through water.  I'm used to programming games myself with lots of if-then clauses and for-loops and state machines, so I don't know what is actually available to you with DFhack, but couldn't you find the piece of code that removes water from valid pathing and disable it or qualify it with an if(swim_level>X) or if(AMPHIBIOUS||AQUATIC)?  If you have access to the original pathing code, that should be an incredibly simple rewrite.  I find it hard to believe that one can wake up the dwarven economy but not tamper with the pathing code. 

An interesting pathing oopsie I discovered in Furry Fortress was that if the duck people are AMPHIBIOUS, duck merchants will ignore any rivers or pools or motes on your map, but their pack animals will not.  The merchants will drive their pack animals into the water, the pack animals will get stuck and the whole caravan will just wait there until the season ends and then they leave.  I assume they would also do this with mounts when sieging, but I never convinced a duck civ to invade me.  If you do succeed in tampering with the pathing code, you'd want to keep the qualifier as swimming skill level instead of if(AMPHIBIOUS) for this reason. 

For being faster in water, would giving them a faster swimming gate and SWIMS_INNATE and NATURAL_SKILL:SWIMMING work in shallow water?  Alternatively, could they perhaps get slower on land instead of faster in water?  Maybe a contact syndrome air or dirt?  Actually, wouldn't a contact syndrome with water that only affects CREATURE_CLASS:FAST_IN_WATER work? 

Can you add brooks to the map?  I don't know how brooks will behave if tampered with.  Maybe you could have brooks for citizens and deep water for pets that are right next to each other so that a citizen can stand on the edge and interact with their pet. 

In the past I suggested for another mod to make a gargouille dragon that has water breath instead of fire.  That would be interesting if the nagas are invading a landlubber fortress, but probably not helpful if you're trying to keep a particular water level in your own fortress.  I've never looked into this, but there is a material for flame in the raws, maybe for aesthetic's sake you could make a lightning material as well.  I see that they have gem workshops, maybe they could also have gem magic.  The sanskrit word Vajra means both lightning and diamond, maybe have some fun with that.  Also, maybe they can use

In my egg-laying civs from Furry Fortress, I never actually witnessed an egg hatching.  I think only once did I witness an egg getting fertilized but I'm not entirely sure about it.  Civ females definitely lay eggs, so if you can do some kind of workshop reaction that turns Naga eggs into Naga babies, that's probably the better option.  As for not eating them, most eggs use the EGG_TEMPLATE, maybe you could make an egg that is not actually edible. 
Logged
Quote
could God in fact send a kea to steal Excalibur and thereby usurp the throne of the Britons? 
Furry Fortress 3 The third saga unfurls.  Now with Ninja Frogs and Dogfish Pirates.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: A new modding challenge - Water based civ
« Reply #2 on: September 06, 2015, 11:24:53 am »

Quote
I might have a few common interests here, but I'm not as interested in breaking the mold and using DFhack as you are.  If you know of a crash course in DFhack you could show, I might take a look at it. 
I dont, I only know how to use scripts, not write them. ;)

Quote
An interesting pathing oopsie I discovered in Furry Fortress was that if the duck people are AMPHIBIOUS, duck merchants will ignore any rivers or pools or motes on your map, but their pack animals will not.  The merchants will drive their pack animals into the water, the pack animals will get stuck and the whole caravan will just wait there until the season ends and then they leave.  I assume they would also do this with mounts when sieging, but I never convinced a duck civ to invade me.  If you do succeed in tampering with the pathing code, you'd want to keep the qualifier as swimming skill level instead of if(AMPHIBIOUS) for this reason. 
Amphibious pack animals wont path through water? I'm sure they do... or did yours arrive with horses/donkeys?

Quote
For being faster in water, would giving them a faster swimming gate and SWIMS_INNATE and NATURAL_SKILL:SWIMMING work in shallow water?  Alternatively, could they perhaps get slower on land instead of faster in water?  Maybe a contact syndrome air or dirt?  Actually, wouldn't a contact syndrome with water that only affects CREATURE_CLASS:FAST_IN_WATER work? 
Units dont swim in 1-3/7 water, they walk. Slower on land doesnt work, because there are no contact syndromes possible with air or dirt. There is also no contact syndrome with water... that's not have syndromes work. I can only use interactions, with the only option available being IN_WATER as location hint. That's why I asked about dfhack ^^

Quote
Can you add brooks to the map?  I don't know how brooks will behave if tampered with.  Maybe you could have brooks for citizens and deep water for pets that are right next to each other so that a citizen can stand on the edge and interact with their pet.
No, I cant, and it wouldnt work. People standing in brooks still cant access deep water.

Quote
In the past I suggested for another mod to make a gargouille dragon that has water breath instead of fire.  That would be interesting if the nagas are invading a landlubber fortress, but probably not helpful if you're trying to keep a particular water level in your own fortress.  I've never looked into this, but there is a material for flame in the raws, maybe for aesthetic's sake you could make a lightning material as well.  I see that they have gem workshops, maybe they could also have gem magic.  The sanskrit word Vajra means both lightning and diamond, maybe have some fun with that.  Also, maybe they can use
A water-creating unit I can do, but it's either very little, or it's like an aquifer, flooding a section. I actually had units like this in my mod before, but they are difficult to control.

they can use... what? Your last sentence just stops midway.

Quote
In my egg-laying civs from Furry Fortress, I never actually witnessed an egg hatching.  I think only once did I witness an egg getting fertilized but I'm not entirely sure about it.  Civ females definitely lay eggs, so if you can do some kind of workshop reaction that turns Naga eggs into Naga babies, that's probably the better option.  As for not eating them, most eggs use the EGG_TEMPLATE, maybe you could make an egg that is not actually edible.
Yeah, I thought about fake-eggs and hatchings, but spawning units with dfhack would mean that relationsships dont exist... no father/mother/siblings. I actually wanted to do a tadpole-like spawning process with a pool full of auqatic pet-tadpoles that grow into naga, but again I had that issue with inaccessable 7/7 water.
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 :::

AceSV

  • Bay Watcher
  • [SUPER_VILLAIN]
    • View Profile
Re: A new modding challenge - Water based civ
« Reply #3 on: September 06, 2015, 12:12:21 pm »

Amphibious pack animals wont path through water? I'm sure they do... or did yours arrive with horses/donkeys?

They were using water buffalo.  I assume amphibious mounts and pack animals would path properly, but I don't know of a way to force a civ to use a specific kind of animal. 

Quote
they can use... what? Your last sentence just stops midway.

Oops, yeah, the thought was maybe they can use their lightning magic to make fulgerites.  These ideas were all flooding in at once and kind of tripped over each other. 
Logged
Quote
could God in fact send a kea to steal Excalibur and thereby usurp the throne of the Britons? 
Furry Fortress 3 The third saga unfurls.  Now with Ninja Frogs and Dogfish Pirates.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: A new modding challenge - Water based civ
« Reply #4 on: September 06, 2015, 01:32:34 pm »

Amphibious pack animals wont path through water? I'm sure they do... or did yours arrive with horses/donkeys?

They were using water buffalo.  I assume amphibious mounts and pack animals would path properly, but I don't know of a way to force a civ to use a specific kind of animal. 

Quote
they can use... what? Your last sentence just stops midway.

Oops, yeah, the thought was maybe they can use their lightning magic to make fulgerites.  These ideas were all flooding in at once and kind of tripped over each other.
I do. I have scripts to add specific animals to civs for different uses.

Fulgurites sound cool (interesting read on Wikipedia), but I can't see a use for them. It's not a nice decoration, nor a useful weapon. Maybe to grow specific corals on them?
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 :::

Jazzeraint

  • Bay Watcher
    • View Profile
Re: A new modding challenge - Water based civ
« Reply #5 on: September 06, 2015, 01:43:54 pm »

- Kelp and coral-growing should take a lot of time, a timer-based createitem script triggered in the workshop would be nice. A bit like simulating a farmplot, just that it requires ingredients and water, instead of soil and seeds.

Can you copy the farmplot into a building that works the same, but requires Water to be built?

Then you could have a custom reaction for ingredients => seeds, which are then planted into the custom plot, with a GROWDUR of like 4000.
Logged
The silver is responsible for this How?

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: A new modding challenge - Water based civ
« Reply #6 on: September 06, 2015, 01:47:36 pm »

- Kelp and coral-growing should take a lot of time, a timer-based createitem script triggered in the workshop would be nice. A bit like simulating a farmplot, just that it requires ingredients and water, instead of soil and seeds.

Can you copy the farmplot into a building that works the same, but requires Water to be built?

Then you could have a custom reaction for ingredients => seeds, which are then planted into the custom plot, with a GROWDUR of like 4000.
No... I can of course make coral-seeds in a custom workshop that needs water, to plant them in a farmplot... but I dont know yet if I want to do it that way or not.

Growing kelp, corals and oyster pearls is planned; which would look weird in normal farmplots ^^
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 :::

Jazzeraint

  • Bay Watcher
    • View Profile
Re: A new modding challenge - Water based civ
« Reply #7 on: September 06, 2015, 01:50:10 pm »

No... I can of course make coral-seeds in a custom workshop that needs water, to plant them in a farmplot... but I dont know yet if I want to do it that way or not.

Growing kelp, corals and oyster pearls is planned; which would look weird in normal farmplots ^^

Can you spawn trees or shrubs with a script? If so, you could make coral 'trees' and kelp 'shrubs' that then have 'fruit' you could gather, which would just be renamed into oysters and kelp, and just make their seeds inaccessible so that they have to use the custom reactions to spawn them.
Logged
The silver is responsible for this How?

Ombragon

  • Bay Watcher
  • [FLEEQUICK][CRAZED]
    • View Profile
Re: A new modding challenge - Water based civ
« Reply #8 on: September 06, 2015, 02:10:49 pm »

I really likes the idea of an "underwater" naga civ, you should check the naga race of the game warlock 2, I think i have tried to do an entity based on theses nagas, i should still have some creatures and different metal-grades corals
Logged

Isngrim

  • Bay Watcher
    • View Profile
Re: A new modding challenge - Water based civ
« Reply #9 on: September 06, 2015, 06:31:37 pm »

I wonder what would happen if you removed the edible tags from their egg materials, i think ill try it out.
Logged
08:43 PM The wild animals and insects sang a merry tune and the trees performed a dance. I know you're trying to cheer me up, Vishnu, but that was actually a bit creepy.-Rhons

AceSV

  • Bay Watcher
  • [SUPER_VILLAIN]
    • View Profile
Re: A new modding challenge - Water based civ
« Reply #10 on: September 07, 2015, 11:15:35 am »

They were using water buffalo.  I assume amphibious mounts and pack animals would path properly, but I don't know of a way to force a civ to use a specific kind of animal. 

I do. I have scripts to add specific animals to civs for different uses.


Where can I find that?  I was told it wasn't possible. 
Logged
Quote
could God in fact send a kea to steal Excalibur and thereby usurp the throne of the Britons? 
Furry Fortress 3 The third saga unfurls.  Now with Ninja Frogs and Dogfish Pirates.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: A new modding challenge - Water based civ
« Reply #11 on: September 07, 2015, 12:43:55 pm »

They were using water buffalo.  I assume amphibious mounts and pack animals would path properly, but I don't know of a way to force a civ to use a specific kind of animal. 

I do. I have scripts to add specific animals to civs for different uses.


Where can I find that?  I was told it wasn't possible.
I've been using a modified script by UristdaVinci in Masterwork 34.11 and 40.24 for a long time now that does exactly that. See dwarffortres/hack/scripts/ and the files AddPetToCiv.lua, AddMinionToCiv.lua, etc... there are files for pets, minions, pullers, pack animals.
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 :::

AceSV

  • Bay Watcher
  • [SUPER_VILLAIN]
    • View Profile
Re: A new modding challenge - Water based civ
« Reply #12 on: September 07, 2015, 06:21:36 pm »

They were using water buffalo.  I assume amphibious mounts and pack animals would path properly, but I don't know of a way to force a civ to use a specific kind of animal. 

I do. I have scripts to add specific animals to civs for different uses.


Where can I find that?  I was told it wasn't possible.
I've been using a modified script by UristdaVinci in Masterwork 34.11 and 40.24 for a long time now that does exactly that. See dwarffortres/hack/scripts/ and the files AddPetToCiv.lua, AddMinionToCiv.lua, etc... there are files for pets, minions, pullers, pack animals.

Man, I have no idea how to use DFhack.  How does one actually call a hack script?  Where does one learn to use these tools? 
Logged
Quote
could God in fact send a kea to steal Excalibur and thereby usurp the throne of the Britons? 
Furry Fortress 3 The third saga unfurls.  Now with Ninja Frogs and Dogfish Pirates.

Isngrim

  • Bay Watcher
    • View Profile
Re: A new modding challenge - Water based civ
« Reply #13 on: September 07, 2015, 10:40:28 pm »

so removing the edible tags will prevent the naga from eating their eggs,but the stockpiling is based on the item type (as far as i can tell),so a script that auto forbids Naga Eggs may be the best way to do things.
and looking at the wiki,i believe it is possible to use specific live vermin in reactions (VERMIN:NONE:CREATURE_ID:CASTE).
Logged
08:43 PM The wild animals and insects sang a merry tune and the trees performed a dance. I know you're trying to cheer me up, Vishnu, but that was actually a bit creepy.-Rhons

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: A new modding challenge - Water based civ
« Reply #14 on: September 08, 2015, 10:02:53 am »

and looking at the wiki,i believe it is possible to use specific live vermin in reactions (VERMIN:NONE:CREATURE_ID:CASTE).
If a wild capture VERMIN is correct but I believe if that pet was tamed/bought that VERMIN is now PET so would have to have roughly 2 reactions for vermin and pet types of the specific creature you wish to use.

Also curious if they worker of the reaction will automatically take the vermin/pet with the animal trap/go grab a animal trap to transport it, or will just grab it with their hands and use it, or will a container reagent be needed? If so how does it tell that they are in cage (placed) cage (stockpile) or animal trap (stockpile)
(Been awhile since I've modded and tested things like this)
Logged
Pages: [1] 2