Jump to content




[MC 1.7.10 | CC 1.65] OpenCCSensors

lua

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

#381 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 12 January 2013 - 12:12 AM

View PostCloudy, on 11 January 2013 - 11:56 PM, said:

It isn't possible. ComputerCraft only checks the method list once, and that's when the peripheral is attached.

Ooh that's interesting. Didn't realise!

Of course now that we have our own API it has to go through, we could do this purely lua side without any trouble. Thoughts?

(btw, been building a test world against the mods within FTB, and managing to squish a lot of little bugs)

#382 CoolisTheName007

  • Members
  • 304 posts

Posted 12 January 2013 - 12:59 AM

Like I said in IRC, one could wrap the methods of a sensor into the object returned by the sensor API, like:
function sensor.wrap(side)
  ...
  local self={}
  for i,v in pairs(sensor.getMethods(side)) do
   self[v]=function(...)
			sensor.sensorCardCall(side,v,...)
   end
  end
  return self
end


#383 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 12 January 2013 - 03:26 AM

Permission given to extract what we like from ic2 using nbt or reflection.

#384 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 12 January 2013 - 05:06 AM

Thaumcraft 3 sensorcard permission given from Azanor.

#385 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 12 January 2013 - 07:28 AM

View PostMikeemoo, on 12 January 2013 - 03:26 AM, said:

Permission given to extract what we like from ic2 using nbt or reflection.

View PostMikeemoo, on 12 January 2013 - 05:06 AM, said:

Thaumcraft 3 sensorcard permission given from Azanor.

This is some exciting new progress! What new information are we likely to be able to get out of IC2 this way? Crop stuff, perhaps?

#386 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 12 January 2013 - 07:34 AM

I would try to take the nbt data approach. It seems best to avoid reflection. I'm getting really excited about this. As soon as my exams are over I'll get started on OCS again. :)

#387 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 12 January 2013 - 08:37 AM

I have to say I'm incredibly impressed by the progress you guys are making, originally I never used any peripheral packs at all but I cannot resist this amazing pack. keep it up guys. if only I knew Java...

#388 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 12 January 2013 - 09:14 AM

I am personally impressed by the success of the open source approach. I've seen other community efforts on these forums, but my impression is that most of them ended up being controlled by a minority. The spirit between the people working on OCS was always very open and tolerant, people can basically do what they want as long the majority doesn't disapprove. And when they do, there probably is a good reason. I think we have mainly Cloudy to thanks for this, but also Mikeemoo and the rest of the dev team. :) ( yes, this is a sales pitch directed at aspired dev team members ;) )

#389 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 12 January 2013 - 10:07 AM

Orwell, working on a new idea..

Posted Image

Probably gonna need your rendering skills though ;-)

its a simple gauge that you can attach to a variety of machines.

If you attach it to an MFSU the gauge will show how full it is, if attach it to a mass fab it'll show the progress, if you attach it to a chest it'll show how full it is, if you attach it to a react it'll show you how hot it is..etc..

Really simple thing for people who don't know lua, but with the added option of putting a computer next to it and calling getPercentage() on the peripheral API..

Need a nice way to show "how full" something is in a very small area (without text).

The code is all done for it except the peripheral part!

(note, this is just a prototype still, might not make it in to OCS)

#390 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 12 January 2013 - 10:10 AM

View PostLyqyd, on 12 January 2013 - 07:28 AM, said:

View PostMikeemoo, on 12 January 2013 - 03:26 AM, said:

Permission given to extract what we like from ic2 using nbt or reflection.

View PostMikeemoo, on 12 January 2013 - 05:06 AM, said:

Thaumcraft 3 sensorcard permission given from Azanor.

This is some exciting new progress! What new information are we likely to be able to get out of IC2 this way? Crop stuff, perhaps?

We could have got crop stuff anyway - I just didnt really want to go implementing it when I knew nothing about crops in ic2! :) I haven't had a proper explore yet, but managed to add a few bits like mass fab progress.

#391 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 12 January 2013 - 10:33 AM

Posted Image

maybe

it's clear what machine it's attached to

#392 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 12 January 2013 - 10:37 AM

The first one makes it more clear which machine it's attached too. I could make the arc color up the percentage (in a gradient from red to green) and gray out the rest? I would really try implementing an API for it as much as possible as it seems to me that we shouldn't wander too far of from the the ComputerCraft path. :) It's a nice idea though! But, when it comes to time, I have exams until the 1st of february and I shouldn't be doing other stuff until then. :D (I sorta am, but I'm trying to limit it :P)

#393 jewelshisen

  • Members
  • 164 posts

Posted 12 January 2013 - 04:26 PM

Can somebody PLEASE tell me where the config file is for this mod?! I keep getting block id conflicts with IC2 and have no way to fix it!

#394 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 13 January 2013 - 12:43 AM

View Postjewelshisen, on 12 January 2013 - 04:26 PM, said:

Can somebody PLEASE tell me where the config file is for this mod?! I keep getting block id conflicts with IC2 and have no way to fix it!

/config/OCS.cfg

#395 jewelshisen

  • Members
  • 164 posts

Posted 13 January 2013 - 02:09 AM

View PostMikeemoo, on 13 January 2013 - 12:43 AM, said:

View Postjewelshisen, on 12 January 2013 - 04:26 PM, said:

Can somebody PLEASE tell me where the config file is for this mod?! I keep getting block id conflicts with IC2 and have no way to fix it!

/config/OCS.cfg

oh... i was looking for it inside the zip...

#396 jewelshisen

  • Members
  • 164 posts

Posted 13 January 2013 - 02:42 AM

This may have already been mentioned elsewhere in this topic but what is the range of the sensor cards and is there a way to boost that range?

#397 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 13 January 2013 - 05:19 AM

View Postjewelshisen, on 13 January 2013 - 02:42 AM, said:

This may have already been mentioned elsewhere in this topic but what is the range of the sensor cards and is there a way to boost that range?

For the majority of the cards it's just a 5x5x5 cube surrounding the sensor. This is being buffed to 7x7x7 or 9x9x9 in the next release I think.
Ideally there'd be a way to upgrade the range - maybe we'll look into that for a future version.

The proximity and dropped items sensor cards are different, they have a 16-block radius sphere area surrounding the sensor.

#398 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 13 January 2013 - 05:29 AM

Idea:

Each card currently has the same format of recipe, where the main item is relevant-ish to that particular card.

redstone [item]	   redstone
redstone redstone  redstone
paper	  paper     paper

So, we could have different tiers of card. You craft a card which gives you a tier 1, but if you wrap the card in redstone you then get a tier 2, and do the same for a tier 3..etc..

So for a tier 2, you'd do:



redstone redstone	 redstone
redstone [tier 1 card]   redstone
redstone redstone	 redstone

for a tier 3, you'd do



redstone redstone	 redstone
redstone [tier 2 card]   redstone
redstone redstone	 redstone

This would be really easy to implement (i think), and would mean can give people a bit more control over what range they have. It also acts as a nice redstone sink because you *always* end up with card too much redstone in the game.

I guess for the block-related cards you could have:

tier 1 = adjacent blocks
tier 2 = 3x3x3 cube
tier 3 = 5x5x5 cube
tier 4 = 7x7x7 cube
tier 5 = 9x9x9 cube
tier 6 = 11x11x11 cube

For proximity/dropped item cards:

tier 1 = 10 block radius
tier 2 = 12 block radius
tier 3 = 14 block radius
tier 4 = 16 block radius
tier 5 = 18 block radius
tier 6 = 20 block radius

#399 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 13 January 2013 - 05:30 AM

View PostMikeemoo, on 13 January 2013 - 05:19 AM, said:

View Postjewelshisen, on 13 January 2013 - 02:42 AM, said:

This may have already been mentioned elsewhere in this topic but what is the range of the sensor cards and is there a way to boost that range?

For the majority of the cards it's just a 5x5x5 cube surrounding the sensor. This is being buffed to 7x7x7 or 9x9x9 in the next release I think.
Ideally there'd be a way to upgrade the range - maybe we'll look into that for a future version.

The proximity and dropped items sensor cards are different, they have a 16-block radius sphere area surrounding the sensor.
The 'mark' system seems to be quite popular in the technical mod community.. Thus, 'Sensor Card M1' or something. We could figure something out.

#400 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 13 January 2013 - 08:39 AM

View PostMikeemoo, on 13 January 2013 - 05:29 AM, said:

Idea:

Each card currently has the same format of recipe, where the main item is relevant-ish to that particular card.

redstone [item]	   redstone
redstone redstone  redstone
paper	  paper     paper

So, we could have different tiers of card. You craft a card which gives you a tier 1, but if you wrap the card in redstone you then get a tier 2, and do the same for a tier 3..etc..

So for a tier 2, you'd do:



redstone redstone	 redstone
redstone [tier 1 card]   redstone
redstone redstone	 redstone

for a tier 3, you'd do



redstone redstone	 redstone
redstone [tier 2 card]   redstone
redstone redstone	 redstone

This would be really easy to implement (i think), and would mean can give people a bit more control over what range they have. It also acts as a nice redstone sink because you *always* end up with card too much redstone in the game.

I guess for the block-related cards you could have:

tier 1 = adjacent blocks
tier 2 = 3x3x3 cube
tier 3 = 5x5x5 cube
tier 4 = 7x7x7 cube
tier 5 = 9x9x9 cube
tier 6 = 11x11x11 cube

For proximity/dropped item cards:

tier 1 = 10 block radius
tier 2 = 12 block radius
tier 3 = 14 block radius
tier 4 = 16 block radius
tier 5 = 18 block radius
tier 6 = 20 block radius

What about leaving a few holes in there?

Adjacent, 5^3, 9^3, 11^3.
Volumes are then:
6, 125, 729, 1331.

That's a fairly even progression in volume between the three volumetric scanning cards (gain of 604 between mk 2 and 3; gain of 602 between mk 3 and 4), as well as not requiring five different upgrades to get there. To balance the reduced upgrade count, we could use some new recipes to upgrade them, which would make upgrades slightly more expensive.

OTO
SRS
SIS

O open
T redstone torch
S stone
R redstone dust
I iron ingot

Makes one range extension antenna.

Then craft one antenna with a sensor card to upgrade it to a mk 2.

Another recipe makes a signal amplifier:

SGS
RRR
SGS

S stone
G gold ingot
R redstone dust

Craft an amplifier and a couple antennas onto a mk 2 to get a mk 3:

OOO
ACA
OMO

O open
C sensor card mk 2
A antenna
M amplifier

One last recipe, for an advanced amplifier:

IGI
RDR
IGI

I iron ingot
G gold ingot
R redstone dust (redstone block instead?)
D diamond

Craft this to upgrade to mk 4:

OAO
ACA
MPM

O open
C sensor card mk 3
A range extending antenna
M amplifier
P advanced amplifier

Let's see, that brings the total cost of a mk4 sensor card to:

3 sugarcane
28 redstone dust
6 sticks
36 stone blocks
10 iron ingots
8 gold ingots
1 diamond

If I counted correctly! What do you all think?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users