Modding Discussion Glad Giraffe Mod Update To Do List

Discussion in 'Starbound Modding' started by C0bra5, Nov 29, 2015.

  1. C0bra5

    C0bra5 Oxygen Tank

    With the unstable update Being here, i thought it would be a good idea to round up all the things that has changed since the last stable build.

    THE CHANGES
    • Unconfirmed
      • The liquids may change from liquid id to actual names for when you reference them in the files.
        originating Post
    • Confirmed
      • The audio files are now .ogg so convert your audio files and update the path in your files to have the .ogg extention instead of .wav.
      • The monster behaviours definitions have been moved from the lua scripts to actual json based files. the .monsterskill files have been adjusted to work with the new system and does not support the old lua scripts. most of the old behaviour scripts have been either removed or moved elsewhere.
        originating Post

    I went a head and printed the all the available lua functions, some may be missing since i was printing from a tech, but there should be a good list. i will highlight the new or changed functions, you can search through it if to see if a function you where using is still in there.

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



    as stated before the unconfirmed changes are unconfirmed and you should ignore them if you don't want to risk your indev version of your mods to break because of a problem that should not exist.
     
    Last edited: Dec 14, 2015
  2. dasmole

    dasmole Title Not Found

    Monsters have moved to a new JSON based system to define their behavior, instead of the old system which really defined everything via lua scripts. Most of the old lua scripts that they were using have been either moved to a new path, or removed altogether.

    Additionally, the ".monsterskill" files have been adjusted to work with this new system, and no longer work with the old lua scripts.

    That said, if you grab the old scripts and monsterskills from current stable, and move them inside your mod, they still seem to work.

    Long story short, if you have any custom monsters in your mods, and they rely on vanilla assets in any way, you'll want to do some testing that they still work in unstable.
     
  3. C0bra5

    C0bra5 Oxygen Tank

    thank's i'm going to add this add this to the list.
    Edit: add to the list completed.
     
    Last edited: Nov 29, 2015
  4. Mackinz

    Mackinz The Waste of Time

    Liquids have been moved from liquid.config to their own json file types under /liquids/.

    An example vanilla liquid file:

    Code:
    {
      "name" : "water",
      "liquidId" : 1,
      "description" : "Plain old water.",
      "tickDelta" : 1,
      "color" : [80, 221, 254, 128],
      "itemDrop" : "liquidwater",
      "statusEffects" : [ "swimming" ],
    
      "interactions" : [
        {
          "liquid" : 3,
          "liquidResult" : 3
        },
        {
          "liquid" : 8,
          "liquidResult" : 0
        },
        {
          "liquid": 12,
          "liquidResult" : 12
        } ,
        {
          "liquid": 6,
          "liquidResult" : 6
        }
      ],
    
      "texture" : "/liquids/watertex.png",
      "bottomLightMix" : [0, 78, 255],
      "textureMovementFactor" : 2.6
    }
    
    Old excerpt from liquids.config (Pleased Giraffe):

    Code:
    "liquids" : {
        "1" : {
          "name" : "water",
          "description" : "Plain old water.",
          "tickDelta" : 1,
          "color" : [80, 221, 254, 128],
          "itemDrop" : "liquidwater",
          "statusEffects" : [ "swimming" ],
    
          "interactions" : [
            {
              "liquid" : 3,
              "liquidResult" : 3
            },
            {
              "liquid" : 8,
              "liquidResult" : 0
            },
            {
              "liquid": 12,
              "liquidResult" : 12
            } ,
            {
              "liquid": 6,
              "liquidResult" : 6
            }
          ],
    
          "texture" : "/liquids/watertex.png",
          "bottomLightMix" : [0, 78, 255],
          "textureMovementFactor" : 2.6
        },
    
     
  5. C0bra5

    C0bra5 Oxygen Tank

    thank's i added it to the list!
     
  6. Errors4l

    Errors4l Spaceman Spiff

    Small JSON name change in object files:
    • The colony tag in object files now reads "colonyTags" rather than "tags".
    Code:
    "tags" : ["apex","apexresearchlab","light"]
    "colonyTags" : ["apex","apexresearchlab","light"]
     
  7. C0bra5

    C0bra5 Oxygen Tank

    thank you I've add this to the list!
     
  8. Crystan

    Crystan Maverick Hunter

    Anyone got some info about the lua api updates?

    I'm currently updating my MMX mod and I don't have a clue what changed and since they removed the mech techs I can't use them as reference.
    For example local nudge = tech.transformedPosition({0, 0}) doesn't work anymore. I've looked into the morphball tech but appearently local nudge = mcontroller.setPosition({0, 0}) doesnt work.

    The new update seems to cause a lot of work to port mods to the new version - atleast for the mods with a lot of content. However, i doubt they've removed the wav support - because that would be really stupid.
     
  9. C0bra5

    C0bra5 Oxygen Tank

    you can print every functions (or almost) by using this thing in a tech script:

    Code:
    function init()
        printTable(0,_ENV);
    end
    
    --prints table
    function printTable(indent, value)
        local tabs = "";
        for i=1,indent,1 do
            tabs = tabs.."    ";
        end
        table.sort(value)
        for k,v in pairs(value) do
            world.logInfo(tabs..getValueOutput(k,v));
            if type(v) == "table" then
                if tostring(k) == "utf8" then
                    world.logInfo("    "..tabs.."SKIPPING UTF8 SINCE IT SEEMS TO HAVE NO END AND JUST BE FILLED WITH TABLES OF TABLES")
                else
                    if tableLen(v) == 0 then
                        world.logInfo("    "..tabs.."EMPTY TABLE")
                    else
                        printTable(indent+1,v);
                     
                    end
                end
                world.logInfo(" ");
            end
        end
     
    end
    
    function tableLen(T)
      local count = 0
      for _ in pairs(T) do count = count + 1 end
      return count
    end
    
    --Required for printTable
    function getValueOutput(key ,value)
        if type(value) == "table" then
            return "table : "..key;
        elseif type(value) == "function" then
            return "function : "..key.."()"
        elseif type(value) == "string" then
            return "string : "..key.." - \""..tostring(value).."\"";
        else
            return type(value).." : "..key.." - "..tostring(value);
        end
    end
    i haven't looked at the lua api yet but i think mcontroller.setPosition(x,y) to change the position, that would be the logical update.
     
  10. lazarus78

    lazarus78 The Waste of Time

    New update is bad new for the heavy modders. SOO much to update. It wil actually be slightly easier to just remake half my stuff.
     
  11. Mackinz

    Mackinz The Waste of Time

    It depends on what you are modding. I made the Matter Manipulator use energy to mine in Stable, and that works in Unstable according to my test.
     
  12. lazarus78

    lazarus78 The Waste of Time

    That's why I said heavy modding. I need to update all my objects, convert my weapons, and just make sure everything else isn't borked... like the damn dash tech going snail speed in air despite my changes...
     
  13. C0bra5

    C0bra5 Oxygen Tank

    can you expand on the basics of the basics of updating weapons to the new system? i would really need some help to explain how to update this thing.
     
  14. lazarus78

    lazarus78 The Waste of Time

    Ill let you know once I understand it. :rofl: Ive only converted one weapon, and only kinda sorta happy with it. Also doesnt help that there are no decent examples. Most are for the random generation bit.

    One thing I can note is that the json files for alt abilities MUST MUST MUST be in "...\items\active\weapons\ranged\altabilities". The game was fine with basically any folder at first, but now it throws a fit if it isn't in there.

    This is a general setup I kinda put together for my weapon:
    Code:
    {
        "itemName" : "LFCSniper06",
        "price" : 1000,
        "inventoryIcon" : "LFCSniper06.png",
        "maxStack" : 1,
        "rarity" : "rare",
        "description" : "Electromagnetic Rail Cannon",
        "shortdescription" : "EMRC - Widower",
        "level" : 6,
        "tooltipKind" : "gun",
        "weaponType" : "Sniper Class",
        "itemTags" : ["weapon","ranged","sniperrifle"],
        "twoHanded" : true,
     
        "animation" : "/items/active/weapons/ranged/gun.animation",
        "animationParts" : {
            "butt" : "",
            "middle" : "LFCSniper06.png",
            "barrel" : "",
            "muzzleFlash" : "/items/active/weapons/ranged/muzzleflash.png"
        },
        "animationCustom" : {
            "sounds" : {
                "fire" : [ "/sfx/gun/plasma_sniper3.ogg" ]
            }
        },
     
        "baseOffset" : [2.1, 0.5],
        "muzzleOffset" : [5, 0],
     
        "scripts" : ["/items/active/weapons/ranged/gun.lua"],
    
        "elementalType" : "physical",
    
        "primaryAttack" : {
            "fireTime" : 1.5,
            "baseDps" : 6.5,
            "energyUsage" : 20.0,
            "inaccuracy" : 0.0,
    
            "projectileCount" : 1,
            "fireType" : "auto",
    
            "projectileType" : "LazPlasma03",
            "projectileParameters" : {
                "knockback" : 40
            }
        },
     
        "stances" : {
            "idle" : {
                "armRotation" : 0,
                "weaponRotation" : 0,
                "twoHanded" : true,
    
                "allowRotate" : true,
                "allowFlip" : true
            },
            "fire" : {
                "duration" : 0,
                "armRotation" : 2,
                "weaponRotation" : 2,
                "twoHanded" : true,
    
                "allowRotate" : false,
                "allowFlip" : false
            },
            "cooldown" : {
                "duration" : 0.1,
                "armRotation" : 2,
                "weaponRotation" : 2,
                "twoHanded" : true,
    
                "allowRotate" : false,
                "allowFlip" : false
            }
        },
    
        "altAbilitySource" : "/items/active/weapons/ranged/altabilities/LFCPiercingShot.altability",
    
        "builder" : "/items/buildscripts/buildunrandweapon.lua"
    }
    
    
    And the alt ability file basically acts as an alternate version of everything from "animation" to "altAbilitySource" where you define whatever alternate projectile and paramaters you want for it, so I could make a sniper with a guided rocket alt if I wanted...

    Also, the image and muzzle offsets are a bit more... meh. A value of "1" translates to 8 pixels on your weapon. Im not sure what is up with the mizzleflash as it doesnt pull from the old effects it appears.

    Sorry if I am just confusing you more. Im not the greatest at explaining things.[DOUBLEPOST=1448913208][/DOUBLEPOST]Oooh, I also wanted to mention that all armors have had their values changes a little. Basically all armors have had their energy bonuses reduced by 75%, so if you have armors that you want to keep in line with the game, then that would be a needed adjustment.

    [​IMG]
     
    Last edited: Nov 30, 2015
    Soundash likes this.
  15. C0bra5

    C0bra5 Oxygen Tank

    Great findings, i'm gonna update this tommorow, sleep is finally playing catch up with me and turns out that 72hours of almost continuous work isn't exactly good for my body. Soo i'm gonna go safely pass out or fall asleep, which ever comes first, and do the addings to the main post tomorrow.
     
  16. The | Suit

    The | Suit Agent S. Forum Moderator

    One unconfirmed change - but Meta told me was a work in progress a while ago. Is being able to name a liquid instead of having to rely on its liquid ID profile. Which would make working with modded liquids fundamentally much easier.

    Though the change has yet to be seen in the user builds.
     
  17. lazarus78

    lazarus78 The Waste of Time

  18. C0bra5

    C0bra5 Oxygen Tank

    added both the basic expansion of the new weapon system you wrote and the armor with the chart to the confirmed list

    added to the unconfirmed list[DOUBLEPOST=1449003967][/DOUBLEPOST]i just added a good part of the current unstable api just in case some people want to see if a function still exists
     
    Last edited: Dec 1, 2015
  19. Monijir

    Monijir Scruffy Nerf-Herder

    Maps have changed. There's a folder holding tile sets now. The .json maps reference these tile sets rather than embedding all of them in every map then purging their properties (Those old files were weeeeird). I suspect backwards compatibility with the old maps is broken, but I won't bother testing it unless y'all think it's worth noting.
     
  20. C0bra5

    C0bra5 Oxygen Tank

    what do you mean by maps? dungerons? they don't seem to have changed
     

Share This Page