OldCoder general development

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

OldCoder general development

by OldCoder » Sun Aug 30, 2015 23:10


I'll use this thread to discuss general Minetest development and administration topics, focusing on mods but addressing other issues as well.

I'll start with an interesting griefing story and the resolution, which mod authors may wish to note.

Recently, I created a world named Wizard School. The world started with an existing school campus, which was protected, and a "build" area for new buildings located outside the campus.

One player constructed an arcade in the "build" area. The arcade was griefed almost immediately. We found copies of the following structure pasted at different heights where the arcade had been:


Image


The arcade was protected, which seemed to rule out griefing by unprivileged players. Additionally, a review of the logs didn't show building activity inside the protected area. And the copies of the new structure were identical.

This looked like a WorldEdit attack, but there were no schems to load. Vanessa and I discussed the possibility that it was a dungeons mapgen glitch or an attack using a hacked client, but neither theory fit the facts.

A "build chest" attack was another possible explanation. But my modset didn't include any "build chests".

Amaz searched the "_game" tree and found some MTS files in the Caverealms mod. One of them, the fortress, turned out to be the mystery structure.

Caverealms mapgens a special node, s_fortress, and a related ABM then builds a fortress next to the node. There are two bugs in the mod:

(1) s_fortress and a similar node named s_fountain aren't barred from the Creative inventory.

(2) The mod doesn't check for protection. If somebody is able to place some of these nodes right outside a protected area, the buildings created by the ABMs can destroy everything in the area regardless of protection.

A partial fix is to make this change to the s_fountain and s_fortress entries in caverealms/node.lua:

Code: Select all
- groups = {crumbly=3, schema=1},
+ groups = {crumbly=3, schema=1, not_in_creative_inventory=1},


This change doesn't address the protection bug, but it does prevent players from misusing Creative to grief in this manner.

Mod authors are advised to set not_in_creative_inventory=1 in a similar way for dangerous nodes. It is also a good idea to take protection issues into account.

Server hosts are advised to make the change in question for Caverealms or to omit the mod from Creative worlds.

To end the story, I made the preceding change and checked the Wizard School logs again. I found this:

Code: Select all
zeo places node    caverealms:s_fortress at (597,8,-374)
zeo tried to place caverealms:s_fortress at protected position (611,6,-373)
zeo tried to place caverealms:s_fortress at protected position (606,4,-384)
zeo places node    caverealms:s_fortress at (597,5,-383)
zeo places node    caverealms:s_fortress at (600,3,-398)
zeo places node    caverealms:s_fortress at (600,4,-398)


A player named zeo had placed several of the s_fortress nodes around the protected arcade. The s_fortress ABMs then built fortresses right onto the arcade and obliterated it.

zeo had tried to place two s_fortress nodes inside the arcade, but my initial search for the griefer hadn't turned that up because my grep command was too specific. I may have searched for "places node" and not "tried to place".

Needless to say, zeo's *ss is xbanned. For others who'd like to keep an eye out for this griefer, his or her IPV4 is: 73.186.171.247

Last edited by OldCoder on Sat Jul 16, 2016 22:43, edited 5 times in total.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: OldCoder general mod issues

by Don » Sun Aug 30, 2015 23:25

Thanks for the reminder. I keep forgetting to put in protection. I will review my mods and add it as needed.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
ArguablySane
Member
 
Posts: 116
Joined: Sun Oct 12, 2014 21:29

Re: OldCoder general mod issues

by ArguablySane » Mon Aug 31, 2015 00:23

Nobody should really be using blocks and ABMs in that way anyway. There are better ways to generate large structures across chunk boundaries, although it would sometimes be easier if the engine gave us access to the seeds of adjacent chunks.

Just split the map up into your own virtual chunks, calculate the contents of all the ones which could potentially affect the chunk you're currently generating (using each one's position as the seed for its prng), then generate the appropriate things inside the current chunk. It's possible to generate arbitrarily large structures in this way, and there's no risk of players getting their hands on game-breaking blocks.
The above post and any ideas expressed therein are released to the public domain under a Creative Commons CC0 license.
 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Mon Aug 31, 2015 07:00


Don and ArguablySane, thank you both for your remarks.

Don, I am of course a Batmod user and MyLights has gone into some of my worlds in the last few minutes. ArguablySane, if you'd like me to test mods that you come up with, I'm at your disposal.

 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: OldCoder general mod issues

by Don » Mon Aug 31, 2015 23:31

I just posted mylights on the forum. I would love it if you could give your opinion on there. Would like to know what is good and what is bad about it.
https://forum.minetest.net/viewtopic.php?f=9&t=13154
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Wed Sep 02, 2015 07:02


Don wrote:"I just posted mylights on the forum. I would love it if you could give your opinion on there."

I'll cross-post this response to my thread and to Don's.

Don's MyLights haven't seen enough use in my worlds for me to comment much yet. However, here's a screenshot of some basic lights in use on the Moon. This is just a couple of the supported types, but they seem clean in design and functional.


Image

 

User avatar
programmingchicken
Member
 
Posts: 537
Joined: Sat Apr 18, 2015 02:20
GitHub: ProgrammingChicken
IRC: gamer chicken
In-game: gamerdude

Re: OldCoder general mod issues

by programmingchicken » Fri Sep 04, 2015 17:20

;-; I still miss my arcade. I spent 2 whole minutes working on it XD
I'm bold. I'm sarcastic. I'm PChicken.
 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Sat Sep 05, 2015 05:50


I'm testing a new Santa NPC based on an old model apparently created by jordan4ibanez in 2012.

He's compatible with Mobs Redo, fights monsters, drops coal, and you can tame him by feeding him cake. If I find a cookies and milk mod, I'll add support for that as well:

The new mod isn't ready for release or its own thread, but I thought I'd share a screenshot:


Image

 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Tue Sep 08, 2015 03:10


Simulating a RetroBiome based on RetroBlocks. I might try adding something like this to the Ethereal mapgen mod:


Image

 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Mon Sep 14, 2015 08:39


I thought I'd try to solve two problems at once:

* The Sea mod doesn't work well if it's added to existing worlds. The issue is that Sea relies on ores to spawn things, so if the mod isn't present at mapgen time for a given underwater area, the area remains barren.

* It's difficult to build underwater due to darkness and the fact that one drowns. Players can build things like lit glass tunnels on the sea floor, but I'd like to encourage greater use of the ocean.

So, I've forked the Sea mod and I'm evaluating three changes:

* My version of Sea optionally populates the ocean using ABMs instead of ore-based spawning
* Sea-plants now emit light
* I'm enabling underwater breathing in some worlds

Note: ABMs will be slower than ores, but sysadmins can switch back to the old approach once existing areas are processed.

The hope is for these changes to lead to interesting builds in the future.

Here's what the modified Sea looks like presently. The plants were generated by an ABM:


Image


 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: OldCoder general mod issues

by Don » Mon Sep 14, 2015 11:00

Nice. I like the plant giving off light.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: OldCoder general mod issues

by twoelk » Mon Sep 14, 2015 13:33

And I had always though I was the only one with a still active map that uses the santa-mod :-D

I wonder wether a season checker could be added to activate certain mods at certain times

Regarding building in or under water you might want too consider the papyrus-roots in Unter Null or Voxelgarden by Casimir. They have worked well on several "Waterworld" style servers to let players build in or underwater.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: OldCoder general mod issues

by Inocudom » Mon Sep 14, 2015 17:13

OldCoder wrote:
I thought I'd try to solve two problems at once:

* The Sea mod doesn't work well if it's added to existing worlds. The issue is that Sea relies on ores to spawn things, so if the mod isn't present at mapgen time for a given underwater area, the area remains barren.

* It's difficult to build underwater due to darkness and the fact that one drowns. Players can build things like lit glass tunnels on the sea floor, but I'd like to encourage greater use of the ocean.

So, I've forked the Sea mod and I'm evaluating three changes:

* My version of Sea optionally populates the ocean using ABMs instead of ore-based spawning
* Sea-plants now emit light
* I'm enabling underwater breathing in some worlds

Note: ABMs will be slower than ores, but sysadmins can switch back to the old approach once existing areas are processed.

The hope is for these changes to lead to interesting builds in the future.

Here's what the modified Sea looks like presently. The plants were generated by an ABM:


Image



Now, if you could just persuade VanessaE to add this to Dreambuilder, everything would work out very nicely.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: OldCoder general mod issues

by Sokomine » Tue Sep 15, 2015 15:01

That underwater world looks very nice! It's good to have more light down there. The only worry I have is that the abm might get too excited and place too much :-)
A list of my mods can be found here.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: OldCoder general mod issues

by Hybrid Dog » Thu Sep 17, 2015 16:06

l have an edited version of the sea mod, too.
https://github.com/HybridDog/sea/

When l modified Sokomine's replacer mod, l (randomly) used it to replace a field of desert sand but somehow not every node there was replaced. When l pointed those nodes, l saw that they were faked desert sand containing sea items. l disabled it and added an alias because l think many mods may try to detect desert sand to e.g. find out if players are in deserts https://github.com/HybridDog/sea/commit ... f2f944cbe4
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: OldCoder general mod issues

by Inocudom » Fri Sep 18, 2015 18:45

I think that this topic can be used to help out OldCoder if he is willing to post the mod errors/mod conflicts that he is experiencing.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: OldCoder general mod issues

by Don » Sat Sep 19, 2015 04:46

Post away! If it is something I can fix or maintain I will post that I will do it.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Sat Sep 19, 2015 10:21


Inocudom wrote:"I think that this topic can be used to help out OldCoder if he is willing to post the mod errors/mod conflicts that he is experiencing."


I appreciate it and may post issues here for discussion in the future.

One current issue is related to signs_lib. Vanessa likes to see updates of her mods used, as most mod authors do, but signs_lib is not backwards compatible. If the new releases are used, old signs are broken. Vanessa points out that this can be fixed by a manual rotation, but I don't have time to go find signs and do that.

If there is a way to use an ABM to fix old signs, this would be acceptable. TenPlus1 has also sent me what I think is his version of the signs_lib code to look at.

 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Sat Sep 19, 2015 10:53


Sokomine wrote:"That underwater world looks very nice! It's good to have more light down there. The only worry I have is that the abm might get too excited and place too much :-)"


I plan to test my version of Sea and ultimately release it. If both the new spawn mode and the level of illumination can be controlled in the conf file, my version should work as a drop-in replacement for the existing mod.

Regarding ABMs placing too many objects, this shouldn't happen unless the random-number generator breaks.

The old Sea mod places special ores at mapgen time. Once the ores are placed, that is all there will be in a given area. Clams and sea-plants can only spawn on top of the ores; this means that their number is limited and also that spawn ABMs are low-load, as the ABMs run only for the ores in question and not for native blocks.

I'm experimenting with ABMs that generate the ores at run-time. This allows areas that existed before the mod was added to be populated.

My runtime-ore ABMs treat each native block that they encounter as a candidate for conversion to each Sea ore once and only once. Node meta-data is used to implement this restriction. Due to this restriction, the number of Sea objects produced should be as limited under the new approach as under the old one.

The metadata increases the size of a world-file slightly. Additionally, the runtime-ore ABMs are high-load, as they are run on most sea-floor blocks. However, server owners can use runtime-ore mode just temporarily to convert old areas and then switch to mapgen-ore mode.

So, in a sense, one can have one's Sea-cake and eat it too.

 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: OldCoder general mod issues

by Hybrid Dog » Sat Sep 19, 2015 11:38

OldCoder wrote:If there is a way to use an ABM to fix old signs, this would be acceptable. TenPlus1 has also sent me what I think is his version of the signs_lib code to look at.

[/size]

you could test at the backside of signs if there's a walkable, pointable and not buildable_to node
OldCoder wrote:The metadata increases the size of a world-file slightly. Additionally, the runtime-ore ABMs are high-load, as they are run on most sea-floor blocks. However, server owners can use runtime-ore mode just temporarily to convert old areas and then switch to mapgen-ore mode.[/size]

you could use PseudoRandom and cache known values in a table instead of saving stuff to meta
 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Sat Sep 19, 2015 18:11


Hybrid Dog wrote:"you could test at the backside of signs if there's a walkable, pointable and not buildable_to node"


Thank you. I presently lack the knowledge to do this, but I'll make a note of it.

Hybrid Dog wrote:"you could use PseudoRandom and cache known values in a table instead of saving stuff to meta"


Do you mean a disk file?

Note: There are no values per se to be recorded.This is a set of flags that indicate which native nodes have been candidates previously for conversion to ores. The record needs to persist indefinitely or until the runtime-ores mode is no longer going to be used.

I've considered using an external file because it would be easy to delete such a file once it was no longer needed. However, I'm using the meta-data approach presently because it was very easy to implement.

 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: OldCoder general mod issues

by Inocudom » Sat Sep 19, 2015 18:23

OldCoder wrote:
Sokomine wrote:"That underwater world looks very nice! It's good to have more light down there. The only worry I have is that the abm might get too excited and place too much :-)"


I plan to test my version of Sea and ultimately release it. If both the new spawn mode and the level of illumination can be controlled in the conf file, my version should work as a drop-in replacement for the existing mod.

Regarding ABMs placing too many objects, this shouldn't happen unless the random-number generator breaks.

The old Sea mod places special ores at mapgen time. Once the ores are placed, that is all there will be in a given area. Clams and sea-plants can only spawn on top of the ores; this means that their number is limited and also that spawn ABMs are low-load, as the ABMs run only for the ores in question and not for native blocks.

I'm experimenting with ABMs that generate the ores at run-time. This allows areas that existed before the mod was added to be populated.

My runtime-ore ABMs treat each native block that they encounter as a candidate for conversion to each Sea ore once and only once. Node meta-data is used to implement this restriction. Due to this restriction, the number of Sea objects produced should be as limited under the new approach as under the old one.

The metadata increases the size of a world-file slightly. Additionally, the runtime-ore ABMs are high-load, as they are run on most sea-floor blocks. However, server owners can use runtime-ore mode just temporarily to convert old areas and then switch to mapgen-ore mode.

So, in a sense, one can have one's Sea-cake and eat it too.


Uploading the source code of your modifications to sites like GitHub allows people to help you further if you need assistance with something. I recently noticed that you already have an account there.
 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Sat Sep 19, 2015 20:00


Inocudom wrote:"Uploading the source code of your modifications to sites like GitHub allows people to help you further if you need assistance with something. I recently noticed that you already have an account there."


Yes, I'm familiar with GitHub :-) I've cloned 100s of GitHub projects for my Linux distro in the past.

My Lord of the Test (LOTT) _game is a special case because it's downstream to an upstream repo run by others. I think that the latest version of the upstream code is private, but my downstream copy will go into a public repo at a later date.

Moontest is another special case. The world was buggy enough to be time-consuming, but it had promise. We'd worked out that mapgen changes could be used to add the entire Solar System to the _game. The UFOs were actually going to travel between different worlds. I'd planned to move the _game to GitHub in the Summer to facilitate this. However, all of the developers working on the project disappeared.

I might create a Moontest repo regardless and seek mapgen authors in particular, but I need to triage my time presently. The circumstances are a little unusual. Talk to me in IRC PM and I'll explain.

What I think that I'll do is create a formal base _game, comparable to Vanessa's Dreambuilder, restructure my more normal worlds to use it as a starting point, then test the _game and GitHub it. If I add configuration files, optional world-core mods such as my versions of Hungry Games and Ethereal, and instructions, people will be able to reproduce most of my worlds except for the maps. Some of those will be released separately.

This will provide maximum benefit to the community.

The stand-alone mods and/or modpacks that I've posted recently about are presently experiments. They're serious projects, though, and will be GitHubbed if my situation stabilizes.

 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: OldCoder general mod issues

by Hybrid Dog » Sun Sep 20, 2015 06:57

OldCoder wrote:Do you mean a disk file?

Note: There are no values per se to be recorded.This is a set of flags that indicate which native nodes have been candidates previously for conversion to ores. The record needs to persist indefinitely or until the runtime-ores mode is no longer going to be used.

I've considered using an external file because it would be easy to delete such a file once it was no longer needed. However, I'm using the meta-data approach presently because it was very easy to implement.

[/size]

No, l think about recalculating the information after restarting the server. PseudoRandom is fairly fast and the information is stored in a table that doesn't need to be calculated constantly. Storing in meta makes clients lag l think https://github.com/minetest/minetest/pull/3166
 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Sun Sep 20, 2015 09:09


Hybrid Dog wrote:"No, I think about recalculating the information after restarting the server. PseudoRandom is fairly fast and the information is stored in a table that doesn't need to be calculated constantly."


I'm not certain that we're talking about the same thing.

I need to know if a particular native block (for example, a dirt or sand block) has been evaluated previously as a candidate for conversion to a particular ore. It's not something, I think, that can be calculated.

I'd be happy to hear more. Perhaps we could discuss this by email, in-game, or in IRC.

 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

by Hybrid Dog » Sun Sep 20, 2015 18:20

lf you use PseudoRandom, you could use the position as seed, so the evaluation is always the same at the position where you calculate it, i.e. you don't need to save it (although, caching it in a table and taking values from there instead of recalculating it every time decreases lag of course and the table is small, only server side and in the memory)
 

OldCoder
Administrator
 
Posts: 330
Joined: Mon Oct 01, 2012 14:59

Re: OldCoder general mod issues

by OldCoder » Sun Oct 18, 2015 06:56


I'm continuing to tweak my mobpack (sic), which is presently named ManyMobs. I've added talking mobs. If you speak to them, they'll respond with a random message.

A future step might be to make them answer questions. For example, perhaps a player will be able to ask bees where to get honey. In the long term, players might be able to use English commands to direct tamed mobs,

The screenshot shows a test of the first iteration of the code. There are bees and wolves nearby, though out of sight. If there aren't any present, talking to them has no effect.


Image

 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: OldCoder general mod issues

by Don » Sun Oct 18, 2015 13:34

You will have to change your name to Dr Dolittle.
This is a great idea. I can think of a number of uses for this.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: OldCoder general mod issues

by twoelk » Sun Oct 18, 2015 13:55

I just imagined walking into the woods and yelling "hello!"
and a multitude of creatures
answers
each in it's style
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: OldCoder general mod issues

by Sokomine » Fri Oct 23, 2015 03:49

Oh yes! Talking mobs are very fine. There's another mod out there that uses text to speach to actually output any sound.

While I find it a bit hard to talk to bees (can't dance like they do - so communication is tricky :-)), other mobs would be valid targets for talking to :-) Maybe they could emply some eliza-like algorithm and make the world more alive.
A list of my mods can be found here.
 

Next

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron