Modding Help Trying to salvage a crew mod (help with LUA)

Discussion in 'Starbound Modding' started by BeazelWeasel, Sep 13, 2016.

  1. LordBaconator

    LordBaconator Scruffy Nerf-Herder

    Just be glad you're not trying to test changes being made to the absolute most confusing, frustrating, and laggy portion of the entire game. The behavior engine is the reason why all NPCs (including monsters) in the game appear to hitch and lag so often. It's HORRIFYING.
     
  2. BeazelWeasel

    BeazelWeasel Scruffy Nerf-Herder

    Is it not well optimized? I assumed it happened was because of how much of the game is coded in what appears to be CPU-centric fashion and so it was my 5 year old Phenom II X6 not being able to get up to speed.
    I have a friend with a PC that's similar to mine, and he has a kickass high-end i7 that he managed to buy with a college grant, heh, I just forgot which one was it. His game never goes below 60 fps. Mine? Weather generally kills framerate. Rain + Avian airship is a combination that drags me down to the 20's and lower.

    Anyway, at this rate, I feel like I could be making progress on my own.
    I managed to make crews alive + interactible after uninstalling, but I'm not confident enough, cause I don't know WHAT I did, because now when it IS installed, I can't interact with crew members at all.
    Gonna change a few more things and maybe even keep the mod useable! And probably break it again in the process, over and over.
     
  3. LordBaconator

    LordBaconator Scruffy Nerf-Herder

    The reason it hitches so much is because it uses a Lua technology called coroutines. Basically coroutines make it so that only one coroutine can be run at a given time in the entire application and they all get daisy chained together. This means that if a single NPC hitches for even a few extra milliseconds on a pathing check then the entire chain gets exponentially slower until it crawls to an unrecoverable stop.

    They would have to rewrite the entire thing to not use coroutines to fix it...and when you write something to use coroutines you explicitly design it around the fact that you're using them.

    My game never goes below 60FPS unless there are a lot of particles on screen. The behavior scripting system actually has no effect on FPS at all. It only affects the internal "server fps" (internal update rate). I have an i7 4770k quad core clocked at 3.5GHz and 10 NPCs is enough to bugger the entire AI system.
     
  4. BeazelWeasel

    BeazelWeasel Scruffy Nerf-Herder

    That sounds pretty terrifying. What can be done in order to avoid or minimize the hitching? During gameplay, or, hell, coding too!

    And back on topic, I think I'm almost cracking it, but it's almost at the crack of dawn where I live. I might need to stop for tonight. Or today.
    Crews still alive & well without, later gonna do test with other mods to see if they conflict and if anything new comes up.
    With it installed, it works perfectly... for one go. I can customize any crew member's outfit exactly once. Asking the tailor ( by himself or with a companion ) to return to the default uniform makes the tailor completely halt all interaction until the game is reloaded ( go to menu and back into the game, not a game restart ).
     
  5. CatofRiddles

    CatofRiddles Subatomic Cosmonaut

    Sorry if i'm replying to too old of a thread, And i'm relatively new to modding, but would making your own "invisible helmet" and using it to replace the "fancaphead" value work? or are you attempting to remove the head option completely?
     

Share This Page