Allright everyone. I've got every function thats is exposed to us in Lua. Now we just need to figure out the parameters. Code: Info: ---------------------------START------------------------- Info: ---World Library------------------------- Info: FUNCTION:npcLineQuery function: 651D2D78 Info: FUNCTION:pointCollision function: 651D2BB8 Info: FUNCTION:windLevel function: 651D2C60 Info: FUNCTION:magnitude function: 651D2B80 Info: FUNCTION:monsterQuery function: 651D26B0 Info: FUNCTION:underground function: 651D2B48 Info: FUNCTION:liquidAt function: 651D2E20 Info: FUNCTION:debugPoint function: 651D2678 Info: FUNCTION:isMonster function: 651D3050 Info: FUNCTION:isNpc function: 651D2EC8 Info: FUNCTION:debugText function: 651D28A8 Info: FUNCTION:entityHealth function: 651D3018 Info: FUNCTION:entityName function: 651D2F70 Info: FUNCTION:objectQuery function: 651D22F8 Info: FUNCTION:lightLevel function: 651D2B10 Info: FUNCTION:entityExists function: 651D29F8 Info: FUNCTION:entityLineQuery function: 651D2A68 Info: FUNCTION:entityHandItem function: 651D2A30 Info: FUNCTION:npcQuery function: 651D26E8 Info: FUNCTION:itemType function: 651D3440 Info: FUNCTION:distance function: 651D2D08 Info: FUNCTION:timeOfDay function: 651D3558 Info: FUNCTION:spawnNpc function: 651D2E90 Info: FUNCTION:day function: 651D3210 Info: FUNCTION:objectLineQuery function: 651D2FA8 Info: FUNCTION:time function: 651D3130 Info: FUNCTION:temperature function: 651D2AD8 Info: FUNCTION:collisionBlocksAlongLine function: 651D2D40 Info: FUNCTION:spawnMonster function: 651D2E58 Info: FUNCTION:rectCollision function: 651D2C98 Info: FUNCTION:lineCollision function: 651D2BF0 Info: FUNCTION:isVisibleToPlayer function: 651D2C28 Info: FUNCTION:material function: 651D2DE8 Info: FUNCTION:debugLine function: 651D2988 Info: FUNCTION:mod function: 651D3088 Info: FUNCTION:breathable function: 651D2CD0 Info: FUNCTION:entitySpecies function: 651D2F38 Info: FUNCTION:entityQuery function: 651D22C0 Info: FUNCTION:loungableOccupied function: 651D2FE0 Info: FUNCTION:spawnProjectile function: 651D29C0 Info: FUNCTION:callScriptedEntity function: 651D2AA0 Info: FUNCTION:logInfo function: 651D2950 Info: FUNCTION:loungableQuery function: 651D2F00 Info: FUNCTION:entityPosition function: 651D2DB0 Info: FUNCTION:playerQuery function: 651D2720 Info: ---Entity Library------------------------- Info: FUNCTION:id function: 651D1E28 Info: FUNCTION:randomizeParameter function: 651D2918 Info: FUNCTION:stunned function: 651D1FB0 Info: FUNCTION:disableWornArmor function: 651D23A0 Info: FUNCTION:setFacingDirection function: 651D1C30 Info: FUNCTION:closestValidTarget function: 651D21E0 Info: FUNCTION:onGround function: 651D1F40 Info: FUNCTION:health function: 651D2218 Info: FUNCTION:isLounging function: 651D2758 Info: FUNCTION:baseHealth function: 651D1BF8 Info: FUNCTION:findPath function: 651D2800 Info: FUNCTION:endAltFire function: 651D2598 Info: FUNCTION:seed function: 651D1D80 Info: FUNCTION:entityInSight function: 651D1CA0 Info: FUNCTION:setInteractive function: 651D2528 Info: FUNCTION:isValidTarget function: 651D21A8 Info: FUNCTION:setLounging function: 651D2608 Info: FUNCTION:toAbsolutePosition function: 651D2138 Info: FUNCTION:falling function: 651D1F78 Info: FUNCTION:position function: 651D1E60 Info: FUNCTION:pathLookahead function: 651D27C8 Info: FUNCTION:holdJump function: 651D1F08 Info: FUNCTION:followPath function: 651D2368 Info: FUNCTION:setAimPosition function: 651D2790 Info: FUNCTION:aimPosition function: 651D2640 Info: FUNCTION:boundBox function: 651D1E98 Info: FUNCTION:randomizeParameterRange function: 651D28E0 Info: FUNCTION:setShifting function: 651D2870 Info: FUNCTION:moveDown function: 651D1DB8 Info: FUNCTION:dt function: 651D2288 Info: FUNCTION:endPrimaryFire function: 651D2448 Info: FUNCTION:beginAltFire function: 651D2560 Info: FUNCTION:emote function: 651D24F0 Info: FUNCTION:move function: 651D1D48 Info: FUNCTION:setCrouching function: 651D2058 Info: FUNCTION:say function: 651D24B8 Info: FUNCTION:setRunning function: 651D1D10 Info: FUNCTION:getItemSlot function: 651D2410 Info: FUNCTION:distanceToEntity function: 651D2020 Info: FUNCTION:configParameter function: 651D25D0 Info: FUNCTION:isJumping function: 651D2170 Info: FUNCTION:level function: 651D1BC0 Info: FUNCTION:setItemSlot function: 651D2838 Info: FUNCTION:resetLounging function: 651D2330 Info: FUNCTION:jump function: 651D2090 Info: FUNCTION:staticRandomizeParameter function: 651D2480 Info: FUNCTION:beginPrimaryFire function: 651D23D8 Info: FUNCTION:facingDirection function: 651D1CD8 Info: FUNCTION:velocity function: 651D1FE8 Info: FUNCTION:closestItemDrop function: 651D1ED0 Info: FUNCTION:species function: 651D2100 Info: FUNCTION:setVelocity function: 651D1C68 Info: ---Object Library------------------------- Info: FUNCTION:closestItemDrop function: 788FE9D8 Info: FUNCTION:animationState function: 788FF3E8 Info: FUNCTION:setParticleEmitterActive function: 788FE850 Info: FUNCTION:isInboundNodeConnected function: 788FF0A0 Info: FUNCTION:playSound function: 788FF538 Info: FUNCTION:setAllOutboundNodes function: 788FF4C8 Info: FUNCTION:currentRotationAngle function: 788FF308 Info: FUNCTION:distanceToEntity function: 788FEAF0 Info: FUNCTION:entityInSight function: 788FEB60 Info: FUNCTION:setColliding function: 788FF110 Info: FUNCTION:setPartTag function: 788FF378 Info: FUNCTION:anchorPoint function: 788FF1F0 Info: FUNCTION:setEffectActive function: 788FE230 Info: FUNCTION:configParameter function: 788FF0D8 Info: FUNCTION:rotateGroup function: 788FF650 Info: FUNCTION:setInteractive function: 788FF180 Info: FUNCTION:scaleGroup function: 788FF570 Info: FUNCTION:break function: 788FF5A8 Info: FUNCTION:getInboundNodeLevel function: 788FF458 Info: FUNCTION:randomizeParameterRange function: 788FF618 Info: FUNCTION:playImmediateSound function: 788FF2D0 Info: FUNCTION:toAbsolutePosition function: 788FEFC0 Info: FUNCTION:direction function: 788FEFF8 Info: FUNCTION:dt function: 788FF3B0 Info: FUNCTION:closestValidTarget function: 788FEEE0 Info: FUNCTION:inboundNodeCount function: 788FF1B8 Info: FUNCTION:level function: 788FF688 Info: FUNCTION:smash function: 788FF5E0 Info: FUNCTION:boundBox function: 788FF500 Info: FUNCTION:currentScale function: 788FF030 Info: FUNCTION:setOutboundNodeLevel function: 788FF490 Info: FUNCTION:setGlobalTag function: 788FF228 Info: FUNCTION:outboundNodeCount function: 788FF068 Info: FUNCTION:burstParticleEmitter function: 788FE348 Info: FUNCTION:id function: 788FEA80 Info: FUNCTION:position function: 788FEEA8 Info: FUNCTION:isValidTarget function: 788FEAB8 Info: FUNCTION:setAnimationState function: 788FF298 Info: FUNCTION:randomizeParameter function: 788FF340 Info: FUNCTION:animationStateProperty function: 788FF148 Info: FUNCTION:stateNudge function: 788FF260 Info: FUNCTION:setFlipped function: 788FF420 Info: ---Tech Library------------------------- Info: FUNCTION:animationStateProperty function: 5C038BB0 Info: FUNCTION:jump function: 5C0386E0 Info: FUNCTION:setAnimationState function: 5C038830 Info: FUNCTION:currentRotationAngle function: 5C038C20 Info: FUNCTION:running function: 5C038130 Info: FUNCTION:moveDown function: 5C0386A8 Info: FUNCTION:inLiquid function: 5C037F38 Info: FUNCTION:jumping function: 5C038210 Info: FUNCTION:scaleGroup function: 5C038600 Info: FUNCTION:setParticleEmitterActive function: 5C0388A0 Info: FUNCTION:parentEntityId function: 5C038A98 Info: FUNCTION:setToolUsageSuppressed function: 5C038A28 Info: FUNCTION:setParentFacingDirection function: 5C0389B8 Info: FUNCTION:setVelocity function: 5C0384B0 Info: FUNCTION:setXVelocity function: 5C038328 Info: FUNCTION:setParentAppearance function: 5C038910 Info: FUNCTION:setVisible function: 5C0385C8 Info: FUNCTION:applyMovementParameters function: 5C0382B8 Info: FUNCTION:anchorPoint function: 5C038590 Info: FUNCTION:playImmediateSound function: 5C038BE8 Info: FUNCTION:parameter function: 5C038558 Info: FUNCTION:onGround function: 5C037FE0 Info: FUNCTION:animationState function: 5C038670 Info: FUNCTION:stateNudge function: 5C038750 Info: FUNCTION:measuredVelocity function: 5C0382F0 Info: FUNCTION:direction function: 5C038280 Info: FUNCTION:setEffectActive function: 5C038718 Info: FUNCTION:positionDelta function: 5C037E90 Info: FUNCTION:xControl function: 5C0381A0 Info: FUNCTION:yControl function: 5C037F00 Info: FUNCTION:applyMovementModifiers function: 5C038360 Info: FUNCTION:setStunned function: 5C0387F8 Info: FUNCTION:setFlipped function: 5C038948 Info: FUNCTION:canJump function: 5C0380F8 Info: FUNCTION:moveLeft function: 5C038B78 Info: FUNCTION:rotateGroup function: 5C038980 Info: FUNCTION:setCrouching function: 5C038638 Info: FUNCTION:crouching function: 5C0380C0 Info: FUNCTION:setPosition function: 5C038168 Info: FUNCTION:setRunning function: 5C0388D8 Info: FUNCTION:currentScale function: 5C038B40 Info: FUNCTION:setPartTag function: 5C038A60 Info: FUNCTION:falling function: 5C038398 Info: FUNCTION:setGlobalTag function: 5C038B08 Info: FUNCTION:moveRight function: 5C0389F0 Info: FUNCTION:velocity function: 5C038478 Info: FUNCTION:collisionBounds function: 5C038018 Info: FUNCTION:burstParticleEmitter function: 5C038868 Info: FUNCTION:walking function: 5C038050 Info: FUNCTION:setYVelocity function: 5C0383D0 Info: FUNCTION:translate function: 5C037F70 Info: FUNCTION:control function: 5C037EC8 Info: FUNCTION:setParentOffset function: 5C038788 Info: FUNCTION:flying function: 5C0381D8 Info: FUNCTION:position function: 5C038440 Info: FUNCTION:setSkidding function: 5C038AD0 Info: ---------------------------STOP------------------------- Some of these I have the arguments for already, but I would like some assistance in setting up a page on the official wiki. As I am completely horrible in UI design, I don't have a good template to use up there. I will try and update this with information as soon as I am 100% sure of the parameters and what the function actually does internally.
Yep. Its been a real pain in the ASS to get it. For whatever reason most of the global tables are nil. _G (Lua's global table) doesn't even exist, and I can't get metamethods to work on it either. But if you, or anyone else is good at editing the Wiki, I would appreciate any help in getting an imformative reference manual for the Lua functions.
Is there any way to figure out the number and type of arguments some of these functions take aside from running them and looking into the error logs?
Its not that simple, but that is definitely a great idea. I have a feeling though that the stack trace that gets returned will be C++ level and not at the actual Lua level. Mast3rPlan was looking at the bindings in the source code and they seemed to differ from what was being called in the .Lua files. I will definitely give it a shot when Finals are over.
Look at the available lua files made by the devs. A lot of the functions are used there. If you want to try things out and get some output back, you can use world.logInfo(string), which adds the string to the logfile.
So the list possibly doesn't show all the functions? I tried to get the players entity object from its entityid (which seems to be always -65536) for some time now, but i didn't get it. Maybe there are still some functions missing.
It does. I iterated through the World, Entity, Tech, and Object Lua tables. So if it is not in here, it probabbly isnt exposed to us. Bartwe said they locked down lots of the lua to stop potential malicious code. For example, _G global table is nil.
I made a copy of decoyprincess and modded it a little to test some of the functions but so far I am able to spawn NPCs with world.spawnNpc("species", "type(e.g. friendlyguard)", level) http://i.snag.gy/0oWQP.jpg . Also, chickens! http://i.snag.gy/QmwhW.jpg with spawnMonster("name", {level}). I'm a newb to lua so this isn't anything great, just thought it was fun to mess around with.
You should create a mod which spawns giant chickens you have to fight. The reward should be a cosmetic chicken suit.
what do you mean just the spawnitem lua function? it's as easy as MorpH said just use the decoyprincess as template and spawn your stuff... i made already a monsterpod for my mutant/monster breeding