Page 1 of 2

[Mod] Flags [1.1] [flags]

PostPosted: Sun Jul 22, 2012 16:44
by Bas080
Add some life to otherwise static buildings by decorating them with waving flags of different colors.

ImageImageImage

Craft
Image Image Image

Image Image Image
wool gives you 16 Image that wave

Image
Image
white flag and a dye gives you a Image that wave

Colors
Red
Orange
Yellow
Lime
Green
Aqua
Cyan
Sky-blue
Blue
Violet
Magenta
Red-violet

Changelog

Download
https://github.com/bas080/flags/zipball/master
or see code https://github.com/bas080/flags

Depends
default
wool
Unifieddyes

License
WTFPL (Textures & Code)

PostPosted: Sun Jul 22, 2012 16:46
by Calinou
Heh, nice idea. :P
PS: feel free to request a topic move; I've also edited your post (added direct download link, let's not confuse newbies. :p).

PostPosted: Mon Jul 23, 2012 00:18
by SegFault22
MC-style pickaxes... >.<
Great, I like the idea of flags. It would make it a lot cooler to take-over cities and place your flag and ''remove'' the other flag. If you ever add flags for different nations, please make the nation flags NON-flamable (for obvious reasons), while other user-made flags (ex. the flag of your empire you built in someone's MT server) can be flamable, so that it is a lot ''cooler'' when taking over major bases/cities of other empires/factions/kingdoms...

PostPosted: Mon Jul 23, 2012 00:38
by VanessaE
Except the USA flag, if added. It is our law here that if you want to burn it in protest, you can. It's a right we defend rather.... fervently. :-)

PostPosted: Mon Jul 23, 2012 01:04
by Splizard
Open source game Hedgewars has a collection of flags (including countries).
Maybe you could use those?

They can be found here: http://code.google.com/p/hedgewars/source/browse/#
(Click on share/hedgewars/Data/Graphics/Flags)

PostPosted: Mon Jul 23, 2012 01:06
by SegFault22
yeah but it may make others angry and spark a hacker-war that would destroy all of Minetest. So it is best that we don't let that happen :P

PostPosted: Mon Jul 23, 2012 23:33
by Bas080
Nice and thank you, I assume they are "free" as Hedgewars is opensource too.

Giving flags different functions is cool. If a person wants to burn a flag, they are most likely burning flags, not playing Minetest. :P All country flags will be treated equally! And for aesthetic reasons will be burnable. (floating flags are not nice looking)

Am thinking about types of game modes that are possible with flags.

Coloured flags depending on the unifieddyes mod is coming soon...

PostPosted: Tue Jul 24, 2012 00:39
by cornernote
how about paintable flags with the painting mod? =)

PostPosted: Tue Jul 24, 2012 17:21
by Bas080
cornernote wrote:how about paintable flags with the painting mod? =)


Interesting, can they still be animated if drawn with painting mod?

PostPosted: Tue Jul 24, 2012 22:55
by jin_xi
yes, they could be, but it is slow to do. look at painting and wobbly cactus mod. a combination of the two would result in awesome waving/lagging flags.

PostPosted: Wed Jul 25, 2012 00:25
by Guest10241024
Now, use the code from this, and make a nyancat rainbow. That will be fun.

PostPosted: Wed Jul 25, 2012 18:06
by VanessaE
Guest, you're evil :-)

PostPosted: Thu Jul 26, 2012 22:04
by VanessaE
Bas080: Can you update to the latest tweak of unifieddyes? It now requires the user to craft some glass bottles to hold the dyes. I split those off into a separate mod, "Vessels" (http://minetest.net/forum/viewtopic.php?id=2574), so you'll need both. It's a good idea to return the empty bottles to the player when a dye is used (using the "replacements = XXXX" argument, with "vessels:glass_bottle").

PostPosted: Sat Jul 28, 2012 16:25
by Bas080
Vanessa, For now this mod doesn't have a descent craft for making flags. Neither does the cotton mod from Jordach which requires "raw cotton" which is not part of the basic flower mod. I am working on a farming mod where cotton and all other types of raw materials can be grown so cotton based mods make more sense. And making a good foundation for other mods. for example a cooking mod (Which would go nicely with the vessels mod) and my rope mod (hemp ropes).

I also notice that the basic flower mod has irregularities. First of all the flowers are not dig-able and no cotton flowers which i already mentioned. Or am i using an older version of the flowers mod? Unifieddyes is dependent on the flowers mod. Shouldn't the flowers mod work good in that case. As many other mods are now dependent on the unifieddyes mod. For people that don't mod this is all very confusing...

PostPosted: Sat Jul 28, 2012 16:32
by InfinityProject
Olympics. USA Britain etc. flags.

PostPosted: Sat Jul 28, 2012 17:53
by VanessaE
It's possible that you have a very old version of Flowers then, probably as a result of me linking to an outdated one from the Unified Dyes page. The reason you couldn't dig them is probably due to the digging groups change, which the old flowers mod hasn't been updated separately to handle. I use the version of flowers found in Nature Pack, and there the flowers spawn regularly, and are all easily collected.

To get a wad of raw cotton, collect a cotton flower and place it in the crafting grid.

It's best if you just get a current release of Nature Pack or Nature Pack Controlled and use the flowers mod therein. The latter also comes with my Jungle Grass mod.

Now as for farming them, the only thing I can say that should definitely be the case is that seeds for flowers should come only from other flowers (including the ones spawned randomly by the flowers mod). Don't get them from some other random source, that'll just lead to confusion. This would probably require a new release of the flowers mod such that each gives up to 2 seeds when collected (I'd say a 20% chance of no seeds, 20% chance of 1 seed, and a 60% chance of 2 seeds). That way one can expand their flower garden at a somewhat realistic rate.

PostPosted: Mon Jan 28, 2013 03:28
by Bas080
VanessaE, updated the mod to support your latest dyes mod. Also added a craft with wool for white base flag

PostPosted: Mon Jan 28, 2013 03:36
by VanessaE
Cool :-)

PostPosted: Fri Mar 29, 2013 21:44
by ETC
Do you mind if I use the code to make a simpler version of this mod/in another mod?
My compliments on the animation by the way, it's very smooth and looks good.

PostPosted: Sat Mar 30, 2013 08:05
by Bas080
ETC wrote:Do you mind if I use the code to make a simpler version of this mod/in another mod?
My compliments on the animation by the way, it's very smooth and looks good.


I do not mind, could you share the link where you implemented it?

PostPosted: Sat Mar 30, 2013 17:37
by Likwid H-Craft
Hmm, this may help for the moon mod:) but do it place with a pole?

PostPosted: Sat Mar 30, 2013 21:06
by ETC
Bas080 wrote:I do not mind, could you share the link where you implemented it?


Yeah, I'll put the link in the readme and the post. Thanks!

PostPosted: Sat Mar 30, 2013 21:10
by ETC
Likwid H-Craft wrote:Hmm, this may help for the moon mod:) but do it place with a pole?


You can stack fenceposts and stick the flag off the side of it, it will fly off the pole just like a real flag.

PostPosted: Fri Aug 23, 2013 01:13
by Rehlgamer101
Doesn't work with the carpet mod

PostPosted: Fri Aug 23, 2013 22:16
by Bas080
Rehlgamer101 wrote:Doesn't work with the carpet mod

What seems to be the issue?

PostPosted: Sat Aug 24, 2013 15:35
by Rehlgamer101
Bas080 wrote:
Rehlgamer101 wrote:Doesn't work with the carpet mod

What seems to be the issue?

Well it first, doesn't pop up in inventory, in creative. (without crafting) and when I try to craft a flag, it comes up with carpet instead. I think that the both mods are too similar to each-other to work on the same server.

PostPosted: Sun Aug 25, 2013 12:45
by Bas080
Rehlgamer101 wrote:
Bas080 wrote:
Rehlgamer101 wrote:Doesn't work with the carpet mod

What seems to be the issue?

Well it first, doesn't pop up in inventory, in creative. (without crafting) and when I try to craft a flag, it comes up with carpet instead. I think that the both mods are too similar to each-other to work on the same server.


It should be able to work. The only thing is that both mods have the same craft. Btw, don;t forget to install unifieddyes and flowers mod. That could explain why the flags do not show up in the creative inventory. I'll post if the craft conflict is fixed.

PostPosted: Sun Mar 30, 2014 18:38
by mimilus
15:07:11: ERROR[main]: ========== ERROR FROM LUA ===========
15:07:11: ERROR[main]: Failed to load and run script from
15:07:11: ERROR[main]: /home/mimilus/.minetest/mods/flags/init.lua:
15:07:11: ERROR[main]: /home/mimilus/.minetest/mods/flags/init.lua:48: attempt to index global 'HUES' (a nil value)
15:07:11: ERROR[main]: stack traceback:
15:07:11: ERROR[main]: /home/mimilus/.minetest/mods/flags/init.lua:48: in main chunk
15:07:11: ERROR[main]: ======= END OF ERROR FROM LUA ========
15:07:11: ERROR[main]: Server: Failed to load and run /home/mimilus/.minetest/mods/flags/init.lua
15:07:11: ERROR[main]: ModError: ModError: Failed to load and run /home/mimilus/.minetest/mods/flags/init.lua


Minetest 0.4.9

PostPosted: Sun Mar 30, 2014 20:07
by Topywo
mimilus wrote:/home/mimilus/.minetest/mods/flags/init.lua:48: attempt to index global 'HUES' (a nil value)


Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local HUES = {
    "red",
    "orange",
    "yellow",
    "lime",
    "green",
    "aqua",
    "cyan",
    "skyblue",
    "blue",
    "violet",
    "magenta",
    "redviolet"
}

local HUES2 = {
    "Red",
    "Orange",
    "Yellow",
    "Lime",
    "Green",
    "Aqua",
    "Cyan",
    "Sky-blue",
    "Blue",
    "Violet",
    "Magenta",
    "Red-violet"
}


Copy/paste above code in the init.lua and then save it. It looks likes it works as supposed.

I think the HUES and HUES2 were once global instead of local (in the dependency unified dyes).

PostPosted: Sun Mar 30, 2014 21:29
by Sokomine
Topywo wrote:I think the HUES and HUES2 were once global instead of local (in the dependency unified dyes).

Sounds very likely. I hit the same problem with the tulips mod and had to edit it.