Bay 12 Games Forum

Please login or register.

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

Author Topic: Making balls  (Read 20379 times)

Kamin

  • Bay Watcher
  • Once you go cloaca, you never go backa.
    • View Profile
    • Slaves to Alcohol: Desura DF Fanpage
Re: Making balls
« Reply #30 on: June 24, 2014, 11:57:00 pm »

Haha "Has it been 4 days? Better check if my penis is still there again."
I'm so glad to have bumbled into this thread.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Making balls
« Reply #31 on: June 24, 2014, 11:59:07 pm »

???
It effectively just checks for the existence of a tag. I see no reason why you can't code that in generically in one fell swoop for any/all tags. Tags are a class type, I would hope, or something organized like that, that you should be able to refer to abstractly.

If he coded it in some weird way that doesn't allow that directly and only accomplishes it via some crazy roundabout scheme, then okay, but I'm not sure I would call that "a very good reason." A reason, sure, but more of a "mediocrely good stopgap reason"

Tags are a single flag for the argless ones; in general, tags are read by the parser and put into creature structs which have separate structs for various things (castes, body size under caste etc.). It doesn't "effectively just check for the existence of a tag", otherwise the syndrome would change every creature of a certain type instead of just the one unit. It's much, much, much more memory efficient to have the creature raw contain all of the raw tokens etc. instead of copying them all to every single unit, and memory is actually at a premium in DF, so the way you're describing would either require:

1. Every single unit to have a copy of the entire creature raw in their data structures.
2. Every CE_ADD_TAG or CE_REMOVE_TAG syndrome to change every single creature in the save file instead of just the one.

EDIT: meph why do I never see the obvious

GavJ

  • Bay Watcher
    • View Profile
Re: Making balls
« Reply #32 on: June 25, 2014, 12:30:36 am »

What? No, neither of those. Every creature just needs a stored set of DIFFERENCES from the raws. Which for 99% of them will be an empty field. that only takes up one object's overhead. Which is trivial for the number of creatures in game at any moment. A kilobyte, total, I'd guess.

Every time you check for the existence of a flag, you check that creature's differences struct. If it doesn't have the entry you are looking for, then check the raws and go with whatever is there (or not). If it does have an entry (which would be either positive or negative), then go with that and don't bother to check the raws.

What's more, I would have assumed that such a system is already in place, since the game tracks things like lost limbs. If so, then it's not any additional wasted memory at all, cause those overheads are already invested in. If not, then whatever IS currently tracking lost limbs could be folded into this and still also help it pay for itself.


Edit: To the extent that 99% aren't empty... like if only 5% have empty differences lists, then that's fine too. Yes it takes up arbitrarily more memory, but only in proportion to how much your game and any mods you have are heavily using those tag changing or checking features. So you're very much getting your money's memory's worth, and it's not a problem.
« Last Edit: June 25, 2014, 12:43:40 am by GavJ »
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Making balls
« Reply #33 on: June 25, 2014, 01:27:21 am »

...
What's more, I would have assumed that such a system is already in place, since the game tracks things like lost limbs. If so, then it's not any additional wasted memory at all, cause those overheads are already invested in. If not, then whatever IS currently tracking lost limbs could be folded into this and still also help it pay for itself.
...

The status of each body part, including if it is missing, on fire, or many other flags is tracked. However the number of body parts in that memory and the number of parts in the creature's raws are the same, regardless of if anything has happened to the creature. The status of perfectly healthy parts is tracked.

GavJ

  • Bay Watcher
    • View Profile
Re: Making balls
« Reply #34 on: June 25, 2014, 01:51:57 am »

Okay well there you go: I just paid for my memory budget. Stop keeping track of perfectly healthy limbs when that could just be assumed by default without having to store data on it.
Then reinvest that same memory in an empty struct per creature, to be used to hold any changes to other tags. Lack of an entry = no change. Presence of entry = "use this version." Also add a boolean field to any extant tags present (in these structs only) which if == 1 indicates "assume this tag doesn't exist at all on this creature" as an option as well.

Overall should yield a memory savings of quite a bit in most games, in addition to making syndromes and other interactions extremely more flexible for modders. And being automatically forward compatible for any and all creature tokens to ever be added.
« Last Edit: June 25, 2014, 01:53:52 am by GavJ »
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Making balls
« Reply #35 on: June 25, 2014, 02:45:44 am »

Isnt your discussion slightly off-topic? I did post a way to do what the OP wanted with raw modding... no scripts needed.
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 :::

Scotsmen

  • Bay Watcher
  • FREEDOOOOOMM!!!! And cake.
    • View Profile
Re: Making balls
« Reply #36 on: June 25, 2014, 02:12:37 pm »

I am seriously amazed at the amount of attention this thread has gotten. All I wanted to do was make balls so I could make people sick, and now there's a whole discussion about sterilization? This is why I love Bay12.

EDIT: Also,
Hands down, best Testicle Science thread I've ever read.
« Last Edit: June 25, 2014, 02:14:57 pm by Scotsmen »
Logged
As he waits to be unrestrained and taken backstage, he can't help but think I miss my fun bits.

RenoFox

  • Bay Watcher
    • View Profile
Re: Making balls
« Reply #37 on: July 03, 2014, 04:29:53 am »

I have done a mod like this too, with an additional [THROAT] tag.

Would it be possible to have all the additional bodyparts merged into a single groin bodypart for aiming purposes? Aiming a warhammer at an individual testicle is a bit too specific. If [SMALL] tag prevents targeting in combat, does it still allow the bodypart to be hit and severed if the parent bodypart is aimed?

Blastbeard

  • Bay Watcher
    • View Profile
Re: Making balls
« Reply #38 on: July 03, 2014, 11:49:27 am »

I have done a mod like this too, with an additional [THROAT] tag.

You made it so you can strangle their...



This entire thread is secretly dedicated to making another Obok, isn't it?
Hide yo elven kids, hide yo wife...
Logged
I don't know how it all works, I just throw molten science at the wall and see what ignites.

FallenAngel

  • Bay Watcher
  • !!x(oᴥo)x!!
    • View Profile
Re: Making balls
« Reply #39 on: July 03, 2014, 03:27:44 pm »

Nah, it's slightly less horrible to make someone suffocate by strangling their magic flute.
...I can't believe I typed that.

Blastbeard

  • Bay Watcher
    • View Profile
Re: Making balls
« Reply #40 on: July 03, 2014, 03:35:14 pm »

Worse still, modding [GRASP] onto mouths and

My sides, they hurt. I couldn't breath, you people are trying to kill me.

The only good that can come of this effort is that I can now kick elves in the pine cones.
Logged
I don't know how it all works, I just throw molten science at the wall and see what ignites.

FallenAngel

  • Bay Watcher
  • !!x(oᴥo)x!!
    • View Profile
Re: Making balls
« Reply #41 on: July 03, 2014, 03:41:21 pm »

I'd prefer to throw them by their cojones THROUGH THEIR PANTS.
"Haha, you're cornered now, since I wrestled off your weapon and shield!"
"Not quite."
*grab*
"this got awkward fast"
*throw*
"WHAT THE F-"
Elf Swordman has died after colliding with an obstacle.

Blastbeard

  • Bay Watcher
    • View Profile
Re: Making balls
« Reply #42 on: July 03, 2014, 03:49:38 pm »

I don't like where this is going, but maybe this needs to be worked into the dragonball mod so we can have this.
Logged
I don't know how it all works, I just throw molten science at the wall and see what ignites.

kopout

  • Bay Watcher
    • View Profile
Re: Making balls
« Reply #43 on: July 03, 2014, 05:35:35 pm »

Instead of [GUTS] you could make them out of a special tissue that has a lot of pain receptors. That way instead of being nauseated they would "give in to pain" when you kick 'em in the jewels
Logged
"Karl Marx: Family jewels"
"Everyone's equally less rich than me!"
Quote from: Lezard
...although I've been having so much fun failing at this I just about forgot what my original aim was.

TheFlame52

  • Bay Watcher
  • Master of the randomly generated
    • View Profile
Re: Making balls
« Reply #44 on: July 04, 2014, 12:49:24 pm »

AAAAAAAAAAAHAHAHAHAHAHAHAHA
Pages: 1 2 [3] 4