Changeset 1039 for cpp/frams/genetics
- Timestamp:
- 11/30/20 03:44:14 (4 years ago)
- Location:
- cpp/frams/genetics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/f1/f1_conv.cpp
r830 r1039 282 282 int Builder::growPart(GeneProps &c, const char *g) 283 283 { 284 sprintf(tmp, "dn=%lg,fr=%lg,ing=%lg,as=%lg,v s=%g,vr=%g,vg=%g,vb=%g",285 1.0 / c.weight, c.friction, c.ingestion, c.assimilation, c. visual_size, c.cred, c.cgreen, c.cblue);284 sprintf(tmp, "dn=%lg,fr=%lg,ing=%lg,as=%lg,vr=%g,vg=%g,vb=%g", 285 1.0 / c.weight, c.friction, c.ingestion, c.assimilation, c.cred, c.cgreen, c.cblue); 286 286 return model.addFromString(Model::PartType, tmp, makeRange(g)); 287 287 } -
cpp/frams/genetics/f9/f9_conv.cpp
r973 r1039 153 153 averagecolor += j->vcolor; 154 154 p->vcolor = averagecolor / count; 155 if (count > 5) count = 5; //avoid too fat...156 p->vsize = 0.3 + count / 15.0; //the more Joints is attached to a Part, the fatter it is157 155 } 158 156 //m.getPart(0)->vcolor = Pt3D(0, 0, 0); //mark first Part black - a visual aid for easier editing -
cpp/frams/genetics/geneprops.cpp
r759 r1039 24 24 muscle_reset_range = true; 25 25 26 visual_size = 0.2;27 26 cred = 0.5; 28 27 cgreen = 0.5; … … 89 88 case 'B': cblue += (1.0 - cblue)*0.25; break; 90 89 case 'b': cblue += (0.0 - cblue)*0.25; break; 91 case 'H': visual_size += (0.7 - visual_size)*0.25; break;92 case 'h': visual_size += (0.05 - visual_size)*0.25; break;93 90 94 91 default: return -1; … … 112 109 normalizeBiol4(); 113 110 114 visual_size = 0.5*visual_size + 0.5 * standard_values.visual_size;115 116 111 if (use_f1_muscle_reset_range) 117 112 { -
cpp/frams/genetics/geneprops.h
r772 r1039 13 13 14 14 15 #define F14_MODIFIERS_VISUAL "DdGgBb Hh"15 #define F14_MODIFIERS_VISUAL "DdGgBb" 16 16 #define F14_MODIFIERS_RARE "EeWwAaSs" //expdef would need to handle these properly/specifically to ensure reasonable behavior, and hardly any expdef does. Modifying initial energy of a creature as a result of its genes (Ee) is in general not a good idea. Weight (Ww) works only in water, and in water sinking/going up should usually be caused by real "intentional" activity of a creature, not by its inherited weight. For assimilation (Aa), there is a dedicated parameter in CreaturesGroup. Stamina (Ss) is no longer needed as destructive collisions are not supported, and even if they were, some expdef would need to impose reasonable restrictions on the value of this parameter (e.g. similar to normalizeBiol4()) so there is some cost associated with it, and the specific consequences of destructions should be defined as needed. 17 17 #define F14_MODIFIERS "LlRrCcQqFfMmIi" F14_MODIFIERS_RARE F14_MODIFIERS_VISUAL … … 50 50 bool muscle_reset_range; ///<Used only by conv_f1 51 51 52 double visual_size; ///<incremented by H, decremented by h. Part's visual size, only affects appearance53 52 double cred; ///<incremented by D, decremented by d. Part's red color proportion 54 53 double cgreen; ///<incremented by B, decremented by b. Part's blue color proportion
Note: See TracChangeset
for help on using the changeset viewer.