Jump to content




[MC 1.7.10 | CC 1.65] OpenCCSensors

lua

  • You cannot reply to this topic
1334 replies to this topic

#461 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 17 January 2013 - 10:44 AM

View Postjewelshisen, on 17 January 2013 - 10:42 AM, said:

Hit a snag. The sensor turtle says the card is not there. I have the card in the selected slot but i get nothing. Am i missing a step?
It always uses the card in slot 16. ;)

#462 jewelshisen

  • Members
  • 164 posts

Posted 17 January 2013 - 10:45 AM

View PostOrwell, on 17 January 2013 - 10:44 AM, said:

View Postjewelshisen, on 17 January 2013 - 10:42 AM, said:

Hit a snag. The sensor turtle says the card is not there. I have the card in the selected slot but i get nothing. Am i missing a step?
It always uses the card in slot 16. ;)

OHHHH.... Did not know that...

#463 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 17 January 2013 - 11:53 AM



#464 TheGeek

  • Members
  • 60 posts

Posted 17 January 2013 - 12:30 PM

View Postjewelshisen, on 17 January 2013 - 08:52 AM, said:

Is it possible to send the sensor data over the rednet network and if so, how would you code it for a sensor turtle?

I'm doing this very thing in my own project, so I'll save you a little time. The trick is to use textutils.serialize() on the transmit end to turn it into a transmittable string, then textutils.unserialize() on the recieving end to turn it into a table again.

Transmitter:
load sensor api --forgot syntax
scanner = sensor.wrap("side")
scan = scanner.getTargets()
rednet.broadcast(textutils.seralize(scan))
receiver
id,message = rednet.receive()
scan = textutils.unseralize(message)
--code to loop for every entry in scan would go here


#465 jewelshisen

  • Members
  • 164 posts

Posted 17 January 2013 - 12:45 PM

View PostTheGeek, on 17 January 2013 - 12:30 PM, said:

View Postjewelshisen, on 17 January 2013 - 08:52 AM, said:

Is it possible to send the sensor data over the rednet network and if so, how would you code it for a sensor turtle?

I'm doing this very thing in my own project, so I'll save you a little time. The trick is to use textutils.serialize() on the transmit end to turn it into a transmittable string, then textutils.unserialize() on the recieving end to turn it into a table again.

Transmitter:
load sensor api --forgot syntax
scanner = sensor.wrap("side")
scan = scanner.getTargets()
rednet.broadcast(textutils.seralize(scan))
receiver
id,message = rednet.receive()
scan = textutils.unseralize(message)
--code to loop for every entry in scan would go here

Ah i beat you to it~ I already figured out how to do it.

#466 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 17 January 2013 - 12:55 PM

View PostMikeemoo, on 17 January 2013 - 11:53 AM, said:

* Awesome vid here *
I'm loving it!

#467 spardha

  • New Members
  • 12 posts

Posted 18 January 2013 - 12:24 AM

,

I don't know if I'm asking this in the right thread? and it's really basic.

I'm trying to learn LUA and write my own simple program to show ic2 MFSU's stored power on a monitor using a sensor via peripheral cables.
But stumbling at the first hurdle and wondered if any could point me in the right direction for using the following terms


getTargets() - gets the targets in a range specified by the card (for the inventory card, it is adjacent blocks and the peripheral)
getTargetDetails(string) - gets detailed information about the target. Use the name of the target from getTargets().
getSensorName() - gets the type of the sensor
getSensorMethods
() - each card can optionally have its own methods - this allows you to find out what these methods are
sensorCardCall
() - calls the above methods as returned by getSensorMethods()

I've tried to compile my own code using the examples on the wiki and here but there not working for many reasons. I used get targets scripts which I copied and that worked then i tried to build on it to getTargetsDetails and failed epicly :P

Thanks


****
Found where i was going wrong, i was using peripheral.wrap instead sensor.wrap <_<

would still appropriated some pointers/code examples

Thanks

#468 Regelneef

  • Members
  • 37 posts
  • LocationThe Nether-lands...

Posted 18 January 2013 - 03:23 AM

View PostMikeemoo, on 17 January 2013 - 11:53 AM, said:

very cool vid

oke enough with the teasing :) I want that 2 :)

#469 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 18 January 2013 - 07:59 AM

Posted Image

Sensor card icons need some love :(

#470 TheGeek

  • Members
  • 60 posts

Posted 18 January 2013 - 03:23 PM

View PostMikeemoo, on 18 January 2013 - 07:59 AM, said:

Posted Image

Sensor card icons need some love :(
Perhaps instead of dots, use roman numerals? (IE: I II III VI V etc)

#471 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 18 January 2013 - 09:16 PM

In the current one the dots are gone, and it's using a border to highlight the different levels. These colors match the text color (rarity) of the object..

Posted Image

No idea if it'll stay.. Cruor was gonna take a look at some ideas at some point.

I'd quite like them to look a bit more like... "cards", however, that'd mean shrinking the height slightly, which means you dont have as much space for the actual icon. An option is to increase the resolution of them, however, we've got cards that look alright at this size so feels wrong to increase the resolution to make them look a bit more rectangular.. Hmm.

Edit: border looks a bit broken on those yellow ones, actually!

#472 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 18 January 2013 - 09:32 PM

If anyone wants to get involved in OCS and think they could have a go at the graphics, please feel free to give it a try!!

There's quite a few different people trying out ideas, so no idea what the final design will actually be (and I wouldn't like to choose!), but if anyone wants to give it a go then I'd love to see some new ideas.

Here's the current texture file:

Posted Image

We also need 3 more items, based on Lyqyds idea from a few pages back:

Posted Image

Range extension antenna, Signal Amplifier, Advanced Amplifier. Doesn't really matter where they go in the texture file, probably bottom row I guess! The top row can be saved for future turtles ;)

#473 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 19 January 2013 - 02:39 AM

Posted Image

hrm :)

#474 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 19 January 2013 - 04:50 AM

I actually really like the looks of those upgrade parts! I may play around with the textures at some point. I used to be able to make pixel-art a long while ago, so maybe I can still kinda sorta do it.

For the borders indicating tier, perhaps we could use white/green/blue/purple for 1-4? I know that color scheme is used in several other games. Or does that go against an existing rarity tiering scheme? Either way, it looks like they may benefit from a saturation boost. The borders are a bit hard to distinguish in the screenshots.

#475 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 19 January 2013 - 04:59 AM

View PostLyqyd, on 19 January 2013 - 04:50 AM, said:

I actually really like the looks of those upgrade parts! I may play around with the textures at some point. I used to be able to make pixel-art a long while ago, so maybe I can still kinda sorta do it.

For the borders indicating tier, perhaps we could use white/green/blue/purple for 1-4? I know that color scheme is used in several other games. Or does that go against an existing rarity tiering scheme? Either way, it looks like they may benefit from a saturation boost. The borders are a bit hard to distinguish in the screenshots.

Minecraft has grey/yellow/teal/purple built in (personally I think the teal looks more epic than purple, but hey), so we wont be able to change that.

As for the borders - feel free to give it a go! we had them more saturated before, however they start to look quite.. mylittlepony

#476 jewelshisen

  • Members
  • 164 posts

Posted 19 January 2013 - 05:31 AM

View PostMikeemoo, on 19 January 2013 - 04:59 AM, said:

View PostLyqyd, on 19 January 2013 - 04:50 AM, said:

I actually really like the looks of those upgrade parts! I may play around with the textures at some point. I used to be able to make pixel-art a long while ago, so maybe I can still kinda sorta do it.

For the borders indicating tier, perhaps we could use white/green/blue/purple for 1-4? I know that color scheme is used in several other games. Or does that go against an existing rarity tiering scheme? Either way, it looks like they may benefit from a saturation boost. The borders are a bit hard to distinguish in the screenshots.

Minecraft has grey/yellow/teal/purple built in (personally I think the teal looks more epic than purple, but hey), so we wont be able to change that.

As for the borders - feel free to give it a go! we had them more saturated before, however they start to look quite.. mylittlepony

Why not just make the border a little thicker, like one or two pixels thicker? Then it won't look quite as washed out and will be easier to see.

#477 Regelneef

  • Members
  • 37 posts
  • LocationThe Nether-lands...

Posted 19 January 2013 - 08:36 AM

View Postjewelshisen, on 19 January 2013 - 05:31 AM, said:


Why not just make the border a little thicker, like one or two pixels thicker? Then it won't look quite as washed out and will be easier to see.

I totally agree, that would suffice :)

#478 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 19 January 2013 - 11:06 AM

https://dl.dropbox.c...-0.1.2-pre1.zip

If someone could give that a test, it'd be reaally helpful.

Specifically checking that all recipes work and every item is craftable. I need to make sure it works when other mods are installed, but also in 'vanilla' (well, with CC).


Also a bit of testing with the Gauge would be handy.. You should be able to use it on MFSUs, batbox, mfe, mass fabs and reactors for now.

The Gauge WILL act as a peripheral, however, you'll probably have a hard time with it until we make a change to the lua sensor api..

merci :)

Oh yeah - FTB is a good pack to try it out in, because it has relevant mods.

#479 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 19 January 2013 - 11:10 AM

Whoops, forgot to add the thaumcraft taint stuff. I'll add that in before official release is prepared.

#480 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 19 January 2013 - 11:37 AM

Found a slight issue with the thaumcraft cart. I think it's just a rendering issue - i'll release a fix when I work out what's wrong!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users