Making a minecraft mod like Improved Chat

Discussion in 'Miscellaneous' started by d1223m, Mar 11, 2012.

Thread Status:
Not open for further replies.
  1. I had some trouble with /ignore too, but I dont think this must be fixed in this mod, but rather in the EMC code.
  2. Yeah i know.
  3. It is fully made by me. x3
    I might try to find a place where i can put it... :p
  4. Twitch1 and d1223m like this.
  5. All programming is good - its like spoken languages: once you know one you know 10% of all the others. ( Actual numbers may vary )
    Importerer likes this.
  6. I know that. :) I was saying that although not Java, it is definitely a step in the proper direction. :)
    The program appears to function properly on the code level, but I do not recognize the language so I do not know how which DK I need... :)
  7. DK?

    Python is a great language ( http://python.org ) and I would definatly recommend it as a first language to learn. 50% of my day job is writing a python powered web app.

    There is also Jython which allows writing python code for JVM and IronPython which allows for writing .NET apps. MCEdit is written in Python. I imagine you use some other python apps without knowing it too! :)
  8. Development Kit.
    I actually have TIJ-3rd-edition4.0 (Thinking In Java), MCP, Python 2.7, Eclipse Indigo, XCode 11, JD-GUI, Java VisualVM, and Jar Bundler (part of XCode). In addition, I have source code for treecapitator, InGame Info, and a few others I pulled from GitHub and the auto-login, auto-fullscreen codes for original Minecraft Launcher. :D
    However, I don't even know where to begin... :)
  9. * add print statements
    * break stuff
    * fix it again

    :D
  10. Yeah, it's not Java. It is Python! Btw. Thanks for the like as it got me the Active Member status! :D
    Ps. Thanks for the nice feedback! :)
  11. So you know lots of Python? As im trying to make small game but im failing with... >.<
  12. Don't kick for when your PM'ing someone and they don't care though, my friends and I sometimes swear in PM, it's not hurting anyone, right?
    MEINCRAVTA likes this.
  13. I disaggre. Swaering in general is bad and unless you want be a rapper when your older swearing is not a good idea.

    Btw you really should'nt ask for likes.
    BigDavie likes this.
  14. Lets get back on topic...

    Im slowly getting things working. Iv now got variables (user defined, prompt bg/fg colors and prefix) and commands so you can set/list/delete variables.

    Next up is processing incoming messages so can trigger the setting of vars and other code.

    Justin mentioned he'd like to see tabs for each of the chat channels - can anyone come up with some mock ups for how these tabs might look/work? There are tabs in ImprovedChat but theyre not very good - they are just text labels that float in the middle of your screen.
    margaritte likes this.
  15. I don't know how to respond to that, and who said I didn't want to be a rapper? :p
  16. Ok here is the first version of my mod.

    Before you even think of downloading the file:
    * dont ask how to install it - if you cant you probably dont want to be running it yet ( this is just a first version to see if it works at all for anyone else but me)
    * i have no idea about compatibility with other mods ( I would try it with a clean minecraft )
    * this isnt even nearly a complete replacement for ImprovedChat yet - dont expect it to be
    * i take absolutely no responsibility for breaking your computer/MC/life ( i dont even really know java so who knows what I did... )
    * you should always be very carefull when downloading any files from the internet, especially ones that can execute code on your computer - maybe I stuck in some code to send me your MC username and password ( note: i didnt )

    If your still willing to try it the commands implemented so far are (all commands should be prefixed with ~):
    * `set` (no arguments ) list the current variables
    * `set [varname] [value]` set a variable
    * `unset [varname]` delete a variable
    * `on` (no arguments) list the current watches
    * `on searchstring "commands to exec"` add a watch to execute some commands when the text is seen
    * `off [number]` delete a watch - number is the number you see when running `on` with no arguments
    * `print [message]` print some text out
    * `save` save the current config
    * `load` load the config from disk (will overwrite all vars and watches you currently have)

    There are several variables you can set via the `set` command:
    * prompt - the prompt prefix in the chat input box
    * prompt_fg - the forreground color of the chat input box
    * prompt_bg - the background color of the chat input box
    * command_prefix - a string indicating what will be intercepted as a chat command
    * history_max - max size of the chat history ( useless atm )

    The prompt_fg and prompt_bg variables are colors and should be set like 0xAARRGGBB ( where AA is alpha, RR red, GG green and BB blue )

    If you want to set a variable to something with a space in quote the second value:
    * set command_prefix "> > this is a stupid example"

    The `on` command is the most usefull. Some examples:
    * `on "&cFocus set to &2Town" "set prompt_fg 0xff00ff00"` - change the prompt color to green when in town chat
    * `on "&cFocus set to &2Town" "set prompt T>"` - change the input prompt to T> when in town chat

    Even more notes:
    * The config file is in [your minecraft folder]/d1223m/chat.conf
    * Chat config is just the same as entering commands
    * When watches match some text I know its a bit verbose as it tells you its setting vars - Ill sort something out for that

    If anyone wants the source feel free to decompile it or just send me a PM and ill send you it.

    Attached Files:

    Twitch1 and margaritte like this.
  17. Testing now. :)
    So far, none of the commands are doing anything... I am going to put them into the config file and see what happens...

    Does it require modloader? haha
    The answer is YES... :)
    Equinox_Boss and d1223m like this.
  18. :confused: urm - it shouldnt. it just worked when i tried it in a fresh MC. you are prefixing all the commands with ~ ?

    like `~set` ?

    (without the backticks ;) )
  19. Yes. With modloader, it seems to function properly... I don't know what the deal is honestly...
    I still don't know what the configs mean though haha

    I crashed minecraft by using ~set prompt_bg 1x11221122 lol

    It is still a bit unstable... I can't find the .cfg file being generated and after crashing it with the improper color code, I have to reinstall my minecraft.jar. :)
    Just keep updating us when you have the next version, I will continue to run and crash my Minecraft without fail. ;)
    Squizzel_Boy likes this.
Thread Status:
Not open for further replies.