Jump to content




[MC 1.2.5] - [CC 1.33] ccSensors [SMP/SSP]

peripheral java lua

454 replies to this topic

#1 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 19 February 2012 - 03:44 PM

INTRO

ccSensors collects information from machines and blocks from around the minecraft world.
those readings can be viewed on the sensor terminal or (and even better) be used in Computercraft lua programs for anything...

UPDATES and NEWS
  • working on adding: alerts & notfications, railcraft sensor, buildcraft triggers.
changelog

mc125 build 017pr2:
-------------------
added: loglevel can be set in the config file default to error only. (loglevel=error,info,debug)
fixed: SensorModules can now be disabled by setting the module id to -1 in the config.
fixed: sensorNet Gui (default key Posted Image will only open when no other gui is opened.
fixed: added another validity check when setting sensorRange (new range <= max_range and >=0)
fixed: weird mc crash on startup with mystcraft. (couldn't reproduce, but assuming the bypass i added will fix it)
fixed: occasional custom sensor names not kept.
added: railcraft sensor

mc125 build 017pr1:
----------------
added: this changelog will now be included with every release.
added: readme.txt - start of a full readme/help file
changed: World sensor now has 3 probes: World, Area, and Biome
added: configuration file now has sensors section to contain all sensor cards ids. (ccSensors.config)
fixed: proximity sensor partially fixed for SMP - can only correctly detect players for now.. (working on animals/mobs for next version)
added: use4096 config option to auto-use higher blockids (can be used when 4096 fix is installed)



DOWNLOAD and INSTALL


lua folders and files (required for both client and server)

client - MC125Build017pr2

server - MC125Build017pr2


to install:
1. place the mod .ZIP file in the mods/ directory
2. extract the lua .ZIP into the mods/ directory

you should end up with a ccSensors.....ZIP and ccSensors folder in the mods/ directory.


Requirements:
Spoiler
Previous versions:

to install just extract the zip into your .minecraft directory.
the following directory structure should be created:
.minecraft/mods/ccSensors.zip
.minecraft/mods/ccSensors



AVAILABLE SENSORS
  • World Sensor - provide environment readings
    • Examples: Light Level,isDay?,isRaining?
  • Inventory Sensor - provide inventory content details
    • Examples: Inventory utilization, Full item list, Empty slots
  • Buildcraft
    • Examples: Engine heat, Engine fuel level,mining Well/Quarry
  • IndustrialCraft2
    • Examples: Reactor heat, MFSU energy Level,Reactor content (Item List)
  • RedPower 2
    • Examples:bluetricity levels,furnace status
  • Forestry
    • Examples:engine information, harvesters/planters content
  • Equivalent Exchange
    • Examples:stored EMC, capacity
  • Thaumcraft2
    • Examples:pure vis/tainted vis amount for all machines using vis,reaserch remining time
  • Advanced Power Systems
    • Examples: PoweredFurnace stored- power,FusionGenerator- temperature,fuel capacity
  • Proximity Sensor
    • Examples: Living Entities within sensor range: Name,Current Health, Distance
GETTING STARTED

1. Place a Remote Sensor block (big headed stick) near a machine/block you want to probe.
( you can rename the Sensor to whatever meaningful name you want)
2. Insert the appropriate SensorModule card in the Module Slot.
3. Browse through the different probes and available readings.

Continue if you want to use the sensor with a Computercraft computer:

4. Place a Sensor Controller next to a computer
5. Assign a new WiFi channel by requesting a new channel in the controller GUI
6. Place a blank Transmitter card in the slot and encode the card
7. Go back to your remote sensor and right click with the encoded Transmitter card. (or just open the GUI and place the card in the slot)
8. to verify - open the Computercraft terminal and run /ccSensors/console

That's it - you now have a working sensor connected to a computer :)/>

WHERE TO GO FROM HERE,

add sensors, controllers and write your own lua programs...the sky (new sky height) is the limit ;)/>



MEDIA



Sample Screens: Dashboards

Sample Screens: Misc Snapshots



Videos

spotlight of pr2 by FunshineX



a nice example of a reactor control program using ccSensors (video by: Rune Kromolty)



MOD CONTENT

Computercraft additions:
The mod adds several Lua APIs and example Lua programs which demonstrate the use of Sensors.
a 'console' program is also included to provide easy access to sensor data without writing/modifying any code.

all of ccSensors lua programs are located in /ccSensors in any Computercraft computer


ITEMS, BLOCKS, RECIPES, AND WHATNOT..
Spoiler


#2 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 19 February 2012 - 03:47 PM

Sweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeet :)/>

I hope these use spritesheets so it wont be any terrain sprites used?

#3 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 19 February 2012 - 05:30 PM

Yeah - ComputerCraft itself in the next version uses forge and its infinite sprite system - so any mods for ComputerCraft don't have an excuse for not using it!

#4 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 19 February 2012 - 09:35 PM

if by infinite sprites you mean using forge's ItextureProvider interface then - YES :D/>
also, using only 1 block id, (metadata is the king...)

#5 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 20 February 2012 - 04:09 AM

Sweeet as pumpkin pie.

#6 coolblockj

  • Members
  • 84 posts

Posted 24 February 2012 - 08:38 PM

SMP compatible?

#7 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 25 February 2012 - 11:41 AM

View Postcoolblockj, on 24 February 2012 - 08:38 PM, said:

SMP compatible?

not yet.... will be once i'm happy with everything working as i planned in SSP.

#8 notgodsarmy666

  • New Members
  • 22 posts

Posted 13 March 2012 - 08:40 PM

sweeeeet, just what I needed
Spoiler


#9 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 13 March 2012 - 09:06 PM

View Postnotgodsarmy666, on 13 March 2012 - 08:40 PM, said:

sweeeeet, just what I needed
Spoiler

print'hello', print"hello", print('hello'), and print("hello") is all valid in Lua.
Also the reactor.lua file is a bit old, use the console program. I probably know this mod better than anyone Cept, the creator, so shoot questions.

#10 bobster71

  • Members
  • 36 posts

Posted 13 March 2012 - 09:57 PM

I'm getting the error in the spoiler. Dont know why, any ideas?
Great idea btw.

Spoiler


#11 notgodsarmy666

  • New Members
  • 22 posts

Posted 13 March 2012 - 11:27 PM

View PostFuzzyPurp, on 13 March 2012 - 09:06 PM, said:

View Postnotgodsarmy666, on 13 March 2012 - 08:40 PM, said:

sweeeeet, just what I needed
Spoiler

print'hello', print"hello", print('hello'), and print("hello") is all valid in Lua.
Also the reactor.lua file is a bit old, use the console program. I probably know this mod better than anyone Cept, the creator, so shoot questions.
funny I always get an error if I have used them without ()
Anyway I can`t get it work with minecraft 1.1 tried forge 1.3.3.13 and 1.3.3.22.
I could list all mods I also use but that is close to spamming. especially if it also does't work even if only
ModLoader
ModLoaderMP
MincraftForge
Optifine_1.1_HD_D5
Computercraft1.31
and ccSensors are loaded
in exactly that order
Spoiler


#12 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 14 March 2012 - 05:29 AM

1.1 bugs maybe. Note done with attaching the peripheral or placing it in the world. This all happens when interacting with the gui of a sensor without having a sensor block placed and link. Basically skipping to 4&5 in getting started, and clicking/changing the reading info in the gui

Spoiler
Spoiler

Tested some more and it still crashes doing everything the right way - this is all with ic2 sensor module mc 1.1 and cc 1.31/backport

-Also lightlevel is redundant for world sensor being that the sensor itself emitts a light level of 15

OKAY none of this stuff happens IN A REGULAR WORLD. ccSENSORS IS BUGGY WITH SUPER FLAT MAPS!!

Edited by FuzzyPurp, 14 March 2012 - 06:07 AM.


#13 Mendax

  • Members
  • 366 posts

Posted 14 March 2012 - 05:52 AM

:mellow:/> cool, now, time to make lights that come on at night or in the rain ;)/>

#14 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 14 March 2012 - 06:21 AM

Happened to a player pressing the sensor key. I had no issues with this in beta. Actually discovered the key by accident when the info popped up on my screen

java.lang.NullPointerException
at ccSensors.network.WiFiSensorNet.isWiFiNetFull(WiFiSensorNet.java:114)
at ccSensors.GUISensorNet.displayUI(GUISensorNet.java:87)
at ccSensors.GUISensorNet.a(GUISensorNet.java:76)
at lo.b(EntityRenderer.java:1095)
at EntityRendererProxy.b(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.x(Minecraft.java:892)
at net.minecraft.client.Minecraft.run(Minecraft.java:747)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 2574c672 ----------

#15 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 14 March 2012 - 06:46 AM

All those crashes besides the one directly above this, is related to world height. Flatmap or overworld, sensors crash on low height.

#16 Normalsoo

  • New Members
  • 10 posts

Posted 14 March 2012 - 08:01 AM

Very nice ;)/> , time for new stuff thats sensor worthy :mellow:/>

#17 electronicsRules

  • New Members
  • 1 posts

Posted 14 March 2012 - 08:18 AM

EDIT: Redundant post, please delete

#18 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 14 March 2012 - 10:47 AM

looking into the issues... will update the download link soon.

when you encounter an issue, please post the error log, as well as a 1liner of what you were trying to do.

Also, are you using MC version 1.2.3 or 1.1?

#19 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 14 March 2012 - 12:22 PM

fixed most of the issues:

download links will be updated in a couple of minutes

i tested (in MC 1.1) all sensors on a superflat world - seems to work fine.


issue 1:
Status: Fixed
MC Version: 1.1 , 1.2.3
all sensorModule cards will be loaded even of the relevant mod is not loaded (IC2,Buildcraft,etc..)
however the card will be disabled.
this is to prevent loss of card items in case a mod is not loaded temporarily.


issue 2:
Status: Fixed
MC Version: 1.1
description:crash on startup
error message:
java.lang.NoClassDefFoundError: ic2/api/Items
reported by:notgodsarmy666
caused by: IC2 sensorModule card recipe contained IC2 items
solution: use only vanilla itesm for card recipes for now.

issue 3:
Status: Fixed
MC Version: 1.1, 1.2.3
description: remote sensor emits light
reported by: FuzzyPurp
solution: sensor block does not emit any light anymore.
might be an option added later on. - emit light using lua api.

issue 5:
MC Version: 1.1, 1.2.3
Status: Fixed
description: crash when accessing sensorNet GUI
error message:
java.lang.NullPointerException
at ccSensors.network.WiFiSensorNet.isWiFiNetFull(WiFiSensorNet.java:114)
reported by: FuzzyPurp
solution: forgot to add a check. shame on me:(


in progress:
Issue 4:
MC Version: 1.1
Status: in progress
description: crash when changing reading from sensor Gui
error message:
java.lang.ArrayIndexOutOfBoundsException: -6
reported by: FuzzyPurp
comment: Strange issue caused by mc classes when calling getBlockTileEntity(i,j,k) on the World Object.
solution: none yet

#20 miyoyo

  • Members
  • 16 posts

Posted 14 March 2012 - 04:46 PM

?raining, Day/Night and isThunderstorm

make
textutils:56: bad argument: string expected, got boolean





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users