I need a fresh config.cfg and autoexec.cfg

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

I need a fresh config.cfg and autoexec.cfg

Postby standardtoaster » Mon Nov 16, 2009 11:00 pm

I've been trying to get my SPH value resetter to work properly because a couple of people have said that it doesn't work. I think I may have messed with the config to much. I deleted it along with autoexec and now some functions aren't working. I opened up the console with ~ typed 1..5 so that it would get me [1, 2, 3, 4, 5] but instead it said that it couldn't do it because it was a Function applied to non-funtion 1(..). Please help.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: I need a fresh config.cfg and autoexec.cfg

Postby Sonic » Tue Nov 17, 2009 12:36 am

I'd send mine, except mine's a custom one, with custom console commands.
I do stuff and break things. You know how it is.
Image
User avatar
Sonic
 
Posts: 1467
Joined: Tue Sep 01, 2009 6:18 pm
Location: America!!!

Re: I need a fresh config.cfg and autoexec.cfg

Postby KarateBrot » Tue Nov 17, 2009 12:46 am

wow cool i didn't know of x...y to get an array counting from one to another number. are there also other helpful short commands?
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: I need a fresh config.cfg and autoexec.cfg

Postby standardtoaster » Tue Nov 17, 2009 1:34 am

Well... I made a quick for myself that I use often.
Code: Select all
clear = {console.clear}

That makes it so whenever I type clear in the console it clears the console.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: I need a fresh config.cfg and autoexec.cfg

Postby electronicboy » Tue Nov 17, 2009 10:34 pm

reinstall algodoo?

options --> reset?

asl my autoexec
Code: Select all
Reflection.ExecuteFile "thyme.cfg";

Keys.bind("f12", {System.screenshot});
Keys.bind("pause", {Sim.running=false; App.Step}); // Press this to take one time step when paused

exit = {System.exit};
quit = {System.exit};
print = {Console.print};

time = {Sim.time};
sin = {math.sin};
cos = {math.cos};

spawnBoxRow = (offset, n)=>{for(n, (x)=>{Scene.addBox({pos = offset + [x, 0]})})};
spawnPyramid = (n)=>{for(n, (i)=>{spawnBoxRow([(n - i) * 0.5, n - i], i)})}; // A pyramid of boxes
makeRing = (r, n)=>{
    list = [];
    for(n, (i)=>{
        a = (2 * math.pi * i) / n;
        list = list ++ [r * [cos(a), sin(a)]]
    });
    list
};

spawnRing = { Scene.addPolygon { surfaces = [ makeRing(1, 48), makeRing(0.5, 48) ] } }; // Creates a 2D-torus

groovyOn = {
   App.fadeColor = [0.8, 0, 0.9];
   App.fadeTranslate = { [3 * sin(time), 2 * sin(time)] };
   App.fadeRotate = { sin(System.time*1.2) };
   App.Background.skyColor = [0,0,0,0];
};

groovyOff = {
   App.fadeColor = [0, 0, 0];
   App.Background.skyColor = [0.45, 0.55, 1, 1];
};


also there is 2 config files!!
one in prgram files and 1 in my docs
program files
Code: Select all
// Default config.cfg shipped with Algodoo 5.47

Resources.shaders = false;

Scene.addWidget {
    minimized = false;
    pos = [0.0, 31.0];
    widgetID = "Toolbar";
};
Scene.addWidget {
    minimized = false;
    pos = [0.0, 70.0];
    widgetID = "SimControl";
};       
Scene.addWidget {
    minimized = false;
    pos = [0.0, 117.0];
    title = "Settings";
    widgetID = "EntityOptions"
};
Scene -> {
    Camera -> {
        smoothPan = true;
        smoothZoom = true;
    };
};


my docs
Code: Select all
// Generated by Algodoo v1.6.0

inclusive_range = (min, max)=>{min > max ? [] : {[min] ++ inclusive_range(min + 1, max)}};
SPH -> {
    kernelMultiplier = 0.635;
    incompressible = true;
    influence = 2.7;
    viscMultiplier = 1.0;
    solveT = 0.01;
    unilateral = true;
    lowMassCollisionRadiusFactor = 0.4;
    friction = 0.01;
    jitter = 0.0;
    sort = false;
    restitution = 0.0;
    maxNeighbors = 64;
    geomFieldOffset = 0.5;
    spikyKernel = true;
    geomFriction = 0.001;
    surfaceTension = 0.0;
    radius = 0.05;
    density = 1.0;
    solveIters = 1;
    minMassFactor = 3.0;
    nonPenetration = true;
    vaporizeTime = +inf;
    pressMultiplier = 1.0;
    specialPressure = true;
    solveConst = 1e+006;
    bucketSize = 2.0;
    geomMassMultiplier = 2.0;
    kernelNormalize = false;
    viscosity = 0.0;
    soundSpeed = 20.0;
    velocitySmoothing = false;
    geometryFields = true
};
math -> {
    max = (a, b)=>{a > b ? a : b};
    min = (a, b)=>{a < b ? a : b}
};
Sim -> {
    airFrictionQuadratic = 0.0;
    blockedContactSolver4N = false;
    skipDistance = 0.15;
    solvePreSortConstraints = true;
    blockedContactSolver3N = true;
    solver = "gs";
    blockedContactSolver2N = true;
    solveRegularizationFactor = 1.0;
    adHocSolver = false;
    cableMaxMassRation = 2.0;
    gravityStrength = 9.8;
    airSwitch = true;
    cableAdaptiveSlack = false;
    gravitySwitch = true;
    frequency = 100;
    blockedContactSolver2NF = false;
    cableMiliatryConstraint = false;
    solveConstant = 1e+008;
    useSkipLists = true;
    timeFactor = 1.0;
    mutipleContactEventPerPair = false;
    maxSpringStrength = 10.0;
    cables = true;
    cableDistanceConstraint = true;
    gravityAngleOffset = 0.0;
    solveConstCables = 1e+008;
    solverSOR = [1.0, 1.0, 1.0];
    solveIter = 30;
    solveTcontacts = 0.05;
    solveStiffIter = 0;
    solveDistFactor = 1.0;
    solveRandomizeConstraints = true;
    bruteColliderCutoff = 0;
    solveTCables = 0.05;
    sortBroadPhasePairs = false;
    blockedContactSolver = false;
    cableLineSmartChoice = true;
    solveTconstraints = 0.05;
    solveVelFactor = 1.0;
    defaultBodyDensity = 2.0;
    cableJacobianScale = 1.0;
    airFrictionLinear = 0.01;
    maxPositionCorrection = +inf;
    warmStart = true;
    cableMaxSlack = 0.1;
    running = false;
    optimizeContactSet = true;
    airFrictionMultiplier = 1.0;
    targetPenetration = 0.0001;
    solveReverseConstraints = false;
    polygonMeshSize = [128, 128];
    cableMaxImpFactor = +inf;
    defaultBodyFriction = 0.5;
    fastPolyAABB = true;
    nyquistFactor = 4.0;
    cableLineConstraint = true;
    springForce = 1000.0;
    warmStartFactor = 0.5;
    airDensity = 0.01;
    largeOverlapTest = true;
    solvePenetrationDamping = false;
    rotFrictionLinear = 0.00314;
    defaultBodyRestitution = 0.5;
    solveAccFactor = 1.0;
    cableSafetyDistance = 0;
    cableLineInternalize = false;
    forceContactCalculations = false
};
sin = {math.sin};
WebCam -> {
    flipVert = false;
    flipHoriz = false
};
Defaults -> {
    glueToWorld = false;
    borders = true
};
spawnPyramid = (n)=>{for(n, (i)=>{spawnBoxRow([(n - i) * 0.5, n - i], i)})};
exit = {System.exit};
App -> {
    fadeColor = [0.0, 0.0, 0.0];
    updateInterval = 1;
    alwaysCalcContacts = false;
    laserResolution = 10.0;
    waterMaxElongation = 2.0;
    maxBorderArea = 0.2;
    borderWidth = 0.1;
    waterColor = [0.1, 0.1, 1.0, 0.7];
    waterRefractiveIndex = 1.33;
    sceneFadeInTime = 1.0;
    polytoolPreviewColor = [1.0, 0.5, 1.0, 0.4];
    gpuWater = false;
    drawBCs = false;
    drawVertices = false;
    maxPointDist = 0.5;
    drawScaleIndicator = true;
    maxUndo = 40;
    metaWater = true;
    minPointDist = 0.15;
    maxSPHSpawn = 2000;
    laserWidth = 0.2;
    maxBorderAreaSpecial = 0.4;
    drawOBBs = false;
    Grid -> {
        grid = true;
        base = 4;
        numAxes = 2;
        scale = 1.0;
        snap = true
    };
    language = "English";
    fadeTranslate = [0.0, 0.0];
    waterTracerLightness = 0.75;
    GUI -> {
        geomGenTolerance = 1.2;
        toolGestureSensitivity = 1.0;
        drawDragLine = true;
        dragUndo = true;
        useHSL = false;
        alikeTolerance = 0;
        geomGenShrink = 0.0033;
        toolGestures = true;
        Forces -> {
            normalText = "N";
            totalText = "";
            airFrictionText = "-fv";
            attraction = true;
            gravityText = "mg";
            airBuoyancyText = "-adg";
            airFriction = true;
            airBuoyancy = true;
            total = true;
            attractionText = "A";
            externalText = "ext";
            friction = true;
            drawValues = true;
            drawNames = true;
            external = true;
            normal = true;
            velScale = 1.0;
            frictionText = "T";
            springText = "-kx-bv";
            forceScale = 1.9;
            drawForces = false;
            gravity = true;
            contactCombinationDistance = 1.2;
            spring = true;
            velocities = false;
            frictionProjection = true;
            hingeText = "H";
            hinge = true
        };
        trapUser = false;
        geomGenMinArea = 0.0009;
        drawHingesWhenRunning = true;
        toolSpecificCursors = true;
        zoomFactor = 0.2;
        allowDrawSelect = true;
        level = 3;
        Scene.addWidget {
            widgetID = "SimInfo";
            minimized = false;
            pos = [842.0, 0.0];
            size = [167.5, 210.0];
            title = "Sim-info"
        };
        Scene.addWidget {
            widgetID = "SimControl";
            minimized = false;
            pos = [0.0, 70.0];
            size = [521.0, 40.0];
            title = ""
        };
        Scene.addWidget {
            widgetID = "Toolbar";
            minimized = false;
            pos = [0.0, 31.0];
            size = [600.0, 32.0];
            title = ""
        };
        Scene.addWidget {
            widgetID = "EntityOptions";
            minimized = false;
            pos = [0.0, 117.0];
            size = [178.25, 120.0];
            title = "Settings"
        }
    };
    laserEvents = true;
    screenshotsWithAlpha = false;
    laserBroadPhase = true;
    Background -> {
        skyColor = [0.24745497, 0.5456197, 0.585, 1.0];
        cuteClouds = true;
        drawClouds = false;
        cloudOpacity = 0.95
    };
    scaleGravityField = false;
    drawBodyCenters = false;
    drawCables = false;
    forceVertexPolygonDrawing = false;
    maxPolygonBorderFactor = 0.75;
    pointSize = 3.0;
    chainDensityFactor = 1.0;
    laserSuperBoost = 1.0;
    dragToolStrength = 0.25;
    HQPolygons = false;
    drawParticleNeighbors = false;
    waterElongation = 0.05;
    fadeRotate = 0.0;
    drawSelectionOBB = false;
    drawVelocityFactor = 0.02;
    lineWidth = 3.0;
    drawParticleCenters = false;
    fadeScale = [0.995, 0.995];
    enableScriptMenu = true;
    checkForUpdates = true;
    DPI = 86.0;
    waterTracers = 0;
    autosaveTime = 300.0;
    waterFanceyFactor = 10.0;
    metaCutoff = 0.5;
    numColorsInRainbow = 12;
    drawCollisions = false;
    drawMapOBBs = false;
    waterTracerSize = 0.015;
    showGravityField = false;
    maxCogs = 128;
    autosaveEnable = true;
    laserWaterBVH = false;
    marchingSquaresResolution = 1.0
};
Console -> {
    fade = false;
    screenSize = 0.35;
    delay = 0.3;
    scroll = true;
    color = [0.1, 0.1, 0.1, 0.8]
};
Tablet -> {
    rightClickOverride = false;
    improveClickTolerance = true;
    overrideMouseEvents = true
};
Resources -> {
    textures = true;
    force16BitTextures = false;
    shaders = false
};
cos = {math.cos};
makeRing = (r, n)=>{
    list = [];
    for(n, (i)=>{
        a = (2 * math.pi * i) / n;
        list = list ++ [r * [cos(a), sin(a)]]
    });
    list
};
groovyOn = {
    App.fadeColor = [0.8, 0, 0.9];
    App.fadeTranslate = {[3 * sin(time), 2 * sin(time)]};
    App.fadeRotate = {sin(System.time * 1.2)};
    App.Background.skyColor = [0, 0, 0, 0]
};
Scene -> {
    author = "";
    title = "V-22 Osprey (Work In Progress)";
    description = "";
    my -> {
        heightground = 2.6721344;
        planepos = [-20.40071, 79.085045];
        groundpos = [-20.400963, 76.41291];
        heightsealevel = 79.085045
    };
    Camera -> {
        trackRotation = false;
        zoom = 11.640823;
        smoothRotation = true;
        smoothPan = true;
        smoothFactor = 0.9;
        rotation = 0.0;
        pan = [12.780467, 103.42179];
        smoothZoom = true
    };
    gravityRotationOffset = NaN
};
time = 31.370623;
GUI -> {
    rightToLeft = false;
    fontShadow = true;
    fgColor = [1.0, 1.0, 1.0, 1.0];
    font = "arial_black";
    crispFonts = false;
    clickTimeTolerance = 0.3;
    opacity = 0.8;
    cursorFPSLimit = 25.0;
    scale = 1.0;
    bgColor = [0.2, 0.2, 0.2, 1.0];
    penInput = false;
    forceOSCursor = true;
    fontShadowOffset = [0.125, 0.125];
    cursor = true;
    crispFontFactor = 0.5;
    tooltips = true;
    clickTolerance = 5.0
};
Threading -> {numThreads = 1};
Input -> {
    touchScreenDetection = true;
    touchScreenDetectionGoodCutoff = 30;
    touchScreenDetectionRelCutoff = 50
};
quit = {System.exit};
groovyOff = {
    App.fadeColor = [0, 0, 0];
    App.Background.skyColor = [0.45, 0.55, 1, 1]
};
Keys -> {
    Keys.bind("f12", {System.screenshot});
    Keys.bind("pause", {
        Sim.running = false;
        App.Step
    })
};
System -> {
    frame = true;
    minFPS = 10.0;
    resizable = true;
    maximized = true;
    maxFPS = 60.0;
    antiAlias = 1;
    regularScreenshots = 0;
    fakeFullscreen = true;
    depth = 32;
    vSync = false;
    fullscreen = false;
    resolution = [1024, 712]
};
for = (n, what)=>{
    n <= 0 ? false : {
        for(n - 1, what);
        what(n - 1)
    }
};
FileInfo -> {
    author = "";
    title = "";
    version = 6;
    description = ""
};
spawnBoxRow = (offset, n)=>{for(n, (x)=>{Scene.addBox({pos = offset + [x, 0]})})};
spawnRing = {Scene.addPolygon({surfaces = [makeRing(1, 48), makeRing(0.5, 48)]})};
print = {Console.print}
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: I need a fresh config.cfg and autoexec.cfg

Postby standardtoaster » Tue Nov 17, 2009 10:41 pm

Thanks! The bottom one was what I needed most. I'll make sure to keep a "clean" copy on hand now.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: I need a fresh config.cfg and autoexec.cfg

Postby gradyfitz » Wed Nov 18, 2009 11:31 am

standardtoaster wrote:Thanks! The bottom one was what I needed most. I'll make sure to keep a "clean" copy on hand now.

standardtoaster wrote:... I deleted it along with autoexec and now some functions aren't working...


This is the reason, autoexec.cfg contains a line telling algodoo to execute the file "thyme.cfg" (Reflection.ExecuteFile "thyme.cfg"), Thyme.cfg contains an infixed operation (..)
Code: Select all
inclusive_range = (min, max)=>{min > max ? [] : {[min] ++ inclusive_range(min + 1, max)}};
infix 2 left: _ .. _ => inclusive_range; // Usage:  1..5 == [1,2,3,4,5]

I have a tutorial explaining how infix works, infix as the key word, 2 as the number of arguments to be sent to the function, left: as the order to evaluate functions (this only comes into play in situations like 6^3^3^2, where it actually matters which order the evaluations occur, in a situation like 7 + 32 + 8, the order would not matter :D), _.._ being the place holders (underscores) and the symbol(s) to assign an infixed operation to, inclusive_range being the function the arguments are being sent into.

Hopefully this was informative :D, there's rarely any reason to delete autoexec.cfg, since it is only manually modified, there shouldn't be too much problem with it.
Mechanisms: 18 Mechanisms.
Thyme: Tutorial - Variables/Commands List.
Thymechanic
gradyfitz
 
Posts: 174
Joined: Tue Sep 01, 2009 8:33 am
Location: Victoria, Australia

Re: I need a fresh config.cfg and autoexec.cfg

Postby KarateBrot » Wed Nov 18, 2009 3:19 pm

is an infix saved to the scene so everyone can use it when they download the scene or is it just working for me and others will get an error?
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: I need a fresh config.cfg and autoexec.cfg

Postby gradyfitz » Thu Nov 19, 2009 7:39 am

KarateBrot wrote:is an infix saved to the scene so everyone can use it when they download the scene or is it just working for me and others will get an error?

Hmm, I've questioned this myself before, I'm pretty sure that it isn't saved with scenes, but min, max, for, inclusive range and infixed .. operations should work with anyone, because this data is added when Algodoo runs (autoexec.cfg runs thyme.cfg, everyone has this file, you can probably safely assume that it will work for everyone). I don't remember whether this even works for local operations (not serialised to the config.cfg file), this isn't too much of a problem, because if you distribute the scene you can just modify the functions that use it, this is not too difficult to do.

The thing is, if you have a massive code, it can be simplified with a few infixed operations, this may just make it easier to read, but that can be very useful, also you could run all your data through a secondary parser, which would act as a debug, that you could later remove easily. 5..6 ++ 6..9 ++ 7..9 as opposed to Math.addlist(inclusive_range(5,6),Math.addlist(inclusive_range(6,9),inclusive_range(7,9))), the first would take a lot less space, if you were running a few thousand line script, it would be much easier to read "5-***-7-***-8-***-9-***-72" than a function in place of each infixed operation, or just easier to type.

Whichever way you choose, it's not to hard to transfer it with the file.

Hopefully this is helpful :D.
Mechanisms: 18 Mechanisms.
Thyme: Tutorial - Variables/Commands List.
Thymechanic
gradyfitz
 
Posts: 174
Joined: Tue Sep 01, 2009 8:33 am
Location: Victoria, Australia

Re: I need a fresh config.cfg and autoexec.cfg

Postby standardtoaster » Thu Nov 19, 2009 7:46 am

I know that this is a stupid question to ask, but where should I put config.cfg? Should I put it in the Algodoo folder or under the Algodoo Application support folder where my scenes are?
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: I need a fresh config.cfg and autoexec.cfg

Postby gradyfitz » Thu Nov 19, 2009 12:37 pm

standardtoaster wrote:I know that this is a stupid question to ask, but where should I put config.cfg? Should I put it in the Algodoo folder or under the Algodoo Application support folder where my scenes are?

Either, it first reads the My Documents version, if it is not found, it reads the Algodoo install folder's copy :D. probably best to keep a clean copy in the install folder, with a modified copy in the My Documents one :D.

Hopefully this helped :D.
Mechanisms: 18 Mechanisms.
Thyme: Tutorial - Variables/Commands List.
Thymechanic
gradyfitz
 
Posts: 174
Joined: Tue Sep 01, 2009 8:33 am
Location: Victoria, Australia

Re: I need a fresh config.cfg and autoexec.cfg

Postby standardtoaster » Thu Nov 19, 2009 4:26 pm

Thanks! Now I don't really need to worry about messing it up again. Thanks gradyfitz.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 4 guests