Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[1.6.2] Custom Flags - 1.3.1 [ModJam]

1.6.2 modjam flags decoration

  • Please log in to reply
49 replies to this topic

#1

nerd-boy
    nerd-boy

    Ghast Hunter

  • Curse Premium
  • Curse Premium
  • 2975 posts

Posted 10 August 2013 - 03:02 AM

Custom Flags


Custom flags was my submition to ModJam. For those who don't know ModJam is a 96 hour coding competition, were a modder has to code, test, bug fix and submit a mod starting from scratch in 96 hours. Voting for modjam mods will begin shortly. It should be noted that I have added a few small features (map item rendering, vertical hanging flags, bock type aware poles), please do not judge based on these features. All modjam entries can be downloaded from here, I will post a link to where you can vote (for me) when one is avaliable

Custom adds flags to minecraft that allow full customisation by the user. Flags can be attached to a flag pole and be put on display for everyone to see.

Posted Image

Mod Mechanics

An instruction manual can be obtained by using the /cf.instructions command.

The mod revolves around 1 new item (Flag) and 1 new block (Flag pole)

Flag poles

4 Flag poles are created by placing 3 wooden logs or 3 iron ingots in a vertical line in the crafting recipe
[ ][L][ ]
[ ][L][ ] = Flag Pole
[ ][L][ ]

Flag poles can be placed on any block. If you place a flag pole on the top or bottom of a block, you will be able to hag a horizontal flag, if you place it on the side of a block, you will be able to place a vertical hanging flag.

Flags

Flags are created by arranging 4 wool blocks (of any colour) in a 2 x 2 square in the crafting grid
[ ][W][W]
[ ][W][W] = Flag
[ ][ ][ ]

The wool may be any colour (or any combination of colours) and the resulting flag will take the colours of the wool blocks used.

Flags may be attached to any flag pole by right clicking a flag pole while holding a flag. In survival/hardcore modes, this will consume the flag, in creative mode, no flag is consumed. Each flag pole block can have a maximum of 4 flags attached to it. Each flag placed after the first will be placed after the previous flag. Right clicking on an flag pole with empty hands will remove the most recently attached flag and place it in the players inventory.

Flags attached to a flag pole will blow in the wind. Due to the fact minecraft wind only blows in the north direction, flags on vertical poles will ALWAYS blow north. The speed of the animation can be changed in the config file, (valid between 1 & 10) higher numbers will speed up the animation, lower nmumbers will slow it down.

Flag Designer

Right clicking while holding a flag (with no usable block in front of the player) will open the flag designer gui. The GUI supports a 32x32 12 bit ARGB image. A colour chooser is included on the right of the screen and drawing tools on the left The tools include
  • Pen Tool: Draws a single pixel at the current mouse location when the left mouse button is down
    • Holding shift will draw a straight line from the last location clicked to the current mouse location
  • Rectangle Tool: Draws a rectangle with the corners of the last 2 clicked locations.
    • Holding shift will force the rectangle into a square
  • Oval Tool: Draws an oval with the corners of the last 2 clicked locations.
    • Holding shift will force the oval into a circle
  • Flood Fill: Clicking the left mouse button will change all of the connected pixals of the same colour to the currently selected colour
    • Holding shift while clicking will fill the whole 32x32 area with the colour selected
  • Text Tool: Allows the user to write text at the most recently clicked location.
    • Pressing enter saves the text
  • Colour Picker: Clicking will set the current colour to the colour of the selected pixal
  • Save: Opens a save dialog to allow the user to save the current design to their filesystem for later use
  • Load: Opens a load dialog to allow the user to use an image on their current file system as their current flag. Images will be scaled to 32x32 and converted to 12bit ARGB before being drawn on the canvus
  • Load Section: Opens a load dialog to allow the user to use a section of an image on their current file system as their current flag. After selecting the desired file, a user will be asked how many sections they desire in the X and Y directions (between 1 & 4) and which section they want to use for the current flag. The resulting image will be scaled to 32x32 and converted to 12 bit ARGB colour space.
  • The OK button will save the design to the currently held flag, pressing escape will close the flag designer without changing the design.
  • Undo/Redo: Pressing Ctrl-z will undo and Ctrl-y will re-do.
Spoiler:

Configuration File

The configuration file for the mod is located in the configs directory under the name custom_flags.cfg The fields correspond to
  • Animation Detail Level: The detail level for the waving animation. 0 will turn the animation off, higher values will produce higher levels of detail (generally 16ish is way more than needed)
  • Cache Size: Not currently in use
  • Flag Speed: The speed of the animation (between 1 & 10). Higher values will speed up the animation
  • Use System L&F: Mimic the system look and feel for swing dialogs. Set to false to use the default look and feel (likely the cross platform metal L&F). Some users may have issues with the save/load buttons, if this is the case try changing this.
  • Load Images in FileChooser: Will preview the images in the filechooser. This feature may also have issues on some systems, turn it off if you have issues with the Save/Load buttons.
  • Flag Pole Id: The Id of the Flag Pole Block (defaults to 2700)
  • Flag Id: The Id of the Flag Item (defaults to 24532)
Instalation Instructions

The mod is compiled for Minecraft 1.6.2
  • Download and Install Minecraft Forge (http://files.minecraftforge.net/)
    • The mod was compiled using Minecraft Forge version 9.10.0.804
  • Download Custom Flags
  • Place the downloaded Custom Flags file into the /mods directory in the .minecraft directory (for Client) or the root of the server directory (for Server)
  • Run the client or server as usual
Video Demonstration


Mod Reviews
By CtrlShiftCreate



Known Bugs & Issues
  • Crafting an Iron flag pole will give you an oak flag pole
  • Some people may have issues with the Save/Load dialogs, try turning off the "Use System L&F" or the "Load Images in FileChooser" options in the config.
  • The Save dialog sometimes opens behind the minecraft window, causing the appearance of minecraft not responding.

Posted Image


Register or log in to remove.

#2

nerd-boy
    nerd-boy

    Ghast Hunter

  • Curse Premium
  • Curse Premium
  • 2975 posts

Posted 10 August 2013 - 07:14 AM

I have just uploaded a slightly more enhanced version. 1.3 adds
  • Undo/Redo buttons in the Flag designer (ctrl-z & ctrl-y)
  • Changed the crafting recipe of the flag poles
  • Added icons for the tools
  • Change the mouse cursor to the current icon in the flag designer gui.

Posted Image


#3

nokiaman12
  • Location: Denmark
  • Minecraft: nokiaman

Posted 10 August 2013 - 12:24 PM

Realy Cool :)
Posted Image

#4

sad555
    sad555

    Coal Miner

  • Members
  • 113 posts
  • Location: Turkey
  • Minecraft: sad555

Posted 10 August 2013 - 01:04 PM

I wish you were working on your main mods instead of this. But thank you anyway, looking interesting.
----------------------------------------------------------------------------
MINECRAFT needs World-edit like tools in the creative mode.

#5

jimmytfan
  • Minecraft: jimmytfan

Posted 10 August 2013 - 03:56 PM

I made a video for this :) https://www.youtube....h?v=ybd5wD2BJIg

#6

nerd-boy
    nerd-boy

    Ghast Hunter

  • Curse Premium
  • Curse Premium
  • 2975 posts

Posted 11 August 2013 - 11:19 PM

View Postsad555, on 10 August 2013 - 01:04 PM, said:

I wish you were working on your main mods instead of this. But thank you anyway, looking interesting.

Did you miss the part that this was for a competition? The back-end mechanics for this is actually a bit of a prototype test for a 1.6 compatible heraldry mechanic.

Posted Image


#7

Terrivel_World

Posted 12 August 2013 - 01:57 AM

For a weekend project, you once again makes the simple and amazing. The fact that is LOADS pictures to be used as a flag makes this all more useful in my gameplays.

Just one question: is this topic version of the mod more updated than the one inside Modjam pack? I know it is suposed to be judged by the result of the limited time window, but the more I meet a project closer to its true concept, I think it is better.
Host of "EXPRESSO MINECRAFT". It's in portuguese, but all are welcome! http://www.youtube.c...r/TerrivelWorld
Also, I fully support: Posted Image

#8

nerd-boy
    nerd-boy

    Ghast Hunter

  • Curse Premium
  • Curse Premium
  • 2975 posts

Posted 12 August 2013 - 02:39 AM

View PostTerrivel_World, on 12 August 2013 - 01:57 AM, said:

For a weekend project, you once again makes the simple and amazing. The fact that is LOADS pictures to be used as a flag makes this all more useful in my gameplays.

Just one question: is this topic version of the mod more updated than the one inside Modjam pack? I know it is suposed to be judged by the result of the limited time window, but the more I meet a project closer to its true concept, I think it is better.

I am glad you like the image loading, personally I think that is one of the features that really make it useable.

The version here is slightly more up to date than the one submitted as I continued working on it. Basicaly the one submitted to modjam was the "base" mod where this has a few bells and whistles. The added stuff are:
  • Flag poles using the type of wood in the crafting recipie (I.e. in the modjam all Flag Poles are Oak Flag Poles)
  • The ability to place flag poles horizontally and hang flags off them
  • The undo/redo buttons
  • The Icons for each of the tools in the GUI (They used to be just labels on buttons)
  • Changing of the mouse cursor depending on the tool in use
And the things I am about to add
  • Fixing the bug (hopefully) where the Save/Load dialogs would appear behind the minecraft window
  • A Rectangle/Square tool
  • An Circle/Oval tool.

If you are planning on judging my mod, please keep in the spirit of the competition and don't base your vote on the above features.

Posted Image


#9

Terrivel_World

Posted 12 August 2013 - 04:29 AM

View Postnerd-boy, on 12 August 2013 - 02:39 AM, said:

I am glad you like the image loading, personally I think that is one of the features that really make it useable.

The version here is slightly more up to date than the one submitted as I continued working on it. Basicaly the one submitted to modjam was the "base" mod where this has a few bells and whistles. The added stuff are:
  • Flag poles using the type of wood in the crafting recipie (I.e. in the modjam all Flag Poles are Oak Flag Poles)
  • The ability to place flag poles horizontally and hang flags off them
  • The undo/redo buttons
  • The Icons for each of the tools in the GUI (They used to be just labels on buttons)
  • Changing of the mouse cursor depending on the tool in use
And the things I am about to add
  • Fixing the bug (hopefully) where the Save/Load dialogs would appear behind the minecraft window
  • A Rectangle/Square tool
  • An Circle/Oval tool.
If you are planning on judging my mod, please keep in the spirit of the competition and don't base your vote on the above features.

Of course I won't judge it outside its original rules, but truth be told, plenty will: since it is hard to find info about the mods around Modjam oficial media, people will look around for that and will find the topics that will probably have a more updated version. A lot of people will have trouble not mixing up when voting.

Thanks for the reply and good luck.
Host of "EXPRESSO MINECRAFT". It's in portuguese, but all are welcome! http://www.youtube.c...r/TerrivelWorld
Also, I fully support: Posted Image

#10

crafteverywhere
  • Minecraft: crafteverywhere

Posted 12 August 2013 - 05:00 AM

It's really cool!I have voted it for modjam.

And maybe you can afford some designs in game but not only allow us do it by ourselves.

edit:I know it can load the img form files,but flag imgs lib in game is differrnt!

#11

nerd-boy
    nerd-boy

    Ghast Hunter

  • Curse Premium
  • Curse Premium
  • 2975 posts

Posted 12 August 2013 - 05:12 AM

View PostTerrivel_World, on 12 August 2013 - 04:29 AM, said:

Of course I won't judge it outside its original rules, but truth be told, plenty will: since it is hard to find info about the mods around Modjam oficial media, people will look around for that and will find the topics that will probably have a more updated version. A lot of people will have trouble not mixing up when voting.

Thanks for the reply and good luck.


I do see were you are comming from, I actually did package a README file in the jar, and also sent one seperately with the submition. I actually thought Searge would have included the readme file with the download so people would have know to to use the mod (and I assume most are in the same boat).

In either case, many of the additions were minor, I see it as more of adding bells and whistles. Unlike many other entries I prioritised bug fixing over more features so my entry was quite stable (except for the file dialog apearing behind the minecraft window sometimes). The main issue was people not knowing how it was used.


View Postcrafteverywhere, on 12 August 2013 - 05:00 AM, said:

It's really cool!I have voted it for modjam.

And maybe you can afford some designs in game but not only allow us do it by ourselves.

edit:I know it can load the img form files,but flag imgs lib in game is differrnt!

As you pointed out, because you can load any image I am not sure if it is really necessary  Furthermore I am the first to admit that I am not the best graphic artist (which is funny because the mod does basically revolve creating your own graphics)

P.s. thanks for the vote, did you look at the other entries also?






EDIT: I am actually quite looking forward to someone having a go at making a capture the flag map

Posted Image


#12

Simbaholic

Posted 12 August 2013 - 10:16 PM

You don't know how long I've been waiting for a flag mod.. *Bows.*
This is awesome. ^^

#13

nerd-boy
    nerd-boy

    Ghast Hunter

  • Curse Premium
  • Curse Premium
  • 2975 posts

Posted 13 August 2013 - 04:32 AM

I have been putting a few finishing touches on the interface, what do you think?

Posted Image

Personally I am not 100% sold on displaying the map texture behind the canvas area. What do you guys think?

Posted Image


#14

nokiaman12
  • Location: Denmark
  • Minecraft: nokiaman

Posted 13 August 2013 - 09:07 AM

View Postnerd-boy, on 13 August 2013 - 04:32 AM, said:

I have been putting a few finishing touches on the interface, what do you think?

Posted Image

Personally I am not 100% sold on displaying the map texture behind the canvas area. What do you guys think?
I think its much better, But the other GUI should have a map behind them as well. Would make it a bit more  Mediavel
Posted Image

#15

sad555
    sad555

    Coal Miner

  • Members
  • 113 posts
  • Location: Turkey
  • Minecraft: sad555

Posted 13 August 2013 - 10:23 AM

View Postnerd-boy, on 11 August 2013 - 11:19 PM, said:


Did you miss the part that this was for a competition? The back-end mechanics for this is actually a bit of a prototype test for a 1.6 compatible heraldry mechanic.

Sorry, it seems i missed the point. Thank you very much then :)
----------------------------------------------------------------------------
MINECRAFT needs World-edit like tools in the creative mode.

#16

Silentscope88
  • Location: The Nether

Posted 13 August 2013 - 10:56 AM

Uhhh... How do I upload screenshots? I made and took pictures of the American Flag and Union Jack I made.

#17

nerd-boy
    nerd-boy

    Ghast Hunter

  • Curse Premium
  • Curse Premium
  • 2975 posts

Posted 14 August 2013 - 12:54 AM

Ok guys, just updated to 1.3.1 which adds:
  • Revamped gui
  • New Text tool (allowing you to write text on your flag)
  • In game instruction manual when you type \cf.instructions

View PostSilentscope88, on 13 August 2013 - 10:56 AM, said:

Uhhh... How do I upload screenshots? I made and took pictures of the American Flag and Union Jack I made.
I have actually been waiting for people to do this.

You will have to upload the image to an image hosting website, I use imgur

Posted Image


#18

Silentscope88
  • Location: The Nether

Posted 14 August 2013 - 01:16 AM

View Postnerd-boy, on 14 August 2013 - 12:54 AM, said:

Ok guys, just updated to 1.3.1 which adds:
  • Revamped gui

  • New Text tool (allowing you to write text on your flag)

  • In game instruction manual when you type \cf.instructions

I have actually been waiting for people to do this.

You will have to upload the image to an image hosting website, I use imgur

Alright, thanks! Also, would you be so kind as to credit me for the screenshots I made? I won't get all upset if you don't, but I would be very happy if you did.

#19

Silentscope88
  • Location: The Nether

Posted 14 August 2013 - 01:21 AM

Also, the screenshots show bits and pieces from other mods. Just a disclaimer.

#20

Silentscope88
  • Location: The Nether

Posted 14 August 2013 - 01:31 AM

Here they are! They show content displayed in Bibliocraft, Sailcraft (lovely new mod, by the way. I seriously recommend it),  Twilight Forest, Staircraft, haycraft, and harvestcraft. Possibly Weee! Flowers!
Posted Image Posted Image
Posted Image
Posted Image
Posted Image

Posted Image