Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Custom Civilization/Race Crashing on Worldgen  (Read 3436 times)

Tinfect

  • Bay Watcher
  • Want an Orange?
    • View Profile
Custom Civilization/Race Crashing on Worldgen
« on: February 26, 2020, 05:25:55 am »

So, uh, I'm creating a custom race and civilization, so as to supplant Dwarves as the playable Fortress Mode race.
Everything works, Object Testing Arena puts everything in the game, mail shirts have a theoretically limitless amount of holes while simultaneously preventing any harm from entering through said holes, still need four gauntlets, ect.

But, on worldgen, the thing just dies on the spot.

That's as far as it gets. It goes so far as to reject worlds, even, before getting to this point, but when it gets here, it's dead.

So uh, here's the entity and creature files. It's not particularly expert work, but I haven't gotten around to fiddling it into its final shape just yet. Note that the only thing I've done to Dwarves, is taken [SITE_CONTROLLABLE] off their civilization. Aside from tacking on a Tower Shield to the shields file, this's all I've done. I don't have any idea what I've done wrong to be honest.
Spoiler: entity (click to show/hide)

Spoiler: creature (click to show/hide)
« Last Edit: February 26, 2020, 05:59:45 am by Tinfect »
Logged
Wizard one casts a Spell, Wizard two casts a Counterspell. Wizard one casts another Spell, Wizard two casts another Counterspell. Army comes along and chops 'em both up.

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #1 on: February 26, 2020, 07:43:23 am »

Dark fortress entities are currently not playing nicely with position tokens. It's well established that CHAT_WORTHY on positions other than the ruler and civ-wide LAW_MAKING responsibilities other than on the ruler cause crashes even in 44.XX. In 47.0X, there are also crashes if defined positions are mixed with variable position tokens, and from my experience, LAND_HOLDER positions also cause crashes.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #2 on: February 26, 2020, 08:11:44 am »

Ive had mixed results with DARK_FORTRESS through some testing. I thought i had effectively combatted the issue but instead i had made a few doozy one off worlds where i somehow hit some criteria for it to work. After a bit more inspection i think im closer to understanding why but it'd be wise to take my findings ith a bit of salt.

[CHAT_WORTHY] is applicable on 47.03 without crashes, but it appears to be since every other pit not managed by a tower has a 'lord' (a generic tokenized law maker) it creates a conflict possibly with a defined monarch who also is by default a law_maker based on the position where they are. I still don't know precisely why it worked in my instance, as maybe overriding the civilization with a [MONARCH] (hard coded to oversee the civ and arrive when fort mode criteria is met) freed up a potential conflict, but the game was still very resistant to letting me put in local expedition leaders.

a [LANDOWNER] and a [MONARCH] noble work perfectly fine on non-playable civiziliation, the custom defined LANDOWNER was restricted to market sites and apparently the lesser lords looked after the pits, i managed to cheese two expedition leaders (one appointed directly by land owner, another 'just' for my site) but it didnt work 100% of the time. A few other oddities are that on certain occasions i've been able to overrule this, i could only generate single tower sites through some [EXCLUSIVE_START_BIOME] settings and when only one tower site of each was availible it worked.

So my untested final recommendation is
Quote
[POSITION:MONARCH] // important hardcoded, the clown master will always leap into this role, define it close to the dwarven monarch with whatever flair like name you like.

[POSITION:LANDOWNER]//blah blah i tested, this one doesnt need to be hardcoded, totally custom but still needs to be set up. For safety make them [REQUIRES_MARKET] to camp out and operate out of towers.

[POSITION:CUSTOM_LAW_MAKER] // Hardcoded name & expedition leader type [SITE] role which hopefully will be leapt into and overriden, then have it replaced by a land owner when they arrive/summarily replace with another noble when fufilled

Other than these three, nothing else i tried custom position wise caused crashes, give each quoted role [CHAT_WORTHY] & do not provide diplomats etc unless you consult CUSTOM_OFFICIAL<num> first since those are hardcoded just to be safe.

EDIT - I misspelled CUSTOM_LAW_MAKER, i also take my hardcoded names from this source recently provided by Toady
« Last Edit: February 26, 2020, 08:23:27 am by FantasticDorf »
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #3 on: February 26, 2020, 09:20:08 am »

I tried it, it worked reliably when it culled the [CUSTOM_LAW_MAKER] due to some faults in the custom position code, but unfortunately attempting to jerry rig to rely upon [CUSTOM_LAW_MAKER] solely or a independent noble now that the [CUSTOM_LAW_MAKER] was defined went back to the issue.

The wiki's definition of the limited amount of tokens we have settles it conclusively that it is not possible with the current amount of position criteria tokens and how they work particular to this crash.

Or have a noble-less structure with no opportunity to obtain more until you somehow scrape by and obtain a land-owner (and seperately set up a colony agreement noble to hurry it along)
« Last Edit: February 26, 2020, 09:21:42 am by FantasticDorf »
Logged

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #4 on: February 26, 2020, 02:43:35 pm »

Back in the Modding 47.x thread, in the beginning when I was bringing the Dark Fortress position issues up, Ive noticed a lot of tokens not working, as well as positions, and even the CUSTOM_X ones Toady mentioned, not always working either. Which is why I mentioned in the other thread that, World Gen for Dark Fortresses automatically create the positions, for each civ, and if a single position or specified token collides with a modded one, it crashes. It can either happen after placing all the Civs as seen from OP, as well as later down the road when more are made. Ive had modded positions work, but 2/3 times it will crash from it colliding with another, (which is why i asked in FotF for toady to give us a more explained answer behind it all). BUT then theres one confusion out of all of this that I have noticed, after giving up the first time once I found out the issue, I went back and tried to find out if theres some way to at least have the basics to have "something" in playable dark fortresses.

I have gotten this to work 100% of the time:

[POSITION:EXPEDITION_LEADER_EVIL]
      [NAME:expedition leader:expedition leaders]
      [SITE]
      [NUMBER:1]
      [RULES_FROM_LOCATION]
      [PRECEDENCE:110]
      [DO_NOT_CULL]
      [ACCOUNT_EXEMPT]
      [DUTY_BOUND]



BUT when I add in:

[POSITION:MILITIA_LEADER_EVIL]
      [NAME:militia leader:militia leaders]
      [SITE]
      [NUMBER:1]
      [SQUAD:10:militia-men:militia-men]
      [PRECEDENCE:120]
      [DO_NOT_CULL]
      [DUTY_BOUND]


The game crashes...

Which makes me think SQUAD is colliding with another World Generated position... which is why we need to find a way to see what CUSTOM_X positions can do what and have what tokens ect. X.X


Once I finish a few issues with my mod I will continue to goof around with dark fortress positions to at least get some resolve.
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #5 on: February 26, 2020, 04:06:49 pm »

Well it would account for culled nobles = no squads therefore no crashes, i hadn't previously considered that by association the militia squads could be broken.

Thanks for the direction, ill try deconstructing them.

Its worth mentioning that [CAPTAIN] is a hardcoded position too, and it creates the fodder used in sieges, though miltia captains should always stand aside normally. With [CHAT_WORTHY] a generated [CUSTOM_MILITARY_STRATEGY] can also be leapt into for the dark fort's general position and given lieutenants etc etc.

EDIT over my previous edit - I've tried your recommendations to not much success, except in the instances where the list was culled anyway, involving removing both the [SQUAD] and [COMMANDER] tokens from a militia commander.
« Last Edit: February 26, 2020, 05:22:05 pm by FantasticDorf »
Logged

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #6 on: February 26, 2020, 05:42:04 pm »

Yeah, originally with that testing, I just tried removing stuff till I could get a 10/10 World Generation easily, which is where I came up with that expedition leader position result, but after double checking it, on the 8th try (or 18th in a sense), it managed to crash after placing civs...    back to the drawing board I go. Guess im also going to switch to doing 25/25 before I claim is being 100% working :S

EDIT:
I changed it to this, and still crashed, even after double checking by removing;
   [VARIABLE_POSITIONS:ALL]
   [SITE_VARIABLE_POSITIONS:ALL]

[POSITION:EXPEDITION_LEADER_EVIL]
      [NAME:expedition leader:expedition leaders]
      [SITE]
      [NUMBER:1]
      [PRECEDENCE:310]
      [DO_NOT_CULL]
      [ACCOUNT_EXEMPT]
      [DUTY_BOUND]

gunna try something smaller next


EDIT2:

after 5 five WG's, it crashed when only using this:

[POSITION:EXPEDITION_LEADER_EVIL]
      [NAME:expedition leader:expedition leaders]
      [NUMBER:1]
      [PRECEDENCE:310]


:s
« Last Edit: February 26, 2020, 06:15:44 pm by Fatace »
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #7 on: February 27, 2020, 01:58:46 pm »

I've linked this up to a issue report clearly laid out by @Goblincookie for future notice, if any more postings are found please put them in a presentable way for Toady, i might attach a summary to this post.
« Last Edit: February 27, 2020, 02:07:06 pm by FantasticDorf »
Logged

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #8 on: March 02, 2020, 02:49:21 pm »




Quote from: Fatace

Will we get a more better representation on how the Dark Fortress Civs Position system works? Modding wise, it seems to have become close to being unplayable as an idea for a "All Civs playable" type mods. With either Custom Offical positions, or newly created ones, causing crashes half the time, or every time. It seems that the new custom positions act like divine metals... They are either made during world gen or not.. and if they are, they seem to stop certain responsibilities being used with player custom positions, causing a further crash.

Will this be looked into with a better way of managing these positions for modders?




Knight Otu: http://www.bay12forums.com/smf/index.php?topic=169696.msg8085543#msg8085543
FantasticDorf: http://www.bay12forums.com/smf/index.php?topic=169696.msg8085551#msg8085551
Fatace (op): http://www.bay12forums.com/smf/index.php?topic=169696.msg8085669#msg8085669

Ah, weirdness related to true-name demon vaults (whether you had them or not.)  And chat-worthy filled the positions in prehistory, causing the issue during the check.  I'll have to roll it out with the first parallel fix patch.




We got our answer... sadly we gotta wait till the fix
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #9 on: March 03, 2020, 04:58:05 am »




Quote from: Fatace

Will we get a more better representation on how the Dark Fortress Civs Position system works? Modding wise, it seems to have become close to being unplayable as an idea for a "All Civs playable" type mods. With either Custom Offical positions, or newly created ones, causing crashes half the time, or every time. It seems that the new custom positions act like divine metals... They are either made during world gen or not.. and if they are, they seem to stop certain responsibilities being used with player custom positions, causing a further crash.

Will this be looked into with a better way of managing these positions for modders?




Knight Otu: http://www.bay12forums.com/smf/index.php?topic=169696.msg8085543#msg8085543
FantasticDorf: http://www.bay12forums.com/smf/index.php?topic=169696.msg8085551#msg8085551
Fatace (op): http://www.bay12forums.com/smf/index.php?topic=169696.msg8085669#msg8085669

Ah, weirdness related to true-name demon vaults (whether you had them or not.)  And chat-worthy filled the positions in prehistory, causing the issue during the check.  I'll have to roll it out with the first parallel fix patch.




We got our answer... sadly we gotta wait till the fix
Marked as fixed in next release though, so at least it's done.  :)
http://www.bay12games.com/dwarves/mantisbt/view.php?id=6941
Logged

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: Custom Civilization/Race Crashing on Worldgen
« Reply #10 on: March 03, 2020, 02:11:29 pm »

Yeah I saw that but.. was very unsure based off the Time that was reported and the posts in it.. and the fact it was only based around CHAT WORTHY related things when that wasn't the only issue happening with positions :s
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...