Jump to content

Trying to apply adjusted animations in "wx Robot enhancement" 2801144962 mod


Recommended Posts

Hello everyone, newbie here :-D

Original problem

What I have done:

  1.  Got fresh status_wx.zip from C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim
  2. Decompiled using
    Quote

    krane.exe anim.bin build.bin exported

  3. Changed animations using Spriter (seems ok, but it was a first time I've used this app ... so mb problem there idk)
  4. Renamed project to status_wx_madzohan.scml
    1. used this name to UIAnim objects (like :SetBank("status_wx_madzohan") or :SetBuild("status_wx_madzohan")) in 
      AddClassPostConstruct("widgets/upgrademodulesdisplay", function(self, ...)
          self.battery_frame = self:AddChild(UIAnim())
          self.battery_frame:GetAnimState():SetBank("status_wx_madzohan")
          self.battery_frame:GetAnimState():SetBuild("status_wx_madzohan")
          self.battery_frame:GetAnimState():PlayAnimation("frame")
          self.battery_frame:GetAnimState():AnimateWhilePaused(false)
      
          self.energy_backing = self:AddChild(UIAnim())
          self.energy_backing:GetAnimState():SetBank("status_wx_madzohan")
          self.energy_backing:GetAnimState():SetBuild("status_wx_madzohan")
          self.energy_backing:GetAnimState():PlayAnimation("energy3")
          self.energy_backing:GetAnimState():AnimateWhilePaused(false)
      
          self.energy_blinking = self:AddChild(UIAnim())
          self.energy_blinking:GetAnimState():SetBank("status_wx_madzohan")
          self.energy_blinking:GetAnimState():SetBuild("status_wx_madzohan")
          self.energy_blinking:GetAnimState():PlayAnimation("energy2")
          self.energy_blinking:GetAnimState():AnimateWhilePaused(false)
          
          self.anim = self:AddChild(UIAnim())
          self.anim:GetAnimState():SetBank("status_wx_madzohan")
          self.anim:GetAnimState():SetBuild("status_wx_madzohan")
          self.anim:GetAnimState():PlayAnimation("energy1")
          self.anim:GetAnimState():AnimateWhilePaused(false)
      
          self.chip_objectpool = {}
          for _ = 1, 20 do
              local chip_object = self:AddChild(UIAnim())
              chip_object:GetAnimState():SetBank("status_wx_madzohan")
              chip_object:GetAnimState():SetBuild("status_wx_madzohan")
              chip_object:GetAnimState():AnimateWhilePaused(false)
      
              chip_object:GetAnimState():Hide("plug_on")
              chip_object._power_hidden = true
      
              chip_object:MoveToBack()
              chip_object:Hide()
      
              table.insert(self.chip_objectpool, chip_object)
          end
          self.chip_poolindex = 1
      
      end)

       

  5. Run DST so autocompiler got it from exported and zipped to anim folder
  6. enabled mod in server's mods section & started brand new localhost game
  7. wx chosen; battery frame appeared but seems like broken: only six default slots in static full "energy1" state without any animations ...

Heeeeelp :) I've uploaded whole mod with exported and anim folders ... Thanks in advance!


UPD

Ok seems the main problem in step 3 ... deleted Spriter :encouragement:, opened in text editor and compared with original found differences ... trying to adapt changes ...

wx_20_slots.zip

Edited by madzohan
upd
Link to comment
Share on other sites

Rebuild `status_wx.zip` guide (No GUI = no Spriter, only text editor = only hardcore!)

1) Copy modded `status_wx.zip` from https://steamcommunity.com/sharedfiles/filedetails/?id=2795674138 or original from `C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\anim`
2) Donwload https://github.com/ZzzzzzzSkyward/DSTmodutils as zip file, you will need two folders:
2.1) https://github.com/ZzzzzzzSkyward/DSTmodutils/tree/master/AnimBuilder
2.2) https://github.com/ZzzzzzzSkyward/DSTmodutils/tree/master/ktools

3) Open Powershell in unziped `status_wx` folder

3.1) `."C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\buildtools\windows\Python27\python2.exe" "PATH_TO_AnimBuilder\deanim.py" .\anim.bin`
3.1.1) in result you will have `anim.bin.xml` , rename it to `anim.xml`

3.2) `\ktools-4.4.4\krane.exe anim.bin build.bin exported`
3.2.1) in result inside `exported` you will have folders with png images (keep them) and with `status_wx.scml` (remove it)

3.3) `."C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\buildtools\windows\Python27\python2.exe" "PATH_TO_AnimBuilder\debuild.py" .\build.bin`
3.3.1) in result you will have `build.bin.xml` , rename it to `build.xml`
3.3.2) open it with text editor 
3.3.2.1) `<Build name="status_wx.scml">` replace with `<Build name="status_wx">`
3.3.2.1) Insert folders path (from 3.2.1) to all `image` props ... for example: `image="movespeed_chip-0"` change to `image="movespeed_chip/movespeed_chip-0"`

4) Move in `some_new_dir`: `build.xml`(from 3.3), `bee_chip ... taser_chip` (folders from 3.2)
4.1) create zip archive from `some_new_dir` -> `some_new_dir.zip`

5) `."C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\buildtools\windows\Python27\python.exe" "C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\tools\scripts\buildanimation.py" some_new_dir.zip`
5.1) in result you will have `.\data\anim\some_new_dir.zip`

6) open `build.xml` in your text editor and adjust `frame`s `y` prop (frame doesn't scales vertically so you have to redraw `frame-0.png` ... GIMP? Photoshop? etc.):
```
<Frame duration="1" framenum="0" h="361.0" image="frame/frame-0" w="342.0" x="110.351776123" y=""/>
```
6.1) `."PATH_TO_AnimBuilder\enanim.py .\anim.xml`
6.2) open `anim.xml` in your text editor and prepend your frames due to number of desired slots (their `m_ty` position shift)
6.3) in result you will have `anim.bin`, insert it to `some_new_dir.zip`

7) rename `some_new_dir.zip` to `status_wx.zip`, replace `status_wx.zip` in your mod's anim folder

Profit!

Edited by madzohan
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...