pandorabox-io / pandorabox.io

Pandorabox infrastructure code
https://pandorabox.io
31 stars 4 forks source link

New active Beacon area effects #430

Closed 6r1d closed 4 years ago

6r1d commented 4 years ago

Well, since we discuss this topic in chat, let's think what types of beacons we'd like to have. Healing beacons? Speed beacons? Immortality beacons? Something else?

S-S-X commented 4 years ago

For me speed sounds very good. I'd say no for immortality and also for healing it should be very expensive. Same for satiation, should be very expensive.

To allow expensive player effects for beacons there must be upgradeable beacons which means either adding inventory slots for upgrades or meta/new nodes for upgraded beacons. Using metadata prevents item stacking in inventory, upgrade slots would allow stacking beacons in inventory.

Few other possible effects:

For damage it could be change in damage dealt by player or damage received by player. For radiation it could be change in radiation resistance for players in area.

OgelGames commented 4 years ago

I believe the red beacons used to have a healing effect, but then had it removed. I personally would like the other beacons to have effects, but they might need to be made more expensive to use to balance it out...

thomasrudin commented 4 years ago

I believe the red beacons used to have a healing effect, but then had it removed.

Yes, a player was woodcutting (automatically) a whole forest while standing near a red beacon (healing -> no damage)... so i decided to remove that feature :/

Still not sure about the healing aspect, it may be too over-powered (more exploits while working in vacuum, etc) but speed and other effects would be rather nice yes :+1:

kiedtl commented 4 years ago

Healing beacon could be exploited for infinite XP. A player could stand near healing beacon while automatically (via xdotool/autohotkey) building and destroying mesecons, never having to stop to eat.

6r1d commented 4 years ago

could be exploited

I wonder if we can track a presence of such beacon, stopping the exp inflation

JRPete2020 commented 4 years ago

Imo I think the beacons are to cheap(they have infinite life), maybe have them consume something to grant the effects, like the technic energy crystals(red, blue, green) per matching color beacon.

S-S-X commented 4 years ago

Healing could be made work if it requires some action like hitting beacon beam or beam base. give +2 hp for beam "digging". Problem is that this would also require special care to prevent all kinds of breaker healing machines etc.

Or allow healing only for half minute after entering beacon area, then make reset 5 minutes after player has leaved area. I think there's problems with this approach too because it quickly gets overly complex this way too.

Could also add inventory slot that adds special healing items periodically, like beehives do add honey. If it feels too powerful make it not stackable. If items can somehow easily have TTL then use that too... This approach would require new item and inventory slots for beacon.

I think the beacons are to cheap

Totally agree with that, green beacons are extremely powerful items. Well now those cant break protected blocks anymore but still...

JRPete2020 commented 4 years ago

Healing beacon could be exploited for infinite XP. A player could stand near healing beacon while automatically (via xdotool/autohotkey) building and destroying mesecons, never having to stop to eat.

Exclude player from obtaining xp while using a healing beacon a possible solution?

kiedtl commented 4 years ago

Exclude player from obtaining xp while using a healing beacon a possible solution?

Or better yet just don't add healing at all. I mean, what if a player is working in an area (say, a crowded city) where a beacon he doesn't own is nearby? Then he wouldn't get any XP for any work he did.

off topic: what's up with the increased speed near spawn?

SwissalpS commented 4 years ago

I can see speed beacons but not the other ideas mentioned. Even speed beacons are questionable as players would quickly be out of range causing roads of beams being placed.

I've had my neighbour 'grief' me with a green beacon. Since only one beacon can normally be placed in the same area, we couldn't have combos like fly and fast. Initially I was all for more reasons to have beacons, but the longer I've played on pandorabox and thought about it, the less the idea excites me.

So -0.25 from me.

thomasrudin commented 4 years ago

off topic: what's up with the increased speed near spawn?

There were some complaints about the distance to the shop from the actual spawn-point, so i re-used the code from my other server... (the increased speed is pretty bad for building things though)

Even speed beacons are questionable as players would quickly be out of range causing roads of beams being placed.

Yay! more colors in the already existing forest of green beams... :yum:

SwissalpS commented 4 years ago

Yay! more colors in the already existing forest of green beams...

that would easily be achieved by making more/all beacons grant fly :p

S-S-X commented 4 years ago

Other suggestions:

shanish SX: invisible to monsters

This might work but might not be that easy to implement, but maybe possible for mobs_redo mobs.

Thailand a local daylight effect ? ... usefull for farming also

I like that suggestion, would be nice if we could light up some caves. It could create similar effect that LV lamp does.

SwissalpS yes, night-beacon :)

Could be very nice with day beacon.

SwissalpS black beacon spawns oerki

Maybe some beacons could increase changes to spawn some specific mobs, fairly easy and straightforward to implement. Big question is what would be the use cases...?

downtime maybe tranport beacon to remove all but owners

I'd say maybe not, this would basically be another forcefield.

Anth Be neat if could rotate the block so the beam could shoots horizontally

That would be nice addition, beam forming immediately after placement could be problem here.

kiedtl commented 4 years ago

Big question is what would be the use cases...?

farming gold ingots, of course :P

6r1d commented 4 years ago

downtime maybe tranport beacon to remove all but owners

It'll be nice if it will move players to /spawn or nearby area. But then again, it'll have to check for players around, which will add some load to the server.

SwissalpS black beacon spawns oerki

Sounds awesome!

Big question is what would be the use cases...?

I am using them for demolition in caves, it's just fun.

S-S-X commented 4 years ago

downtime maybe tranport beacon to remove all but owners

It'll be nice if it will move players to /spawn or nearby area. But then again, it'll have to check for players around, which will add some load to the server.

I really think that teleporting players is bad idea, both to the /spawn and to nearby area. However it could be implemented as forcefield like barrier that only lets owner to get through, it could then work like xp protected doors. Also with this approach no need to check for players periodically. Downside with this implementation of course is that it is not even nearly as fun as tp would be.

OgelGames commented 4 years ago

I'm going to see if I can put together a new mod for this, probably as a beacons redo, instead of trying to add everything to the current beacons mod. (it's a bit of a mess at the moment 😄)

thomasrudin commented 4 years ago

I'm going to see if I can put together a new mod for this, probably as a beacons redo, instead of trying to add everything to the current beacons mod. (it's a bit of a mess at the moment smile)

Yes it is :) i extracted that mod from a forums post and mutilatedchanged it to my liking :confounded:

Feel free to change/redo as you like :+1:

OgelGames commented 4 years ago

Just a quick update to make sure I'm not making the wrong changes... (also thought they looked really nice 😄 )

beacons

I've decided the best way to implement the new effects and sideways beacons is to use a formspec to select which effect and direction you want before activating the beacon.

The beacons will also have slots for enabling different effect strengths, with effects like fly being the same at all levels, as this allows the beacons to remain cheap enough to be used purely for decoration (no effects without at least one of the slots filled).

I have thought about making them consume fuel to grant the effects, with more powerful effects consuming more fuel, but at the moment I'm not sure...

thomasrudin commented 4 years ago

:open_mouth: ... they look awesome... :+1: I can't wait to see for what @Lejo1 is abusing them.. :smile:

I have thought about making them consume fuel to grant the effects, with more powerful effects consuming more fuel, but at the moment I'm not sure...

Interesting idea

SwissalpS commented 4 years ago

I like what I see :)

I have thought about making them consume fuel to grant the effects, with more powerful effects consuming more fuel, but at the moment I'm not sure...

Maybe it makes sense for some effects to consume a fuel, but some may just as well be fine without.

S-S-X commented 4 years ago

The beacons will also have slots for enabling different effect strengths, with effects like fly being the same at all levels, as this allows the beacons to remain cheap enough to be used purely for decoration (no effects without at least one of the slots filled).

I have trouble understanding this one... for example what you propose for fly priv? Will existing green beacons still grant fly like how it is now or will they need upgrade for fly?

Maybe allow upgrading existing beacons to more powerful ones and decide current green beacon changes later? So green one would work at least for some time after changes like it does currently but possibly later remove fly priv customization and grant it only through upgraded beacons.

I have thought about making them consume fuel to grant the effects, with more powerful effects consuming more fuel, but at the moment I'm not sure...

Make them burn dyes for more powerful beacon effects :) If this is somehow implemented then maybe it would be nice to be able to turn beacon on/off by hitting it or via formspec?

I like fuel requirement for more powerful beacons because it somewhat mitigates some possible misuse of overpowered beacons if it will require player actions to keep it running (no tube support) but then on the other hand tube support for things like this would also be nice. Could also be technic compatible and require varying amounts of HV power depending on beacon effect.

BobFred7 commented 4 years ago

I would prefer if adding effects to beacons used a permanent/one-time, mildly expensive upgrade rather than a continuous but cheaper fuel cost

OgelGames commented 4 years ago

I have trouble understanding this one...

The beacons will by default have no effect to keep them cheap enough to be used for decoration, but adding expensive upgrades will unlock certain effects, with more and more powerful effects the more upgrades are added.

Effects like fly will only have one effect level (because it can only be on or off), whereas effects like speed will have multiple effect levels (it can have different strengths).

Sorry if it's hard to understand, it's kinda hard to explain textually, but it should make sense when it's done...

Will existing green beacons still grant fly like how it is now or will they need upgrade for fly?

Currently the fly effect is managed by the custom mod (https://github.com/pandorabox-io/pandorabox_custom/blob/master/fly.lua), so that shouldn't be effected, but the beacons will still be upgraded via a lbm.

I would prefer if adding effects to beacons used a permanent/one-time, mildly expensive upgrade rather than a continuous but cheaper fuel cost

Yeah, probably won't add fuel requirement, you wouldn't want your fly beacon to run out of fuel when you're building high up...

SwissalpS commented 4 years ago

Effects like fly will only have one effect level (because it can only be on or off),

Well, theoretically upgrades could influence the radius, but I don't think that would be a good idea.

OgelGames commented 4 years ago

upgrades could influence the radius

I was thinking about that too, either they could be added as separate upgrade slots, or they could use the same ones, the latter preventing high power effects from having a big radius.

S-S-X commented 4 years ago

Sorry if it's hard to understand, it's kinda hard to explain textually

That explained it perfectly, I was just not sure what you meant by different levels

Yeah, probably won't add fuel requirement, you wouldn't want your fly beacon to run out of fuel when you're building high up...

Agreed that fuel should not be required for basic effects that cannot be easily misused like speed, light, fly, gravity, etc.

There I was thinking about burning fuel for possibly overpowered beacon effects like damage reduction, hunger removal, healing, some other active shields and things like that. I think those could be implemented and possible abuse mitigated if there is something that must be done by player to keep it active.

thomasrudin commented 4 years ago

Well, theoretically upgrades could influence the radius, but I don't think that would be a good idea.

possible but i need to rewrite the fly (or other effect) detection mechanism for that first, it is not that optimized currently:

https://github.com/pandorabox-io/pandorabox_custom/blob/f57f47748d1983f623be874157cfa5e7d7c4f37b/fly.lua#L32-L36

A larger radius than now would incur a lot of additional lag...

There I was thinking about burning fuel for possibly overpowered beacon effects like damage reduction, hunger removal, healing, some other active shields and things like that. I think those could be implemented and possible abuse mitigated if there is something that must be done by player to keep it active.

They will still find a way to abuse it :smile: but the idea sounds good :+1:

OgelGames commented 4 years ago

need to rewrite the fly (or other effect) detection mechanism for that first, it is not that optimized currently

I'm already on that, the way it's currently going to be done is this:

This method should be the most efficient way, and shouldn't be any slower with larger ranges. (please correct me if I'm wrong)

I was thinking about burning fuel for possibly overpowered beacon effects

None of the effects will be overpowered (i.e exploitable for afk XP farming), so there won't be any fuel requirement, because that just complicates everything else.

They will still find a way to abuse it :smile:

Exactly why there won't be overpowered effects :smile:

thomasrudin commented 4 years ago

This method should be the most efficient way, and shouldn't be any slower with larger ranges. (please correct me if I'm wrong)

Perfect! :+1:

OgelGames commented 4 years ago

Turned out way more complicated than I thought it would be, but I've got it all working: https://github.com/OgelGames/beacon

It still needs some work to tidy and optimize the code a bit, but it's enough for testing 😉 ~Also it currently depends on player_monoids, I will be making it optional, but it was easier not to at the moment.~ player_monoids is now optional.

The beacon direction is based on placement, with the beam pointing in the opposite direction to the face of the node it was placed on. The default upgrade item is default:diamondblock.

SwissalpS commented 4 years ago

too bad I can't test in the nearest future, am excited to. :D

thomasrudin commented 4 years ago

Turned out way more complicated than I thought it would be, but I've got it all working: https://github.com/OgelGames/beacon

I see if i can check that out the next few days, sounds awesome...

SwissalpS commented 4 years ago

I did like the way we could build onto beacon-rays, will you be implementing that?

Edit: I'm sure you also have something planed to convert old beacon:green to upgraded and activated new beacon. There are a lot of green beacons that are hidden under dirt and some are essential for players to stay where they are when logged off.

Like how it's working except that I need to deactivate to make any changes, but will get used to that.

OgelGames commented 4 years ago

I did like the way we could build onto beacon-rays, will you be implementing that?

I found the beam being selectable to be more annoying than useful, so I made it not selectable, but it would probably suffice to just make the selection box smaller instead, so it's still possible to build on it.

Edit: I'm sure you also have something planed to convert old beacon:green to upgraded and activated new beacon. There are a lot of green beacons that are hidden under dirt and some are essential for players to stay where they are when logged off.

Yes, this, which also updates the red beacons with healing to match the original mod.

Like how it's working except that I need to deactivate to make any changes, but will get used to that.

I had some problems getting "live" changes to work properly...

SwissalpS commented 4 years ago

Yes, this, which also updates the red beacons with healing to match the original mod.

sweet, hope it won't change new beacons too :)

A compromise with smaller selection box in y (when vertical) sounds good. That will also make it easier to fight mobs through beams and build behind them.

OgelGames commented 4 years ago

I've made a few changes, added gravity effects, and done more testing. The mod is pretty much done, and should be ready for use unless anyone can find anything wrong 😄

hope it won't change new beacons

https://dev.minetest.net/minetest.register_lbm 😉

SwissalpS commented 4 years ago

While testing I noticed two things that are probably not worth looking into:

Nit-picking: when wielding another beacon and right-clicking a placed beacon, formspec does not show unless there would be space around placed beacon for another beacon to be placed.

@thomasrudin this is ready for production, imo Edit: unless there is an issue with lag

SwissalpS commented 4 years ago

oops, found a crash: trying to recreate it. When a player leaves: 2020-02-17 14:43:31: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'beacon' in callback on_leaveplayer(): ...minetest/pandora/minetest/bin/../mods/beacon/effects.lua:82: attempt to call field 'on_remove' (a nil value)

SwissalpS commented 4 years ago

OK, fixed.

thomasrudin commented 4 years ago

screenshot_20200217_172613

Nice work! I tested the effects and they should not be too op i think, i haven't tested the timeouts (are there any?...)

Placement works pretty well, just the selection-box of the beams is a bit small.

Also: backwards compatibilty seems to work... :+1:

OgelGames commented 4 years ago
  • fly beacons have no effect on admin / singleplayer

That's intentional, admin and singleplayer already (can) have the fly privilege.

  • jump enhancement does not help get out of water, however speed-boost does

That's just how Minetest physics works :smile:

Nit-picking: when wielding another beacon and right-clicking a placed beacon, formspec does not show unless there would be space around placed beacon for another beacon to be placed.

I think I can fix that...

i haven't tested the timeouts (are there any?...)

You mean the time until the effect is removed when the player is out of range? There is a setting for that: https://github.com/OgelGames/beacon/blob/master/init.lua#L20 (3 seconds by default)

Placement works pretty well, just the selection-box of the beams is a bit small.

Yeah, it is quite tiny, maybe I'll increase the size slightly...

kiedtl commented 4 years ago

I wonder, will we be able to mine the beacon's beacon with the repo? :)

OgelGames commented 4 years ago

I wonder, will we be able to mine the beacon's beacon with the repo? :)

The beam nodes will still be able to be mined in the same way as before, but not by hand.

SwissalpS commented 4 years ago

but not by hand.

? the only way I know how to do it currently, is basically by hand :p

OgelGames commented 4 years ago

but not by hand.

? the only way I know how to do it currently, is basically by hand :p

Not sure how you're doing it by hand, the only way I know how to mine the beam is either with a technic constructor or a digtron... Either way, it will be exactly the same as before.

OgelGames commented 4 years ago

I've fixed the beacon right-click bug, and also added a chat command to get information about all beacon effects, or only the effects active on the player: https://github.com/OgelGames/beacon/blob/master/chatcommands.lua#L20

SwissalpS commented 4 years ago

it will be exactly the same as before.

Well these methods you describe are manual to me. I had a fully automated harvesting system before :)

I've fixed the beacon right-click bug

Cool :D