1. 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

Classes/Items Custom class

Discussion in 'Modding [KAG]' started by KodzghlyCZ, Aug 26, 2015.

  1. KodzghlyCZ

    KodzghlyCZ Catapult Fodder

    Messages:
    21
    I was on "More class server" and there was class called "Ninja" - Knight with grapling hook. Does anyone know, how to make custom class and add it to server?
     
  2. bunnie

    bunnie Haxor Tester

    Messages:
    1,319
    can't you just google "c++ tutorial"?
    http://www.cplusplus.com/doc/tutorial/
     
  3. KodzghlyCZ

    KodzghlyCZ Catapult Fodder

    Messages:
    21
    Why I must learn c++? In KAG classis this was more easy.
     
  4. bunnie

    bunnie Haxor Tester

    Messages:
    1,319
    But now it is not that easy. You need to learn angelscript, and angelscript is really similiar to c++.
    You can also go on the irc channel kag.modding and ask for help.
     
  5. KodzghlyCZ

    KodzghlyCZ Catapult Fodder

    Messages:
    21
    If I know c#, can I use it?
     
  6. bunnie

    bunnie Haxor Tester

    Messages:
    1,319
    It's similiar to angelscript too, so yes. It's a blend between c++ and java.
     
  7. 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
    KodzghlyCZ likes this.
  8. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    If you know C#, you have the same basics as Angelscript shares with C++. Those are obviously not the same beast but shares the same roots (as in, C).

    Adding more classes in KAG is a bit harder than you would except it to, but if you're watching and understanding respawning, tents and classes code it will be way easier. As Verra said the easiest for you would be to get in contact with people that had experience with this.
     
    KodzghlyCZ likes this.
  9. Geti

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

    Messages:
    3,730
    Its nice that people link general c++ coding tutorials, but it should be pointed out that KAG uses AngelScript, not C++, not C#, etc. AngelScript is its own language, has less memory management for you to do than C++. You write mods in AS and they're downloaded to the client where appropriate and run there - things were easier in classic because you couldn't do that. Config files still exist, and you can still mix and match functionality like you could in the apparently "good old days" - but you can now write the functionality yourself as well.

    Sidenote: You can directly use "real" C++ if you use AsuMagics's serverside framework for it but those mods are not downloaded to the client.

    In terms of just using other people's mods (permissions allowing) you just add them to your server (copy to mods/ and add to the mod config) and connecting clients will download them.
     
    Asu and KodzghlyCZ like this.
  10. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    KTMC is not really a C++ framework though, but I'll probably opensource it. It also uses Angelscript to make mods.
     
    KodzghlyCZ likes this.
  11. KodzghlyCZ

    KodzghlyCZ Catapult Fodder

    Messages:
    21
    Thanx guys so much. This really helped me. :spam::kappa: