Parser suggestion

danon

Member
Mar 9, 2016
24
5
Hi,


I've been reading a bit in the code repo/here and saw that many writers avoid parser calls as much as possible (and I can understand why, having e.g.  [pc.chest]  in there turn into anything feels frustrating/dangerous.


While at the same time not using the parser often results in if riddled code for small differences in output.


So my suggestion is to structure things a bit different;


e.g.   smeared [pc.cockHeadBiggest] in


[pc.cockHeadBiggest, "square", "bulbous", "undulating"]

for(desc: suggestedDesc)
if(pc.penis rectangularity factor > 0.9)
if(desc == "square") return desc;
if(desc == "rectangular") return desc;
if(desc == "not round wtf") return desc;


For small differences this should make it a lot easier for writers to have a flow/control and the coders not having to omg fuck handling 7 unrereadable variants.


Though if one does that one might as well go beyond and use attributes for choosing the result;


your legs [pc.skin, hard:"clacking", goo:"melting", fur:"brushing", default:"rubbing"] together against

for(key,value: suggestedDesc)
if(key == "hard")
if(pc.skin == "chitin") return value;
if(pc.skin == "metal") return value;
if(pc.skin == "wearing metal greaves" ) return value;


And can turn things like "if(pc.cumQ() < 25)" into [pc.cumQ, little:"", some:"", torrent:""]


Structured like this new transformations can be added without having new random generated words break old scenes.


This obviously won't catch all variants but I think doing it like this should make the lives of everyone easier in the long run.
 
Last edited by a moderator: