1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Modders: Call to Arms!

Discussion in 'Community Dev Corner' started by Geti, Dec 28, 2013.

Mods: Downburst, Mazey
  1. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    MM has requested that I gather all modding related issues in one place so he can fix them. As such, I need to gather all modding related issues in one place.. so he can fix them.

    Please respond here with confirmed issues with modding in the following format

    Description: <here>
    Steps to Reproduce: <simple description of how to reproduce it>
    Example of Affected Mod: <zip/rar/tar/whatever of a simple mod that reproduces the issue, either attached or as a publically accessible link (dropbox preferred)>

    The final step is especially important as any steps we can take to lighten the load for him are steps towards a fix. Make sure the archive is able to be extracted directly into Mods/ , ie add the folder not the contents.

    Please help us make modding KAG a more enjoyable experience!

    Cheers,
    Max/Geti
     
    SkiPzZ_, Aphelion, norill and 5 others like this.
  2. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    @Chrispin @Verrazano @Eanmig @Arcrave @jackitch

    Feel free to nag more people in, the more comprehensive this thread is the better. Take this as your one chance to nag MM more or less 'directly'.
     
    Klokinator likes this.
  3. Mazey

    Mazey Haxor Global Moderator Forum Moderator Staff Alumni Donator Official Server Admin

    Messages:
    1,914
  4. vik

    vik THD Team THD Team Tester

    Messages:
    51
    Not really a problem with modding but it would be great if we could edit doc.kag2d.com maybe that way we can add examples? As in downloadable examples, actual example mods, that would be great
     
    Klokinator likes this.
  5. Diprog

    Diprog Bison Rider Tester
    1. FUN Servers

    Messages:
    149
    Modding has big problem for me. You can't edit tiles or add your own. It's bad cause blob blocks look shitty, for example bad shadow system (accurate lighting), coins go through this blob block and corpses too. If you'll add ability to add tiles it'll be awesome. Or fix those problems which I said above
     
    PUNK123, FunATuns, Sinleet and 4 others like this.
  6. Chaosed0

    Chaosed0 Catapult Fodder

    Messages:
    15
    Description: Upon loading a mod, the following error occurs:
    Code:
    [17:35:37] Script filename conflict! ../Mods/TestPrint/TestPrint.as (requested TestPrint.as) (loading new script)
    Then, the code in the script is not executed on the client.

    If I were to guess, it seems like this only happens if you have original scripts in the mod; that is, scripts that don't overwrite ones in Base. When that occurs, it tries to look in Base for the scripts, but of course, they don't exist. This is probably related to the issue that occurs when you try to load a map outside of the Base folder.

    Steps to Reproduce: To be honest, I'm not sure what exactly triggers the error, but try this: create a server with this mod (also linked below as TestPrint). Create an empty file named "test.test", and add it to the mapcycle list. Run the server , and join with a client. The first time it should work flawlessly; it conjures up a flat bedrock map, and prints out a line saying "THIS IS A PRINT STATEMENT" on the client, but not on the server. Then, exit KAG, re-launch it and re-join the server. The above error shows up, and the code is not run on the client. This is evinced by two things: the print statement doesn't print, and the world spritesheet and backgrounds aren't loaded, making the playing area completely invisible.

    Example of Affected Mod: TestPrint (hosted on my web server)
    For a larger example (almost never a good thing, but just in case), this is the mod I'm creating.

    EDIT: For further reference, here's the thread I created about the problem.
     
    Last edited: Dec 29, 2013
    Aphelion likes this.
  7. Chrispin

    Chrispin KAG Guard Tester

    Messages:
    380
    I have a bunch of issues to share, so this will be the first of many unless someone else covers my issues. Now I'm not sure if this first issue is necessarily just modding related but here it goes:

    Description:
    The file matcher does a half-ass job of matching the right files to the inputted name. Currently you have to be very careful what you name your mod files because if it contains a phrase from a file that already exists in the "Base" folder you will find that:
    1.) either your new mod file won't load at all in-game or
    2.) the similarly-named file that was in "Base" will pretty much be replaced by your new mod file
    Steps to Reproduce: Simply create a file (.ogg/.png/.as/.whatever) and name it similarly to a file that already exists in the "Base" folder, and watch as the file matcher completely fails. There are multiple ways to fool the file matcher but one way (as you'll see in my example mod) is to name your new mod file with the name of an existing file in "Base" at the beginning of the name. So for example, knights play a sound called "SwordSlash.ogg". In the example mod, I made a file called "SwordSlashMostAnnoyingSound.ogg". Both names are clearly different yet instead of hearing jab and slash sound affects you hear Jim Carrey screaming if the mod is active.
    Example of Affected Mod: Attached. Simply extract into the "Mods" folder. It's just one seemingly harmless sound but you'll hear it played a lot. Play as a knight and attack with the sword.
     

    Attached Files:

    Arcrave and ZeroZ30o like this.
  8. ZeroZ30o

    ZeroZ30o Haxor

    Messages:
    119
    Description: This is actually a server issue. I've searched everywhere, and it's really weird. Anyway, posting here because I felt this was pretty strange:
    Whenever I host a server (all 5 ports open, both router and firewall -it's worth mentioning I can open ports successfully on other games, like 11100 in Risk of Rain-) it separates in two possible outcomes, depending on if there are any different files from vanilla kag.
    If I do not have mods, the server works perfectly. Anybody can connect without any issues.
    However, adding a mod will cause a very strange behavior, which is that it will let the player who attempted to connect download the mods hosted in the server, load everything, and then deconnect. It seemed that, when failing to connect without downloading mods, the name of the person does not appear in console. Otherwise, it appears as if he successfully connected, needless to say, wrongfully.

    Steps to Reproduce: This is where it gets tricky. Apparently no one else has this issue, so just... join #kag.modding, if I'm on tell me about this (I'm on alot), and just... ask anything you need.
    Pretty annoying, I know, but it's a very "unique" issue, I guess. Can't reproduce this.
    Edit: router is Livebox from Orange, if that helps.

    Example of Affected Mod: N/A.

    Again, I posted here because it seemed like a pretty major issue, half-related to mods. And I just need help on this.
     
    Last edited: Feb 6, 2014
  9. Mazey

    Mazey Haxor Global Moderator Forum Moderator Staff Alumni Donator Official Server Admin

    Messages:
    1,914
    @Chaosed0 This means you didn't activate the mod in mods.cfg.


    e: looks like something else, sorry, I had the bug when not activating a mod.
     
    Last edited: Dec 29, 2013
  10. Verrazano

    Verrazano Flat Chested Haggy Old Souless Witchy Witch Witch THD Team Global Moderator Forum Moderator Tester
    1. Practitioners of War Extreme Revolution - POWER

    Messages:
    477
    Description: When adding a script to a blob from inside of #define SERVER_ONLY the script does not work on the client side. I.E. creating blobs from the game rules and giving the special scripts. However if(getNet().isServer()){ /*add script to blob*/ } still works. (tested on both localhost and dedicated server, doesn't effect localhost since it also runs the #define SERVER_ONLY scripts.
    Steps to Reproduce:
    1) download the mod and unzip folders in to Mods folder
    2) enable RulesLoader and AddScriptMod
    3) in autoconfig.cfg set sv_gamemode to AddScriptMod
    4) run dedicated server
    5) connect with a client
    6) check console for: Could not find script /.as when a crate spawns.
    --
    The crate should have an extra button when pressing e that when clicked makes the crate say "dix!!!1!"
    Example of Affected Mod:
    https://dl.dropboxusercontent.com/u/6826017/AddScriptMod.zip
    --- Double Post Merged, Dec 29, 2013, Original Post Date: Dec 29, 2013 ---
    That's not the issue Mazey, I was trying to help him figure out what was going on. It's a much more bizzare issue than simply not activating the mod.
     
    Chrispin likes this.
  11. Chaosed0

    Chaosed0 Catapult Fodder

    Messages:
    15
    No problem, but thanks for trying to help. I'm really not sure what's up - not sure if it's something completely specific to my mod, or specific to adding MapLoaders, or something else completely.
     
    Last edited: Dec 29, 2013
  12. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    Chrispin likes this.
  13. you guys need to update EULA because current version forbids modding at all, lol
    you also need to decide whether or not you allow commercial mods
     
    Froghead48 and Chrispin like this.
  14. Chrispin

    Chrispin KAG Guard Tester

    Messages:
    380
    Description: The functions someMap.getMapName() and getMapInParenthesis() return empty strings in many cases, making them useless functions in most cases. In one of the KAG scripts I remember reading that someMap.getMapName() will only return the blank string ( "" ) on client. I'm honestly not too sure what the implications are except that I can't use that function in any of my scripts, except when I can mysteriously print the map names under certain hooks like "void LoadMap()".

    These functions would be very useful in "BasePNGLoader.as" where we could load unique parallax backgrounds and tile textures for each map based on their map names. The alternative would be to run scripts in "mapcycle.cfg", but there are a couple of problems with this. Firstly, the scripts will only run when the game loads the next map based on the map cycle. This means you can't just type "/rcon /loadmap MyShittyMap.png" in console and expect the script specified in "mapcycle.cfg" to run. Secondly, I've only been able to reload the parallax backgrounds using the attached scripts. I've run into issues when trying to replace the tile textures using "someMap.CreateTileMap()" because it can't be called twice during the same match I think.

    Steps to Reproduce: Just try to print the output of getMapName() or getMapInParenthesis() in a script and the game will most likely print nothing.

    Example of Affected Mod: Attached in post. Extract it right into your "Mods" folder. When you get in-game type anything in the chat box and you should see "The name of the current map is: *insert map name here* " in red letters. The problem is that there won't be a map name inserted there even though I called the function "getMap().getMapName()".
     

    Attached Files:

    ZeroZ30o likes this.
  15. MM

    MM THD Team THD Team Administrator Global Moderator

    Messages:
    327
    Maybe the mods have some errors? Are they printed in the console?
     
    icemusher likes this.
  16. MM

    MM THD Team THD Team Administrator Global Moderator

    Messages:
    327
    Those functions only return something in the map loading scripts on server. I will see if I can get them working on client.
     
    icemusher likes this.
  17. Verrazano

    Verrazano Flat Chested Haggy Old Souless Witchy Witch Witch THD Team Global Moderator Forum Moderator Tester
    1. Practitioners of War Extreme Revolution - POWER

    Messages:
    477
    There are no errors in his scripts and they run on my server fine.
     
  18. ZeroZ30o

    ZeroZ30o Haxor

    Messages:
    119
    This. I'm the only one who can join the server via 127.0.0.1.
    Edit: when it has mods, if it doesn't anyone can join.
     
    Last edited: Feb 6, 2014
  19. Aphelion

    Aphelion Wunderkind Donator
    1. Aphelion's Roleplay

    Messages:
    180
    After rejoining a server after some abrupt disconnection you may get:

    Code:
    Script: Failed to call function 'Execute' (Code: -4)
    Script: Error -4; State -7;
    on any scripts that have been modified by the mod. Which may cause game breaking issues.
    I doubt this could be an issue with my scripts, as I have had this problem with all my mods.
     
    Last edited: Jan 13, 2014
  20. MM

    MM THD Team THD Team Administrator Global Moderator

    Messages:
    327
    Thanks for this. I think a crash also follows this.
     
    Aphelion and Klokinator like this.
Mods: Downburst, Mazey