Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - kuactet

Pages: [1]
1
DF Suggestions / Re: The description suggestions thread
« on: August 11, 2009, 09:20:52 pm »
What contradictions in descriptive text?

This guy is frail and rugged. She is frail and tough. He is mighty and flimsy. The problem is these describe unrelated stats, but they don't sound like they do, whereas "He can bend steel with his hands, but has a glass jaw" isn't quite as obviously wrong.

2
DF Suggestions / The description suggestions thread
« on: August 11, 2009, 09:37:35 am »
So there was a lot of good stuff going on in the FotF and probably some of it will be lost/forgotten by the time Toady gets back to this. So, to summarize what other people have already said...

Separate static from changing, e.g. large frame vs. simply fat. (ikkonoisi)

Less infodump, filter by how much it deviates from the average. This is already done to order the descriptions, but it should simply not display any of the 'somewhat' traits. (Fishersalwaysdie, Timst, Granite26, Dante, probably others)

The above should only apply to facial and body features, and not things like hair/skin/eye color, for which there is no average, and body size/build, which is actually important to know. (Exponent, smjjames)

Filter by body part it describes, e.g. all facial features in one paragraph, hair features in another, body features in another, etc. (Warlord255)

Or model it after dating website profiles: height, weight, eye color, hair color, hair length, skin color, and basic body type, and then other weird specific features. (jpwrunyan)

Add a 'capstone' description: ugly, beautiful, deformed, handsome, ill-bred, cute, etc. (Warlord255)

An overall description of the entire fort (overall short/tall, thin/stocky, frail/robust, etc.). (Bunny)

Switch up the sentence structure: "His X is Y,", "His A is X and Y,", "He has Ying X," "His X Ys" (ManaUser)




My own suggestions:

Add temporal descriptors. "Since last fall, he has been fat." "He hit a growth spurt at age 22 and is now somewhat tall." "Since his marriage to Urist, his very long beard is neatly combed." "He keeps his head shaved since the death of his son." It would be cool if these were eventually tied to real events, but for now they'd keep descriptions from being so dry.

Add relational descriptors. "His beard is braided, in the style of the King." "Like his brother, his long hair is tied back in a ponytail." "He has his grandmother's square chin." "His round ochre eyes protrude like a toad's." Again, it'd be only the most neurotic of players that would notice if these descriptions weren't really accurate and for the rest of us, it'd make reading them more fun.

Add cause descriptors. "His earlobes dangle because of a fight he was involved in." "His nose is upturned from having walked into a wall." "His skin is rough from burns he suffered." Again, these would only be flavor for now.

More interesting adjectives for extreme traits: extremely concave/convex -> collapsed/hooked, extremely thin/fat -> stick-like/bloated, etc.

Make adjectives more 'natural'. "can take a punch" instead of "rugged", "can bend steel with his hands" instead of "strong", "a stiff breeze could knock him over" instead of "frail", "shrugs off most injuries" instead of "mighty". Toady already touched on this in response to some of the seeming contradictions in descriptive text and I thought it'd be a neat thing to do on its own.



Discuss. Elaborate. Criticize. Go!

3
Curses / Re: Importing Liberals, or, Who Needs Backwards Compatibility?
« on: December 30, 2008, 09:07:01 pm »
This importing stuff sounds as it will be glitchy, as one of the newer versions did funny stuff to people with a certain skill.

The code is right there. You can look at it and decide definitively whether or not it will be glitchy. If you're not a programmer, and it makes you feel better, it's written so that if it comes across a line it doesn't understand, it ignores it. So if, for example, one of your liberal's skills is "Fighting The Man", and across versions the skill is renamed "Inciting Revolutions" then if it's called "Fighting The Man" in the .liberal file, you lose the skill when you import that liberal. There's no room for glitches of that sort. The only problems that I'm seeing are if the line is longer than 200 characters, which realistically can't happen unless you're a jackass who names your liberals things like Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaron or Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanthony. But that would crash the game anyway (I'm pretty sure the maximum name length is 40 characters, but I could be wrong).


The only "in game" issue I see would be time. A 57 year old founder from an arch conservative 2030 would seem kinda odd if  they showed up back in 2007.

Easiest implementation would be to include time (and possibly national office holder/issues) in the .liberal file.

I agree. That would be a step on the way to a truly forward and backward compatible save system, which should probably wait until orgs are nailed down.


If this would allow me to start a new game with everything nearly arch conservative, that would be great. Something I've always wanted but never realized till now.

I like that. There's an option to compile the game so that it starts with laws at C+ but it should be possible without having to resort to that.

4
Curses / Re: Importing Liberals, or, Who Needs Backwards Compatibility?
« on: December 25, 2008, 12:09:23 am »
This is a single player game. There is not one skill that can't be increased by grinding long enough. Cheating literally does not matter. By the time a player has leveled a character to the point of godhood, he would have seen pretty much everything the game has to offer. Instead of having to do that every time you start over, you could just get right to fighting the man.

Also since there are no sanity checks on any of the stats, I'd be more worried about somebody giving their liberal a heart of 9000. Or exploiting a buffer overflow to execute arbitrary code--oh wait.

5
Curses / Importing Liberals, or, Who Needs Backwards Compatibility?
« on: December 24, 2008, 03:42:26 pm »
Every new version breaks old saves. That might be necessary to add new features, but it's not cool when you lose your Grade-A badass founder. So I wrote something to export/import a liberal's stats into a human-readable .liberal file. Sample output:

Code: [Select]
[BIOGRAPHICAL INFORMATION]
Given Name: Miguel Stone
Code Name: Ammons Hart
Date of Birth: 10-16-1984
Place of Origin: Philadelphia, PA
Occupation: Political Activist

[ATTRIBUTES]
Strength: 4
Intelligence: 7
Wisdom: 1
Agility: 5
Health: 6
Charisma: 7
Heart: 13
Juice: 645

[SKILLS]
Pistol: 3.66
Persuasion: 14.00
Psychology: 17.00
Law: 2.00
Security: 4.83
Disguise: 9.47
Tailoring: 0.49
Driving: 3.76
Writing: 3.04
Art: 2.15
Religion: 1.00
Business: 0.14
Stealth: 1.00
Theft: 0.64
Seduction: 2.21
Leadership: 8.78
Tactics: 0.45

[WOUNDS]

I want input from other people, particularly on how this should fit in to the game. I'm seeing a few different options:

Exported liberals can stay in the old game, be treated as though they went to start a LCS chapter in a different city, or something else entirely.

Imported liberals can be used only to start a new game (as founder), be answering personal ads ("Polyamorous 22yo liberal seeking partner to help fight the man"), or something.

Thoughts? Is there even any demand for this feature?

Also, I thought I had the train(...) thing figured out but apparently I don't. If anybody could correct it ( cr.train(sk,x); ), that'd be great.

Also, importing the wounds was more work than it's worth until it's decided how (if?) this fits in to the game.

Code: [Select]
void exportliberal(creaturest &e)
{
FILE *h;
char str[200];
strcpy(str,e.name);
strcat(str,".liberal");
h=LCSOpenFile(str, "w+", LCSIO_PRE_HOME);

fprintf(h,"[BIOGRAPHICAL INFORMATION]\n");
fprintf(h,"Given Name: %s\n",e.propername);
fprintf(h,"Code Name: %s\n",e.name);
fprintf(h,"Date of Birth: %02d-%02d-%4d\n",e.birthday_month,e.birthday_day,year-e.age);
fprintf(h,"Place of Origin: %s\n",lcityname);
getrecruitcreature(str,e.type);
fprintf(h,"Occupation: %s\n",str);

fprintf(h,"\n[ATTRIBUTES]\n");
fprintf(h,"Strength: %d\n",e.att[ATTRIBUTE_STRENGTH]);
fprintf(h,"Intelligence: %d\n",e.att[ATTRIBUTE_INTELLIGENCE]);
fprintf(h,"Wisdom: %d\n",e.att[ATTRIBUTE_WISDOM]);
fprintf(h,"Agility: %d\n",e.att[ATTRIBUTE_AGILITY]);
fprintf(h,"Health: %d\n",e.att[ATTRIBUTE_HEALTH]);
fprintf(h,"Charisma: %d\n",e.att[ATTRIBUTE_CHARISMA]);
fprintf(h,"Heart: %d\n",e.att[ATTRIBUTE_HEART]);
fprintf(h,"Juice: %d\n",e.juice);

fprintf(h,"\n[SKILLS]\n");
for(int sk=0; sk<SKILLNUM; sk++)
{
if(e.skill[sk]>0 || e.get_skill_ip(sk)>0)
{
getskill(str,sk);
fprintf(h,"%s: %d.%02d\n",str,e.skill[sk],
(e.get_skill_ip(sk)*100)/(100+(10*e.skill[sk])));
}
}

fprintf(h,"\n[WOUNDS]\n");

if((e.wound[BODYPART_LEG_RIGHT] & WOUND_NASTYOFF)||
(e.wound[BODYPART_LEG_RIGHT] & WOUND_CLEANOFF)) fprintf(h,"Missing: right leg.\n");

if((e.wound[BODYPART_LEG_LEFT] & WOUND_NASTYOFF)||
(e.wound[BODYPART_LEG_LEFT] & WOUND_CLEANOFF)) fprintf(h,str,"Missing: left leg.\n");

if((e.wound[BODYPART_ARM_RIGHT] & WOUND_NASTYOFF)||
(e.wound[BODYPART_ARM_RIGHT] & WOUND_CLEANOFF)) fprintf(h,"Missing: right arm.\n");

if((e.wound[BODYPART_ARM_LEFT] & WOUND_NASTYOFF)||
(e.wound[BODYPART_ARM_LEFT] & WOUND_CLEANOFF)) fprintf(h,"Missing: left arm.\n");

if(e.special[SPECIALWOUND_RIGHTEYE]!=1) fprintf(h,"Missing: right eye.\n");
if(e.special[SPECIALWOUND_LEFTEYE]!=1) fprintf(h,"Missing: left eye.\n");
if(e.special[SPECIALWOUND_NOSE]!=1) fprintf(h,"Missing: nose.\n");
if(e.special[SPECIALWOUND_TONGUE]!=1) fprintf(h,"Missing: tongue.\n");
if(e.special[SPECIALWOUND_TEETH]!=TOOTHNUM) fprintf(h,"Missing: %d teeth.\n",TOOTHNUM-e.special[SPECIALWOUND_TEETH]);

LCSCloseFile(h);
}

Code: [Select]
void importliberal(char *codename)
{
FILE *h;
char str[200], r1[200];
char *eoftest, *r2, *val;
int type = 0;
strcat(codename, ".liberal");
h=LCSOpenFile(codename, "r", LCSIO_PRE_HOME);
if(h==NULL)
{
//this liberal cannot be found, possibly as a result of Conservative conspiracy
}
else
{
creaturest cr;
cr.creatureinit();
cr.type=CREATURE_POLITICALACTIVIST;

eoftest=fgets(r1,200,h);
while(1)
{
while(memcmp(r1,"[",1)!=0 && memcmp(r1,"\n",1)!=0)
{
r2 = strtok(r1,":");
val = strtok(NULL,":");
val[strcspn(val,"\n")]='\0';//strip off the newline character
if(val!=NULL)
{
switch(type)//type: 1=bio, 2=atts, 3=skills, 4=wounds
{
case 1:
if(strcmp(r2,"Given Name")==0)
{
strcpy(cr.propername,&val[1]);
break;
}
else if(strcmp(r2,"Code Name")==0)
{
strcpy(cr.name,&val[1]);
break;
}
else if(strcmp(r2,"Date of Birth")==0)
{
int m,d,y;
sscanf(val,"%02d-%02d-%4d",&m,&d,&y);
cr.birthday_month=m;
cr.birthday_day=d;
cr.age=year-y;
break;
}
else if(strcmp(r2,"Place of Origin")==0)
{
break;
}
else if(strcmp(r2,"Occupation")==0)
{
for(int i=0; i<CREATURENUM; i++)
{
getrecruitcreature(str,i);
if(strcmp(&val[1],str)==0) cr.type=i;
}
break;
} else break;
case 2:
int i;
if(strcmp(r2,"Strength")==0)
{
sscanf(val,"%d",&i);
cr.att[ATTRIBUTE_STRENGTH]=i;
break;
} else if(strcmp(r2,"Intelligence")==0)
{
sscanf(val,"%d",&i);
cr.att[ATTRIBUTE_INTELLIGENCE]=i;
break;
} else if(strcmp(r2,"Wisdom")==0)
{
sscanf(val,"%d",&i);
cr.att[ATTRIBUTE_WISDOM]=i;
break;
} else if(strcmp(r2,"Agility")==0)
{
sscanf(val,"%d",&i);
cr.att[ATTRIBUTE_AGILITY]=i;
break;
} else if(strcmp(r2,"Health")==0)
{
sscanf(val,"%d",&i);
cr.att[ATTRIBUTE_HEALTH]=i;
break;
} else if(strcmp(r2,"Charisma")==0)
{
sscanf(val,"%d",&i);
cr.att[ATTRIBUTE_CHARISMA]=i;
break;
} else if(strcmp(r2,"Heart")==0)
{
sscanf(val,"%d",&i);
cr.att[ATTRIBUTE_HEART]=i;
break;
} else if(strcmp(r2,"Juice")==0)
{
sscanf(val,"%d",&i);
cr.juice=i;
break;
} else break;
case 3:
int j,k;
for(int sk=0; sk<SKILLNUM; sk++)
{
getskill(str,sk);
if(strcmp(r2,str)==0)
{
sscanf(val,"%d.%02d",&j,&k);
cr.skill[sk]=j;
int x = 6*(100+10*j)*k/(100*maxskill(sk,cr,true));
cr.train(sk,x);//this should be right but isn't! help!
}
}
break;
case 4:
break;
default:
break;
}
}
eoftest=fgets(r1,200,h);
if(eoftest==NULL) break;
}
if(strcmp(r1,"[BIOGRAPHICAL INFORMATION]\n")==0) type=1;
if(strcmp(r1,"[ATTRIBUTES]\n")==0) type=2;
if(strcmp(r1,"[SKILLS]\n")==0) type=3;
if(strcmp(r1,"[WOUNDS]\n")==0) type=4;
eoftest=fgets(r1,200,h);
if(eoftest==NULL) break;

}
//other stuff to finalize the liberal depending on where this ends up

LCSCloseFile(h);
}
}

6
Curses / Re: So I added some stuff (firemen)...
« on: August 31, 2008, 07:20:24 pm »
So I tested my commit privileges by doing just that. It seems to work, except a bug that I'm pretty sure isn't my fault: sometimes if a member of the squad is killed and another is injured as the squad e(V)ades combat, the injured member is listed multiple times. Sometimes you wind up with a squad of dead liberals.

Spoiler (click to show/hide)

P.S. I am a stupid person who does not know how to use -m.

7
Curses / Re: What Am I Doing Wrong?
« on: August 31, 2008, 04:14:44 pm »
It's fixed in SVN, if you want to mess around with that.

8
Curses / Re: So I added some stuff (firemen)...
« on: August 30, 2008, 07:04:28 pm »
I was leery of adding skills or trying to balance these things properly. I approve of your changes.

Spoiler (click to show/hide)

I'm on Sourceforge as kuactet.

9
Curses / So I added some stuff (firemen)...
« on: August 30, 2008, 03:22:00 pm »
Having fire without firemen felt a bit incomplete, so I added them.

New creature: fireman. Shows up during the Massive Conservative Response phase if there are any fires. Carries an Axe (roughly on par with a sword) and wears Bunker Gear (weak full-body armor, cuts fire damage by a factor of 4). Operates out of the downtown Fire Station.

New location: Fire Station. Not at all interesting yet.

To do: Make fires burn out faster or spread less if firemen are present? Make firemen rescue random people from burning squares (to be later arrested if they have any crimes)? Something else entirely?


http://www.kuactet.com/files/lcschanges1.zip

This seems to work with the latest version from SVN.

Also, hello.

10
DF General Discussion / Water clocks, computers, and automation
« on: October 24, 2007, 09:52:00 pm »
I'm splitting this off from the FOTF thread. This is the thread for mechanical computers, gates, and contraptions of that sort.

I'd like to keep this implementation-only, so no "It would be cool if..." posts, please. Only actual working devices, with pictures once they become available.


I'll start it off with a possible floodgate-based digital display:

code:

......
..11..
.2..3.
.2..3.
..44..
.5..6.
.5..6.
..77..
......

displayed  |      active floodgates:
number:    |  1   2   3   4   5   6   7
 1           X   X       X   X       X
 2               X               X    
 3               X           X        
 4           X               X       X
 5                   X       X       x
 6                   X                
 7               X       X   X   X    
 8                                    
 9                           X        
 0                       X            


If, for example, you want to display the number 0110 (6), floodgate 3  needs to be active (invisible). Create a pressure switch that that activates floodgate 3 when depressed. Then,

code:

top view:

###############
#......BDDB~~S#
#._.###########
#...#_#_#_#_###
#####.#.#.#.###



. clear space
# rock
_ pressure switch
~ water
S source
B bridge
D door

The four pressure switches at the bottom are attached to the binary input. When it reads 0110, both bridges will be lowered, and both doors open, so water can flow and activate the floodgate 3 switch.

You can do all 10 numbers at once (up to 16 from a 4-bit pattern):

code:

#############
#0_..BBBB~~S#
#############
#1_..BBBD~~S#
#############
#2_..BBDB~~S#
#############
#3_..BBDD~~S#
#############
#4_..BDBB~~S#
#############
#5_..BDBD~~S#
#############
#6_..BDDB~~S#
#############
#7_..BDDD~~S#
#############
#8_..DBBB~~S#
#############
#9_..DBBD~~S#
#############
####_#_#_#_##
####.#.#.#.##

where 1_ is linked to floodgates 1,2,4,5,7  2_ is linked to floodgates 2,6 etc. and the leftmost bit of the input pattern is linked to each left fluid control, etc.

This system can be set up to display anything based on bit patterns, for example a digital timer. Your turn!


Pages: [1]