Modding Discussion 1.0 Update, It's going to arrive sooner or later. So let's prepare for it!

Discussion in 'Starbound Modding' started by C0bra5, Jun 19, 2016.

  1. bk3k

    bk3k Oxygen Tank

    Thanks for this thread. Hopefully with 1.0 approaching, we'll see some official LUA documentation once again.

    also

    These aren't removed. They're renamed.

    - pressurizedbeam is now pressurisedbeam
    - pressurizedgirder is now pressurisedgirder
    - pressurizedplatform is now pressurisedplatform

    It does seem an odd renaming, but apparently a valid spelling.

    steelplatform is now tungstenplatform
    pressurizedsteel is now pressuriseddurasteel

    The brains though do appear to be gone, unless I'm missing them.
     
    Last edited: Jul 12, 2016
  2. Crystan

    Crystan Maverick Hunter

    Not sure if this is the right topic to ask but I'm having some major issues with my techs/quest in my MMX mod. It would be great to know if its now possible again to learn techs by using an item?
     
  3. v6ooo

    v6ooo Space Kumquat

    I don't know if there's still an item parameter to learn but you can learn from quests (see tech scientist) and you can also unlock from a lua script.
    player.makeTechAvailable - shows on tech console
    player.enableTech - unlocks w/o using tech cards
     
  4. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    SFX>Humanoid>[racename]_chatter_[gender].ogg is a new sound effect added. I haven't yet discovered which file references it, so if anybody knows, that'd be great. I've already checked the .species files, most of the dialog files and NPC files, but perhaps I missed something >_< It's the new sound effect added to races, used when you speak with NPCs.
     
  5. The | Suit

    The | Suit Agent S. Forum Moderator

    .modinfo file might be changed to .metadata in the future.

    Though modinfo should work fine for now.
    It is likely for steam workshop but I have no developer confirmation on this change at the moment.
     
  6. v6ooo

    v6ooo Space Kumquat

    @AmazonValkyrie,
    grep.png

    You are correct. I haven't posted about this because we haven't gotten a answer if the format is final or if there will be more changes.

    The changes in Nightly that we know about so far
    • Main menu now has a button to open mod/asset list
    • Game attempts to loads all files/folders inside the root of /assets/ & /mods/
    • You can prevent loading of a file/folder by prefixing it with an underscore, _filename
    • pak.modinfo has been replaced by .metadata
      • Same parameters plus "version", "description", "friendlyName" that will show ingame, "priority" to override load order for mods, defaults to 0 and should not be included unless you need to change the value. Mainly for mods that need to load at specific order but can't use require or include.
      • You can easily create a .metadata on Windows by naming a file " .metadata. " (with a trailing dot)
    • Mods without a .metadata (or name) defined will be loaded as an unnamed mod
    • .pak & .modpak has been merged into a single .pak format.
    • .pak files no longer have an asset name attached to them when packed using asset_packer. (name is set by .metadata)
     
    Last edited: Jul 17, 2016
    bk3k, Inf_Wolf14, C0bra5 and 2 others like this.
  7. Mackinz

    Mackinz The Waste of Time

    Now if only Nightly would be updated to actually work instead of crashing because it doesn't even recognize the packed.pak file...
     
    Inf_Wolf14 and C0bra5 like this.
  8. bk3k

    bk3k Oxygen Tank

    For those who do shipmods - or even allow ship objects to be created - techstations now have added this
    Code:
    "uniqueId" : "techstation"
    All racial variants all have the same "uniqueId" and having more than one object in a world(or ship) with the same "uniqueId" will cause the world to error out. Apparently this is intentional behavior judging by the error message.

    Very annoying for me and possibly other ship modders. I could see this being griefer gold too. A person (who has vanilla techstations in their inventory) joins your server and places them to crash your world. Good luck even figuring out who did it! Perhaps I should report this as an exploit?
     
  9. Xylia

    Xylia Tiy's Beard

    Oi.

    That will screw over anybody who uses GitHub as a means of distributing their mod, because GitHub likes to place a .git folder inside the mod's folder if you use a git client to keep updated so you don't have to re-download the entire mod all over again.
     
  10. Segenam

    Segenam Phantasmal Quasar

    And don't Mac computers also put a file inside the folder as well? I remember this being an issue a long time ago where that file would cause mods made on a mac computer to break. (though I don't use a Mac my self so I may be wrong but I do remember something about this.)
     
  11. Inf_Wolf14

    Inf_Wolf14 Spaceman Spiff

    I think its a problem with the packed.pak metadata... I unpacked then repacked the assets with a new assets source name and it from then on crashed due to duplicate files and/or missing files.

    After that point I quit trying... >_<
     
  12. Mackinz

    Mackinz The Waste of Time

    Put an underscore ( _ ) in front of a folders name or asset file and the game will not load it.

    Also, Nightly is now loading but ends up loading all assets twice.
     
  13. v6ooo

    v6ooo Space Kumquat

    I'm at work so I'm not going to attempt an edit.

    It loads all files/folders in the root of /assets/ and /mods/, I don't think it loads git files within a mod folder.
     
  14. Xylia

    Xylia Tiy's Beard

    If you do that, then GitHub Client won't see the .git folder if you rename it _.git, lol. You'll be constantly re-naming the folder every time you go to update the mod.

    Hopefully this is how it is...
     
  15. v6ooo

    v6ooo Space Kumquat

    Having said that, unknown file formats are are also skipped, you can see in the log. You don't have anything to worry about.
     
  16. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    Speaking of changes, and I don't wanna de-rail this thread, but does anybody know why every S.A.I.L. was switched to the same model, but in different colors for each race?

    Also, after they advertised the new laser weapons (sword, bow, pick axe, etc), I haven't been able to find them in the nightly files at all. Anybody know what happened to those?

    Again, sorry if I'm steering off track >_< I'm just full o' questions today!
     
  17. Storm_UK

    Storm_UK Existential Complex

    It does seem odd they changed to rather 'boring' identical looking AI's across the races, only differentiated in colour. The old ones had much more character. They would be easy enough for someone to mod back though.
     
  18. Xylia

    Xylia Tiy's Beard

    I found a laser pickaxe in my first Nightly playthrough ~3 weeks ago.
     
  19. bk3k

    bk3k Oxygen Tank

    I might as well put this here. This is from a recent nightly, but I assume it applies to 1.0 as well.

    Code:
    function : ipairs()
    function : error()
    function : getmetatable()
    function : jremove()
    function : assert()
    function : rawset()
    function : print()
    table : world
      function : getObjectParameter()
      function : callScriptedEntity()
      function : entityDescription()
      function : entityVelocity()
      function : entityCanDamage()
      function : entityPosition()
      function : getProperty()
      function : debugLine()
      function : platformerPathStart()
      function : entityHealth()
      function : tileIsOccupied()
      function : monsterQuery()
      function : spawnTreasure()
      function : npcLineQuery()
      function : loungeableQuery()
      function : containerItems()
      function : windLevel()
      function : playerQuery()
      function : containerPutItemsAt()
      function : gravity()
      function : entityAggressive()
      function : containerAddItems()
      function : entityLineQuery()
      function : containerTakeNumItemsAt()
      function : entityType()
      function : npcQuery()
      function : objectQuery()
      function : sendEntityMessage()
      function : entityDamageTeam()
      function : pointTileCollision()
      function : isTileProtected()
      function : containerSwapItemsNoCombine()
      function : destroyLiquid()
      function : material()
      function : threatLevel()
      function : itemType()
      function : loungeableOccupied()
      function : liquidAt()
      function : setProperty()
      function : timeOfDay()
      function : resolvePolyCollision()
      function : containerAvailable()
      function : entityName()
      function : damageTiles()
      function : containerClose()
      function : underground()
      function : containerTakeAll()
      function : entitySpecies()
      function : polyContains()
      function : containerStackItems()
      function : spawnNpc()
      function : spawnMonster()
      function : lightLevel()
      function : spawnVehicle()
      function : entityHandItemDescriptor()
      function : spawnProjectile()
      function : placeObject()
      function : polyCollision()
      function : magnitude()
      function : entityHandItem()
      function : lineTileCollision()
      function : containerItemApply()
      function : day()
      function : nearestTo()
      function : collisionBlocksAlongLine()
      function : spawnStagehand()
      function : placeMaterial()
      function : xwrap()
      function : objectAt()
      function : rectTileCollision()
      function : itemDropQuery()
      function : containerItemAt()
      function : entityGender()
      function : entityHasCountOfItem()
      function : debugPoly()
      function : findPlatformerPath()
      function : rectCollision()
      function : lineCollision()
      function : time()
      function : entityPortrait()
      function : entityMoney()
      function : debugPoint()
      function : distance()
      function : isNpc()
      function : entityQuery()
      function : findUniqueEntity()
      function : isMonster()
      function : containerItemsCanFit()
      function : placeMod()
      function : monsterType()
      function : stagehandType()
      function : spawnLiquid()
      function : containerItemsFitWhere()
      function : entityUniqueId()
      function : containerConsume()
      function : breathable()
      function : dayLength()
      function : pointCollision()
      function : containerConsumeAt()
      function : mod()
      function : debugText()
      function : containerSwapItems()
      function : objectSpaces()
      function : damageTileArea()
      function : containerSize()
      function : npcType()
      function : containerOpen()
      function : entityExists()
      function : objectLineQuery()
      function : spawnItem()
      function : containerTakeAt()
      function : farmableStage()
    table : storage
      EMPTY TABLE
    table : animator
      function : stopAllSounds()
      function : scaleTransformationGroup()
      function : setParticleEmitterOffsetRegion()
      function : setParticleEmitterBurstCount()
      function : setPartTag()
      function : hasTransformationGroup()
      function : partPoint()
      function : setFlipped()
      function : setLightColor()
      function : burstParticleEmitter()
      function : setGlobalTag()
      function : setSoundVolume()
      function : transformTransformationGroup()
      function : setSoundPosition()
      function : partPoly()
      function : setSoundPitch()
      function : setLightPosition()
      function : setSoundPool()
      function : translateTransformationGroup()
      function : animationState()
      function : hasSound()
      function : resetTransformationGroup()
      function : setLightPointAngle()
      function : setParticleEmitterActive()
      function : setLightActive()
      function : currentRotationAngle()
      function : setParticleEmitterEmissionRate()
      function : rotateTransformationGroup()
      function : rotateGroup()
      function : setEffectActive()
      function : animationStateProperty()
      function : playSound()
      function : setAnimationRate()
      function : setAnimationState()
    table : config
      function : getParameter()
    table : root
      function : behaviorModule()
      function : npcPortrait()
      function : nonEmptyRegion()
      function : getConfigurationPath()
      function : monsterSkillParameter()
      function : assetJson()
      function : imageSize()
      function : techConfig()
      function : loadVersionedJson()
      function : itemHasTag()
      function : createItem()
      function : recipesForItem()
      function : projectileGravityMultiplier()
      function : createBiome()
      function : getConfiguration()
      function : npcVariant()
      function : materialMiningSound()
      function : materialFootstepSound()
      function : tenantConfig()
      function : questConfig()
      function : projectileConfig()
      function : generateName()
      function : makeCurrentVersionedJson()
      function : monsterPortrait()
      function : evalFunction2()
      function : treeFoliageDirectory()
      function : hasTech()
      function : setConfigurationPath()
      function : imageSpaces()
      function : materialHealth()
      function : itemType()
      function : itemConfig()
      function : createTreasure()
      function : materialPath()
      function : getMatchingTenants()
      function : npcConfig()
      function : techType()
      function : setConfiguration()
      function : isTreasurePool()
      function : itemTags()
      function : evalFunction()
      function : liquidStatusEffects()
      function : treeStemDirectory()
    table : tech
      function : aimPosition()
      function : setToolUsageSuppressed()
      function : setVisible()
      function : parentLounging()
      function : setParentHidden()
      function : setParentOffset()
      function : setParentDirectives()
      function : setParentState()
    function : update()
    function : tonumber()
    table : sb
      function : makeRandomSource()
      function : logError()
      function : interpolateSinEase()
      function : staticRandomDouble()
      function : staticRandomDoubleRange()
      function : printJson()
      function : nrand()
      function : jsonQuery()
      function : setLogMap()
      function : makePerlinSource()
      function : staticRandomI32Range()
      function : print()
      function : makeUuid()
      function : replaceTags()
      function : staticRandomI32()
      function : jsonMerge()
      function : logInfo()
      function : logWarn()
    table : script
      function : updateDt()
      function : setUpdateDelta()
    table : string
      function : dump()
      function : packsize()
      function : len()
      function : find()
      function : gsub()
      function : unpack()
      function : gmatch()
      function : sub()
      function : lower()
      function : upper()
      function : byte()
      function : char()
      function : pack()
      function : format()
      function : reverse()
      function : rep()
      function : match()
    function : setmetatable()
    function : jarray()
    function : rawget()
    table : mcontroller
      function : baseParameters()
      function : controlModifiers()
      function : facingDirection()
      function : controlApproachYVelocity()
      function : yVelocity()
      function : translate()
      function : controlFly()
      function : controlAcceleration()
      function : setXVelocity()
      function : controlFace()
      function : isNullColliding()
      function : xVelocity()
      function : rotation()
      function : controlApproachXVelocity()
      function : yPosition()
      function : anchorState()
      function : resetAnchorState()
      function : xPosition()
      function : controlApproachVelocityAlongAngle()
      function : controlApproachVelocity()
      function : setPosition()
      function : controlCrouch()
      function : running()
      function : isCollisionStuck()
      function : controlForce()
      function : controlHoldJump()
      function : controlRotation()
      function : clearControls()
      function : liquidMovement()
      function : groundMovement()
      function : crouching()
      function : setAutoClearControls()
      function : autoClearControls()
      function : collisionBody()
      function : flying()
      function : setYPosition()
      function : stickingDirection()
      function : setRotation()
      function : liquidPercentage()
      function : isColliding()
      function : walking()
      function : addMomentum()
      function : controlMove()
      function : setYVelocity()
      function : velocity()
      function : setVelocity()
      function : movingDirection()
      function : canJump()
      function : falling()
      function : jumping()
      function : setAnchorState()
      function : controlDown()
      function : controlJump()
      function : collisionPoly()
      function : controlParameters()
      function : onGround()
      function : liquidId()
      function : setXPosition()
      function : boundBox()
      function : position()
    string : _VERSION - "Lua 5.3"
    function : xpcall()
    table : status
      function : statPositive()
      function : statusProperty()
      function : overConsumeResource()
      function : resourceMax()
      function : resourceLocked()
      function : consumeResource()
      function : setResource()
      function : clearPersistentEffects()
      function : setStatusProperty()
      function : removeEphemeralEffect()
      function : addEphemeralEffects()
      function : modifyResourcePercentage()
      function : clearAllPersistentEffects()
      function : isResource()
      function : addEphemeralEffect()
      function : activeUniqueStatusEffectSummary()
      function : setPersistentEffects()
      function : addPersistentEffect()
      function : resetAllResources()
      function : setResourcePercentage()
      function : resourcePercentage()
      function : resetResource()
      function : getPersistentEffects()
      function : resource()
      function : inflictedDamageSince()
      function : damageTakenSince()
      function : clearEphemeralEffects()
      function : resourcePositive()
      function : modifyResource()
      function : resourceNames()
      function : addPersistentEffects()
      function : setResourceLocked()
      function : giveResource()
      function : stat()
      function : inflictedHitsSince()
    table : table
      function : concat()
      function : sort()
      function : pack()
      function : unpack()
      function : remove()
      function : move()
      function : insert()
    table : math
      number : mininteger - -9223372036854775808
      number : pi - 3.1415926535898
      function : abs()
      function : acos()
      function : ult()
      function : random()
      number : maxinteger - 9223372036854775807
      function : deg()
      function : modf()
      function : tointeger()
      function : ceil()
      function : fmod()
      function : cos()
      function : type()
      function : tan()
      function : sqrt()
      function : asin()
      function : sin()
      function : randomseed()
      function : atan()
      function : rad()
      number : huge - inf
      function : exp()
      function : max()
      function : floor()
      function : min()
      function : log()
    function : tostring()
    table : coroutine
      function : create()
      function : running()
      function : resume()
      function : isyieldable()
      function : yield()
      function : wrap()
      function : status()
    function : require()
    function : jsize()
    function : type()
    function : rawlen()
    function : init()
    function : next()
    function : rawequal()
    function : jobject()
    table : os
      function : clock()
      function : time()
      function : difftime()
    function : jresize()
    function : select()
    function : pcall()
    table : entity
      function : uniqueId()
      function : entityInSight()
      function : isValidTarget()
      function : position()
      function : id()
      function : entityType()
       function : damageTeam()
       function : distanceToEntity()
    
    function : pairs()
    
    


    which is somewhat different than

    Code:
    table : object
      function : getOutputNodePosition()
      function : name()
      function : spaces()
      function : say()
      function : getLightColor()
      function : level()
      function : setUniqueId()
      function : direction()
      function : isOutputNodeConnected()
      function : position()
      function : setHealth()
      function : setSoundEffectEnabled()
      function : setOfferedQuests()
      function : setAllOutputNodes()
      function : getInputNodeLevel()
      function : smash()
      function : sayPortrait()
      function : toAbsolutePosition()
      function : getOutputNodeLevel()
      function : isTouching()
      function : setOutputNodeLevel()
      function : setTurnInQuests()
      function : uniqueId()
      function : setProcessingDirectives()
      function : setAnimationParameter()
      function : isInputNodeConnected()
      function : setMaterialSpaces()
      function : health()
      function : setDamageSources()
      function : outputNodeCount()
      function : getInputNodePosition()
      function : setInteractive()
      function : getOutputNodeIds()
      function : setConfigParameter()
      function : getInputNodeIds()
      function : boundBox()
      function : setLightColor()
      function : inputNodeCount()
    function : type()
    table : root
      function : createBiome()
      function : generateName()
      function : nonEmptyRegion()
      function : itemTags()
      function : getConfigurationPath()
      function : hasTech()
      function : materialMiningSound()
      function : imageSpaces()
      function : makeCurrentVersionedJson()
      function : setConfigurationPath()
      function : questConfig()
      function : treeFoliageDirectory()
      function : itemConfig()
      function : treeStemDirectory()
      function : materialHealth()
      function : isTreasurePool()
      function : evalFunction()
      function : getConfiguration()
      function : techConfig()
      function : materialPath()
      function : getMatchingTenants()
      function : materialFootstepSound()
      function : setConfiguration()
      function : itemType()
      function : imageSize()
      function : evalFunction2()
      function : techType()
      function : tenantConfig()
      function : projectileConfig()
      function : liquidStatusEffects()
      function : createTreasure()
      function : itemHasTag()
      function : monsterSkillParameter()
      function : monsterPortrait()
      function : recipesForItem()
      function : assetJson()
      function : createItem()
      function : npcVariant()
      function : projectileGravityMultiplier()
      function : npcConfig()
      function : loadVersionedJson()
      function : behaviorModule()
      function : npcPortrait()
    table : math
      function : ceil()
      number : pi - 3.1415926535898
      function : type()
      function : ult()
      number : mininteger - -9223372036854775808
      function : acos()
      function : floor()
      number : maxinteger - 9223372036854775807
      function : random()
      function : sin()
      function : fmod()
      function : tan()
      function : log()
      function : sqrt()
      function : modf()
      function : deg()
      function : abs()
      function : atan()
      function : tointeger()
      number : huge - inf
      function : rad()
      function : min()
      function : exp()
      function : max()
      function : randomseed()
      function : cos()
      function : asin()
    table : self
      EMPTY TABLE
    function : jresize()
    function : tonumber()
    function : select()
    function : jobject()
    string : _VERSION - "Lua 5.3"
    function : ipairs()
    function : print()
    function : pcall()
    function : init()
    function : setmetatable()
    function : rawget()
    table : utf8
      SKIPPING UTF8 SINCE IT SEEMS TO HAVE NO END AND JUST BE FILLED WITH TABLES OF TABLES
    function : xpcall()
    function : require()
    table : script
      function : updateDt()
      function : setUpdateDelta()
    function : rawset()
    function : rawlen()
    function : tostring()
    table : world
      function : containerOpen()
      function : entityPosition()
      function : containerItemsCanFit()
      function : spawnMonster()
      function : containerClose()
      function : regionActive()
      function : forceDestroyLiquid()
      function : breakObject()
      function : distance()
      function : material()
      function : isTileProtected()
      function : entityPortrait()
      function : spawnItem()
      function : containerAvailable()
      function : containerTakeAt()
      function : players()
      function : entityQuery()
      function : magnitude()
      function : gravity()
      function : monsterType()
      function : itemType()
      function : isPlayerModified()
      function : threatLevel()
      function : entityVelocity()
      function : getProperty()
      function : npcLineQuery()
      function : entityLineQuery()
      function : containerAddItems()
      function : debugPoint()
      function : placeMod()
      function : polyCollision()
      function : entityDamageTeam()
      function : isNpc()
      function : rectCollision()
      function : loungeableQuery()
      function : setTileProtection()
      function : entityCanDamage()
      function : playerQuery()
      function : callScriptedEntity()
      function : flyingType()
      function : damageTiles()
      function : resolvePolyCollision()
      function : entityHasCountOfItem()
      function : takeItemDrop()
      function : tileIsOccupied()
      function : spawnNpc()
      function : containerTakeNumItemsAt()
      function : objectSpaces()
      function : pointCollision()
      function : lightLevel()
      function : objectAt()
      function : spawnTreasure()
      function : containerConsumeAt()
      function : entityHealth()
      function : damageTileArea()
      function : entitySpecies()
      function : entityName()
      function : containerItemAt()
      function : platformerPathStart()
      function : sendEntityMessage()
      function : pointTileCollision()
      function : itemDropQuery()
      function : containerConsume()
      function : dayLength()
      function : containerItemsFitWhere()
      function : containerSize()
      function : dungeonId()
      function : spawnStagehand()
      function : containerItems()
      function : timeOfDay()
      function : objectLineQuery()
      function : entityHandItem()
      function : day()
      function : debugLine()
      function : entityType()
      function : entityAggressive()
      function : containerTakeAll()
      function : entityExists()
      function : collisionBlocksAlongLine()
      function : setSkyTime()
      function : rectTileCollision()
      function : lineTileCollision()
      function : lineCollision()
      function : debugPoly()
      function : getObjectParameter()
      function : spawnVehicle()
      function : placeDungeon()
      function : universeFlags()
      function : placeObject()
      function : entityDescription()
      function : warpPhase()
      function : setUniverseFlag()
      function : skyTime()
      function : containerSwapItemsNoCombine()
      function : underground()
      function : containerStackItems()
      function : setUniqueId()
      function : mod()
      function : isVisibleToPlayer()
      function : loadRegion()
      function : findUniqueEntity()
      function : loungeableOccupied()
      function : time()
      function : nearestTo()
      function : setPlayerStart()
      function : monsterQuery()
      function : containerSwapItems()
      function : containerPutItemsAt()
      function : fidelity()
      function : findPlatformerPath()
      function : destroyLiquid()
      function : polyContains()
      function : spawnLiquid()
      function : xwrap()
      function : placeMaterial()
      function : entityGender()
      function : liquidAt()
      function : entityHandItemDescriptor()
      function : setProperty()
      function : npcType()
      function : windLevel()
      function : containerItemApply()
      function : spawnProjectile()
      function : npcQuery()
      function : farmableStage()
      function : objectQuery()
      function : loadUniqueEntity()
      function : breathable()
      function : stagehandType()
      function : entityMoney()
      function : entityUniqueId()
      function : isMonster()
      function : debugText()
    table : string
      function : upper()
      function : match()
      function : char()
      function : dump()
      function : reverse()
      function : unpack()
      function : packsize()
      function : byte()
      function : pack()
      function : sub()
      function : format()
      function : len()
      function : lower()
      function : gmatch()
      function : find()
      function : rep()
      function : gsub()
    function : getmetatable()
    table : os
      function : difftime()
      function : time()
      function : clock()
    table : table
      function : insert()
      function : sort()
      function : remove()
      function : move()
      function : concat()
      function : unpack()
      function : pack()
    function : jsize()
    table : storage
      EMPTY TABLE
    table : config
      function : getParameter()
    function : error()
    function : assert()
    table : animator
      function : setAnimationState()
      function : setSoundVolume()
      function : stopAllSounds()
      function : setSoundPool()
      function : setParticleEmitterOffsetRegion()
      function : scaleTransformationGroup()
      function : setEffectActive()
      function : rotateTransformationGroup()
      function : playSound()
      function : setParticleEmitterEmissionRate()
      function : setSoundPitch()
      function : translateTransformationGroup()
      function : setParticleEmitterActive()
      function : setAnimationRate()
      function : setLightPointAngle()
      function : resetTransformationGroup()
      function : transformTransformationGroup()
      function : hasSound()
      function : currentRotationAngle()
      function : setLightActive()
      function : burstParticleEmitter()
      function : partPoint()
      function : setPartTag()
      function : rotateGroup()
      function : setParticleEmitterBurstCount()
      function : setSoundPosition()
      function : partPoly()
      function : setGlobalTag()
      function : hasTransformationGroup()
      function : animationStateProperty()
      function : setLightPosition()
      function : setLightColor()
      function : setFlipped()
      function : animationState()
    function : jremove()
    table : sb
      function : makeRandomSource()
      function : setLogMap()
      function : logWarn()
      function : logInfo()
      function : replaceTags()
      function : print()
      function : jsonMerge()
      function : printJson()
      function : nrand()
      function : makePerlinSource()
      function : staticRandomDoubleRange()
      function : logError()
      function : interpolateSinEase()
      function : staticRandomI32Range()
      function : makeUuid()
      function : jsonQuery()
      function : staticRandomI32()
      function : staticRandomDouble()
    function : rawequal()
    table : message
      function : setHandler()
    table : entity
      function : id()
      function : entityInSight()
      function : distanceToEntity()
      function : entityType()
      function : position()
      function : damageTeam()
      function : uniqueId()
      function : isValidTarget()
    function : jarray()
    table : coroutine
      function : status()
      function : running()
      function : isyieldable()
      function : yield()
      function : resume()
      function : wrap()
      function : create()
    function : pairs()
    function : next()
    


    I don't deserve any credit because I just used a bit of code someone has posted previously (sorry I don't remember who) with minor changes to make it compatible and trimming away log timestamps etc. I figure this could be of use to some, and this would be a good place to drop it as any.
     
    Last edited: Jul 19, 2016
    C0bra5 and Inf_Wolf14 like this.
  20. Crystan

    Crystan Maverick Hunter

    I know that you can learn Techs through quests, thats how I did it before but I couldn't get the quest to work and its really annoying for testing/code upgrade purposes. I believe there are quite a few people who would love to have the option to learn a tech through an Item.

    I've tried to create a consumeable activeitem that unlocks a tech through lua but it doesn't seem to work because the script is unaware of the player variable (api doc pls) or maybe I'm doing something wrong and my code is total crap, haven't touched lua for quite some time. Actually, I didn't really understood how exactly the activeitem lua code works yet. ;) Anyone got a suggestion?


    Code:
    function init()
      self.techName = config.getParameter("techName")
    end
    
    function update(dt, fireMode, shiftHeld, moves)
      if fireMode == "primary" and self.previousFireMode ~= "primary" then
          player.makeTechAvailable(techName)
          player.enableTech(techName)
        end
    end
    
    Code:
    {
      "itemName" : "mmx_techBluePrint",
      "price" : 10,
      "inventoryIcon" : "mmx_techBluePrint.png",
      "rarity" : "Common",
      "maxStack" : 1000,
      "description" : "A tech blueprint",
      "shortdescription" : "Tech Blueprint",
      "category" : "Tool",
      "twoHanded" : false,
    
      "scripts" : ["unlockTech.lua"],
    
      "techName" : "aquasphere",
    
      "consumeOnUse" : true,
    }
    
     

Share This Page