Bay 12 Games Forum

Please login or register.

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

Author Topic: Forcing sieges - a script and research  (Read 14086 times)

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Forcing sieges - a script and research
« Reply #15 on: June 29, 2017, 07:37:39 pm »

I've updated the script, it now accepts parameters as below:

-civ HUMAN -race [ GOBLIN TOAD ] -count [ 2 10 ] -undead -debug -cleanup

-civ is optional. If not present, will find a civ for the first race. If present, it can be a race name (will find a civ), or a part of english civ name. Can also be "self" if you can't think of anything better.
-race is require and can be either one value or a list.
-count is required and can be either one value or a list with number of items matching races.
-undead is optional if you're a fan of corpses.
-debug is optional.
-cleanup is optional and will delete the created army controller.

I think doing the cleanup if generally better, but it needs more testing. I've had some crashes when generating a 100 goblin siege both with cleanup and without but not sure whether it's a vanilla DF crash because of a large number of units or is caused by the script.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: Forcing sieges - a script and research
« Reply #16 on: June 29, 2017, 07:47:31 pm »

so if I remember correctly you could point 2 bandit armies to one spot and have them both auto attack each other due to their ai is targeted to attack Brigands and being apart of an army.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Ggobs

  • Bay Watcher
    • View Profile
Re: Forcing sieges - a script and research
« Reply #17 on: July 24, 2017, 07:35:17 pm »

Where do I add this script?
Logged
Just popping in to say that if DF has taught me anything, it's that everything is doomed.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Forcing sieges - a script and research
« Reply #19 on: July 26, 2017, 01:14:28 am »

Oh cool. I when i was doing army stuff the controller was not researched enough. IIRC you can add hist figures to the armies for more fun :P

Also has anyone tried to use "friendly armies". Maybe you could already do the "your units leave to offsite targets" scripts for some more modding fun? This way they could actually return.

Roses

  • Bay Watcher
    • View Profile
Re: Forcing sieges - a script and research
« Reply #20 on: November 11, 2017, 12:02:35 pm »

So I was working on thoroughly testing the unit create script since I was getting crashes trying to create 50+ units at once (to replicate sieges) when I remembered this gem. Part of this post is just to bump this up so other people don't forget about it like I did, but I also have a couple questions (sorry, I know some of them could be answered by me simply trying out the script, but I am traveling right now and sadly DF doesn't work on my phone)

1. Have you done any more work on the script? You mentioned you are more into research that maintaining, but just wanted to check if you fleshed out any more of the unknown values.

2. Are units spawned with items and materials accessible to the civ as normal?

3. If using -undead is the entire army spawned undead, or just some of them?

4. What does adding the creature class to the army do? Does that mean only creatures with that creature class will be spawned?

5. Do you mind if I include this script in my repository (with appropriate credit of course)?
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: Forcing sieges - a script and research
« Reply #21 on: November 11, 2017, 04:03:00 pm »

completely forgot about this script/thread, and that I got my question answered.

hmm probably a good time to mess with this script.

oh and thanks roses.

I guess with 3 it's similar how inhabitants of forts can start off with syndromes or interaction classes that turn them into a vampire or a necromancer on a site level.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Forcing sieges - a script and research
« Reply #22 on: November 11, 2017, 04:44:01 pm »

1. Have you done any more work on the script? You mentioned you are more into research that maintaining, but just wanted to check if you fleshed out any more of the unknown values.

No, I was sort of waiting for feedback whether it works ok or causing any problems after some time in game maybe. In particular, there's a "cleanup" command-line flag which will case army controller to be deleted after siege has started. That's because there's an unknown structure unk_58 in army_controller which is filled with some data seen in other controllers, and I don't know whether it's better to leave the controller with that data or delete it manually. In my tests I didn't experience crashes in either case, but I didn't play for too long.

2. Are units spawned with items and materials accessible to the civ as normal?

I guess yes, the actual units are spawned by the game, so it should just like during normal sieges.

3. If using -undead is the entire army spawned undead, or just some of them?

Entire army. However currently it puts 100 in some field to do this, don't know why this particular value.

4. What does adding the creature class to the army do? Does that mean only creatures with that creature class will be spawned?

Don't know, not even sure what creatures it's supposed to affect.

5. Do you mind if I include this script in my repository (with appropriate credit of course)?

Sure, if it doesn't corrupt anything I'd be happy if more people knew about the script.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Forcing sieges - a script and research
« Reply #23 on: December 09, 2017, 05:00:02 am »

I tried to force a siege by creating an army, a controller and targeting the fort. It seems to work just fine, so now I'm unsure whether just no one tried that, or there are known issues with this approach.

Could never get it consistent and armies weren't as well-mapped way back in 2014 when I was trying it. I also just sort of forgot over the years.

pikachu17

  • Bay Watcher
  • PADORU PADORU
    • View Profile
Re: Forcing sieges - a script and research
« Reply #24 on: December 19, 2017, 02:07:25 pm »

PTW
Logged
Sigtext!
dwarf 4tress from scratch
The Pikachu revolution!
Thank you NatureGirl19999 for the avatar switcher at http://signavatar.com

A warforged bard named Gender appears and says"Hello. I am a social construct."

iii22

  • Bay Watcher
    • View Profile
Re: Forcing sieges - a script and research
« Reply #25 on: January 19, 2020, 06:24:28 pm »

How do I make the army controller?
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Forcing sieges - a script and research
« Reply #26 on: January 20, 2020, 09:44:54 am »

Just saw this was necro'd and wanted to chip in with a bit of information.

I dont have any experience with army controllers, but on account of 44.12 (current of time of post) raiding system, is there any elaboration on whether we could manipulate these controllers instead? Mainly as a side note of forcing them to come back home or clearing them off the map.

Since 44.12 (or implementation of raiding in general), if they are the only kind of applicable army availible to them, positions overlaps onto [CAPTAIN] like [MILITIA_CAPTAIN] for fortress mode will send historical units in sieges, whereas the default of [CAPTAIN] (this is hardcoded and auto-provided by generated positions over sites) will send fodder generated out of thin air, which can be tracked from the new c civilisation screen as historicals actually depopulate sites as they get their armies together while captains do not.

A additional criteria of position captain leaders would be interesting, since then you could arrange for things like:
Code: [Select]
-civ EVIL -position [CAPTAIN] -addposition [MONARCH] - race [GOBLIN] - count [60 100]
A evil siege, forcing the attendance of the monarch (demon) but lead by a captain.
Logged

iii22

  • Bay Watcher
    • View Profile
Re: Forcing sieges - a script and research
« Reply #27 on: January 21, 2020, 07:59:08 pm »

Just saw this was necro'd and wanted to chip in with a bit of information.

I dont have any experience with army controllers, but on account of 44.12 (current of time of post) raiding system, is there any elaboration on whether we could manipulate these controllers instead? Mainly as a side note of forcing them to come back home or clearing them off the map.

Since 44.12 (or implementation of raiding in general), if they are the only kind of applicable army availible to them, positions overlaps onto [CAPTAIN] like [MILITIA_CAPTAIN] for fortress mode will send historical units in sieges, whereas the default of [CAPTAIN] (this is hardcoded and auto-provided by generated positions over sites) will send fodder generated out of thin air, which can be tracked from the new c civilisation screen as historicals actually depopulate sites as they get their armies together while captains do not.

A additional criteria of position captain leaders would be interesting, since then you could arrange for things like:
Code: [Select]
-civ EVIL -position [CAPTAIN] -addposition [MONARCH] - race [GOBLIN] - count [60 100]
A evil siege, forcing the attendance of the monarch (demon) but lead by a captain.
It says that it can't find a civilization, even though I settled near a goblin pit.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Forcing sieges - a script and research
« Reply #28 on: February 15, 2020, 04:47:35 pm »

Damn... Why did I never see this?
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 :::

iii22

  • Bay Watcher
    • View Profile
Re: Forcing sieges - a script and research
« Reply #29 on: August 17, 2020, 02:52:01 pm »

I've updated the script, it now accepts parameters as below:

-civ HUMAN -race [ GOBLIN TOAD ] -count [ 2 10 ] -undead -debug -cleanup

-civ is optional. If not present, will find a civ for the first race. If present, it can be a race name (will find a civ), or a part of english civ name. Can also be "self" if you can't think of anything better.
-race is require and can be either one value or a list.
-count is required and can be either one value or a list with number of items matching races.
-undead is optional if you're a fan of corpses.
-debug is optional.
-cleanup is optional and will delete the created army controller.

I think doing the cleanup if generally better, but it needs more testing. I've had some crashes when generating a 100 goblin siege both with cleanup and without but not sure whether it's a vanilla DF crash because of a large number of units or is caused by the script.
So I decided to try this script again ( -civ HUMAN -race [HUMAN] -count [5] ) but it still didn't work. The error message was something like "couldn't find available civ". Does anybody have a video demonstration for something?
Logged
Pages: 1 [2] 3