Coding Help.

  • Wazabi-Bros
    26th Mar 2012 Member 0 Permalink
    AND YES I DO THINK THIS IS MEN'T TO BE IN THE MODS SUB FORUMS

    Hi I'm working on my first Mod ever and unfortunately I'm struggling.
    Can I please get an experienced player to help me :)

    In the coding wiki I'm up to here:

    Before we go on with the actual code, we need to finish up a few things first so that the code actually knows there is a new update_HETR function. Go back to powder.h at line ~ 250. You will see lots of int update_'(UPDATE_FUNC_ARGS); . This list is sorted alphabetically so lets put in our new HETR function.

    Now I'm using NotePad++ and the int part start at ~ 343. I've followed the wiki carefully and it says to look there to see your element. Problem is, its not there. 
    I've followed this step as well:

    Now we need to make a hetr.c file for our new heater element, if using visual studio, you should be able to right click on the source folder inside the project, and create a new file, and name it hetr.c Once you have a blank hetr.c created and it is included in the project, we need to add a few things to this file.

    Can i get some help on getting my element there?
    Here's what I've done so far.

    In powder.h
    #define PT_RANB 161
    #define PT_NUM  162

    In elementdata.c
        {"RANB",    PIXPACK(0x2289BD), 5.0f, 0.01f * CFDS, 0.99f, 0.10f, -0.2f, -3.1f, 5.80f, 0.001f * CFDS, 0, 1000, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Rainbow Dash Gas. HIGHLY Flammable.", ST_GAS, TYPE_GAS, NULL, NULL},

    In ranb.c (File I had to create)
    #include <element.h>

    int update_RANB(UPDATE_FUNC_ARGS) {

    return 0;
    }
  • jacksonmj
    26th Mar 2012 Developer 0 Permalink
    Before we go on with the actual code, we need to finish up a few things first so that the code actually knows there is a new update_HETR function. Go back to powder.h at line ~ 250. You will see lots of int update_'(UPDATE_FUNC_ARGS); . This list is sorted alphabetically so lets put in our new HETR function.

    Add this to the list in powder.h:
    int update_RANB(UPDATE_FUNC_ARGS);
  • Wazabi-Bros
    26th Mar 2012 Member 0 Permalink
    @jacksonmj (View Post)
    Ok I will :) So now do I just continue?
  • vanquish349
    26th Mar 2012 Member 0 Permalink
  • Wazabi-Bros
    26th Mar 2012 Member 0 Permalink
    [EDIT: Got it worked out]
    [DELETED]