Jump to content




[MC1.12+][Fork] CC: Tweaked


90 replies to this topic

#81 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 24 August 2020 - 02:15 PM

I pushed a release yesterday, but entirely forgot to write an update post about it. CC:T 1.91.0 isn't a big change, but there's a couple of minor improvements.
  • string.{pack,unpack,packsize} support. MCJack123 added support to Cobalt for the various string pack/unpacking functions from Lua 5.3. These behave similarly to Python's struct module, or PHP's pack/unpack - it allows you to easily pack binary data into strings, and unpack it again. Hopefully it'll make working with complex binary file formats (such as images, compressed files, etc...) a little easier.
  • Repeated string concatenation is now linear rather than quadratic. This won't have any major impact, just will mean code doing string concatenation within loops will run a little faster - in some pathological cases, textutils.serialize is 10x faster.
    I've done a little write up on how this works internally, if that's your sort of thing.
Many thanks to abby, MCJack123, neumond and R93950X for their PRs! Having other people help out makes things significantly easier.

#82 Purple

  • Members
  • 115 posts
  • LocationAlone in the dark, looking at the pretty lights with dreams of things I can not have.

Posted 25 October 2020 - 09:07 PM

I tried using a resource pack for code like you'd do in regular computercraft for this but they don't seem to work. As in the files just are not found by the turtle. So are there any instructions on how to do it for CCTweaked?

#83 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 26 October 2020 - 02:57 PM

View PostPurple, on 25 October 2020 - 09:07 PM, said:

I tried using a resource pack for code like you'd do in regular computercraft for this but they don't seem to work. As in the files just are not found by the turtle. So are there any instructions on how to do it for CCTweaked?

What version of the game are you on? Resource packs changed into data packs at some point so depending on MC version you might need a data pack instead, The folder structure is the same for CC/CC:T but you have to put it in the data pack format and location.

#84 Purple

  • Members
  • 115 posts
  • LocationAlone in the dark, looking at the pretty lights with dreams of things I can not have.

Posted 27 October 2020 - 11:52 AM

I just moved from 12 to 14.4 14.4 But all my other resource packs work just fine. I mean, as far as I can tell the only difference is that you need to change "pack_format": 3 to "pack_format": 4 in the config. Am I missing something? The path is still: data\computercraft\lua\rom right?

Edited by Purple, 27 October 2020 - 11:54 AM.


#85 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 27 October 2020 - 01:56 PM

View PostPurple, on 27 October 2020 - 11:52 AM, said:

I just moved from 12 to 14.4 14.4 But all my other resource packs work just fine. I mean, as far as I can tell the only difference is that you need to change "pack_format": 3 to "pack_format": 4 in the config. Am I missing something? The path is still: data\computercraft\lua\rom right?
There's a couple of changes:
  • The directory needs to be "data" instead of "assets" (looks like you've picked this up already)
  • Pack format version as you mention
  • It needs to be installed in the world's datapack folder, rather than the resource packs one.

There's an example pack at https://github.com/S...atapack-example, which might be worth consulting.

Edited by SquidDev, 27 October 2020 - 01:57 PM.


#86 Purple

  • Members
  • 115 posts
  • LocationAlone in the dark, looking at the pretty lights with dreams of things I can not have.

Posted 29 October 2020 - 02:40 PM

So it no longer works for all worlds but I have to install into each world individually? Wow, that sucks. Well thanks for the help. At least I can get it to work at all.

#87 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 29 October 2020 - 03:32 PM

View PostPurple, on 29 October 2020 - 02:40 PM, said:

So it no longer works for all worlds but I have to install into each world individually? Wow, that sucks. Well thanks for the help. At least I can get it to work at all.

This mod might be a workaround: https://www.cursefor...global-datapack

Edited by Lupus590, 29 October 2020 - 03:32 PM.


#88 Purple

  • Members
  • 115 posts
  • LocationAlone in the dark, looking at the pretty lights with dreams of things I can not have.

Posted 31 October 2020 - 09:49 AM

Thanks. That helps.

Another random question. I just updated to the newest CCTweaked for 1.14 and I notice that every time I open a computer a hint of sorts pops up. Now at first these were helpful but they take up half the screen at times and thus they unfortunately got annoying really quickly. Is there a way to kill those? Or better yet toggle them so that I can turn them on occasionally (since I do keep running into new stuff) but not keep them on all the time when I just want to do quick work?

I just got a helpful hint from the hint system on how to do it. :)

Edited by Purple, 31 October 2020 - 10:37 AM.


#89 Purple

  • Members
  • 115 posts
  • LocationAlone in the dark, looking at the pretty lights with dreams of things I can not have.

Posted 31 October 2020 - 11:21 AM

still debuging.

Edited by Purple, 31 October 2020 - 11:29 AM.


#90 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 01 November 2020 - 11:51 AM

View PostPurple, on 31 October 2020 - 09:49 AM, said:

I just got a helpful hint from the hint system on how to do it. :)

See, they are useful!

#91 Purple

  • Members
  • 115 posts
  • LocationAlone in the dark, looking at the pretty lights with dreams of things I can not have.

Posted 16 April 2021 - 09:57 AM

One note to everyone reading this in the future. Using CCTweaked and a datapack you no longer have to use OS.LoadAPI. It works automatically. Yes, the example content pack has an useful example code file that shows just this. But if you are stupid like me and don't look at that file now you know.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users