Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Wierdness doing my head in  (Read 1102 times)

Aranador

  • Bay Watcher
    • View Profile
Wierdness doing my head in
« on: October 28, 2017, 01:26:16 am »

So - I am re-working the MLP mod.  Mostly it is going well - but one oddity is doing my head in.

So there are 1055 castes in the main race of the mod, to get around the limitations of the genetic inheritance of colours.  And that all works great.  each caste gets its own cutiemark description, and that works great.  Each caste is grouped in lots of 10, as a sort of meta group, and those archetypes get special bonuses to some skills to represent the mechanical benefit of their cutiemarks.  And then it gets weird.  The first 326 castes get their bonuses, the rest do not.  Keep in mind that the bonuses are allocated in batches of 10, so one batch has 6 castes that get their bonuses, and 4 that do not - and every subsequent caste does not.

I cant for the life of me see a definition or oddity wrong with any specific caste, and further more, there are other definitions by caste grouping, or individual castes going on, and all of those work fully for all 1055 castes.

So my brain is fried from wracking over this problem for days - I need new inspiration on what to check and how to check for it.

I also need a nap and a headache tablet.
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Wierdness doing my head in
« Reply #1 on: October 28, 2017, 07:56:23 am »

1055 castes! The heck, that sounds like a recipe for a headache even if it works right.

Do you have a pastebin pasty for us so we can have a look for ourselves without figuring out which of the many tiny horse mods you're working with?
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: Wierdness doing my head in
« Reply #2 on: October 28, 2017, 01:08:10 pm »

Are the bonuses skill boosts? I had a problem in Jawa Fortress with that sort of bonus no longer getting through the lists after a point. Try moving one of the castes that doesn't work to a point in the file above one that does. It might result in that caste working and the other one breaking. Then we might have a clue.
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!

Dunmeris

  • Bay Watcher
    • View Profile
Re: Wierdness doing my head in
« Reply #3 on: October 28, 2017, 03:08:49 pm »

1055? How did you manage that without getting completely burned out? That's impressive, but I wouldn't be surprised if having that many castes to keep track of is exactly the problem.

The game tends to shit itself when it has vast numbers of things in a single creature that it has to manage at once. Like that one mod way back when that gave all the meat realistic names (things like brisket, chuck, ribs, flank, short loin, sirloin, rounds, leg, bacon for pigs, etc. etc.) depending on the type of animal and which body part the meat came from. It accomplished this with metric shit-tons of individual tissue definitions on basically every domesticable animal, and it had a weird habit of doing things like making animals spawn without skin or vital body parts.

I'd recommend trying to split the castes among different creatures, and then assigning all the creatures to the same entity. Though then again with that many castes the answer could also be something like an accidental duplicate. In that case, splitting the castes up into different creatures would also make it easier to check for duplicates (or just fix the problem outright if the dupes end up in different creatures).
Logged

Aranador

  • Bay Watcher
    • View Profile
Re: Wierdness doing my head in
« Reply #4 on: October 28, 2017, 05:28:53 pm »

Well - to be fair - the 1055 castes were all ready there when I started re-doing things, although I did have to go through and make an individual cutiemark description for each and every one - Double weird there because all of those work fine.

I have indeed swapped chunks of the file around trying to get the problem to move or change or offer some clue, and all I can say is, the first 326 castes in order of definition work, the rest no longer get the skill mods applied.

The 'obvious' answer is to cull the caste list down to 325, and live with the fact that the probability of a duplicate appearing in a fort goes up.  I can still massage the appearance  variables enough that duplicates have a reasonable chance of being subtly different.  And hey, in the show, re-used art assets for background ponies is a thing, so it can be the case in the game as well.

I am thinking that there is a 16 bit pointer that advances approximately 200 each time, meaning it overflows after 326, that stores this particular aspect of a creature's definition - or something similar.  If other mods have noticed similar weirdness then at least there is a chance it isn't totally my own stoopidness causing this..

Even before I started changing the mod, I was sort of noticing oddities, but lacked the information to really pinpoint what the issue was - it was enough though to have sent be down this path of madness.

I'll give my poor head another day or two to chill, then I might re-do with the 325 caste goal.  It will be a good opportunity to individualise the ponies a little more.  All this mostly just to side step the DF genetic system that tends to homogenise population appearance.
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Wierdness doing my head in
« Reply #5 on: October 28, 2017, 06:28:28 pm »

Have you tried copying over castes with similar/same buffs with the USE_CASTE tag?
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Aranador

  • Bay Watcher
    • View Profile
Re: Wierdness doing my head in
« Reply #6 on: October 30, 2017, 02:54:37 am »

So I slashed the number of castes in the mod down to 320, and it all works.  So I am going to go ahead and claim that the problem is that a stack pointer went beyond its limit and no more of that type of information could be stored.

I now have a few other things to test, and then I'll make another pass of this part of the system, and individualise things a lot more.
Logged