Clipboard.

Someone Else 37

Forum Addict
Feb 10, 2013
1,876
1,440
168
echo "g(i,x,t,o){return((3&x&(i*((3&i>>16?\"BY}6YB6%\":\"Qj}6jQ6%\")[t%8]+51)>>o))<<4);};main(){int i; int n; int s; for(i=0;;i++)putchar(g(i,1,n=i>>14,12)+g(i,s=i>>17,n^i>>13,10)+g(i,s/3,n+((i>>11)%3),10)+g(i,s/5,8+n-((i>>10)%3),9));}"|gcc -xc -w -&&./a.out | play -r 8000 -t raw -e unsigned-integer -b 8 -v 0.5 -

I was watching a Youtube video where some coder had written a shell command that generates and plays music using as few characters as possible. Unfortunately, it didn't work on my system for two reasons: there was some syntax that my compiler didn't like, and it used a Linux-only utility to play it that my Mac doesn't have. So I had to make do with a different utility and about 60 more characters. Most of them are in the last bit- the "play -r 8000 -t raw -e unsigned-integer -b 8 -v 0.5 -"- which does the same thing as "aplay" alone, which is the Linux-only thing.

But if you're running any UNIXey system, the above code should work as is, as long as you've got sox installed.

... I think it just repeated. Not sure though. Definitely more than a 10-minute loop; seems to be something like 15, although there may well be slight differences the second time around that I haven't picked up on.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
req.body.creatorId = req.userId

just me being lazy with nodejs it seems
I guess this is also one of the first times I posted code here that isn't php :p
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
Your UUID?
nope

upload_2016-2-4_15-1-14.png

a nice example of me playing rimworld :p
 

Someone Else 37

Forum Addict
Feb 10, 2013
1,876
1,440
168
51 Not precisely, although DF does have some things that are kind of similar.

For one thing, children in DF are lazy bums who don't do anything other than deconstruct walls and occasionally harvest crops. Which means they have lots of social skills (because all they do for the first twelve years of their life is hang out and party) and occasionally a little farming experience.

Whenever a dwarf (or any creature with [CAN_LEARN]) does any job (well, almost), they gain some XP in the associated skill. Mining builds up the Miner skill, running a pump builds up the pump operating skill, beating something with a sword gives swordsman skill, etc. Higher skill in any given job lets the dwarf perform that job better in one way or another- skilled miners mine faster and have a better chance of actually dropping boulders of the rocks they mine; skilled craftsdwarves produce better-quality goods (resulting in sharper weapons and more effective armor, as well as more valuable... anything really); skilled soldiers will deal more damage with their weapons, etc. There's a separate skill for each and every labor out there, except things like hauling and lever pulling.

In addition, creatures in DF have a number of attributes. The physical attributes include things like strength, toughness, agility, and disease resistance, while the mental attributes include things like focus, willpower, spatial sense, memory, and quite a few others. These are all involved in a number of different skills, such that training the skill raises the attribute, which in turn helps the dwarf perform related tasks. For instance, pump operating trains Endurance (self-explanatory), Kinesthetic Sense (involved in pretty much everything to do with movement), Strength (ability to haul heavy things without getting slowed down as much, as well as to hit harder), Toughness (resistance to being hit in combat), and Willpower (reduces pain and exertion effects, as well as keeping the dwarf from running away in battle).

All dwarves have their attributes set at random at birth, although they can be increased later on.

In addition, dwarves have personalities, which are way too complicated for me to try to explain here (and don't have much known impact on the game anyway), so I'll just post a link to the wiki. Notably, DEPRESSION_PROPENSITY, ANGER_PROPENSITY, and ANXIETY_PROPENSITY have an impact on what will happen when the dwarf becomes very stressed out or is driven insane. Dwarves with high ANGER_PROPENSITY are more likely to throw tantrums or go berserk; while dwarves high in the other facets are more likely to much more peacefully go melancholic and commit suicide or go stark raving mad and wander around the fortress in a daze, dropping their possessions and clothes on the ground until they die of thirst. Also, dwarves with high ALTRUISM will get a happy thought from dragging wounded dwarves to the hospital area, while dwarves with low ALTRUISM will get an unhappy thought from doing so. Finally, personality traits have some effect on what social skills dwarves can gain experience in. How, exactly, this works is not clear to me, but a dwarf that finds commerce disgusting would probably be a poor candidate for your broker.

Finally, dwarves have preferences. All dwarves have a list of stones, metals, gemstones, other materials, colors, shapes, items (including weapons, armor, clothing, furniture, etc.), foods, drinks, and animals that they like, and possibly a type of vermin that they strongly dislike. Dwarves will get happy thoughts from seeing and being near objects that they like and things made of materials that they like (so a dwarf that likes plump helmets or dwarven wine will be a happy dwarf indeed), and will get an unhappy thought if they happen to see a critter they don't like. Also, nobles tend to mandate production of items that match their preferences, which is annoying if they require materials not found on your map. Dwarves undergoing strange moods are presumably more likely to use materials that match their preferences, although they won't usually demand materials your fortress has yet to produce.

DF doesn't really have anything like the specific, predefined backstories and traits you mentioned, although dwarves repeatedly subjected to traumatic experience (e.g. things dying in front of them) will become hardened to tragedy, causing unhappy thoughts to not affect them as much and causing them to become alcoholic (as if they weren't already).
 

ljfa

New Member
Jul 29, 2019
2,761
-46
0
/me fills a syringe with the stuff and injects it in gamemanj's arm


ah...roleplaying again
and I tell you, this injection did not go well :p
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
50 they are both colonists sims so...yea :p

in rimworld every colonist also has a backstory of 2 parts (one childhood the other adulthood). These backstory influence what a character can do/can do well or cannot do at all. A character also has traits and jobs he likes.
For your character the back story is
childhood->Scout-> (shooting+3 construction +1,crafting+2, researching disabled, art disabled)
adulthood->herbalist->(social-2,medicine +4, growing+4)
traits:
Careful shooter->(shooting+3,Aiming time +25%,shooting accuracy +50%)
Bloodlust->(not caring of seeing blood or dead people)
Nudist->(+20 mood bonus if naked (hat is allowed) -3 mood otherwise (basically the best trait ever in a biome that won't kill naked people :p ))

Does dwarf fortress have something like that ?