[Mod] Stargate-like portals [portal_mgc]

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

[Mod] Stargate-like portals [portal_mgc]

by HarrierJack » Sat Aug 06, 2016 22:38

(WIP) Minetest Portals (a la Stargate)
for MT 0.4.14

I need testers to work out the final things, at this point teleporting and 'dialing' works but no doubt there's bugs.
Works with and without Technic and Mesecons
note: without Technic, diamond blocks are used by default

By: Harrierjack based on Technic/stargate
Formspec was a copy but eventually changed completely. Some formspec textures and gate sounds are still used (at least as placeholder)

Gladly received help from:
DHD textures: DS-Minetest, Azekill_DIABLO
Formspec Icons: TBD


Stargate-like portals for Minetest.


The portal itself is a structure you have to build yourself (atm anyway), it should look like the example below and be made from carbon steel blocks when Technic and moreores mod is enabled. The block type can be changed in default_settings.txt as well as some other values but in case technic isn't available or a custom block can't be found it will always default to default:diamondblock.

Note: if you switch portal blocks mid game / in existing world all previous portals will still be registered as such, either remove 'portal_registered_portals.data' file and/or remove/replace DHD's, symbols will probably change

Image


When you have build a portal from the correct blocks, you need to put down a DialHomeDevice (DHD) near the portal (diameter 10 or see default_settings.txt) to have it connect to that portal. The portal checks where the DHD is to see which side will be used for the teleporting 'dropzone'.

Right clicking the DHD will open the menu. The portal registrator will be the owner and can change the name or set private. At this time the only advantage of private is not showing up in the portal list.
On the left bottom you can see some information about the current portal and on the right you see public portals with their address. After entering an address press the big red button and the portal activates.

Image


After activation the portal stays open for 8 seconds, every porting entity adds 2 more seconds to the time it stays open, and after an address is set you can also punch the portal (or use mese signal) to enable/disable the portal. Mese signal can keep the portal on (as long as there's power (or power requirement is 0 or without technic mod))

Note that the DHD needs technic HV power for the portal to function, when the power runs out the portal shuts down (keep arms and legs inside at all times :) ). The DHD and the portal work wireless (let's go with that ;) )

All public portals are connected (no discovery necessary)

Image

As mentioned several settings can be changed in default_settings.txt. I suggest you backup the file and edit it for any personal preference, such as time portal stays open, extra time, power requirement, power type, even the shape of the ring if you like.


Requires: default game
(optional)Technic but then also include moreores for the carbon steel blocks or without moreores for diamond portals
(optional)Mesecons

License: WTFPL

Download
Github Repo
Direct Zip


Let me know what you think.

PS: the UFO in the last picture is from a seperate unrelated ufo mod and it actually works going through the portal.. if you can manage to align it correctly since it's hitbox is just a little smaller then the inside of the portal.. (anyway, I just noticed that when portal mod was almost done, when I started I never planned vehicles to be ported though it seems to work) perhaps another TODO proper item vehicle support
update: had to break vehicle support for now since it was 'grabbing' 3 other unknown entities when 1 player goes through..
Last edited by HarrierJack on Tue Aug 16, 2016 21:04, edited 8 times in total.
 

User avatar
cx384
Member
 
Posts: 492
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Stargate-like portal mod

by cx384 » Sun Aug 07, 2016 07:51

+ fixed


nice mod!

Image

screenshot_20160807_110626.png
(389.88 KiB) Not downloaded yet
Last edited by cx384 on Sun Aug 07, 2016 09:14, edited 3 times in total.
Can your read this?
 

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

Re: [Mod] Stargate-like portal mod

by HarrierJack » Sun Aug 07, 2016 08:29

lol, stupid mistakes, should be fixed now

tnx :)
 

User avatar
DS-minetest
Member
 
Posts: 1026
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Stargate-like portal mod

by DS-minetest » Sun Aug 07, 2016 12:35

very nice mod :D
at HybridDog's technic extras mod you can use the music player by clicking onto the node at the right spot and in his sort of travelnet the elevator has something like this, too (or the digilines pad,...). can you add something like this to the dhd, too? or maybe make the stargate controllable with digiline
Edit: dont save the screenshots in the mod folder, they use ~1.5MB of ~1.8MB
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

Re: [Mod] Stargate-like portal mod

by HarrierJack » Sun Aug 07, 2016 12:47

yo DS-minetest

at the moment everything works in a simple way (well not considering the dialing part with symbols, this has been the latest feature.) Also when the DHD is set to a valid portal with the formspec, afterwards you can just punch the dhd to activate it to the last address

I've thougth about something where you can see / press the symbols on the dhd itself but I haven't done much with the mods you described so I wasn't aware there were such things possible. (also as I mentioned in your dhd topic, 3d stuff isn't my favorite part :)

For now the next planned thing besides listening to feedback would be to implement technic power requirement, which should be fairly easy since I've already done that for another mod autofarmer so I know what to put where (roughly speaking :))

But I'm a big advocate of anything mese / digiline / technic /automation related so I'll have a look at some code and see what's possible

edit: well screenshot.png is used by minetest mod selection if you go to that menu at least, but yeah arguably the other 2 I just put there since it was the easiest way to have them in github without needing to create some imgbucket account somewhere (and not caring for it the next 10 years as with others.. :) ) efficiency stuff comes later at this point, most ppl laugh at anything less then 10mb nowadays anyway (though I do some android programming as well where I hate apps over 5mb so I get your point :D )

edit: turned png into jpg (and low quality)
Last edited by HarrierJack on Sun Aug 07, 2016 20:15, edited 1 time in total.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

Re: [Mod] Stargate-like portals [portal_mgc]

by HarrierJack » Tue Aug 09, 2016 16:00

update:

- added technic power requirement
- added mesecons support
- made both things optional. You can now play without them and fall back to diamond portals (or custom blocks in default_settings.txt)

Don't get scared by the power requirement it's a lot :P 500.000 HV per second the portal is on and before I get flamed, a few things :)
1) a few HV batteries and some solar panels to charge em gets you a looong way (pun not intended if you put your portals close together :P )
2) quantum physics and matter transportation requires a lot of power, just ask CERN when they reveal theirs ;P
3) feel free to go to default_settings.txt and change it to 0, or 20 or 25.000.000 or .. you get the point :)


At this point I think everything I envisioned works (bugs aside plz report if you run into any)

I've looked at digilines but atm I'm not sure what or how to pass on the data (yes a string msg, but I'd rather not search the msg for i.e. portal:1234 or portal:on/off though it's the only thing I can come up with at the moment, i'm open for suggestions :P)

Any other wishes let them be known and I will see what I can do

enjoy.
Last edited by HarrierJack on Tue Aug 09, 2016 16:24, edited 1 time in total.
 

User avatar
DS-minetest
Member
 
Posts: 1026
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Stargate-like portals [portal_mgc]

by DS-minetest » Tue Aug 09, 2016 16:11

does it always require 500000 or only at activation?
at activation it should use more
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

Re: [Mod] Stargate-like portals [portal_mgc]

by HarrierJack » Tue Aug 09, 2016 16:16

it's 500000 while the portal is on, so for the 10 seconds (8+2secs if only one goes through) it's open for 1 person teleport it consumes 5M which is 5 hv batteries (better have one extra :))

ofcourse you wanted mesecons hehe, so if you keep it always on it'll go through your batteries fast, though a nuke with just 8x6 solar panels and a lot of batteries managed to hold out quite some time.

I did consider going for the portal using a lot and the dhd using a little when in 'standby' but that got a bit complex fast so for the moment the dhd's are very alien tech efficient when not doing anything :)

edit: I should have mentioned per sec, power demand is per second (since that's the 'tick' return call from technics timer)

probably should also mention that when teleporting far off by yourself the chunk with the original portal isn't loaded, not quite sure what happens then, no problems, but not sure what is consumed when, hard to test since either someone is there, and it's loaded or someone isn't hehe, kind of like the question "If a tree falls in a forest and no one is around to hear it, does it make a sound?"
 

User avatar
DS-minetest
Member
 
Posts: 1026
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Stargate-like portals [portal_mgc]

by DS-minetest » Tue Aug 09, 2016 20:36

so, 500k/s while its on and 5M when someone goes through, so 500k/s*10s+5M=10M
ill make a test with a portal far away
  1. Edit: you forgot to delete the old png screenshots
  2. Edit: it does not use power when you are away
  3. Edit: the formspec cant get the textures without unified inventory
Last edited by DS-minetest on Tue Aug 09, 2016 21:13, edited 2 times in total.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Stargate-like portals [portal_mgc]

by Byakuren » Tue Aug 09, 2016 20:53

HarrierJack wrote:update:

- added technic power requirement
- added mesecons support
- made both things optional. You can now play without them and fall back to diamond portals (or custom blocks in default_settings.txt)

Don't get scared by the power requirement it's a lot :P 500.000 HV per second the portal is on and before I get flamed, a few things :)
1) a few HV batteries and some solar panels to charge em gets you a looong way (pun not intended if you put your portals close together :P )
2) quantum physics and matter transportation requires a lot of power, just ask CERN when they reveal theirs ;P
3) feel free to go to default_settings.txt and change it to 0, or 20 or 25.000.000 or .. you get the point :)


At this point I think everything I envisioned works (bugs aside plz report if you run into any)

I've looked at digilines but atm I'm not sure what or how to pass on the data (yes a string msg, but I'd rather not search the msg for i.e. portal:1234 or portal:on/off though it's the only thing I can come up with at the moment, i'm open for suggestions :P)

Any other wishes let them be known and I will see what I can do

enjoy.

Messages can be tables too. You could also use different channels for different kinds of messages.
Every time a mod API is left undocumented, a koala dies.
 

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

Re: [Mod] Stargate-like portals [portal_mgc]

by HarrierJack » Thu Aug 11, 2016 16:28

Byakuren wrote:Messages can be tables too. You could also use different channels for different kinds of messages.


tnx for that tip.

For now I think I found the first problem:
portals acting up, not shutting down after you teleport somewhere else within view distance but probably outside loading distance, (this is ofc in a server on my own)

I can see it still being on, when I get closer things either kick in, or go wrong (on/off cycle) also the opposite portal transfer does work, probably due to that portal being closer to a mod which forceloads? (technic?) i'm not sure, I'm not that familiar with the code so if anyone has suggestions, feel free..

edit: rofl I just realized I haven't made the dhd craftable yet, (did think about that, but that was when I started and less important :) seems I completely forgot somehow )
It's funny nobody caught that yet :P
 

User avatar
DS-minetest
Member
 
Posts: 1026
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Stargate-like portals [portal_mgc]

by DS-minetest » Fri Aug 12, 2016 09:13

no one thinks the mod is unbuggy enough to use it at playing, i think

suggestions:
maybe make it more realistic:
  • if you go into paddle from wrong side you die
  • at destination gate make a paddle, too. if you go in, you die. (make it undeadly for ~0.5 seconds and give an acceleration in the water and take it out of the stargate again to be pressed out before the undeadly time ends)
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

Re: [Mod] Stargate-like portals [portal_mgc]

by HarrierJack » Sun Aug 14, 2016 13:52

DS-minetest wrote:so, 500k/s while its on and 5M when someone goes through, so 500k/s*10s+5M=10M
ill make a test with a portal far away
  1. Edit: you forgot to delete the old png screenshots
  2. Edit: it does not use power when you are away
  3. Edit: the formspec cant get the textures without unified inventory


Almost, it's not 5M extra for a person I meant it's 5M total if only one goes through (since it's 2 secs extra per person you can say it's 2x500k per person with a base usage of 4M)

- deleted old refs for old screenies
- will be working on the power consumption when not near
- added a quick texture for background of DHD, seems that texture was indeed taken from unified :)

note: if anyone thinks 'that guys art sucks' you're completely right :)
If anyone knows he can do better I'll happily swap these for theirs with honorable mention :P
Cause I really really really really hate pixel work..
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Stargate-like portals [portal_mgc]

by azekill_DIABLO » Sun Aug 14, 2016 16:03

it's hard to work in a pixel world when you hate it :) i will be happy to do some textures, just say me by pm or here what do you want i do!
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Stargate-like portals [portal_mgc]

by azekill_DIABLO » Mon Aug 15, 2016 12:23

here they are. if they are not what you want say me exactly what do you wnat
Attachments
textures.zip
(343.14 KiB) Downloaded 24 times
 

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

Re: [Mod] Stargate-like portals [portal_mgc]

by HarrierJack » Mon Aug 15, 2016 16:57

Tnx Azekill I'll have a look at the textures later.

Almost, it's not 5M extra for a person I meant it's 5M total if only one goes through (since it's 2 secs extra per person you can say it's 2x500k per person with a base usage of 4M)


Spoke too soon, well what I described was the intention which seemed to work when you're standing next to it :)

But it seems there's some async between technic timer and dhd timer resulting in a bit more power needed then calculated when you actually portal through to somewhere else and then come back (one person porting drained 6.5M from my batteries instead of the expected 5M , but it did this constantly with nearly the same numbers), might be cause I set demand on enabling meaning that probably the zero count also uses power, well long story short, even over distance it drains and shutsdown properly in my test version, just the calculation is a bit ..off.. :) for the time being I might leave that to the unpredictability of quantum physics.. :) )

note: I haven't updated this version yet as I'm still testing
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Stargate-like portals [portal_mgc]

by azekill_DIABLO » Tue Aug 16, 2016 08:25

also remeber that minetest has a short reaction time. this would explain why it takes a bit more than expected.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Stargate-like portals [portal_mgc]

by azekill_DIABLO » Tue Aug 16, 2016 15:33

Here are the textures! (sorry the eye is terrifying, i only know how to do bloody eyeballs...)
Attachments
textures.zip
(341.58 KiB) Downloaded 24 times
 

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

Re: [Mod] Stargate-like portals [portal_mgc]

by HarrierJack » Tue Aug 16, 2016 19:33

I just updated, will have a look at the textures

- fixed a bug where destroying dhd would enable as if punched]
- fixed an issue with facedirs not being set when activating through punch only
- added Azekill_DIABLO's dhd textures
- fixed timing async with technic and node timer, it's still possible a 1 sec difference occurs (though it seems rare)

so right now my promised 5M (or whatever timer you set) works, even over distance
* knocks on wood * I got tired of gate hopping but they all shutdown after the appropiate time

+ some other minor issues that might pop up

Though I recommend a clean world or at least destroying and replanting the DHD's so they reregister their correct values (though I still have temp fixes in place so your world doesn't crash you will probably face the wrong way coming out of the portal)
 

User avatar
DS-minetest
Member
 
Posts: 1026
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Stargate-like portals [portal_mgc]

by DS-minetest » Tue Aug 16, 2016 21:17

ive modeled a bit for a dhd (not finished). if you are interested in a dhd mesh tell me
Image
Attachments
screen.png
(218.58 KiB) Not downloaded yet
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

HarrierJack
Member
 
Posts: 15
Joined: Fri Jun 24, 2016 01:21
GitHub: harrierjack
IRC: HarrierJack
In-game: harrierjack

Re: [Mod] Stargate-like portals [portal_mgc]

by HarrierJack » Tue Aug 16, 2016 23:06

Not bad, you should check technic/stargate (though I can't remember if it works out of the box)
It didn't have anything of a DHD yet but it does/did have a working portal, complete with chakra stuff etc, looked good, though it was a 3x3 node, I wanted a bigger one which was easy enough, except that minetest doesn't like hitboxes bigger then 2-3 nodes.

So..I had to come up with a way to have a big portal and still have decent collision detection hehe, so why not use ingame block collision.. and here we are a few weeks later :D

As for the DHD, I immediately liked yours over some 3d model cause it fits a lot better with the world (everything being a cube and all :) )

My point is, I'm not against mesh models, it's just the rounder things get the more it looks strange compared to the rest of this world, I still have a few portal tryouts which are still made of cubes (and stairs) but look a lot rounder, it just always looked 'off' compared to the rest.
So if you want some practice and a purpose, go for it, if it's something awesome I might even use it, but as it is now I like the blockyness of the portal and DHD as they are now.

But who knows it might be awesome, let me know when you got something :) or fork it for testing. Or let me know if you want to know what to put where, it's only a few lines as long as you are better at blending than I am :P

PS: I tried to get a picture of the technic/stargate model but noticed it was my 'altered' version (I managed to re-align it in blender cause increasing it in code showed it was crooked hehe, but that also screwed over the textures, and I gave up several hours looking into getting the textures back :)
 

User avatar
DS-minetest
Member
 
Posts: 1026
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Stargate-like portals [portal_mgc]

by DS-minetest » Wed Aug 17, 2016 11:42

HarrierJack wrote:As for the DHD, I immediately liked yours over some 3d model cause it fits a lot better with the world (everything being a cube and all :) )

My point is, I'm not against mesh models, it's just the rounder things get the more it looks strange compared to the rest of this world, I still have a few portal tryouts which are still made of cubes (and stairs) but look a lot rounder, it just always looked 'off' compared to the rest.
So if you want some practice and a purpose, go for it, if it's something awesome I might even use it, but as it is now I like the blockyness of the portal and DHD as they are now.

But who knows it might be awesome, let me know when you got something :) or fork it for testing. Or let me know if you want to know what to put where, it's only a few lines as long as you are better at blending than I am :P

yep, the cubic style is mostly better in a cubic world. but there are several mods which ignore it, like ilights
i am now sure to be better in blending as you, im a newbie
maybe ill make the dhd model better for fun :) (and a bit practise)
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
Piezo_
Member
 
Posts: 115
Joined: Fri Jul 20, 2018 21:36
Location: purgatory
GitHub: is proprietary I use NotABug
In-game: Piezo_ or TheRealPiezo_

Re: [Mod] Stargate-like portals [portal_mgc]

by Piezo_ » Fri Jul 20, 2018 21:41

The download link seems to be dead. Screenshots, too.
while (true) { suffer(); }
 

User avatar
Lokrates
Member
 
Posts: 10
Joined: Sun Dec 17, 2017 10:22
Location: Lake Lucerne
GitHub: Lokrates

Re: [Mod] Stargate-like portals [portal_mgc]

by Lokrates » Sat Jul 21, 2018 14:09

I tested it briefly with minetest 5.0.0dev (without mods). Still seems to work.
Attachments
portal_mgc.zip
(774.71 KiB) Downloaded 13 times
Hätte ich doch nur Englisch gelernt.
 


Return to WIP Mods



Who is online

Users browsing this forum: wziard and 1 guest