Jump to content




[MC1.12][Fork] CC: Tweaked


35 replies to this topic

#1 SquidDev

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

Posted 15 November 2017 - 06:20 PM

Posted Image

What?
CC: Tweaked is a fork of ComputerCraft which aims to provide earlier access to experimental and in-development features of the mod.

I'm not aiming to create a competing fork of ComputerCraft, nor am I planning to take it in in a vastly different direction to the original mod. In fact, CC: Tweaked aims to be a nurturing ground for various features, with a pull request against the original mod being the end goal.

CC: Tweaked also includes many pull requests from the community which have not yet been merged, offering a large number of additional bug fixes and features over the original mod.

Features
CC: Tweaked contains the all features of the latest alpha, as well as numerous bug fixes, performance improvements and several additional features. Whilst a full changelog can be found on the GitHub release page, here's a couple of exciting features:
  • Replace LuaJ with Cobalt.
  • Allow running multiple computers at the same time.
  • Websocket support in the HTTP library.
  • Wired modems and cables act more like multiparts.
  • Adds the /computercraft command, offering various diagnostic tools for server owners. This allows operators to track which computers are hogging resources, turn on and shutdown multiple computers at once and interact with computers remotely.
  • Add full-block wired modems, allowing one to wrap non-solid peripherals (such as chests).
  • [1.80pr1] Add binary mode to HTTP.
  • [1.80pr1] Dyable pocket computers and turtles.
  • [1.80pr1] Allow computer and monitors to configure their palette. Also allow normal computer/monitors to use any colour, converting it to greyscale.
  • [1.80pr1] Add require to the shell environment.
Download
CC: Tweaked can be downloaded from CurseForge. The source can be found on GitHub.

Contributing
Any contribution is welcome, be that using the mod, reporting bugs or contributing code.

If you find a bug, report it on the CC: Tweaked issue tracker and not the ComputerCraft one. Whilst there's a chance the bug may apply to both versions, I would like to confirm that before copying it across.

If you wish to contribute code, do consider submitting it to the ComputerCraft repository instead: after all, that is the primary place for ComputerCraft development.

Edited by SquidDev, 21 February 2018 - 03:53 PM.


#2 KingofGamesYami

  • Members
  • 2,978 posts
  • LocationUnited States of America

Posted 15 November 2017 - 10:43 PM

*Notices my PR was included* Woo!
Overall, this looks pretty nice. It's not actually a fork of the main repository on github, probably because github doesn't allow you to merge PRs that way? I'm not sure, but I really hope these changes make it into the main mod soon.

Edited by KingofGamesYami, 15 November 2017 - 10:43 PM.


#3 SquidDev

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

Posted 15 November 2017 - 10:57 PM

View PostKingofGamesYami, on 15 November 2017 - 10:43 PM, said:

*Notices my PR was included* Woo!
Of course! I'm looking forward to (ab)using it.

View PostKingofGamesYami, on 15 November 2017 - 10:43 PM, said:

It's not actually a fork of the main repository on github, probably because github doesn't allow you to merge PRs that way?
I wanted to, but GitHub doesn't allow you to have multiple forks of the same project. Given that I needed to keep my "normal fork" of ComputerCraft around in order to PR changes, this was the only option. On the bright side, it does make the repo a little easier to search - GitHub reduces the functionality of forked repos somewhat.

Edited by SquidDev, 15 November 2017 - 10:58 PM.


#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,027 posts
  • LocationTasmania (AU)

Posted 19 November 2017 - 06:28 AM

Played around for a bit this afternoon and couldn't find any broken functionality other than in mon.getTextScale(), which always returns 1... which I assume is a problem within the implementation here?

#5 SquidDev

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

Posted 19 November 2017 - 01:59 PM

View PostBomb Bloke, on 19 November 2017 - 06:28 AM, said:

Played around for a bit this afternoon and couldn't find any broken functionality other than in mon.getTextScale(), which always returns 1... which I assume is a problem within the implementation here?
Good catch! I didn't test that PR as I thought it would be simple enough, but sadly CC is never as simple as that. I've submitted a fix for that, so it should show up in the next release. Thanks!

I've noticed some issues with computers not appearing to be on when they definitely are, so it'd be much appreciated if you could keep an eye out to confirm/deny that. I'm not entirely sure if this is a 1.12 issue or something which broke in one of my PRs.

Edited by SquidDev, 19 November 2017 - 02:00 PM.


#6 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,027 posts
  • LocationTasmania (AU)

Posted 19 November 2017 - 02:23 PM

View PostSquidDev, on 19 November 2017 - 01:59 PM, said:

I've noticed some issues with computers not appearing to be on when they definitely are, so it'd be much appreciated if you could keep an eye out to confirm/deny that. I'm not entirely sure if this is a 1.12 issue or something which broke in one of my PRs.

Come to think of it, I did notice that behaviour, and hadn't before (despite having used vanilla CC a fair bit under 1.12) - assumed it was something to do with my code causing a shutdown, but taking a closer look, the affected system is running correctly.

It appears the frontal texture isn't updated until term.setCursorBlink() is called (so a startup script with "while true do os.pullEvent() end" should be enough to reproduce it, assuming you're cold-booting your systems).

Edited by Bomb Bloke, 19 November 2017 - 02:25 PM.


#7 SquidDev

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

Posted 19 November 2017 - 03:17 PM

View PostBomb Bloke, on 19 November 2017 - 02:23 PM, said:

It appears the frontal texture isn't updated until term.setCursorBlink() is called (so a startup script with "while true do os.pullEvent() end" should be enough to reproduce it, assuming you're cold-booting your systems).
Weirdly enough, terminal blinking marked a computer as changed but it turning on/shutting down didn't. Normally this didn't matter as the terminal would clear and so the state would be transmitted. However, I've changed that behaviour so this caused issues. Anyway, it's all fixed now and should be in the next release.

Thanks for this testing and sorry for the bugs. Though I guess it's better if it surfaces now than in appearing in "actual" ComputerCraft :).

Edited by SquidDev, 19 November 2017 - 03:18 PM.


#8 SquidDev

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

Posted 01 December 2017 - 08:02 PM

I've finally got round to pushing a new update to CC: Tweaked. This is mostly composed of bug fixes, though there are several new features:
  • Fix term.getTextScale() not working across multiple monitors.
  • Fix computer state not being synced to client when turning on/off.
  • Provide an API for registering custom APIs.
  • Render turtles called "Dinnerbone" or "Grumm" upside-down.
  • Fix getCollisionBoundingBox not using all AABBs.
  • Experimental: Add map-like rendering for pocket computers.
I'd really appreciate people's thoughts on the map-like rendering. Whilst it's an improvement over CCTweaks's implementation, it's far from ideal. Have a look at the PR for more information

Edited by SquidDev, 01 December 2017 - 08:40 PM.


#9 DannySMc

  • Members
  • 1,804 posts
  • Location/home/dannysmc95

Posted 06 December 2017 - 01:15 AM

Hey Squid,

Any documentation on how the websocket addition to HTTP works?

Thanks,

#10 SquidDev

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

Posted 07 December 2017 - 04:12 PM

View PostDannySMc, on 06 December 2017 - 01:15 AM, said:

Any documentation on how the websocket addition to HTTP works?
I've slowly begun putting together documentation on the GitHub wiki. Not everything is there, but most of the major changes are.

In other news, I've pushed a new release to CurseForge. It hasn't shown up yet (it's been in review for ~7 hours now), but do grab it once available.

Changelog
  • Add /computercraft command, providing various diagnostic tools.
  • Make http.websocket synchronous and add http.websocketAsync.
  • Restore binary compatibility for ILuaAPI. This fixes crashes under 1.80pr1.2 with Plethora.


#11 SquidDev

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

Posted 21 February 2018 - 03:57 PM

I've just pushed another update to CC: Tweaked. This adds several useful new features, as well as making the mod even more stable. I've been working closely with SwitchCraft and Project</Beta> to iron out numerous CC issues. Using these fixes, SwitchCraft went from crashing every few hours to being relatively stable.

Changes from the last ComputerCraft alpha
  • Verify the action can be completed in copy, rename and mkdir commands.
  • Add /rom/modules so the package path.
  • Add read to normal file handles - allowing reading a given number of characters.
  • Various minor bug fixes.
Changes from the last CC:Tweaked release
  • Ensure ComputerCraft peripherals are thread-safe. This fixes multiple Lua errors and crashes with modems monitors.
  • Add /computercraft track command, for monitoring how long computers execute for.
  • Add ore dictionary support for recipes.
  • Track which player owns a turtle. This allows turtles to play nicely with various claim/grief prevention systems.
  • Add config option to disable various turtle actions.
  • Add an API for extending wired networks.
  • Add full-block wired modems.
  • Several minor bug fixes.
Like always, the release can be found on CurseForge.

Edited by SquidDev, 21 February 2018 - 05:52 PM.


#12 SquidDev

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

Posted 15 March 2018 - 05:38 PM

I've just pushed another release of CC:Tweaked to CurseForge. There's no major changes here: it's mostly composed of fixes for various monitor bugs (some introduced in 1.80pr1.4, some which have been around for a long time). Many thanks to Lignum for their fixes for some of the graphical issues.

Changes from the last CC:Tweaked release
  • Several additional fixes to monitors, solving several crashes and graphical glitches.
  • Add recipes to upgrade computers, turtles and pocket computers.

Edited by SquidDev, 15 March 2018 - 05:39 PM.


#13 soulfighterX

  • Members
  • 4 posts

Posted 18 March 2018 - 09:29 PM

Noob question, but is this supposed to be a replacement for the ComputerCraft mod, or a dependent thereof? And if so, are all mods that are made for the nightly builds of ComputerCraft 1.80pr also compatible with this?

#14 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,027 posts
  • LocationTasmania (AU)

Posted 19 March 2018 - 01:23 AM

It's a fork - an alternate version based on the original code, not an addon that runs alongside the original version.

Other mods which are compatible with the mainline version of ComputerCraft may or may not be compatible with this version (but you should expect most, if not all, of them to work). Same deal with scripts, although any of those that work in CC but not CC:T would warrant a bug report to SquidDev.

At this point in time, I believe most users would be better off running CC:T.

Edited by Bomb Bloke, 19 March 2018 - 01:25 AM.


#15 SquidDev

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

Posted 19 March 2018 - 08:16 AM

View PostsoulfighterX, on 18 March 2018 - 09:29 PM, said:

And if so, are all mods that are made for the nightly builds of ComputerCraft 1.80pr also compatible with this?
To add to what BombBloke said, I'm not aware of any mods which aren't: SwitchCraft has been running CC:T with running Plethora, Computronics and OpenComputers and not seen any integration issues so far. I'm very careful to maintain backwards compatibility, so unless a mod is doing something seriously wacky it should work.

#16 SquidDev

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

Posted 15 May 2018 - 05:18 PM

I've just pushed another release to CC:Tweaked. There's nothing exactly groundbreaking, but there's definitely a couple of useful bugfixes and features:

Changes from the last CC:Tweaked release
  • Allow network cables to work with compact machines. They do not currently visually connect, but are still usable.
  • A large number of improvements to the /computercraft command, including:
    • Ensure the tables are correctly aligned
    • Remove the output of the previous invocation of that command when posting to chat.
    • /computercraft track is now per-user, instead of global.
    • We now track additional fields, such as the number of peripheral calls, http requests, etc... You can specify these as an optional argument to /computercraft track dump to see them.
  • wget automatically determines the filename (Luca0208)
  • Allow using alternative HTTP request methods (DELETE, PUT, etc...)
  • Enable Gzip compression for websockets.
  • Fix monitors not rendering when optifine shaders are enabled. There are still issues (they are tinted orange during the night), but it is an improvement.
Minor changes/fixes
  • Fix .isDiskPresent() always returning true.
  • Fix peripherals showing up on wired networks when they shouldn't be.
  • Fix turtle.place() crashing the server in some esoteric conditions.
  • Remove upper bound on the number of characters than can be read with .read(n: number).
  • Fix various typos in keys.lua (hugeblank)
Just to say a massive thank you to Luca0208 and hugeblank for their contributions! Luca has added a feature I've been wanting for a while, but never got round to implement. huge fixed typos in a file I must have read many times, but never noticed.

On a semi-related note, if you're interested, I've put together a little write up of the various profiling tools CC:T offers. It's intended more as a casual blog post than documentation, but it may prove interesting/useful. Any comments are welcome - I'm not much of a writer so feel free to critique my prose.

Edited by SquidDev, 15 May 2018 - 05:18 PM.


#17 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,027 posts
  • LocationTasmania (AU)

Posted 16 May 2018 - 01:15 AM

Quote

Why not just rate limit things?

Oh er not sure I like the sound of that.

Are we talking number of resumes per tick, or number of calls per yield, or...?

#18 SquidDev

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

Posted 16 May 2018 - 06:20 AM

View PostBomb Bloke, on 16 May 2018 - 01:15 AM, said:

Quote

Why not just rate limit things?
Oh er not sure I like the sound of that. Are we talking number of resumes per tick, or number of calls per yield, or...?
I don't plan on doing any rate for execution time, as I feel "too long without yielding" is "good enough" for most cases. I think there are some improvements which could be made to allow execution time to be more fairly spread across computers, but that's not a priority.

I'm currently investigating only investigating rate limiting HTTP requests, as there's been some issues with broken programs running requests in an infinite loop, saturating the bandwidth. There's an issue describing things in a little more detail, but it mostly boils down to "stop people downloading stupidly large files or a stupid number of files".

If people have any thoughts on all of this, do say! The general aim is to make the default configs relatively server, while not impacting any single player world which is slightly more abusive of resources. However, I'm not exactly renowned for balancing things well, so any feedback is welcome!

#19 Dreossk

  • Members
  • 21 posts

Posted 09 June 2018 - 01:43 AM

I reported a bug for ComputerCraft here: https://github.com/d...raft/issues/549, then I saw CC Tweaked might actually be the most recent ComputerCraft mod? My problem is about computers not booting when I login on a server. Is that problem fixed in CC Tweaked? If I switch to this mod should I destroy my computers in the game before?

Edited by Dreossk, 09 June 2018 - 01:43 AM.


#20 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,027 posts
  • LocationTasmania (AU)

Posted 09 June 2018 - 04:10 AM

Over time there have been various attempts and failures to fix the startup bug. I'm pretty certain it's squashed for good in CC:Tweaked, though.

You don't need to destroy your old computers if switching, although it never hurts to make a backup copy of your world before messing with your mod collection.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users