Bay 12 Games Forum

Please login or register.

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

Author Topic: Forcing sieges - a script and research  (Read 3628 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
  • Pika Pika!
    • View Profile
Re: Forcing sieges - a script and research
« Reply #24 on: December 19, 2017, 02:07:25 pm »

PTW
Pages: 1 [2]